From 45bf0438b0fbd21a11019a2ea5bb65196a6eff86 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Thu, 27 Mar 2025 16:28:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B2=97=E4=BD=8D=E6=89=B9=E9=87=8F=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=8A=9F=E8=83=BD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../util/saveimport/JobInfoImportUtil.java | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/com/engine/organization/util/saveimport/JobInfoImportUtil.java b/src/com/engine/organization/util/saveimport/JobInfoImportUtil.java index 679675ee..06e8d0f8 100644 --- a/src/com/engine/organization/util/saveimport/JobInfoImportUtil.java +++ b/src/com/engine/organization/util/saveimport/JobInfoImportUtil.java @@ -1,35 +1,23 @@ 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.hrmresource.po.ResourcePO; 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.StaffParams; -import com.engine.organization.entity.staff.po.StaffPO; -import com.engine.organization.entity.staff.po.StaffPlanPO; import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.job.JobMapper; -import com.engine.organization.mapper.staff.StaffMapper; -import com.engine.organization.mapper.staff.StaffPlanMapper; -import com.engine.organization.service.impl.StaffServiceImpl; import com.engine.organization.util.OrganizationAssert; import com.engine.organization.util.db.MapperProxyFactory; -import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; 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.file.ImageFileManager; -import weaver.general.TimeUtil; import weaver.general.Util; import weaver.hrm.User; -import weaver.hrm.company.DepartmentComInfo; import weaver.hrm.job.JobTitlesComInfo; import weaver.systeminfo.SystemEnv; @@ -86,6 +74,7 @@ public class JobInfoImportUtil { // 组装待处理数据 Integer subCompanyId = null; Integer departmentId = null; + String departmentname = ""; Integer jobTitleId = null; Integer isKey = null; @@ -161,7 +150,8 @@ public class JobInfoImportUtil { continue nextRow; } for (String s : split) { - departmentId = MapperProxyFactory.getProxy(DepartmentMapper.class).getIdByNameAndPid(s, departmentId, departmentId == null ? 0 : departmentId); + departmentId = MapperProxyFactory.getProxy(DepartmentMapper.class).getIdByNameAndPid(s, subCompanyId, departmentId == null ? 0 : departmentId); + departmentname = s; if (null == departmentId) { historyDetailPO.setOperateDetail(cellValue + "部门未找到对应数据"); historyDetailPO.setStatus("0"); @@ -185,7 +175,7 @@ public class JobInfoImportUtil { //是否关键岗 if ("is_key".equals(infoPO.getFieldName()) && StringUtils.isNotBlank(cellValue)) { - isKey = Integer.parseInt(cellValue); + isKey = "是".equals(cellValue) ? 1 : 0; } // 岗位 @@ -204,7 +194,7 @@ public class JobInfoImportUtil { ResourcePO build = ResourcePO.builder().subcompanyid1(subCompanyId).departmentid(departmentId).jobtitle(jobTitleId).build(); int count = MapperProxyFactory.getProxy(JobMapper.class).selectByConditions(build); if (count > 0) { - historyDetailPO.setOperateDetail(cellValue + "在聚才林岗位管理中已存在,请勿重复导入"); + historyDetailPO.setOperateDetail(departmentname +"下 <"+ cellValue + ">岗位在聚才林岗位管理中已存在,请勿重复导入"); historyDetailPO.setStatus("0"); OrgImportUtil.saveImportDetailLog(historyDetailPO); continue nextRow;