Merge pull request '导入BUG,提示信息优化' (#71) from feature/dxf into develop

Reviewed-on: #71
pull/72/head
dxfeng 2 years ago
commit 7990d67914

@ -1705,7 +1705,6 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
continue nextRow;
}
if (StringUtils.isNotBlank(cellValue) && StringUtils.isBlank(Util.null2String(reallyValue)) && !"ec_company".equals(infoPO.getFieldName()) && !"ec_department".equals(infoPO.getFieldName())) {
historyDetailPO.setRelatedName("");
historyDetailPO.setOperateDetail(infoPO.getFieldNameDesc() + "数据转换失败,未找到对应数据");
historyDetailPO.setStatus("0");
saveImportDetailLog(historyDetailPO);
@ -2123,9 +2122,9 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
*
*/
private void saveImportDetailLog(JclImportHistoryDetailPO historyDetailPO) {
String relatedName = historyDetailPO.getRelatedName();
if (StringUtils.isNotBlank(relatedName)) {
relatedName = "[" + relatedName + "]";
String relatedName = "";
if (StringUtils.isNotBlank(historyDetailPO.getRelatedName())) {
relatedName = "[" + historyDetailPO.getRelatedName() + "]";
}
String detailMsg = "导入第" + historyDetailPO.getRowNums() + "行数据," + relatedName + historyDetailPO.getOperateDetail();
historyDetailPO.setOperateDetail(detailMsg);

@ -2,8 +2,10 @@ package com.engine.organization.util.saveimport;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.engine.organization.entity.department.po.DepartmentPO;
import com.engine.organization.entity.extend.po.ExtendInfoPO;
import com.engine.organization.entity.jclimport.po.JclImportHistoryDetailPO;
import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.staff.bo.StaffBO;
import com.engine.organization.entity.staff.param.StaffSearchParam;
import com.engine.organization.entity.staff.po.StaffPO;
@ -249,21 +251,33 @@ public class StaffInfoImportUtil {
param.setJobId(null);
break;
case "2":// 部门
if (null == parentCompanyId) {
checkMsg = "编制维度选择分部时,分部必填!";
} else if (null == parentDepartmentId) {
if (null == parentDepartmentId) {
checkMsg = "编制维度选择部门时,部门必填!";
} else {
DepartmentPO deptById = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(parentDepartmentId);
if (null == deptById) {
checkMsg = "未找到对应部门!";
} else {
param.setCompId(deptById.getParentComp());
param.setEcCompany(deptById.getEcCompany());
}
}
// 取消岗位赋值
param.setJobId(null);
break;
case "3": // 岗位
if (null == parentCompanyId) {
checkMsg = "编制维度选择分部时,分部必填!";
} else if (null == parentDepartmentId) {
checkMsg = "编制维度选择部门时,部门必填!";
} else if (null == parentJobId) {
if (null == parentJobId) {
checkMsg = "编制维度选择岗位时,岗位必填!";
} else {
JobPO jobPO = MapperProxyFactory.getProxy(JobMapper.class).getJobById(parentJobId);
if (null == jobPO) {
checkMsg = "未找到对应岗位!";
} else {
param.setCompId(jobPO.getParentComp());
param.setEcCompany(jobPO.getEcCompany());
param.setDeptId(jobPO.getParentDept());
param.setEcDepartment(jobPO.getEcDepartment());
}
}
break;
default:

Loading…
Cancel
Save