Browse Source

Merge remote-tracking branch 'origin/dev_temp' into dev_temp

master
wangchao 5 years ago
parent
commit
f176efd6cc
  1. 2
      epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml
  2. 2
      epmet-module/epmet-heart/epmet-heart-server/pom.xml
  3. 2
      epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml
  4. 2
      epmet-module/gov-org/gov-org-server/pom.xml
  5. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java
  6. 17
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffServiceImpl.java
  7. 2
      epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml
  8. 2
      epmet-module/gov-project/gov-project-server/pom.xml
  9. 15
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  10. 10
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
  11. 2
      epmet-user/epmet-user-server/deploy/docker-compose-dev.yml
  12. 2
      epmet-user/epmet-user-server/pom.xml
  13. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java
  14. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java
  15. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java
  16. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java
  17. 5
      epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml

2
epmet-module/epmet-heart/epmet-heart-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-heart-server: epmet-heart-server:
container_name: epmet-heart-server-dev 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: ports:
- "8111:8111" - "8111:8111"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/epmet-heart/epmet-heart-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>0.0.53</version> <version>0.0.54</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-heart</artifactId> <artifactId>epmet-heart</artifactId>

2
epmet-module/gov-org/gov-org-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services: services:
gov-org-server: gov-org-server:
container_name: gov-org-server-dev 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: ports:
- "8092:8092" - "8092:8092"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/gov-org/gov-org-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>0.3.92</version> <version>0.3.94</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>gov-org</artifactId> <artifactId>gov-org</artifactId>

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffController.java

@ -143,11 +143,12 @@ public class StaffController {
* @author zhaoqifeng * @author zhaoqifeng
* @date 2020/8/27 16:12 * @date 2020/8/27 16:12
* @param tokenDto * @param tokenDto
* @param fromDTO * @param formDTO
* @return com.epmet.commons.tools.utils.Result * @return com.epmet.commons.tools.utils.Result
*/ */
@PostMapping("stafftransfer") @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(); return new Result();
} }
} }

17
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.dto.result.*;
import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.CustomerAgencyEntity;
import com.epmet.entity.CustomerStaffAgencyEntity; import com.epmet.entity.CustomerStaffAgencyEntity;
import com.epmet.feign.EpmetHeartOpenFeignClient; import com.epmet.feign.*;
import com.epmet.feign.EpmetUserFeignClient;
import com.epmet.feign.GovProjectOpenFeignClient;
import com.epmet.feign.OperCrmFeignClient;
import com.epmet.service.*; import com.epmet.service.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -48,6 +45,8 @@ public class StaffServiceImpl implements StaffService {
private CustomerGridService customerGridService; private CustomerGridService customerGridService;
@Autowired @Autowired
private StaffTransferRecordService staffTransferRecordService; private StaffTransferRecordService staffTransferRecordService;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override @Override
public Result<StaffsInAgencyResultDTO> getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { public Result<StaffsInAgencyResultDTO> getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) {
@ -235,7 +234,15 @@ public class StaffServiceImpl implements StaffService {
//5.逻辑删除工作人员原组织加入的部门、网格,部门、网格总人数减1 //5.逻辑删除工作人员原组织加入的部门、网格,部门、网格总人数减1
customerDepartmentService.updateDepartment(fromDTO.getStaffId()); customerDepartmentService.updateDepartment(fromDTO.getStaffId());
customerGridService.updateGrid(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 staffTransferRecordDTO = new StaffTransferRecordDTO();
staffTransferRecordDTO.setCustomerId(tokenDto.getCustomerId()); staffTransferRecordDTO.setCustomerId(tokenDto.getCustomerId());
staffTransferRecordDTO.setOperateStaffId(tokenDto.getUserId()); staffTransferRecordDTO.setOperateStaffId(tokenDto.getUserId());

2
epmet-module/gov-project/gov-project-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services: services:
gov-project-server: gov-project-server:
container_name: gov-project-server-dev 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: ports:
- "8102:8102" - "8102:8102"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/gov-project/gov-project-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.47</version> <version>0.3.48</version>
<parent> <parent>
<artifactId>gov-project</artifactId> <artifactId>gov-project</artifactId>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>

15
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.constant.ServiceConstant;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.*;
import com.epmet.dto.GovStaffRoleDTO;
import com.epmet.dto.UserBaseInfoDTO;
import com.epmet.dto.UserDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallback; import com.epmet.feign.fallback.EpmetUserOpenFeignClientFallback;
@ -299,4 +296,14 @@ public interface EpmetUserOpenFeignClient {
**/ **/
@PostMapping("/epmetuser/userbaseinfo/extuserinfo") @PostMapping("/epmetuser/userbaseinfo/extuserinfo")
Result<ExtUserInfoResultDTO> extUserInfo( @RequestBody CommonUserIdFormDTO param); Result<ExtUserInfoResultDTO> 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);
} }

10
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.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.*;
import com.epmet.dto.GovStaffRoleDTO;
import com.epmet.dto.UserBaseInfoDTO;
import com.epmet.dto.UserDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient;
@ -203,4 +200,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien
public Result<ExtUserInfoResultDTO> extUserInfo(CommonUserIdFormDTO param) { public Result<ExtUserInfoResultDTO> extUserInfo(CommonUserIdFormDTO param) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "extUserInfo", 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);
}
} }

2
epmet-user/epmet-user-server/deploy/docker-compose-dev.yml

@ -2,7 +2,7 @@ version: "3.7"
services: services:
epmet-user-server: epmet-user-server:
container_name: epmet-user-server-dev 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: ports:
- "8087:8087" - "8087:8087"
network_mode: host # 不会创建新的网络 network_mode: host # 不会创建新的网络

2
epmet-user/epmet-user-server/pom.xml

@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>0.3.128</version> <version>0.3.129</version>
<parent> <parent>
<groupId>com.epmet</groupId> <groupId>com.epmet</groupId>
<artifactId>epmet-user</artifactId> <artifactId>epmet-user</artifactId>

14
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.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.GovStaffRoleDTO; import com.epmet.dto.GovStaffRoleDTO;
import com.epmet.dto.StaffRoleDTO;
import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.form.CommonUserFormDTO;
import com.epmet.dto.form.CustomerRoleFormDTO; import com.epmet.dto.form.CustomerRoleFormDTO;
import com.epmet.dto.form.RolesUsersListFormDTO; import com.epmet.dto.form.RolesUsersListFormDTO;
@ -167,4 +168,17 @@ public class StaffRoleController {
public Result<List<CustomerStaffRoleResultDTO>> getStaffRoles(@PathVariable String staffId) { public Result<List<CustomerStaffRoleResultDTO>> getStaffRoles(@PathVariable String staffId) {
return new Result<List<CustomerStaffRoleResultDTO>>().ok(staffRoleService.getStaffRoles(staffId)); return new Result<List<CustomerStaffRoleResultDTO>>().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();
}
} }

9
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java

@ -112,4 +112,13 @@ public interface StaffRoleDao extends BaseDao<StaffRoleEntity> {
* @Date 10:45 2020-08-25 * @Date 10:45 2020-08-25
**/ **/
StaffRoleDTO selectStaffRoleByStaffIdAndRoleId(@Param("staffId") String staffId, @Param("roleId") String roleId); 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);
} }

9
epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java

@ -150,4 +150,13 @@ public interface StaffRoleService extends BaseService<StaffRoleEntity> {
List<CustomerStaffRoleResultDTO> getStaffRoles(String staffId); List<CustomerStaffRoleResultDTO> getStaffRoles(String staffId);
List<StaffRoleEntity> getStaffRoleEntytiesByStaffIdAndOrgId(String agencyId, String staffId); List<StaffRoleEntity> getStaffRoleEntytiesByStaffIdAndOrgId(String agencyId, String staffId);
/**
* 更改角色组织
* @author zhaoqifeng
* @date 2020/8/31 10:31
* @param formDTO
* @return void
*/
void changeRoleOrg(StaffRoleDTO formDTO);
} }

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java

@ -182,4 +182,10 @@ public class StaffRoleServiceImpl extends BaseServiceImpl<StaffRoleDao, StaffRol
return baseDao.listStaffRoleEntytiesByStaffIdAndOrgId(agencyId, staffId); return baseDao.listStaffRoleEntytiesByStaffIdAndOrgId(agencyId, staffId);
} }
@Override
@Transactional(rollbackFor = Exception.class)
public void changeRoleOrg(StaffRoleDTO formDTO) {
baseDao.updateStaffRoleOrgId(formDTO);
}
} }

5
epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml

@ -23,6 +23,11 @@
and sr.ORG_ID = #{orgId} and sr.ORG_ID = #{orgId}
and sr.DEL_FLAG = '0' and sr.DEL_FLAG = '0'
</update> </update>
<update id="updateStaffRoleOrgId" parameterType="com.epmet.dto.StaffRoleDTO">
UPDATE staff_role SET ORG_ID = #{orgId}
WHERE STAFF_ID = #{staffId}
AND DEL_FLAG = '0'
</update>
<!--查询具有某角色的staff列表--> <!--查询具有某角色的staff列表-->

Loading…
Cancel
Save