From 8c348f2061f1ca26d05e1b5845c0358ccab9285d Mon Sep 17 00:00:00 2001 From: dxfeng Date: Tue, 31 May 2022 13:50:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B2=97=E4=BD=8D=E6=A8=A1=E5=9D=97BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/job/dto/JobListDTO.java | 15 ++++++++++----- .../organization/mapper/job/JobMapper.xml | 2 +- .../service/impl/JobServiceImpl.java | 18 ++++++++++++------ .../transmethod/JobTransMethod.java | 2 +- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/com/engine/organization/entity/job/dto/JobListDTO.java b/src/com/engine/organization/entity/job/dto/JobListDTO.java index 91759418..d524a033 100644 --- a/src/com/engine/organization/entity/job/dto/JobListDTO.java +++ b/src/com/engine/organization/entity/job/dto/JobListDTO.java @@ -50,27 +50,27 @@ public class JobListDTO { /** * 所属分部 */ - @TableTitle(title = "所属分部", dataIndex = "parentComp", key = "parentComp") + @TableTitle(title = "所属分部", dataIndex = "compName", key = "compName") private String compName; /** * 所属部门 */ - @TableTitle(title = "所属部门", dataIndex = "parentDept", key = "parentDept") + @TableTitle(title = "所属部门", dataIndex = "deptName", key = "deptName") private String deptName; /** * 岗位序列 */ - @TableTitle(title = "岗位序列", dataIndex = "sequenceId", key = "sequenceId") + @TableTitle(title = "岗位序列", dataIndex = "sequenceName", key = "sequenceName") private String sequenceName; /** * 等级方案 */ - @TableTitle(title = "等级方案", dataIndex = "schemeId", key = "schemeId") + @TableTitle(title = "等级方案", dataIndex = "schemeName", key = "schemeName") private String schemeName; /** * 上级岗位 */ - @TableTitle(title = "上级岗位", dataIndex = "parentJob", key = "parentJob") + @TableTitle(title = "上级岗位", dataIndex = "parentJobName", key = "parentJobName") private String parentJobName; private Long parentJob; /** @@ -85,6 +85,11 @@ public class JobListDTO { @TableTitle(title = "禁用标记", dataIndex = "forbiddenTag", key = "forbiddenTag") private Integer forbiddenTag; + /** + * 操作列 + */ + @TableTitle(title = "", dataIndex = "operate", key = "operate") + private String operate; /** * 子节点 */ diff --git a/src/com/engine/organization/mapper/job/JobMapper.xml b/src/com/engine/organization/mapper/job/JobMapper.xml index 1c5de349..458ddc53 100644 --- a/src/com/engine/organization/mapper/job/JobMapper.xml +++ b/src/com/engine/organization/mapper/job/JobMapper.xml @@ -156,7 +156,7 @@ creator=#{creator}, update_time=#{updateTime}, - jobName=#{jobName}, + job_name=#{jobName}, parent_comp=#{parentComp}, parent_dept=#{parentDept}, sequence_id=#{sequenceId}, diff --git a/src/com/engine/organization/service/impl/JobServiceImpl.java b/src/com/engine/organization/service/impl/JobServiceImpl.java index 848b600c..38129945 100644 --- a/src/com/engine/organization/service/impl/JobServiceImpl.java +++ b/src/com/engine/organization/service/impl/JobServiceImpl.java @@ -292,7 +292,7 @@ public class JobServiceImpl extends Service implements JobService { SearchConditionOption noOption = new SearchConditionOption("1", "是"); isKeyOptions.add(yesOption); isKeyOptions.add(noOption); - SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "是否关键岗", "forbiddenTag"); + SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "是否关键岗", "isKey"); isKeyItem.setDetailtype(3); conditionItems.add(jobNoItem); @@ -348,7 +348,8 @@ public class JobServiceImpl extends Service implements JobService { public int saveBaseForm(JobSearchParam params) { List list = getJobMapper().listByNo(Util.null2String(params.getJobNo())); OrganizationAssert.isEmpty(list, "编号不允许重复"); - JobPO jobPO = JobBO.convertParamsToPO(params, (long) user.getUID()); + JobPO jobPO = JobBO.convertParamsToPO(params, user.getUID()); + jobPO.setIsKey(null == jobPO.getIsKey() ? 0 : jobPO.getIsKey()); // 设置对应的等级方案 return getJobMapper().insertIgnoreNull(jobPO); } @@ -358,6 +359,7 @@ public class JobServiceImpl extends Service implements JobService { JobSearchParam searchParam = JSONObject.parseObject(JSONObject.toJSONString(params), JobSearchParam.class); String groupId = (String) params.get("viewCondition"); JobPO jobPO = JobBO.convertParamsToPO(searchParam, user.getUID()); + jobPO.setIsKey(null == jobPO.getIsKey() ? 0 : jobPO.getIsKey()); int updateCount = 0; // 更新主表数据 updateCount += getJobMapper().updateBaseJob(jobPO); @@ -395,7 +397,9 @@ public class JobServiceImpl extends Service implements JobService { return; } DepartmentPO parentDept = getDepartmentMapper().getDeptById(departmentPO.getParentDept()); - buildParentDepts(parentDept, builderDeparts); + if (null != parentDept) { + buildParentDepts(parentDept, builderDeparts); + } } /** @@ -410,7 +414,9 @@ public class JobServiceImpl extends Service implements JobService { return; } CompPO parentComp = getCompMapper().listById(compPO.getParentCompany()); - buildParentComps(parentComp, builderComps); + if (null != parentComp) { + buildParentComps(parentComp, builderComps); + } } /** @@ -627,7 +633,7 @@ public class JobServiceImpl extends Service implements JobService { SearchConditionOption noOption = new SearchConditionOption("1", "是"); isKeyOptions.add(yesOption); isKeyOptions.add(noOption); - SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "禁用标记", "forbiddenTag"); + SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "是否关键岗", "isKey"); isKeyItem.setDetailtype(3); // 工作地点 SearchConditionItem workplaceItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作地点", "workplace"); @@ -657,7 +663,7 @@ public class JobServiceImpl extends Service implements JobService { OrganizationAssert.notNull(jobPO, "数据不存在或数据已删除"); jobNoItem.setValue(jobPO.getJobNo()); jobNameItem.setValue(jobPO.getJobName()); - isKeyItem.setValue(jobPO.getIsKey()); + isKeyItem.setValue(null == jobPO.getIsKey() ? "0" : jobPO.getIsKey() + ""); workplaceItem.setValue(jobPO.getWorkplace()); descriptionItem.setValue(jobPO.getDescription()); workDutyItem.setValue(jobPO.getWorkDuty()); diff --git a/src/com/engine/organization/transmethod/JobTransMethod.java b/src/com/engine/organization/transmethod/JobTransMethod.java index 8242bfdd..c7257131 100644 --- a/src/com/engine/organization/transmethod/JobTransMethod.java +++ b/src/com/engine/organization/transmethod/JobTransMethod.java @@ -17,7 +17,7 @@ public class JobTransMethod { } public static String getIsKeySpan(String isKey) { - if ("0".equals(isKey)) + if ("1".equals(isKey)) return "是"; else return "否";