员工更新接口

This commit is contained in:
zengweihai 2024-05-15 17:01:21 +08:00
parent 3f5368b44b
commit ae0c658e08
1 changed files with 22 additions and 19 deletions

View File

@ -169,27 +169,30 @@ public class UserTaskImpl extends AbstractTask {
dataMap.put("shkd_oaid",userData.getString("id"));
// 职位分录
List<Map<String, Object>> posList = new ArrayList<>();
Map<String, Object> entryentity = new HashMap<>();
// 通过编码设置部门
Map<String, Object> dptNumMap = new HashMap<>();
dptNumMap.put("number", userData.getString("departmentcode"));
entryentity.put("dpt",dptNumMap ); // 部门
entryentity.put("position", userData.getString("jobactivityname")); // 职位
entryentity.put("isincharge", false); //负责人
entryentity.put("ispartjob", false); //兼职
String managerId_oa = userData.getString("managerid");//获取上级人员id(oa)
Long managerId = userIds.get(managerId_oa);//直接上级id
if (managerId != null){
entryentity.put("superior", managerId); // 赋值直接上级
}else {
if (!"".equals(managerId_oa)){//当上级人员idoa存在且未在星瀚系统检索成功时修改参数flag,接口将重新构造人员类更新数据
flag = true;
if(workid == null){//若人不存在则更新部门
List<Map<String, Object>> posList = new ArrayList<>();
Map<String, Object> entryentity = new HashMap<>();
// 通过编码设置部门
Map<String, Object> dptNumMap = new HashMap<>();
dptNumMap.put("number", userData.getString("departmentcode"));
entryentity.put("dpt",dptNumMap ); // 部门
entryentity.put("position", userData.getString("jobactivityname")); // 职位
entryentity.put("isincharge", false); //负责人
entryentity.put("ispartjob", false); //兼职
String managerId_oa = userData.getString("managerid");//获取上级人员id(oa)
Long managerId = userIds.get(managerId_oa);//直接上级id
if (managerId != null){
entryentity.put("superior", managerId); // 赋值直接上级
}else {
if (!"".equals(managerId_oa)){//当上级人员idoa存在且未在星瀚系统检索成功时修改参数flag,接口将重新构造人员类更新数据
flag = true;
}
}
entryentity.put("seq", 1);
posList.add(entryentity);
dataMap.put("entryentity", posList);
}
entryentity.put("seq", 1);
posList.add(entryentity);
dataMap.put("entryentity", posList);
user.setDataMap(dataMap);
paramList.add(user);
}