diff --git a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml index 93c0d6a466..c2188564d1 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-heart-server: container_name: epmet-heart-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.53 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-heart-server:0.0.54 ports: - "8111:8111" network_mode: host # 使用现有网络 diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml index 5b963aa293..e4c46c066d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.0.53 + 0.0.54 com.epmet epmet-heart diff --git a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml index c7447c6ca7..365abb2fb6 100644 --- a/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-org-server: container_name: gov-org-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.92 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-org-server:0.3.94 ports: - "8092:8092" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 22bdde41b0..162ab46f9b 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.92 + 0.3.94 com.epmet gov-org diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java index 8eea5b3461..c3187e3e8e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java @@ -143,11 +143,12 @@ public class StaffController { * @author zhaoqifeng * @date 2020/8/27 16:12 * @param tokenDto - * @param fromDTO + * @param formDTO * @return com.epmet.commons.tools.utils.Result */ @PostMapping("stafftransfer") - public Result staffTransfer(@LoginUser TokenDto tokenDto, @RequestBody StaffTransferFormDTO fromDTO){ + public Result staffTransfer(@LoginUser TokenDto tokenDto, @RequestBody StaffTransferFormDTO formDTO){ + staffService.staffTransfer(tokenDto, formDTO); return new Result(); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java index cae5e05475..9cae28ab76 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java @@ -10,10 +10,7 @@ import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.CustomerStaffAgencyEntity; -import com.epmet.feign.EpmetHeartOpenFeignClient; -import com.epmet.feign.EpmetUserFeignClient; -import com.epmet.feign.GovProjectOpenFeignClient; -import com.epmet.feign.OperCrmFeignClient; +import com.epmet.feign.*; import com.epmet.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -48,6 +45,8 @@ public class StaffServiceImpl implements StaffService { private CustomerGridService customerGridService; @Autowired private StaffTransferRecordService staffTransferRecordService; + @Autowired + private EpmetUserOpenFeignClient epmetUserOpenFeignClient; @Override public Result getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { @@ -235,7 +234,15 @@ public class StaffServiceImpl implements StaffService { //5.逻辑删除工作人员原组织加入的部门、网格,部门、网格总人数减1 customerDepartmentService.updateDepartment(fromDTO.getStaffId()); customerGridService.updateGrid(fromDTO.getStaffId()); - //6.操作记录表新增调动记录 + //6.更改工作人员组织角色 + StaffRoleDTO staffRoleDTO = new StaffRoleDTO(); + staffRoleDTO.setOrgId(fromDTO.getAgencyId()); + staffRoleDTO.setStaffId(fromDTO.getStaffId()); + Result result = epmetUserOpenFeignClient.changeRoleOrg(staffRoleDTO); + if (!result.success()) { + throw new RenException(result.getCode(), result.getMsg()); + } + //7.操作记录表新增调动记录 StaffTransferRecordDTO staffTransferRecordDTO = new StaffTransferRecordDTO(); staffTransferRecordDTO.setCustomerId(tokenDto.getCustomerId()); staffTransferRecordDTO.setOperateStaffId(tokenDto.getUserId()); diff --git a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml index 9e65fc267b..cb86efe9ce 100644 --- a/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml +++ b/epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: gov-project-server: container_name: gov-project-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.47 + image: 192.168.1.130:10080/epmet-cloud-dev/gov-project-server:0.3.48 ports: - "8102:8102" network_mode: host # 使用现有网络 diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index ea7d864925..d32305e713 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -2,7 +2,7 @@ - 0.3.47 + 0.3.48 gov-project com.epmet diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index 21a70de787..4e3da40627 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -4,10 +4,7 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.GovStaffRoleDTO; -import com.epmet.dto.UserBaseInfoDTO; -import com.epmet.dto.UserDTO; +import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallback; @@ -299,4 +296,14 @@ public interface EpmetUserOpenFeignClient { **/ @PostMapping("/epmetuser/userbaseinfo/extuserinfo") Result extUserInfo( @RequestBody CommonUserIdFormDTO param); + + /** + * 更改角色所属组织 + * @author zhaoqifeng + * @date 2020/8/31 10:36 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("epmetuser/staffrole/changeroleorg") + Result changeRoleOrg(@RequestBody StaffRoleDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 8b81b57dd2..a60c9611ae 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -4,10 +4,7 @@ import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.GovStaffRoleDTO; -import com.epmet.dto.UserBaseInfoDTO; -import com.epmet.dto.UserDTO; +import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.feign.EpmetUserOpenFeignClient; @@ -203,4 +200,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result extUserInfo(CommonUserIdFormDTO param) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "extUserInfo", param); } + + @Override + public Result changeRoleOrg(StaffRoleDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "changeRoleOrg", formDTO); + } } diff --git a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml index 5db407af03..225f60469f 100644 --- a/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml +++ b/epmet-user/epmet-user-server/deploy/docker-compose-dev.yml @@ -2,7 +2,7 @@ version: "3.7" services: epmet-user-server: container_name: epmet-user-server-dev - image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.128 + image: 192.168.1.130:10080/epmet-cloud-dev/epmet-user-server:0.3.129 ports: - "8087:8087" network_mode: host # 不会创建新的网络 diff --git a/epmet-user/epmet-user-server/pom.xml b/epmet-user/epmet-user-server/pom.xml index 23f27c7560..113f95ed12 100644 --- a/epmet-user/epmet-user-server/pom.xml +++ b/epmet-user/epmet-user-server/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - 0.3.128 + 0.3.129 com.epmet epmet-user diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java index 2eada17f01..60b4d5400e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java @@ -5,6 +5,7 @@ import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.GovStaffRoleDTO; +import com.epmet.dto.StaffRoleDTO; import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.form.CustomerRoleFormDTO; import com.epmet.dto.form.RolesUsersListFormDTO; @@ -167,4 +168,17 @@ public class StaffRoleController { public Result> getStaffRoles(@PathVariable String staffId) { return new Result>().ok(staffRoleService.getStaffRoles(staffId)); } + + /** + * 更改角色所属组织 + * @author zhaoqifeng + * @date 2020/8/31 10:29 + * @param formDTO + * @return com.epmet.commons.tools.utils.Result + */ + @PostMapping("changeroleorg") + public Result changeRoleOrg(@RequestBody StaffRoleDTO formDTO) { + staffRoleService.changeRoleOrg(formDTO); + return new Result(); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java index 02e7e6abd5..9b082cb841 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java @@ -112,4 +112,13 @@ public interface StaffRoleDao extends BaseDao { * @Date 10:45 2020-08-25 **/ StaffRoleDTO selectStaffRoleByStaffIdAndRoleId(@Param("staffId") String staffId, @Param("roleId") String roleId); + + /** + * 更改角色所属组织 + * @author zhaoqifeng + * @date 2020/8/31 10:33 + * @param dto + * @return void + */ + void updateStaffRoleOrgId(StaffRoleDTO dto); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java index e6c238a53f..5e260dd3c3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java @@ -150,4 +150,13 @@ public interface StaffRoleService extends BaseService { List getStaffRoles(String staffId); List getStaffRoleEntytiesByStaffIdAndOrgId(String agencyId, String staffId); + + /** + * 更改角色组织 + * @author zhaoqifeng + * @date 2020/8/31 10:31 + * @param formDTO + * @return void + */ + void changeRoleOrg(StaffRoleDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java index 231ab010ea..bb85550f3c 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java @@ -182,4 +182,10 @@ public class StaffRoleServiceImpl extends BaseServiceImpl + + UPDATE staff_role SET ORG_ID = #{orgId} + WHERE STAFF_ID = #{staffId} + AND DEL_FLAG = '0' +