|
@@ -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)); |
|
|