Browse Source

更新员工信息

tags/24080901
PoffyZhang 1 year ago
parent
commit
7f2e673793
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java

+ 11
- 1
pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java View File

@@ -16,6 +16,7 @@ import com.ningdatech.pmapi.user.constant.UserAvailableEnum;
import com.ningdatech.pmapi.user.entity.UserInfo; import com.ningdatech.pmapi.user.entity.UserInfo;
import com.ningdatech.pmapi.user.service.IUserInfoService; import com.ningdatech.pmapi.user.service.IUserInfoService;
import com.ningdatech.zwdd.ZwddIntegrationProperties; import com.ningdatech.zwdd.ZwddIntegrationProperties;
import com.ningdatech.zwdd.client.ZwddAuthClient;
import com.ningdatech.zwdd.client.ZwddClient; import com.ningdatech.zwdd.client.ZwddClient;
import com.ningdatech.zwdd.model.Page; import com.ningdatech.zwdd.model.Page;
import com.ningdatech.zwdd.model.dto.EmployeeAccountIdDTO; import com.ningdatech.zwdd.model.dto.EmployeeAccountIdDTO;
@@ -52,6 +53,9 @@ public class EmployeeBatchGetTask {
private ZwddClient zwddClient; private ZwddClient zwddClient;


@Autowired @Autowired
private ZwddAuthClient zwddAuthClient;

@Autowired
private IDingOrganizationService iDingOrganizationService; private IDingOrganizationService iDingOrganizationService;


@Autowired @Autowired
@@ -420,13 +424,19 @@ public class EmployeeBatchGetTask {
* @param empCode * @param empCode
*/ */
public void getEmployeeByCode(String empCode) { public void getEmployeeByCode(String empCode) {
GenericResult<EmployeeInfoDTO> result = zwddClient.getEmployeeByCode(empCode);
GenericResult<EmployeeInfoDTO> result = zwddAuthClient.getEmployeeByCode(empCode);
log.error("请求员工信息 result:{}",JSON.toJSONString(result)); log.error("请求员工信息 result:{}",JSON.toJSONString(result));
if(!result.isSuccess()){ if(!result.isSuccess()){
log.error("请求员工信息失败 :{},mesg:{}",empCode,result.getMsg()); log.error("请求员工信息失败 :{},mesg:{}",empCode,result.getMsg());
return;
} }
EmployeeInfoDTO data = result.getData(); EmployeeInfoDTO data = result.getData();


if(Objects.isNull(data)){
log.error("请求员工信息失败 返回为空");
return;
}

DingEmployeeInfo emp = iDingEmployeeInfoService.getOne(Wrappers.lambdaQuery(DingEmployeeInfo.class) DingEmployeeInfo emp = iDingEmployeeInfoService.getOne(Wrappers.lambdaQuery(DingEmployeeInfo.class)
.eq(DingEmployeeInfo::getEmployeeCode, empCode) .eq(DingEmployeeInfo::getEmployeeCode, empCode)
.last(BizConst.LIMIT_1)); .last(BizConst.LIMIT_1));


Loading…
Cancel
Save