|
|
|
@ -24,9 +24,11 @@ import org.apache.poi.xssf.usermodel.XSSFCell;
|
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFRow;
|
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
|
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
|
import weaver.conn.RecordSet;
|
|
|
|
|
import weaver.file.ImageFileManager;
|
|
|
|
|
import weaver.general.Util;
|
|
|
|
|
import weaver.hrm.User;
|
|
|
|
|
import weaver.hrm.job.JobGroupsComInfo;
|
|
|
|
|
import weaver.systeminfo.SystemEnv;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
@ -49,6 +51,8 @@ public class StaffInfoImportUtil {
|
|
|
|
|
importFieldsMap.put("方案名称", ExtendInfoPO.builder().tableName("jcl_org_staff").fieldName("plan_name").fieldNameDesc("方案名称").isrequired(0).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
|
|
|
|
importFieldsMap.put("分部", ExtendInfoPO.builder().tableName("jcl_org_staff").fieldName("comp_id").fieldNameDesc("分部").isrequired(1).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
|
|
|
|
importFieldsMap.put("部门", ExtendInfoPO.builder().tableName("jcl_org_staff").fieldName("dept_id").fieldNameDesc("部门").isrequired(0).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
|
|
|
|
importFieldsMap.put("职务类型", ExtendInfoPO.builder().tableName("hrmjobgroups").fieldName("jobgroupname").fieldNameDesc("职务类型").isrequired(0).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
|
|
|
|
importFieldsMap.put("职务", ExtendInfoPO.builder().tableName("hrmjobactivities").fieldName("jobactivityname").fieldNameDesc("职务").isrequired(0).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
|
|
|
|
importFieldsMap.put("岗位", ExtendInfoPO.builder().tableName("jcl_org_staff").fieldName("job_id").fieldNameDesc("岗位").isrequired(0).controlType(1).browserType("1").customValue("[\"input\",\"text\",\"100\"]").build());
|
|
|
|
|
importFieldsMap.put("编制数", ExtendInfoPO.builder().tableName("jcl_org_staff").fieldName("staff_num").fieldNameDesc("编制数").isrequired(1).controlType(1).browserType("2").customValue("[\"input\",\"int\"]").build());
|
|
|
|
|
|
|
|
|
@ -88,6 +92,9 @@ public class StaffInfoImportUtil {
|
|
|
|
|
Long parentJobId = null;
|
|
|
|
|
StaffPlanPO staffPlanPO = null;
|
|
|
|
|
|
|
|
|
|
String jobactivitymark = "";
|
|
|
|
|
String jobgroupremark = "";
|
|
|
|
|
|
|
|
|
|
historyDetailPO.setRowNums(String.valueOf(i + 1));
|
|
|
|
|
for (int cellIndex = 0; cellIndex < lastCellNum; cellIndex++) {
|
|
|
|
|
XSSFCell cell = row.getCell((short) cellIndex);
|
|
|
|
@ -188,6 +195,16 @@ public class StaffInfoImportUtil {
|
|
|
|
|
map.put("ec_department", parentDepartmentId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//职务类型
|
|
|
|
|
if ("jobgroupname".equals(infoPO.getFieldName()) && StringUtils.isNotBlank(cellValue)) {
|
|
|
|
|
jobgroupremark = cellValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//职务
|
|
|
|
|
if ("jobactivityname".equals(infoPO.getFieldName()) && StringUtils.isNotBlank(cellValue)) {
|
|
|
|
|
jobactivitymark = cellValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 岗位
|
|
|
|
|
if ("job_id".equals(infoPO.getFieldName()) && StringUtils.isNotBlank(cellValue)) {
|
|
|
|
|
if (null == parentCompanyId) {
|
|
|
|
@ -205,7 +222,8 @@ public class StaffInfoImportUtil {
|
|
|
|
|
continue nextRow;
|
|
|
|
|
}
|
|
|
|
|
for (String s : split) {
|
|
|
|
|
parentJobId = MapperProxyFactory.getProxy(JobMapper.class).getIdByNameAndPid(s, parentCompanyId, parentDepartmentId == null ? 0 : parentDepartmentId, parentJobId == null ? 0 : parentJobId);
|
|
|
|
|
parentJobId = MapperProxyFactory.getProxy(JobMapper.class).getIdByNameAndPid(s, parentCompanyId, parentDepartmentId == null ? 0 : parentDepartmentId, parentJobId == null ? 0 : parentJobId
|
|
|
|
|
,jobactivitymark,jobgroupremark);
|
|
|
|
|
if (null == parentJobId) {
|
|
|
|
|
historyDetailPO.setOperateDetail(s + "岗位未找到对应数据");
|
|
|
|
|
historyDetailPO.setStatus("0");
|
|
|
|
@ -335,8 +353,14 @@ public class StaffInfoImportUtil {
|
|
|
|
|
item.put("value", value);
|
|
|
|
|
itemList.add(item);
|
|
|
|
|
}
|
|
|
|
|
Map<String, Object> other = new HashMap<>();
|
|
|
|
|
other.put("index", (lsPromptLabel.size() + 1));
|
|
|
|
|
other.put("value", "注意:岗位维度编制信息导入时引入职务类型和职务判断,导入时请先去除多语言,否则无法找到对应岗位");
|
|
|
|
|
itemList.add(other);
|
|
|
|
|
groupItem.put("items", itemList);
|
|
|
|
|
lsGroup.add(groupItem);
|
|
|
|
|
return lsGroup;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|