代码优化

This commit is contained in:
Administrator 2025-09-09 10:51:25 +08:00
parent dfa20fc352
commit 7f212762d7
3 changed files with 32 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package com.weaver.seconddev.jcl.organization.controller;
import com.weaver.common.authority.annotation.WeaPermission;
import com.weaver.ebuilder.form.client.entity.field.ModuleField;
import com.weaver.seconddev.jcl.common.service.CommonService;
import com.weaver.seconddev.jcl.organization.service.EmployeeRelationService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -24,6 +25,8 @@ public class EmployeeRelationController {
@Autowired
private EmployeeRelationService employeeRelationService;
@Autowired
private CommonService commonService;
/**
* 员工管理-根据姓名+手机号/姓名+邮箱/身份证号判断是否黑名单
@ -376,4 +379,16 @@ public class EmployeeRelationController {
}
/**
* 根据数据源名称获得该数据源下所有数据
* @return
*/
@GetMapping("/getListDatasBySourceName")
@WeaPermission(publicPermission = true)
public List<Map<String, Object>> getListDatasBySourceName(){
List<Map<String, Object>> personYdzqMonthList = commonService.getListDatasBySourceName("人员编制控编维度统计数据","LOGIC","weaver-hr-service");
log.error("getListDatasBySourceName.personYdzqMonthList:{}",personYdzqMonthList);
return personYdzqMonthList;
}
}

View File

@ -238,6 +238,7 @@ public class SyncOrganizationPersonInfo implements EsbServerlessRpcRemoteInterfa
employee_new.put("status","normal");
//状态字段换个对应
employee_new.put("personnel_status",getIgnoreCase(employee_info, "personnel_status_jcl"));
//关联账号信息表
employee_new.put("user_id",getIgnoreCase(employee_info, "id"));
employee_new.put("create_time",nowData);
@ -464,6 +465,14 @@ public class SyncOrganizationPersonInfo implements EsbServerlessRpcRemoteInterfa
employee_new.remove("id");
//状态字段换个对应
employee_new.put("personnel_status",getIgnoreCase(employee_info, "personnel_status_jcl"));
/**
* 这里增加一个判断 0908
*/
if(getIgnoreCase(employee_info, "personnel_status_jcl").equals("5")){
employee_new.put("status","unavailable");
}else {
employee_new.put("status","normal");
}
employee_new.entrySet().removeIf(entry -> entry.getValue() == null);
log.error("SyncOrganizationPersonInfo3333.employee_info:{}", employee_info);
log.error("SyncOrganizationPersonInfo3333.employee_new:{}", employee_new);

View File

@ -422,6 +422,14 @@ public class SyncOrganizationPersonInfo_cbd implements EsbServerlessRpcRemoteInt
employee_new.remove("id");
//状态字段换个对应
employee_new.put("personnel_status",getIgnoreCase(employee_info, "personnel_status_jcl"));
/**
* 这里增加一个判断 0908
*/
if(getIgnoreCase(employee_info, "personnel_status_jcl").equals("5")){
employee_new.put("status","unavailable");
}else {
employee_new.put("status","normal");
}
employee_new.entrySet().removeIf(entry -> entry.getValue() == null);
log.error("SyncOrganizationPersonInfo3333.employee_info:{}", employee_info);
log.error("SyncOrganizationPersonInfo3333.employee_new:{}", employee_new);