Browse Source

程序补缺

master
sunyuchao 4 years ago
parent
commit
7c3e4c60be
  1. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml
  2. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml
  3. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
  4. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

8
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml

@ -68,10 +68,10 @@
sr.staff_id,
case when gsr.role_key =
<choose>
<when test="orgType != null orgType == 'agency' ">
<when test="orgType != null and orgType == 'agency' ">
'agency_leader'
</when>
<when test="orgType != null orgType == 'dept' ">
<when test="orgType != null and orgType == 'dept' ">
'dept_leader'
</when>
<otherwise>
@ -92,10 +92,10 @@
ORDER BY
gsr.role_key <![CDATA[<>]]>
<choose>
<when test="orgType != null orgType == 'agency' ">
<when test="orgType != null and orgType == 'agency' ">
'agency_leader'
</when>
<when test="orgType != null orgType == 'dept' ">
<when test="orgType != null and orgType == 'dept' ">
'dept_leader'
</when>
<otherwise>

4
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml

@ -53,7 +53,7 @@
<select id="selectStaffList" resultType="java.lang.String">
<choose>
<when test="orgType != null orgType == 'dept' ">
<when test="orgType != null and orgType == 'dept' ">
SELECT
user_id
FROM
@ -64,7 +64,7 @@
ORDER BY
created_time ASC
</when>
<when test="orgType != null orgType == 'grid' ">
<when test="orgType != null and orgType == 'grid' ">
SELECT
user_id
FROM

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java

@ -331,6 +331,7 @@ public class StaffServiceImpl implements StaffService {
//2.调用user服务,新增用户信息
StaffSubmitFromDTO submitDTO = ConvertUtils.sourceToTarget(fromDTO, StaffSubmitFromDTO.class);
submitDTO.setAgencyId(fromDTO.getOrgId());
Result<CustomerStaffDTO> result = epmetUserFeignClient.addStaff(submitDTO);
if (!result.success()) {
if (result.getCode() != EpmetErrorCode.SERVER_ERROR.getCode()) {
@ -380,7 +381,7 @@ public class StaffServiceImpl implements StaffService {
StaffOrgRelationEntity staffOrgRelationEntity = new StaffOrgRelationEntity();
staffOrgRelationEntity.setCustomerId(fromDTO.getCustomerId());
if("agency".equals(fromDTO.getOrgType())){
staffOrgRelationEntity.setPids(("".equals(orgDTO.getPids()) ? "" : orgDTO.getPids() + ":"));
staffOrgRelationEntity.setPids(("".equals(orgDTO.getPids()) ? "" : orgDTO.getPids()));
}else {
staffOrgRelationEntity.setPids(("".equals(orgDTO.getPids()) ? "" : orgDTO.getPids() + ":") + orgDTO.getAgencyId());
}

4
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -444,7 +444,7 @@
<select id="selectAgencyDetail" resultType="com.epmet.dto.result.OrgResultDTO">
<choose>
<when test="orgType != null orgType == 'dept' ">
<when test="orgType != null and orgType == 'dept' ">
SELECT
ca.customer_id,
ca.id AS "agencyId",
@ -464,7 +464,7 @@
AND ca.del_flag = '0'
AND cd.id = #{orgId}
</when>
<when test="orgType != null orgType == 'grid' ">
<when test="orgType != null and orgType == 'grid' ">
SELECT
ca.customer_id,
ca.id AS "agencyId",

Loading…
Cancel
Save