Browse Source

Merge branch 'dev_staff_info' into develop

master
sunyuchao 4 years ago
parent
commit
f2f28dc5b6
  1. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  2. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  3. 88
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -647,6 +647,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
List<String> list = staffRoleDao.selectByStaffId(staffId);
//汇总数据
result = ConvertUtils.sourceToTarget(dto, StaffDetailV2FormDTO.class);
result.setStaffId(dto.getUserId());
result.setName(dto.getRealName());
result.setGender(dto.getGender().toString());
result.setRoles(list);

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -302,4 +302,14 @@ public class CustomerAgencyController {
public Result<String> getAreaCodeSwitch(@PathVariable("customerId")String customerId){
return new Result<String>().ok(customerOrgParameterService.getAreaCodeSwitch(customerId));
}
/**
* @Description 通讯录查询当前人员所属组织组织下部门/网格树
* @author sun
**/
@PostMapping("orgtree")
Result<ExtStaffPermissionResultDTO> orgTree(@LoginUser TokenDto tokenDto){
return new Result<ExtStaffPermissionResultDTO>().ok(customerAgencyService.staffPermissionExt(tokenDto.getUserId()));
}
}

88
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml

@ -41,58 +41,62 @@
<!-- 查询当前网格所属机构下的不在此网格的工作人员Id -->
<select id="getSelectableStaffsForGrid" parameterType="string" resultType="string">
SELECT
agency.USER_ID
FROM
CUSTOMER_STAFF_AGENCY agency
WHERE
agency.DEL_FLAG = '0'
AND agency.AGENCY_ID = (
SELECT
PID
agency.user_id
FROM
CUSTOMER_GRID
customer_staff_agency agency
INNER JOIN staff_org_relation sor ON agency.user_id = sor.staff_id AND sor.org_type = 'agency'
WHERE
DEL_FLAG = '0'
AND ID = #{gridId})
AND agency.USER_ID NOT IN (
SELECT
USER_ID
FROM
CUSTOMER_STAFF_GRID
WHERE
DEL_FLAG = '0'
AND
GRID_ID = #{gridId} )
agency.del_flag = '0'
AND agency.agency_id = (
SELECT
pid
FROM
customer_grid
WHERE
del_flag = '0'
AND id = #{gridId}
)
AND agency.user_id NOT IN (
SELECT
user_id
FROM
customer_staff_grid
WHERE
del_flag = '0'
AND
grid_id = #{gridId}
)
</select>
<!-- 查询当前部门所属机构下的不在此部门的工作人员Id -->
<select id="getSelectableStaffsForDept" parameterType="string" resultType="string">
SELECT
agency.USER_ID
agency.user_id
FROM
CUSTOMER_STAFF_AGENCY agency
customer_staff_agency agency
INNER JOIN staff_org_relation sor ON agency.user_id = sor.staff_id AND sor.org_type = 'agency'
WHERE
agency.DEL_FLAG = '0'
AND agency.AGENCY_ID = (
SELECT
AGENCY_ID
FROM
CUSTOMER_DEPARTMENT
WHERE
DEL_FLAG = '0'
AND ID = #{departmentId})
AND agency.USER_ID NOT IN (
SELECT
USER_ID
FROM
CUSTOMER_STAFF_DEPARTMENT
WHERE
DEL_FLAG = '0'
AND
DEPARTMENT_ID = #{departmentId} )
agency.del_flag = '0'
AND agency.agency_id = (
SELECT
agency_id
FROM
customer_department
WHERE
del_flag = '0'
AND id = #{departmentId}
)
AND agency.user_id NOT IN (
SELECT
user_id
FROM
customer_staff_department
WHERE
del_flag = '0'
AND
department_id = #{departmentId}
)
</select>
<select id="selectAgencyStaffList" resultType="com.epmet.dto.result.StaffListResultDTO">

Loading…
Cancel
Save