Browse Source

添加 title查询org

dev_shibei_match
zxc 4 years ago
parent
commit
bd3414af43
  1. 20
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java
  2. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java
  3. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java
  4. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java
  5. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java
  6. 21
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml

20
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/EventTitleOrgResultDTO.java

@ -0,0 +1,20 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/5 5:23 下午
* @DESC
*/
@Data
public class EventTitleOrgResultDTO implements Serializable {
private static final long serialVersionUID = -517506506008916648L;
private String agencyId;
private String gridId;
private String gridName;
}

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java

@ -17,7 +17,9 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
@ -29,6 +31,7 @@ import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.excel.CustomerStaffGridExcel;
import com.epmet.service.CustomerStaffGridService;
@ -131,4 +134,15 @@ public class CustomerStaffGridController {
public Result<List<GridStaffResultDTO>> selectGridStaffByGridIds(@RequestBody List<String> gridIds){
return new Result<List<GridStaffResultDTO>>().ok(customerStaffGridService.selectGridStaffByGridIds(gridIds));
}
/**
* @Description 查询ORG
* @Param userId
* @author zxc
* @date 2021/8/5 5:36 下午
*/
@PostMapping("eventorg")
public Result<List<EventTitleOrgResultDTO>> eventOrg(@LoginUser TokenDto tokenDto){
return new Result<List<EventTitleOrgResultDTO>>().ok(customerStaffGridService.eventOrg(tokenDto.getUserId()));
}
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java

@ -22,6 +22,7 @@ import com.epmet.dto.CustomerGridDTO;
import com.epmet.dto.CustomerStaffDepartmentDTO;
import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import org.apache.ibatis.annotations.Mapper;
@ -106,4 +107,12 @@ public interface CustomerStaffGridDao extends BaseDao<CustomerStaffGridEntity> {
* @date 2021/6/8 3:36 下午
*/
List<GridStaffResultDTO> selectGridStaffByGridIds(@Param("gridIds") List<String> gridIds);
/**
* @Description 查询ORG
* @Param userId
* @author zxc
* @date 2021/8/5 5:36 下午
*/
List<EventTitleOrgResultDTO> eventOrg(@Param("userId") String userId);
}

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java

@ -26,6 +26,7 @@ import com.epmet.dto.form.CustomerGridFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CommonStaffInfoResultDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
@ -126,4 +127,12 @@ public interface CustomerStaffGridService extends BaseService<CustomerStaffGridE
* @date 2021/6/8 3:36 下午
*/
List<GridStaffResultDTO> selectGridStaffByGridIds(List<String> gridIds);
/**
* @Description 查询ORG
* @Param userId
* @author zxc
* @date 2021/8/5 5:36 下午
*/
List<EventTitleOrgResultDTO> eventOrg(String userId);
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java

@ -31,6 +31,7 @@ import com.epmet.dto.CustomerStaffGridDTO;
import com.epmet.dto.form.CommonGridIdFormDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.EventTitleOrgResultDTO;
import com.epmet.dto.result.GridStaffResultDTO;
import com.epmet.entity.CustomerStaffGridEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
@ -181,4 +182,15 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl<CustomerStaffG
}
return data;
}
/**
* @Description 查询ORG
* @Param userId
* @author zxc
* @date 2021/8/5 5:36 下午
*/
@Override
public List<EventTitleOrgResultDTO> eventOrg(String userId) {
return baseDao.eventOrg(userId);
}
}

21
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml

@ -102,6 +102,27 @@
)
</select>
<!-- 查询ORG -->
<select id="eventOrg" resultType="com.epmet.dto.result.EventTitleOrgResultDTO">
SELECT
sa.AGENCY_ID AS agencyId,
sa.AGENCY_ID AS gridId,
ca.ORGANIZATION_NAME AS gridNamme
FROM customer_staff_agency sa
LEFT JOIN customer_agency ca ON (ca.ID = sa.AGENCY_ID AND ca.DEL_FLAG = 0)
WHERE sa.DEL_FLAG = 0
AND sa.USER_ID = #{userId}
UNION ALL
SELECT
sg.GRID_ID AS gridId,
cg.PID AS agencyId,
cg.GRID_NAME AS gridName
FROM customer_staff_grid sg
LEFT JOIN customer_grid cg ON (cg.ID = sg.GRID_ID AND cg.DEL_FLAG = 0)
WHERE sg.DEL_FLAG = 0
AND sg.USER_ID = #{userId}
</select>
<!-- 批量插入网格工作人员 -->
<insert id="insertBatch" parameterType="java.util.List">
insert into customer_staff_grid

Loading…
Cancel
Save