Bläddra i källkod

更新员工信息

tags/24080901
PoffyZhang 1 år sedan
förälder
incheckning
7f2e673793
1 ändrade filer med 11 tillägg och 1 borttagningar
  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 Visa fil

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

@Autowired
private ZwddAuthClient zwddAuthClient;

@Autowired
private IDingOrganizationService iDingOrganizationService;

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

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

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


Laddar…
Avbryt
Spara