BUG修复
This commit is contained in:
parent
672f0f9e11
commit
b214ec8509
|
|
@ -205,17 +205,31 @@ public class OrganizationSyncEc {
|
|||
if (EcHrmRelationUtil.isNotExistJob(newName, jclJobId)) {
|
||||
// 查询ec表ID
|
||||
RecordInfo hrmJobTitle = getSystemDataMapper().getHrmJobTitleByName(oldName);
|
||||
map.put("id", Util.null2String(hrmJobTitle.getId()));
|
||||
map.put("operateIp", Util.null2String(user.getLoginip()));
|
||||
map.put("jobtitlemark", newName);
|
||||
map.put("jobtitlename", newName);
|
||||
map.put("jobactivityid", Util.null2String(params.get("jobactivityid")));
|
||||
map.put("jobresponsibility", Util.null2String(params.get("work_duty")));
|
||||
map.put("jobcompetency", Util.null2String(params.get("work_authority")));
|
||||
map.put("jobtitleremark", Util.null2String(params.get("description")));
|
||||
map.put("jobtitlecode", Util.null2String(params.get("job_no")) + "_" + System.currentTimeMillis());
|
||||
// 修改岗位表数据
|
||||
this.resultMap = ServiceUtil.getService(HrmJobServiceImpl.class, user).editJobTitle(map, user);
|
||||
if (null != hrmJobTitle) {
|
||||
map.put("id", Util.null2String(hrmJobTitle.getId()));
|
||||
map.put("operateIp", Util.null2String(user.getLoginip()));
|
||||
map.put("jobtitlemark", newName);
|
||||
map.put("jobtitlename", newName);
|
||||
map.put("jobactivityid", Util.null2String(params.get("jobactivityid")));
|
||||
map.put("jobresponsibility", Util.null2String(params.get("work_duty")));
|
||||
map.put("jobcompetency", Util.null2String(params.get("work_authority")));
|
||||
map.put("jobtitleremark", Util.null2String(params.get("description")));
|
||||
map.put("jobtitlecode", Util.null2String(params.get("job_no")) + "_" + System.currentTimeMillis());
|
||||
// 修改岗位表数据
|
||||
this.resultMap = ServiceUtil.getService(HrmJobServiceImpl.class, user).editJobTitle(map, user);
|
||||
} else {
|
||||
// TODO 纠正错误数据 临时使用
|
||||
// 不存在则新建职务
|
||||
map.put("operateIp", Util.null2String(user.getLoginip()));
|
||||
map.put("jobtitlemark", newName);
|
||||
map.put("jobtitlename", newName);
|
||||
map.put("jobactivityid", Util.null2String(params.get("jobactivityid")));
|
||||
map.put("jobresponsibility", Util.null2String(params.get("work_duty")));
|
||||
map.put("jobcompetency", Util.null2String(params.get("work_authority")));
|
||||
map.put("jobtitleremark", Util.null2String(params.get("description")));
|
||||
map.put("jobtitlecode", Util.null2String(params.get("job_no")) + "_" + System.currentTimeMillis());
|
||||
this.resultMap = ServiceUtil.getService(HrmJobServiceImpl.class, user).addJobTitle(map, user);
|
||||
}
|
||||
} else {
|
||||
// 修改后存在共用、不修改岗位表数据,更新对应人员的岗位信息为当前岗位的ID
|
||||
RecordInfo hrmJobTitle = getSystemDataMapper().getHrmJobTitleByName(newName);
|
||||
|
|
|
|||
|
|
@ -65,50 +65,52 @@ public class CusFieldDataTrigger {
|
|||
directionData.setField100002(sourceField100002);
|
||||
Long gwId = Long.parseLong(sourceField100002);
|
||||
JobPO jobById = MapperProxyFactory.getProxy(JobMapper.class).getJobById(gwId);
|
||||
RecordInfo hrmJobTitleByName = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmJobTitleByName(jobById.getJobName());
|
||||
Long ecGwId = StringUtils.isNotBlank(hrmJobTitleByName.getId()) ? Long.parseLong(hrmJobTitleByName.getId()) : null;
|
||||
Long ecBmId = jobById.getEcDepartment();
|
||||
Long ecGsId = jobById.getEcCompany();
|
||||
Map<String, Object> hrmResourceMap = new HashMap<>();
|
||||
// 岗位
|
||||
hrmResourceMap.put("jobtitle", ecGwId);
|
||||
// 部门
|
||||
hrmResourceMap.put("departmentid", ecBmId);
|
||||
// 公司
|
||||
hrmResourceMap.put("subcompanyid1", ecGsId);
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(id).tableName("hrmresource").params(hrmResourceMap).build());
|
||||
updateFlag = true;
|
||||
if (null != jobById) {
|
||||
RecordInfo hrmJobTitleByName = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmJobTitleByName(jobById.getJobName());
|
||||
Long ecGwId = StringUtils.isNotBlank(hrmJobTitleByName.getId()) ? Long.parseLong(hrmJobTitleByName.getId()) : null;
|
||||
Long ecBmId = jobById.getEcDepartment();
|
||||
Long ecGsId = jobById.getEcCompany();
|
||||
Map<String, Object> hrmResourceMap = new HashMap<>();
|
||||
// 岗位
|
||||
hrmResourceMap.put("jobtitle", ecGwId);
|
||||
// 部门
|
||||
hrmResourceMap.put("departmentid", ecBmId);
|
||||
// 公司
|
||||
hrmResourceMap.put("subcompanyid1", ecGsId);
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(id).tableName("hrmresource").params(hrmResourceMap).build());
|
||||
updateFlag = true;
|
||||
|
||||
// 职等职级为空,从岗位取值、更新
|
||||
if (StringUtils.isBlank(sourceField100001)) {
|
||||
if (StringUtils.isNotBlank(jobById.getLevelId())) {
|
||||
// 通过岗位关联,如有多个职等,选取第一个
|
||||
String[] levelArray = jobById.getLevelId().split(",");
|
||||
LevelPO levelByID = MapperProxyFactory.getProxy(LevelMapper.class).getLevelByID(Long.parseLong(levelArray[0]));
|
||||
directionData.setField100008(levelByID.getLevelName());
|
||||
} else {
|
||||
directionData.setField100008(null);
|
||||
}
|
||||
// 职等职级方案
|
||||
if (StringUtils.isNotBlank(Util.null2String(jobById.getSchemeId()))) {
|
||||
SchemePO schemeByID = MapperProxyFactory.getProxy(SchemeMapper.class).getSchemeByID(jobById.getSchemeId());
|
||||
directionData.setField100006(schemeByID.getSchemeName());
|
||||
} else {
|
||||
directionData.setField100006(null);
|
||||
}
|
||||
// 职级
|
||||
if (StringUtils.isNotBlank(jobById.getGradeId())) {
|
||||
GradePO gradeByLevelId = MapperProxyFactory.getProxy(GradeMapper.class).getGradeByID(Long.parseLong(jobById.getGradeId()));
|
||||
directionData.setField100007(gradeByLevelId.getGradeName());
|
||||
} else {
|
||||
directionData.setField100007(null);
|
||||
}
|
||||
// 岗位序列
|
||||
if (StringUtils.isNotBlank(Util.null2String(jobById.getSequenceId()))) {
|
||||
SequencePO sequenceBySchemeId = MapperProxyFactory.getProxy(SequenceMapper.class).getSequenceByID(jobById.getSequenceId());
|
||||
directionData.setField100005(sequenceBySchemeId.getSequenceName());
|
||||
} else {
|
||||
directionData.setField100005(null);
|
||||
// 职等职级为空,从岗位取值、更新
|
||||
if (StringUtils.isBlank(sourceField100001)) {
|
||||
if (StringUtils.isNotBlank(jobById.getLevelId())) {
|
||||
// 通过岗位关联,如有多个职等,选取第一个
|
||||
String[] levelArray = jobById.getLevelId().split(",");
|
||||
LevelPO levelByID = MapperProxyFactory.getProxy(LevelMapper.class).getLevelByID(Long.parseLong(levelArray[0]));
|
||||
directionData.setField100008(levelByID.getLevelName());
|
||||
} else {
|
||||
directionData.setField100008(null);
|
||||
}
|
||||
// 职等职级方案
|
||||
if (StringUtils.isNotBlank(Util.null2String(jobById.getSchemeId()))) {
|
||||
SchemePO schemeByID = MapperProxyFactory.getProxy(SchemeMapper.class).getSchemeByID(jobById.getSchemeId());
|
||||
directionData.setField100006(schemeByID.getSchemeName());
|
||||
} else {
|
||||
directionData.setField100006(null);
|
||||
}
|
||||
// 职级
|
||||
if (StringUtils.isNotBlank(jobById.getGradeId())) {
|
||||
GradePO gradeByLevelId = MapperProxyFactory.getProxy(GradeMapper.class).getGradeByID(Long.parseLong(jobById.getGradeId()));
|
||||
directionData.setField100007(gradeByLevelId.getGradeName());
|
||||
} else {
|
||||
directionData.setField100007(null);
|
||||
}
|
||||
// 岗位序列
|
||||
if (StringUtils.isNotBlank(Util.null2String(jobById.getSequenceId()))) {
|
||||
SequencePO sequenceBySchemeId = MapperProxyFactory.getProxy(SequenceMapper.class).getSequenceByID(jobById.getSequenceId());
|
||||
directionData.setField100005(sequenceBySchemeId.getSequenceName());
|
||||
} else {
|
||||
directionData.setField100005(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -846,6 +846,7 @@ public class HrmImportProcessE9 extends BaseBean {
|
|||
if (this.checkInfo(vo, resultList)) {
|
||||
continue;
|
||||
}
|
||||
new BaseBean().writeLog("checkKeys校验通过");
|
||||
|
||||
if (vo.getAccounttype() == null || "".equalsIgnoreCase(Util.null2String(vo.getAccounttype()))) {
|
||||
if (StringUtil.isNotNull(vo.getCertificatenum()) && certificateNums.get(StringUtil.vString(vo.getCertificatenum())) != null) {
|
||||
|
|
@ -1005,6 +1006,7 @@ public class HrmImportProcessE9 extends BaseBean {
|
|||
// hrm.setJobtitle(jobtitleid);
|
||||
//}
|
||||
|
||||
new BaseBean().writeLog("hrmId【" + hrmId + "】");
|
||||
if (Util.getIntValue(hrmId) < 0) continue;
|
||||
|
||||
//上级id
|
||||
|
|
@ -1418,6 +1420,7 @@ public class HrmImportProcessE9 extends BaseBean {
|
|||
String nowmanagerstr = Util.null2String(recordSet.getString("managerstr"));
|
||||
String resourceid = recordSet.getString("id");
|
||||
//指定上级为自身的情况,不更新自身上级
|
||||
new BaseBean().writeLog("resourceid【" + resourceid + "】");
|
||||
if (hrmId.equals(resourceid))
|
||||
continue;
|
||||
String nowmanagerstr2 = "";
|
||||
|
|
@ -1767,7 +1770,8 @@ public class HrmImportProcessE9 extends BaseBean {
|
|||
if (!recordSet.next()) {
|
||||
return !addPersonData(personFild, personValue, id);
|
||||
}
|
||||
|
||||
new BaseBean().writeLog("personValue【" + personValue + "】");
|
||||
new BaseBean().writeLog("personFild【" + personFild + "】");
|
||||
String[] personValues = personValue.split(";");
|
||||
String[] personFields = personFild.split(",");
|
||||
String fielddbType;
|
||||
|
|
@ -2077,14 +2081,14 @@ public class HrmImportProcessE9 extends BaseBean {
|
|||
return currentId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位id
|
||||
*
|
||||
* @param jobtitlename 岗位名称
|
||||
* @param jobactivityname 职务
|
||||
* @param jobgroupname 职务类别
|
||||
* @return -1:职务类别不存在,-2:职务不存在,-3:岗位名称不存在
|
||||
*/
|
||||
///**
|
||||
// * 获取岗位id
|
||||
// *
|
||||
// * @param jobtitlename 岗位名称
|
||||
// * @param jobactivityname 职务
|
||||
// * @param jobgroupname 职务类别
|
||||
// * @return -1:职务类别不存在,-2:职务不存在,-3:岗位名称不存在
|
||||
// */
|
||||
//public int getJobTitles(String jobtitlename, String jobactivityname,
|
||||
// String jobgroupname) {
|
||||
// RecordSet rs = new RecordSet();
|
||||
|
|
@ -2139,8 +2143,6 @@ public class HrmImportProcessE9 extends BaseBean {
|
|||
// }
|
||||
// return jobtitle;
|
||||
//}
|
||||
|
||||
|
||||
public static boolean needCheckLicenseForUpdate(ResourceComInfo resourceComInfo, String hrmId, HrmResourceVo vo) {
|
||||
String statusOfHrmId = resourceComInfo.getStatus(hrmId);
|
||||
String loginidOfHrmId = resourceComInfo.getLoginID(hrmId);
|
||||
|
|
@ -2604,6 +2606,7 @@ public class HrmImportProcessE9 extends BaseBean {
|
|||
|
||||
private boolean checkInfo(HrmResourceVo hrmResourceVo, List<ImportLog> resultList) {
|
||||
//新增账号、工号唯一性校验
|
||||
new BaseBean().writeLog("checkKeys【" + Arrays.toString(checkKeys) + "】");
|
||||
for (String key : checkKeys) {
|
||||
Map<String, String> checkInfo = checkInfos.get(key);
|
||||
if (checkInfo != null && !checkInfo.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue