|
@ -1,18 +1,19 @@ |
|
|
package com.epmet.service.impl; |
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
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.CustomerAgencyDTO; |
|
|
import com.epmet.dto.CustomerAgencyDTO; |
|
|
import com.epmet.dto.CustomerStaffAgencyDTO; |
|
|
import com.epmet.dto.CustomerStaffAgencyDTO; |
|
|
import com.epmet.dto.CustomerStaffDTO; |
|
|
import com.epmet.dto.CustomerStaffDTO; |
|
|
import com.epmet.dto.form.StaffInfoFromDTO; |
|
|
import com.epmet.dto.form.*; |
|
|
import com.epmet.dto.form.StaffSubmitFromDTO; |
|
|
|
|
|
import com.epmet.dto.form.StaffsInAgencyFromDTO; |
|
|
|
|
|
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.EpmetUserFeignClient; |
|
|
import com.epmet.feign.EpmetUserFeignClient; |
|
|
|
|
|
import com.epmet.feign.GovProjectOpenFeignClient; |
|
|
import com.epmet.feign.OperCrmFeignClient; |
|
|
import com.epmet.feign.OperCrmFeignClient; |
|
|
import com.epmet.service.CustomerAgencyService; |
|
|
import com.epmet.service.CustomerAgencyService; |
|
|
import com.epmet.service.CustomerStaffAgencyService; |
|
|
import com.epmet.service.CustomerStaffAgencyService; |
|
@ -40,6 +41,8 @@ public class StaffServiceImpl implements StaffService { |
|
|
private CustomerAgencyService customerAgencyService; |
|
|
private CustomerAgencyService customerAgencyService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private CustomerStaffAgencyService customerStaffAgencyService; |
|
|
private CustomerStaffAgencyService customerStaffAgencyService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private GovProjectOpenFeignClient govProjectOpenFeignClient; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Result<StaffsInAgencyResultDTO> getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { |
|
|
public Result<StaffsInAgencyResultDTO> getStaffInfoForHome(StaffsInAgencyFromDTO fromDTO) { |
|
@ -183,4 +186,31 @@ public class StaffServiceImpl implements StaffService { |
|
|
} |
|
|
} |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void staffTransfer(TokenDto tokenDto, StaffTransferFormDTO fromDTO) { |
|
|
|
|
|
//1.获取工作人员与机关关系
|
|
|
|
|
|
CustomerStaffAgencyDTO staffAgencyDTO = customerStaffAgencyService.getInfoByUserId(fromDTO.getStaffId()); |
|
|
|
|
|
String oldAgency = staffAgencyDTO.getAgencyId(); |
|
|
|
|
|
//2.查询是否有未处理项目
|
|
|
|
|
|
ProjectListFromDTO projectFromDTO = new ProjectListFromDTO(); |
|
|
|
|
|
projectFromDTO.setCustomerId(staffAgencyDTO.getCustomerId()); |
|
|
|
|
|
projectFromDTO.setUserId(fromDTO.getStaffId()); |
|
|
|
|
|
projectFromDTO.setPageNo(1); |
|
|
|
|
|
projectFromDTO.setPageSize(10); |
|
|
|
|
|
Result<List<PendProjectListResultDTO>> pendResult = govProjectOpenFeignClient.getPendProjectList(projectFromDTO); |
|
|
|
|
|
if (!pendResult.success()) { |
|
|
|
|
|
throw new RenException(pendResult.getCode(), pendResult.getMsg()); |
|
|
|
|
|
} |
|
|
|
|
|
if (null != pendResult.getData() && pendResult.getData().size() > NumConstant.ZERO) { |
|
|
|
|
|
throw new RenException(EpmetErrorCode.EXIT_PEND_PROJECT.getCode()); |
|
|
|
|
|
} |
|
|
|
|
|
//3.查询是否有活动未结束
|
|
|
|
|
|
|
|
|
|
|
|
//4.修改人员所属组织
|
|
|
|
|
|
|
|
|
|
|
|
//5.逻辑删除工作人员原组织加入的部门、网格,组织人员总数旧的减1新的加1,部门、网格总人数减1
|
|
|
|
|
|
|
|
|
|
|
|
//6.操作记录表新增调动记录
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|