Pre Merge pull request !244 from dxfeng/feature/dxf

pull/244/MERGE
dxfeng 3 years ago committed by Gitee
commit 30b3255ea0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -63,7 +63,8 @@ public class JobBrowserService extends BrowserService {
searchTreeParams.setId(idArray[1]); searchTreeParams.setId(idArray[1]);
Map<String, Object> searchTree = new JobServiceImpl().getSearchTree(searchTreeParams); Map<String, Object> searchTree = new JobServiceImpl().getSearchTree(searchTreeParams);
List<TreeNode> datas = (List<TreeNode>) searchTree.get("datas"); List<TreeNode> datas = (List<TreeNode>) searchTree.get("datas");
nodeData.addAll(datas.get(0).getSubs()); TreeNode treeNode = datas.stream().filter(item -> idArray[1].equals(item.getId())).findFirst().orElse(new TreeNode());
nodeData.addAll(treeNode.getSubs());
} }
} }
List<CusBrowserTree> cusBrowserTrees = CusBowserTreeBO.convertSearchTreeToBorwserTree(nodeData); List<CusBrowserTree> cusBrowserTrees = CusBowserTreeBO.convertSearchTreeToBorwserTree(nodeData);

@ -98,6 +98,8 @@ public class JobBO {
Map<Long, List<JobListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentJob() && 0 != item.getParentJob()).collect(Collectors.groupingBy(JobListDTO::getParentJob)); Map<Long, List<JobListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentJob() && 0 != item.getParentJob()).collect(Collectors.groupingBy(JobListDTO::getParentJob));
// 处理被引用数据 // 处理被引用数据
List<String> usedIds = MapperProxyFactory.getProxy(JobMapper.class).listUsedId(); List<String> usedIds = MapperProxyFactory.getProxy(JobMapper.class).listUsedId();
// 兼容不同类型
usedIds.addAll(MapperProxyFactory.getProxy(JobMapper.class).getCusJobIds());
List<String> collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList()); List<String> collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList());
return dtoList.stream().peek(e -> { return dtoList.stream().peek(e -> {
List<JobListDTO> childList = collects.get(e.getId()); List<JobListDTO> childList = collects.get(e.getId());

@ -136,6 +136,14 @@ public interface JobMapper {
*/ */
List<String> listUsedId(); List<String> listUsedId();
/**
* EC使
* @return
*/
List<String> getCusJobIds();
/** /**
* *
* *

@ -317,6 +317,8 @@
job_name=#{jobName}, job_name=#{jobName},
parent_comp=#{parentComp}, parent_comp=#{parentComp},
parent_dept=#{parentDept}, parent_dept=#{parentDept},
ec_company=#{ecCompany},
ec_department=#{ecDepartment},
sequence_id=#{sequenceId}, sequence_id=#{sequenceId},
scheme_id=#{schemeId}, scheme_id=#{schemeId},
parent_job=#{parentJob}, parent_job=#{parentJob},
@ -540,6 +542,12 @@
and t.id != #{id} and t.id != #{id}
</if> </if>
</select> </select>
<select id="getCusJobIds" resultType="java.lang.String">
SELECT FIELD100002
FROM CUS_FIELDDATA
WHERE SCOPE = 'HrmCustomFieldByInfoType'
AND SCOPEID = -1
</select>
<sql id="nullparentJob"> <sql id="nullparentJob">
and ifnull(parent_job,0) = and ifnull(parent_job,0) =

@ -699,6 +699,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
deptById.setEcCompany(company); deptById.setEcCompany(company);
deptById.setParentComp(Objects.requireNonNull(EcHrmRelationUtil.getJclCompanyId(Util.null2String(company))).getId()); deptById.setParentComp(Objects.requireNonNull(EcHrmRelationUtil.getJclCompanyId(Util.null2String(company))).getId());
deptById.setParentDept(null); deptById.setParentDept(null);
deptById.setEcDepartment(null);
} else if ("1".equals(moveParam.getMoveType())) { } else if ("1".equals(moveParam.getMoveType())) {
Long department = moveParam.getDepartment(); Long department = moveParam.getDepartment();
Long departmentId = Objects.requireNonNull(EcHrmRelationUtil.getJclDepartmentId(Util.null2String(department))).getId(); Long departmentId = Objects.requireNonNull(EcHrmRelationUtil.getJclDepartmentId(Util.null2String(department))).getId();

@ -815,7 +815,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
saveImportDetailLog(historyDetailPO); saveImportDetailLog(historyDetailPO);
continue nextRow; continue nextRow;
} }
if (StringUtils.isNotBlank(cellValue) && StringUtils.isBlank(Util.null2String(reallyValue)) && !"parent_comp".equals(infoPO.getFieldName())) { if (StringUtils.isNotBlank(cellValue) && StringUtils.isBlank(Util.null2String(reallyValue)) && !"ec_company".equals(infoPO.getFieldName())) {
historyDetailPO.setOperateDetail(infoPO.getFieldNameDesc() + "数据转换失败,未找到对应数据"); historyDetailPO.setOperateDetail(infoPO.getFieldNameDesc() + "数据转换失败,未找到对应数据");
historyDetailPO.setStatus("0"); historyDetailPO.setStatus("0");
saveImportDetailLog(historyDetailPO); saveImportDetailLog(historyDetailPO);
@ -1072,7 +1072,7 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
} }
for (String s : split) { for (String s : split) {
parentDepartmentId = MapperProxyFactory.getProxy(DepartmentMapper.class).getIdByNameAndPid(s, parentCompanyId, parentDepartmentId == null ? 0 : parentDepartmentId); parentDepartmentId = MapperProxyFactory.getProxy(DepartmentMapper.class).getIdByNameAndPid(s, parentCompanyId, parentDepartmentId == null ? 0 : parentDepartmentId);
if (null == parentCompanyId) { if (null == parentDepartmentId) {
historyDetailPO.setOperateDetail(cellValue + "部门未找到对应数据"); historyDetailPO.setOperateDetail(cellValue + "部门未找到对应数据");
historyDetailPO.setStatus("0"); historyDetailPO.setStatus("0");
saveImportDetailLog(historyDetailPO); saveImportDetailLog(historyDetailPO);

@ -539,11 +539,11 @@ public class JobServiceImpl extends Service implements JobService {
// 人员信息变动,更新分部、部门、岗位 // 人员信息变动,更新分部、部门、岗位
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
rs.executeUpdate("SELECT ID FROM CUS_FIELDDATA WHERE SCOPEID =-1 AND FIELD100002 = ?", jobById.getId()); rs.execute("SELECT ID FROM CUS_FIELDDATA WHERE SCOPE = 'HrmCustomFieldByInfoType' AND SCOPEID =-1 AND FIELD100002 = '" + jobById.getId() + "'");
while (rs.next()) { while (rs.next()) {
long userId = Long.parseLong(Util.null2String(rs.getString("ID"))); long userId = Long.parseLong(Util.null2String(rs.getString("ID")));
// 更新岗位 、岗位更新触发器 // 更新岗位 、岗位更新触发器
rs.executeUpdate("update CUS_FIELDDATA set FIELD100002 = ? where SCOPEID =-1 and id = ", targetJob.getId(), userId); rs.executeUpdate("update CUS_FIELDDATA set FIELD100002 = ? where SCOPE = 'HrmCustomFieldByInfoType' AND SCOPEID =-1 and id = ?", targetJob.getId(), userId);
CusFieldDataTrigger.run(userId); CusFieldDataTrigger.run(userId);
// 更新人员组织架构图 // 更新人员组织架构图
} }
@ -569,13 +569,14 @@ public class JobServiceImpl extends Service implements JobService {
job.setParentDept(parentDepartment); job.setParentDept(parentDepartment);
job.setEcDepartment(ecDepartment); job.setEcDepartment(ecDepartment);
job.setParentJob(parentJob); job.setParentJob(parentJob);
getJobMapper().updateBaseJob(job);
// 更新人员信息 // 更新人员信息
RecordSet rs = new RecordSet(); RecordSet rs = new RecordSet();
rs.executeUpdate("SELECT ID FROM CUS_FIELDDATA WHERE SCOPEID =-1 AND FIELD100002 = ?", job.getId()); rs.execute("SELECT ID FROM CUS_FIELDDATA WHERE SCOPE = 'HrmCustomFieldByInfoType' AND SCOPEID =-1 AND FIELD100002 = '" + job.getId() + "'");
while (rs.next()) { while (rs.next()) {
long userId = Long.parseLong(Util.null2String(rs.getString("ID"))); long userId = Long.parseLong(Util.null2String(rs.getString("ID")));
// 更新人员分部、部门 // 更新人员分部、部门
rs.executeUpdate("UPDATE HRMRESOURCE SET SUBCOMPANYID1 = ? , DEPARTMENTID = ? WHERE ID =? ", ecCompany, ecDepartment, userId); // rs.executeUpdate("UPDATE HRMRESOURCE SET SUBCOMPANYID1 = ? , DEPARTMENTID = ? WHERE ID =? ", ecCompany, ecDepartment, userId);
// 更新人员组织架构图 // 更新人员组织架构图
CusFieldDataTrigger.run(userId); CusFieldDataTrigger.run(userId);
} }

@ -205,17 +205,31 @@ public class OrganizationSyncEc {
if (EcHrmRelationUtil.isNotExistJob(newName, jclJobId)) { if (EcHrmRelationUtil.isNotExistJob(newName, jclJobId)) {
// 查询ec表ID // 查询ec表ID
RecordInfo hrmJobTitle = getSystemDataMapper().getHrmJobTitleByName(oldName); RecordInfo hrmJobTitle = getSystemDataMapper().getHrmJobTitleByName(oldName);
map.put("id", Util.null2String(hrmJobTitle.getId())); if (null != hrmJobTitle) {
map.put("operateIp", Util.null2String(user.getLoginip())); map.put("id", Util.null2String(hrmJobTitle.getId()));
map.put("jobtitlemark", newName); map.put("operateIp", Util.null2String(user.getLoginip()));
map.put("jobtitlename", newName); map.put("jobtitlemark", newName);
map.put("jobactivityid", Util.null2String(params.get("jobactivityid"))); map.put("jobtitlename", newName);
map.put("jobresponsibility", Util.null2String(params.get("work_duty"))); map.put("jobactivityid", Util.null2String(params.get("jobactivityid")));
map.put("jobcompetency", Util.null2String(params.get("work_authority"))); map.put("jobresponsibility", Util.null2String(params.get("work_duty")));
map.put("jobtitleremark", Util.null2String(params.get("description"))); map.put("jobcompetency", Util.null2String(params.get("work_authority")));
map.put("jobtitlecode", Util.null2String(params.get("job_no")) + "_" + System.currentTimeMillis()); 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); // 修改岗位表数据
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 { } else {
// 修改后存在共用、不修改岗位表数据更新对应人员的岗位信息为当前岗位的ID // 修改后存在共用、不修改岗位表数据更新对应人员的岗位信息为当前岗位的ID
RecordInfo hrmJobTitle = getSystemDataMapper().getHrmJobTitleByName(newName); RecordInfo hrmJobTitle = getSystemDataMapper().getHrmJobTitleByName(newName);

@ -21,6 +21,7 @@ import com.engine.organization.mapper.scheme.SchemeMapper;
import com.engine.organization.mapper.sequence.SequenceMapper; import com.engine.organization.mapper.sequence.SequenceMapper;
import com.engine.organization.thread.HrmResourceTriggerRunnable; import com.engine.organization.thread.HrmResourceTriggerRunnable;
import com.engine.organization.util.db.MapperProxyFactory; import com.engine.organization.util.db.MapperProxyFactory;
import com.wbi.util.Util;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.util.HashMap; import java.util.HashMap;
@ -64,23 +65,53 @@ public class CusFieldDataTrigger {
directionData.setField100002(sourceField100002); directionData.setField100002(sourceField100002);
Long gwId = Long.parseLong(sourceField100002); Long gwId = Long.parseLong(sourceField100002);
JobPO jobById = MapperProxyFactory.getProxy(JobMapper.class).getJobById(gwId); JobPO jobById = MapperProxyFactory.getProxy(JobMapper.class).getJobById(gwId);
RecordInfo hrmJobTitleByName = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmJobTitleByName(jobById.getJobName()); if (null != jobById) {
Long ecGwId = StringUtils.isNotBlank(hrmJobTitleByName.getId()) ? Long.parseLong(hrmJobTitleByName.getId()) : null; RecordInfo hrmJobTitleByName = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmJobTitleByName(jobById.getJobName());
Long ecBmId = jobById.getEcDepartment(); Long ecGwId = StringUtils.isNotBlank(hrmJobTitleByName.getId()) ? Long.parseLong(hrmJobTitleByName.getId()) : null;
Long ecGsId = jobById.getEcCompany(); Long ecBmId = jobById.getEcDepartment();
Map<String, Object> hrmResourceMap = new HashMap<>(); Long ecGsId = jobById.getEcCompany();
// 岗位 Map<String, Object> hrmResourceMap = new HashMap<>();
hrmResourceMap.put("jobtitle", ecGwId); // 岗位
// 部门 hrmResourceMap.put("jobtitle", ecGwId);
hrmResourceMap.put("departmentid", ecBmId); // 部门
// 公司 hrmResourceMap.put("departmentid", ecBmId);
hrmResourceMap.put("subcompanyid1", ecGsId); // 公司
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(id).tableName("hrmresource").params(hrmResourceMap).build()); hrmResourceMap.put("subcompanyid1", ecGsId);
updateFlag = true; MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(id).tableName("hrmresource").params(hrmResourceMap).build());
updateFlag = true;
if(StringUtils.isBlank(sourceField100001)){ // 职等职级为空,从岗位取值、更新
// 拼接Field100001字段,岗位序列A职级A职等 if (StringUtils.isBlank(sourceField100001)) {
sourceField100001 += "_" + jobById.getSequenceId() + "A" + jobById.getGradeId() + "A" + jobById.getLevelId().split(",")[0]; 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);
}
}
} }
} }

@ -37,7 +37,7 @@ public class OrgImportUtil {
} }
public static void saveImportDetailLog(JclImportHistoryDetailPO historyDetailPO) { public static void saveImportDetailLog(JclImportHistoryDetailPO historyDetailPO) {
String detailMsg = "导入第" + historyDetailPO.getRowNums() + "行数据,[" + historyDetailPO.getRelatedName() + "]" + historyDetailPO.getOperateDetail(); String detailMsg = "导入第" + historyDetailPO.getRowNums() + "行数据," + historyDetailPO.getRelatedName() + historyDetailPO.getOperateDetail();
historyDetailPO.setOperateDetail(detailMsg); historyDetailPO.setOperateDetail(detailMsg);
MapperProxyFactory.getProxy(JclImportHistoryDetailMapper.class).insertHistoryDetail(historyDetailPO); MapperProxyFactory.getProxy(JclImportHistoryDetailMapper.class).insertHistoryDetail(historyDetailPO);
} }

@ -124,9 +124,10 @@ public class StaffInfoImportUtil {
List<StaffPlanPO> staffPlanPOS = MapperProxyFactory.getProxy(StaffPlanMapper.class).listByNo(Util.null2String(reallyValue)); List<StaffPlanPO> staffPlanPOS = MapperProxyFactory.getProxy(StaffPlanMapper.class).listByNo(Util.null2String(reallyValue));
if (CollectionUtils.isNotEmpty(staffPlanPOS)) { if (CollectionUtils.isNotEmpty(staffPlanPOS)) {
staffPlanPO = staffPlanPOS.get(0); staffPlanPO = staffPlanPOS.get(0);
map.put("plan_id",staffPlanPO.getId()); map.put("plan_id", staffPlanPO.getId());
historyDetailPO.setRelatedName(staffPlanPO.getPlanNo()); historyDetailPO.setRelatedName(staffPlanPO.getPlanNo());
} else { } else {
historyDetailPO.setRelatedName("");
historyDetailPO.setOperateDetail("编号:" + reallyValue + ",未找到对应数据"); historyDetailPO.setOperateDetail("编号:" + reallyValue + ",未找到对应数据");
historyDetailPO.setStatus("0"); historyDetailPO.setStatus("0");
OrgImportUtil.saveImportDetailLog(historyDetailPO); OrgImportUtil.saveImportDetailLog(historyDetailPO);
@ -169,7 +170,7 @@ public class StaffInfoImportUtil {
} }
for (String s : split) { for (String s : split) {
parentDepartmentId = MapperProxyFactory.getProxy(DepartmentMapper.class).getIdByNameAndPid(s, parentCompanyId, parentDepartmentId == null ? 0 : parentDepartmentId); parentDepartmentId = MapperProxyFactory.getProxy(DepartmentMapper.class).getIdByNameAndPid(s, parentCompanyId, parentDepartmentId == null ? 0 : parentDepartmentId);
if (null == parentCompanyId) { if (null == parentDepartmentId) {
historyDetailPO.setOperateDetail(cellValue + "部门未找到对应数据"); historyDetailPO.setOperateDetail(cellValue + "部门未找到对应数据");
historyDetailPO.setStatus("0"); historyDetailPO.setStatus("0");
OrgImportUtil.saveImportDetailLog(historyDetailPO); OrgImportUtil.saveImportDetailLog(historyDetailPO);
@ -213,6 +214,15 @@ public class StaffInfoImportUtil {
map.put("job_id", parentJobId); map.put("job_id", parentJobId);
} }
// 编制数大于0
if ("staff_num".equals(infoPO.getFieldName()) && Integer.parseInt(Util.null2String(reallyValue)) < 0) {
historyDetailPO.setOperateDetail("编制数不可小于0");
historyDetailPO.setStatus("0");
OrgImportUtil.saveImportDetailLog(historyDetailPO);
continue nextRow;
}
} }
} }
// 校验、数据交互 // 校验、数据交互
@ -226,6 +236,7 @@ public class StaffInfoImportUtil {
OrgImportUtil.saveImportDetailLog(historyDetailPO); OrgImportUtil.saveImportDetailLog(historyDetailPO);
continue; continue;
} }
StaffSearchParam param = JSONObject.toJavaObject((JSON) JSONObject.toJSON(map), StaffSearchParam.class);
String controlDimension = staffPlanPO.getControlDimension(); String controlDimension = staffPlanPO.getControlDimension();
String checkMsg = ""; String checkMsg = "";
switch (controlDimension) { switch (controlDimension) {
@ -233,6 +244,9 @@ public class StaffInfoImportUtil {
if (null == parentCompanyId) { if (null == parentCompanyId) {
checkMsg = "编制维度选择分部时,分部必填!"; checkMsg = "编制维度选择分部时,分部必填!";
} }
// 取消部门、岗位赋值
param.setDeptId(null);
param.setJobId(null);
break; break;
case "2":// 部门 case "2":// 部门
if (null == parentCompanyId) { if (null == parentCompanyId) {
@ -240,6 +254,8 @@ public class StaffInfoImportUtil {
} else if (null == parentDepartmentId) { } else if (null == parentDepartmentId) {
checkMsg = "编制维度选择部门时,部门必填!"; checkMsg = "编制维度选择部门时,部门必填!";
} }
// 取消岗位赋值
param.setJobId(null);
break; break;
case "3": // 岗位 case "3": // 岗位
if (null == parentCompanyId) { if (null == parentCompanyId) {
@ -254,16 +270,15 @@ public class StaffInfoImportUtil {
checkMsg = "编制方案数据有误,请确认"; checkMsg = "编制方案数据有误,请确认";
break; break;
} }
if(StringUtils.isNotBlank(checkMsg)){ if (StringUtils.isNotBlank(checkMsg)) {
historyDetailPO.setOperateDetail(checkMsg); historyDetailPO.setOperateDetail(checkMsg);
historyDetailPO.setStatus("0"); historyDetailPO.setStatus("0");
OrgImportUtil.saveImportDetailLog(historyDetailPO); OrgImportUtil.saveImportDetailLog(historyDetailPO);
continue; continue;
} }
StaffSearchParam param = JSONObject.toJavaObject((JSON) JSONObject.toJSON(map), StaffSearchParam.class);
StaffPO staffPO = StaffBO.convertParamToPO(param, (long) user.getUID()); StaffPO staffPO = StaffBO.convertParamToPO(param, (long) user.getUID());
if(null==staffPO.getControlPolicy()){ if (null == staffPO.getControlPolicy()) {
staffPO.setControlPolicy(1); staffPO.setControlPolicy(1);
} }
MapperProxyFactory.getProxy(StaffMapper.class).insertIgnoreNull(staffPO); MapperProxyFactory.getProxy(StaffMapper.class).insertIgnoreNull(staffPO);

@ -846,6 +846,7 @@ public class HrmImportProcessE9 extends BaseBean {
if (this.checkInfo(vo, resultList)) { if (this.checkInfo(vo, resultList)) {
continue; continue;
} }
new BaseBean().writeLog("checkKeys校验通过");
if (vo.getAccounttype() == null || "".equalsIgnoreCase(Util.null2String(vo.getAccounttype()))) { if (vo.getAccounttype() == null || "".equalsIgnoreCase(Util.null2String(vo.getAccounttype()))) {
if (StringUtil.isNotNull(vo.getCertificatenum()) && certificateNums.get(StringUtil.vString(vo.getCertificatenum())) != null) { if (StringUtil.isNotNull(vo.getCertificatenum()) && certificateNums.get(StringUtil.vString(vo.getCertificatenum())) != null) {
@ -1005,6 +1006,7 @@ public class HrmImportProcessE9 extends BaseBean {
// hrm.setJobtitle(jobtitleid); // hrm.setJobtitle(jobtitleid);
//} //}
new BaseBean().writeLog("hrmId【" + hrmId + "】");
if (Util.getIntValue(hrmId) < 0) continue; if (Util.getIntValue(hrmId) < 0) continue;
//上级id //上级id
@ -1418,6 +1420,7 @@ public class HrmImportProcessE9 extends BaseBean {
String nowmanagerstr = Util.null2String(recordSet.getString("managerstr")); String nowmanagerstr = Util.null2String(recordSet.getString("managerstr"));
String resourceid = recordSet.getString("id"); String resourceid = recordSet.getString("id");
//指定上级为自身的情况,不更新自身上级 //指定上级为自身的情况,不更新自身上级
new BaseBean().writeLog("resourceid【" + resourceid + "】");
if (hrmId.equals(resourceid)) if (hrmId.equals(resourceid))
continue; continue;
String nowmanagerstr2 = ""; String nowmanagerstr2 = "";
@ -1767,7 +1770,8 @@ public class HrmImportProcessE9 extends BaseBean {
if (!recordSet.next()) { if (!recordSet.next()) {
return !addPersonData(personFild, personValue, id); return !addPersonData(personFild, personValue, id);
} }
new BaseBean().writeLog("personValue【" + personValue + "】");
new BaseBean().writeLog("personFild【" + personFild + "】");
String[] personValues = personValue.split(";"); String[] personValues = personValue.split(";");
String[] personFields = personFild.split(","); String[] personFields = personFild.split(",");
String fielddbType; String fielddbType;
@ -2077,14 +2081,14 @@ public class HrmImportProcessE9 extends BaseBean {
return currentId; return currentId;
} }
/** ///**
* id // * 获取岗位id
* // *
* @param jobtitlename // * @param jobtitlename 岗位名称
* @param jobactivityname // * @param jobactivityname 职务
* @param jobgroupname // * @param jobgroupname 职务类别
* @return -1:-2-3 // * @return -1:职务类别不存在,-2职务不存在-3岗位名称不存在
*/ // */
//public int getJobTitles(String jobtitlename, String jobactivityname, //public int getJobTitles(String jobtitlename, String jobactivityname,
// String jobgroupname) { // String jobgroupname) {
// RecordSet rs = new RecordSet(); // RecordSet rs = new RecordSet();
@ -2139,8 +2143,6 @@ public class HrmImportProcessE9 extends BaseBean {
// } // }
// return jobtitle; // return jobtitle;
//} //}
public static boolean needCheckLicenseForUpdate(ResourceComInfo resourceComInfo, String hrmId, HrmResourceVo vo) { public static boolean needCheckLicenseForUpdate(ResourceComInfo resourceComInfo, String hrmId, HrmResourceVo vo) {
String statusOfHrmId = resourceComInfo.getStatus(hrmId); String statusOfHrmId = resourceComInfo.getStatus(hrmId);
String loginidOfHrmId = resourceComInfo.getLoginID(hrmId); String loginidOfHrmId = resourceComInfo.getLoginID(hrmId);
@ -2604,6 +2606,7 @@ public class HrmImportProcessE9 extends BaseBean {
private boolean checkInfo(HrmResourceVo hrmResourceVo, List<ImportLog> resultList) { private boolean checkInfo(HrmResourceVo hrmResourceVo, List<ImportLog> resultList) {
//新增账号、工号唯一性校验 //新增账号、工号唯一性校验
new BaseBean().writeLog("checkKeys【" + Arrays.toString(checkKeys) + "】");
for (String key : checkKeys) { for (String key : checkKeys) {
Map<String, String> checkInfo = checkInfos.get(key); Map<String, String> checkInfo = checkInfos.get(key);
if (checkInfo != null && !checkInfo.isEmpty()) { if (checkInfo != null && !checkInfo.isEmpty()) {

Loading…
Cancel
Save