包名更改
This commit is contained in:
commit
03e0f6ee60
|
|
@ -248,12 +248,12 @@ CREATE TABLE JCL_ORG_JOB (
|
|||
job_name varchar(100) NULL,
|
||||
parent_comp int null,
|
||||
parent_dept int null,
|
||||
job_sequence int null,
|
||||
sequence_id int null,
|
||||
scheme_id int null,
|
||||
parent_job int null,
|
||||
is_key_job int null,
|
||||
is_key int null,
|
||||
workplace varchar(100) NULL,
|
||||
work_description text null,
|
||||
description text null,
|
||||
work_duty text null,
|
||||
work_authority text null,
|
||||
forbidden_tag int NULL,
|
||||
|
|
@ -268,8 +268,8 @@ CREATE TABLE JCL_ORG_JOB (
|
|||
CREATE TABLE JCL_ORG_JOBDT (
|
||||
id int auto_increment NOT NULL,
|
||||
mainid int NULL,
|
||||
job_rank int null,
|
||||
job_level int null,
|
||||
level_id int null,
|
||||
grade_id int null,
|
||||
creator int null,
|
||||
delete_type int null,
|
||||
create_time date null,
|
||||
|
|
|
|||
|
|
@ -250,12 +250,12 @@ CREATE TABLE JCL_ORG_JOB (
|
|||
JOB_NAME NVARCHAR2(100) NULL,
|
||||
PARENT_COMP NUMBER NULL,
|
||||
PARENT_DEPT NUMBER NULL,
|
||||
JOB_SEQUENCE NUMBER NULL,
|
||||
SEQUENCE_ID NUMBER NULL,
|
||||
SCHEME_ID NUMBER NULL,
|
||||
PARENT_JOB NUMBER NULL,
|
||||
IS_KEY_JOB NUMBER NULL,
|
||||
IS_KEY NUMBER NULL,
|
||||
WORKPLACE NVARCHAR2(100) NULL,
|
||||
WORK_DESCRIPTION NVARCHAR2(1000) NULL,
|
||||
DESCRIPTION NVARCHAR2(1000) NULL,
|
||||
WORK_DUTY NVARCHAR2(1000) NULL,
|
||||
WORK_AUTHORITY NVARCHAR2(1000) NULL,
|
||||
FORBIDDEN_TAG NUMBER NULL,
|
||||
|
|
@ -270,8 +270,8 @@ CREATE TABLE JCL_ORG_JOB (
|
|||
CREATE TABLE JCL_ORG_JOBDT (
|
||||
ID NUMBER NOT NULL,
|
||||
MAINID NUMBER NULL,
|
||||
JOB_RANK NUMBER NULL,
|
||||
JOB_LEVEL NUMBER NULL,
|
||||
LEVEL_ID NUMBER NULL,
|
||||
GRADE_ID NUMBER NULL,
|
||||
CREATOR NUMBER NULL,
|
||||
DELETE_TYPE NUMBER NULL,
|
||||
CREATE_TIME DATE NULL,
|
||||
|
|
|
|||
|
|
@ -248,12 +248,12 @@ CREATE TABLE JCL_ORG_JOB (
|
|||
job_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
parent_comp int null,
|
||||
parent_dept int null,
|
||||
job_sequence int null,
|
||||
sequence_id int null,
|
||||
scheme_id int null,
|
||||
parent_job int null,
|
||||
is_key_job int null,
|
||||
is_key int null,
|
||||
workplace varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
|
||||
work_description text null,
|
||||
description text null,
|
||||
work_duty text null,
|
||||
work_authority text null,
|
||||
forbidden_tag int NULL,
|
||||
|
|
@ -268,8 +268,8 @@ CREATE TABLE JCL_ORG_JOB (
|
|||
CREATE TABLE JCL_ORG_JOBDT (
|
||||
id int IDENTITY(1,1) NOT NULL,
|
||||
mainid int NULL,
|
||||
job_rank int null,
|
||||
job_level int null,
|
||||
level_id int null,
|
||||
grade_id int null,
|
||||
creator int null,
|
||||
delete_type int null,
|
||||
create_time date null,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package com.engine.organization.entity.comp.bo;
|
||||
package com.engine.organization.entity.company.bo;
|
||||
|
||||
import com.api.hrm.bean.TreeNode;
|
||||
import com.engine.organization.entity.comp.dto.CompListDTO;
|
||||
import com.engine.organization.entity.comp.param.CompSearchParam;
|
||||
import com.engine.organization.entity.comp.po.CompPO;
|
||||
import com.engine.organization.entity.company.dto.CompListDTO;
|
||||
import com.engine.organization.entity.company.param.CompSearchParam;
|
||||
import com.engine.organization.entity.company.po.CompPO;
|
||||
import com.engine.organization.entity.searchtree.SearchTree;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import weaver.crm.Maint.SectorInfoComInfo;
|
||||
|
|
@ -21,9 +21,9 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
public class CompBO {
|
||||
|
||||
public static List<CompListDTO> buildCompDTOList(Collection<CompPO> list) {
|
||||
public static List<CompListDTO> buildCompDTOList(Collection<com.engine.organization.entity.company.po.CompPO> list) {
|
||||
|
||||
Map<Long, CompPO> poMaps = list.stream().collect(Collectors.toMap(item -> item.getId(), item -> item));
|
||||
Map<Long, com.engine.organization.entity.company.po.CompPO> poMaps = list.stream().collect(Collectors.toMap(item -> item.getId(), item -> item));
|
||||
|
||||
List<CompListDTO> dtoList = list.stream().map(e -> CompListDTO.builder().id(e.getId()).compNo(e.getCompNo()).compName(e.getCompName()).compNameShort(e.getCompNameShort()).parentCompany(e.getParentCompany()).parentCompName(null == poMaps.get(e.getParentCompany()) ? "" : poMaps.get(e.getParentCompany()).getCompName()).orgCode(e.getOrgCode()).industry(new SectorInfoComInfo().getSectorInfoname(e.getIndustry() + "")).compPrincipal(getUserNameById(e.getCompPrincipal() + "")).forbiddenTag(e.getForbiddenTag()).build()).collect(Collectors.toList());
|
||||
Map<Long, List<CompListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentCompany() && 0 != item.getParentCompany()).collect(Collectors.groupingBy(CompListDTO::getParentCompany));
|
||||
|
|
@ -33,15 +33,15 @@ public class CompBO {
|
|||
}).filter(item -> null == item.getParentCompany() || 0 == item.getParentCompany()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static List<CompListDTO> buildCompDTOList(Collection<CompPO> list, List<CompPO> filterList) {
|
||||
public static List<CompListDTO> buildCompDTOList(Collection<com.engine.organization.entity.company.po.CompPO> list, List<com.engine.organization.entity.company.po.CompPO> filterList) {
|
||||
// 搜索结果为空,直接返回空
|
||||
if (CollectionUtils.isEmpty(filterList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 递归添加父级数据
|
||||
Map<Long, CompPO> poMaps = list.stream().collect(Collectors.toMap(item -> item.getId(), item -> item));
|
||||
List<CompPO> addedList = new ArrayList<>();
|
||||
for (CompPO po : filterList) {
|
||||
Map<Long, com.engine.organization.entity.company.po.CompPO> poMaps = list.stream().collect(Collectors.toMap(item -> item.getId(), item -> item));
|
||||
List<com.engine.organization.entity.company.po.CompPO> addedList = new ArrayList<>();
|
||||
for (com.engine.organization.entity.company.po.CompPO po : filterList) {
|
||||
dealParentData(addedList, po, poMaps);
|
||||
}
|
||||
|
||||
|
|
@ -53,15 +53,15 @@ public class CompBO {
|
|||
}).filter(item -> null == item.getParentCompany() || 0 == item.getParentCompany()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public static CompPO convertParamToPO(CompSearchParam param, Long employeeId) {
|
||||
public static com.engine.organization.entity.company.po.CompPO convertParamToPO(CompSearchParam param, Long employeeId) {
|
||||
if (null == param) {
|
||||
return null;
|
||||
}
|
||||
return CompPO.builder().id(param.getId() == null ? 0 : param.getId()).compNo(param.getCompNo()).compName(param.getCompName()).compNameShort(param.getCompNameShort()).parentCompany(param.getParentCompany()).orgCode(param.getOrgCode()).industry(param.getIndustry()).compPrincipal(param.getCompPrincipal()).description(param.getDescription()).forbiddenTag(param.getForbiddenTag() == null ? null : param.getForbiddenTag() ? 0 : 1).deleteType(0).createTime(new Date()).updateTime(new Date()).creator(employeeId).build();
|
||||
return com.engine.organization.entity.company.po.CompPO.builder().id(param.getId() == null ? 0 : param.getId()).compNo(param.getCompNo()).compName(param.getCompName()).compNameShort(param.getCompNameShort()).parentCompany(param.getParentCompany()).orgCode(param.getOrgCode()).industry(param.getIndustry()).compPrincipal(param.getCompPrincipal()).description(param.getDescription()).forbiddenTag(param.getForbiddenTag() == null ? null : param.getForbiddenTag() ? 0 : 1).deleteType(0).createTime(new Date()).updateTime(new Date()).creator(employeeId).build();
|
||||
|
||||
}
|
||||
|
||||
public static List<TreeNode> buildSetToSearchTree(Set<CompPO> comps) {
|
||||
public static List<TreeNode> buildSetToSearchTree(Set<com.engine.organization.entity.company.po.CompPO> comps) {
|
||||
return comps.stream().map(item -> {
|
||||
SearchTree tree = new SearchTree();
|
||||
tree.setCanClick(true);
|
||||
|
|
@ -85,7 +85,7 @@ public class CompBO {
|
|||
* @param po
|
||||
* @param poMaps
|
||||
*/
|
||||
private static void dealParentData(List<CompPO> addedList, CompPO po, Map<Long, CompPO> poMaps) {
|
||||
private static void dealParentData(List<com.engine.organization.entity.company.po.CompPO> addedList, com.engine.organization.entity.company.po.CompPO po, Map<Long, com.engine.organization.entity.company.po.CompPO> poMaps) {
|
||||
if (!addedList.contains(po)) {
|
||||
addedList.add(po);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.engine.organization.entity.comp.dto;
|
||||
package com.engine.organization.entity.company.dto;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||
import com.engine.organization.annotation.OrganizationTable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.engine.organization.entity.comp.param;
|
||||
package com.engine.organization.entity.company.param;
|
||||
|
||||
import com.engine.organization.common.BaseQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.engine.organization.entity.comp.po;
|
||||
package com.engine.organization.entity.company.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
|
|
@ -26,8 +26,20 @@ public class DepartmentBO {
|
|||
// 递归添加父级数据
|
||||
Map<Long, DepartmentPO> poMaps = list.stream().collect(Collectors.toMap(DepartmentPO::getId, item -> item));
|
||||
|
||||
List<DepartmentListDTO> dtoList = list.stream().map(e -> DepartmentListDTO.builder().id(e.getId()).deptNo(e.getDeptNo()).deptName(e.getDeptName()).deptNameShort(e.getDeptNameShort()).parentComp(e.getParentComp() + "")// 命名
|
||||
.parentDept(e.getParentDept()).parentDeptName(null == poMaps.get(e.getParentDept()) ? "" : poMaps.get(e.getParentDept()).getDeptName()).deptPrincipal(getEmployeeNameById(e.getDeptPrincipal())).showOrder(e.getShowOrder()).forbiddenTag(e.getForbiddenTag()).build()).collect(Collectors.toList());
|
||||
List<DepartmentListDTO> dtoList = list.stream().map(e ->
|
||||
DepartmentListDTO
|
||||
.builder()
|
||||
.id(e.getId())
|
||||
.deptNo(e.getDeptNo())
|
||||
.deptName(e.getDeptName())
|
||||
.deptNameShort(e.getDeptNameShort())
|
||||
.parentComp(e.getParentComp() + "")// 命名
|
||||
.parentDept(e.getParentDept())
|
||||
.parentDeptName(null == poMaps.get(e.getParentDept()) ? "" : poMaps.get(e.getParentDept())
|
||||
.getDeptName()).deptPrincipal(getEmployeeNameById(e.getDeptPrincipal()))
|
||||
.showOrder(null == e.getShowOrder() ? 0 : e.getShowOrder())
|
||||
.forbiddenTag(e.getForbiddenTag())
|
||||
.build()).collect(Collectors.toList());
|
||||
Map<Long, List<DepartmentListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentDept() && 0 != item.getParentDept()).collect(Collectors.groupingBy(DepartmentListDTO::getParentDept));
|
||||
return dtoList.stream().peek(e -> e.setChildren(collects.get(e.getId()))).filter(item -> null == item.getParentDept() || 0 == item.getParentDept()).collect(Collectors.toList());
|
||||
}
|
||||
|
|
@ -43,18 +55,29 @@ public class DepartmentBO {
|
|||
for (DepartmentPO po : filterList) {
|
||||
dealParentData(addedList, po, poMaps);
|
||||
}
|
||||
|
||||
List<DepartmentListDTO> dtoList = addedList.stream().map(e -> DepartmentListDTO.builder().id(e.getId()).deptNo(e.getDeptNo()).deptName(e.getDeptName()).deptNameShort(e.getDeptNameShort()).parentComp(e.getParentComp() + "")// 命名
|
||||
.parentDept(e.getParentDept()).parentDeptName(null == poMaps.get(e.getParentDept()) ? "" : poMaps.get(e.getParentDept()).getDeptName()).deptPrincipal(getEmployeeNameById(e.getDeptPrincipal())).showOrder(e.getShowOrder()).forbiddenTag(e.getForbiddenTag()).build()).collect(Collectors.toList());
|
||||
Map<Long, List<DepartmentListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentDept() && 0 != item.getParentDept()).collect(Collectors.groupingBy(DepartmentListDTO::getParentDept));
|
||||
return dtoList.stream().peek(e -> e.setChildren(collects.get(e.getId()))).filter(item -> null == item.getParentDept() || 0 == item.getParentDept()).collect(Collectors.toList());
|
||||
return buildDeptDTOList(addedList);
|
||||
}
|
||||
|
||||
public static DepartmentPO convertParamsToPO(DeptSearchParam param, Long employeeId) {
|
||||
public static DepartmentPO convertParamsToPO(DeptSearchParam param, long employeeId) {
|
||||
if (null == param) {
|
||||
return null;
|
||||
}
|
||||
return DepartmentPO.builder().id(param.getId() == null ? 0 : param.getId()).deptNo(param.getDeptNo()).deptName(param.getDeptName()).deptNameShort(param.getDeptNameShort()).parentComp(param.getParentComp()).parentDept(param.getParentDept()).deptPrincipal(param.getDeptPrincipal()).showOrder(param.getShowOrder()).forbiddenTag(param.getForbiddenTag() == null ? null : param.getForbiddenTag() ? 0 : 1).description(param.getDescription()).deleteType(0).createTime(new Date()).updateTime(new Date()).creator(employeeId).build();
|
||||
return DepartmentPO
|
||||
.builder()
|
||||
.id(param.getId() == null ? 0 : param.getId())
|
||||
.deptNo(param.getDeptNo())
|
||||
.deptName(param.getDeptName())
|
||||
.deptNameShort(param.getDeptNameShort())
|
||||
.parentComp(param.getParentComp())
|
||||
.parentDept(param.getParentDept())
|
||||
.deptPrincipal(param.getDeptPrincipal())
|
||||
.showOrder(param.getShowOrder())
|
||||
.forbiddenTag(param.getForbiddenTag() == null ? null : param.getForbiddenTag() ? 0 : 1)
|
||||
.description(param.getDescription()).deleteType(0)
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.creator(employeeId)
|
||||
.build();
|
||||
}
|
||||
|
||||
public static List<SingleDeptTreeVO> buildSingleDeptTreeVOS(List<DepartmentPO> departmentPOs, Long parentComp) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,104 @@
|
|||
package com.engine.organization.entity.job.bo;
|
||||
|
||||
import com.engine.organization.entity.job.dto.JobListDTO;
|
||||
import com.engine.organization.entity.job.param.JobSearchParam;
|
||||
import com.engine.organization.entity.job.po.JobPO;
|
||||
import com.engine.organization.transmethod.JobTransMethod;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/30
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class JobBO {
|
||||
|
||||
public static JobPO convertParamsToPO(JobSearchParam param, long employeeId) {
|
||||
if (null == param) {
|
||||
return null;
|
||||
}
|
||||
return JobPO
|
||||
.builder()
|
||||
.id(param.getId() == null ? 0 : param.getId())
|
||||
.jobNo(param.getJobNo())
|
||||
.jobName(param.getJobName())
|
||||
.parentComp(param.getParentComp())
|
||||
.parentDept(param.getParentDept())
|
||||
.sequenceId(param.getSequenceId())
|
||||
.schemeId(param.getSchemeId())
|
||||
.parentJob(param.getParentJob())
|
||||
.isKey(param.getIsKey())
|
||||
.workplace(param.getWorkplace())
|
||||
.description(param.getDescription())
|
||||
.workDuty(param.getWorkDuty())
|
||||
.workAuthority(param.getWorkAuthority())
|
||||
.forbiddenTag(param.getForbiddenTag() == null ? null : param.getForbiddenTag() ? 0 : 1)
|
||||
.deleteType(0)
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.creator(employeeId)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
public static List<JobListDTO> buildDTOList(Collection<JobListDTO> list) {
|
||||
// 递归添加父级数据
|
||||
Map<Long, JobListDTO> poMaps = list.stream().collect(Collectors.toMap(JobListDTO::getId, item -> item));
|
||||
|
||||
List<JobListDTO> dtoList = list.stream().map(e ->
|
||||
JobListDTO.builder()
|
||||
.id(e.getId())
|
||||
.jobNo(e.getJobNo())
|
||||
.jobName(e.getJobName())
|
||||
.compName(e.getCompName())
|
||||
.deptName(e.getDeptName())
|
||||
.sequenceName(e.getSequenceName())
|
||||
.schemeName(e.getSchemeName())
|
||||
.parentJob(e.getParentJob())
|
||||
.parentJobName(null == poMaps.get(e.getParentJob()) ? "" : poMaps.get(e.getParentJob()).getJobName())
|
||||
.isKey(JobTransMethod.getIsKeySpan(e.getIsKey()))
|
||||
.forbiddenTag(e.getForbiddenTag())
|
||||
.build()).collect(Collectors.toList());
|
||||
Map<Long, List<JobListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentJob() && 0 != item.getParentJob()).collect(Collectors.groupingBy(JobListDTO::getParentJob));
|
||||
return dtoList.stream().peek(e -> e.setChildren(collects.get(e.getId()))).filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
public static List<JobListDTO> buildJobDTOList(List<JobListDTO> allList, List<JobListDTO> filterJobPOs) {
|
||||
// 搜索结果为空,直接返回空
|
||||
if (CollectionUtils.isEmpty(filterJobPOs)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 递归添加父级数据
|
||||
Map<Long, JobListDTO> poMaps = allList.stream().collect(Collectors.toMap(JobListDTO::getId, item -> item));
|
||||
List<JobListDTO> addedList = new ArrayList<>();
|
||||
for (JobListDTO dto : filterJobPOs) {
|
||||
dealParentData(addedList, dto, poMaps);
|
||||
}
|
||||
// 递归添加父级数据
|
||||
return buildDTOList(addedList);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归获取查询后数据的父级数据
|
||||
*
|
||||
* @param addedList
|
||||
* @param po
|
||||
* @param poMaps
|
||||
*/
|
||||
private static void dealParentData(List<JobListDTO> addedList, JobListDTO po, Map<Long, JobListDTO> poMaps) {
|
||||
if (!addedList.contains(po)) {
|
||||
addedList.add(po);
|
||||
}
|
||||
JobListDTO parentDto = poMaps.get(po.getParentJob());
|
||||
if (null != parentDto) {
|
||||
dealParentData(addedList, parentDto, poMaps);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.engine.organization.entity.job.dto;
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||
import com.engine.organization.annotation.OrganizationTable;
|
||||
import com.engine.organization.annotation.OrganizationTableOperate;
|
||||
import com.engine.organization.annotation.TableTitle;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/30
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@OrganizationTable(pageId = "0efea835-dfc5-11ec-a09e-00e04c680716",
|
||||
tableType = WeaTableType.NONE,
|
||||
operates = {
|
||||
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除"),
|
||||
@OrganizationTableOperate(index = "2", text = "合并"),
|
||||
@OrganizationTableOperate(index = "3", text = "转移"),
|
||||
@OrganizationTableOperate(index = "4", text = "联查岗位"),
|
||||
@OrganizationTableOperate(index = "4", text = "联查人员")
|
||||
})
|
||||
public class JobListDTO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableTitle(title = "编号", dataIndex = "jobNo", key = "jobNo")
|
||||
private String jobNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableTitle(title = "名称", dataIndex = "jobName", key = "jobName")
|
||||
private String jobName;
|
||||
/**
|
||||
* 所属分部
|
||||
*/
|
||||
@TableTitle(title = "所属分部", dataIndex = "parentComp", key = "parentComp")
|
||||
private String compName;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableTitle(title = "所属部门", dataIndex = "parentDept", key = "parentDept")
|
||||
private String deptName;
|
||||
/**
|
||||
* 岗位序列
|
||||
*/
|
||||
@TableTitle(title = "岗位序列", dataIndex = "sequenceId", key = "sequenceId")
|
||||
private String sequenceName;
|
||||
/**
|
||||
* 等级方案
|
||||
*/
|
||||
@TableTitle(title = "等级方案", dataIndex = "schemeId", key = "schemeId")
|
||||
private String schemeName;
|
||||
/**
|
||||
* 上级岗位
|
||||
*/
|
||||
@TableTitle(title = "上级岗位", dataIndex = "parentJob", key = "parentJob")
|
||||
private String parentJobName;
|
||||
private Long parentJob;
|
||||
/**
|
||||
* 是否关键岗
|
||||
*/
|
||||
@TableTitle(title = "是否关键岗", dataIndex = "isKey", key = "isKey")
|
||||
private String isKey;
|
||||
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@TableTitle(title = "禁用标记", dataIndex = "forbiddenTag", key = "forbiddenTag")
|
||||
private Integer forbiddenTag;
|
||||
|
||||
/**
|
||||
* 子节点
|
||||
*/
|
||||
private List<JobListDTO> children;
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package com.engine.organization.entity.job.param;
|
||||
|
||||
import com.engine.organization.common.BaseQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/30
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class JobSearchParam extends BaseQueryParam {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String jobNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String jobName;
|
||||
/**
|
||||
* 所属分部
|
||||
*/
|
||||
private Long parentComp;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private Long parentDept;
|
||||
/**
|
||||
* 岗位序列
|
||||
*/
|
||||
private Long sequenceId;
|
||||
/**
|
||||
* 等级方案
|
||||
*/
|
||||
private Long schemeId;
|
||||
/**
|
||||
* 上级岗位
|
||||
*/
|
||||
private Long parentJob;
|
||||
/**
|
||||
* 是否关键岗
|
||||
*/
|
||||
private Integer isKey;
|
||||
/**
|
||||
* 工作地点
|
||||
*/
|
||||
private String workplace;
|
||||
/**
|
||||
* 工作概述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 任职职责
|
||||
*/
|
||||
private String workDuty;
|
||||
/**
|
||||
* 工作权限
|
||||
*/
|
||||
private String workAuthority;
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
private Boolean forbiddenTag;
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.engine.organization.entity.job.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/30
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class JobPO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String jobNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String jobName;
|
||||
/**
|
||||
* 所属分部
|
||||
*/
|
||||
private Long parentComp;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
private Long parentDept;
|
||||
/**
|
||||
* 岗位序列
|
||||
*/
|
||||
private Long sequenceId;
|
||||
/**
|
||||
* 等级方案
|
||||
*/
|
||||
private Long schemeId;
|
||||
/**
|
||||
* 上级岗位
|
||||
*/
|
||||
private Long parentJob;
|
||||
/**
|
||||
* 是否关键岗
|
||||
*/
|
||||
private Integer isKey;
|
||||
/**
|
||||
* 工作地点
|
||||
*/
|
||||
private String workplace;
|
||||
/**
|
||||
* 工作概述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 任职职责
|
||||
*/
|
||||
private String workDuty;
|
||||
/**
|
||||
* 工作权限
|
||||
*/
|
||||
private String workAuthority;
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
private Integer forbiddenTag;
|
||||
|
||||
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.engine.organization.entity.post.dto;
|
||||
package com.engine.organization.entity.postion.dto;
|
||||
|
||||
import com.engine.organization.entity.post.po.PostPO;
|
||||
import com.engine.organization.entity.postion.po.PostPO;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.engine.organization.entity.post.dto;
|
||||
package com.engine.organization.entity.postion.dto;
|
||||
|
||||
import com.engine.organization.entity.post.param.PostInfoSearchParam;
|
||||
import com.engine.organization.entity.post.po.PostInfoPO;
|
||||
import com.engine.organization.entity.postion.param.PostInfoSearchParam;
|
||||
import com.engine.organization.entity.postion.po.PostInfoPO;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.engine.organization.entity.post.param;
|
||||
package com.engine.organization.entity.postion.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.engine.organization.entity.post.po;
|
||||
package com.engine.organization.entity.postion.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.engine.organization.entity.post.po;
|
||||
package com.engine.organization.entity.postion.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.engine.organization.entity.post.vo;
|
||||
package com.engine.organization.entity.postion.vo;
|
||||
|
||||
import com.engine.organization.annotation.OrganizationTable;
|
||||
import com.engine.organization.annotation.OrganizationTableColumn;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.engine.organization.mapper.comp;
|
||||
|
||||
import com.engine.organization.entity.comp.po.CompPO;
|
||||
import com.engine.organization.entity.company.po.CompPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.organization.mapper.comp.CompMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.comp.po.CompPO">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.company.po.CompPO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="comp_no" property="compNo"/>
|
||||
<result column="comp_name" property="compName"/>
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
and NVL(parent_company,'0')='0'
|
||||
</sql>
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.comp.po.CompPO" keyProperty="id"
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.company.po.CompPO" keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
INSERT INTO jcl_org_comp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -171,12 +171,12 @@
|
|||
and id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="listByNo" parameterType="com.engine.organization.entity.comp.po.CompPO" resultMap="BaseResultMap">
|
||||
<select id="listByNo" parameterType="com.engine.organization.entity.company.po.CompPO" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_comp t where comp_no = #{compNo} AND delete_type = 0
|
||||
</select>
|
||||
<select id="listByFilter" parameterType="com.engine.organization.entity.comp.po.CompPO" resultMap="BaseResultMap">
|
||||
<select id="listByFilter" parameterType="com.engine.organization.entity.company.po.CompPO" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="baseColumns"/>
|
||||
FROM
|
||||
|
|
@ -252,7 +252,7 @@
|
|||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateBaseComp" parameterType="com.engine.organization.entity.comp.po.CompPO">
|
||||
<update id="updateBaseComp" parameterType="com.engine.organization.entity.company.po.CompPO">
|
||||
update jcl_org_comp
|
||||
<set>
|
||||
creator=#{creator},
|
||||
|
|
|
|||
|
|
@ -246,9 +246,6 @@
|
|||
<if test=" deptNameShort != null and deptNameShort != '' ">
|
||||
and t.dept_name_short like CONCAT('%',#{deptNameShort},'%')
|
||||
</if>
|
||||
<if test=" deptNameShort != null and deptNameShort != '' ">
|
||||
and t.dept_name_short like CONCAT('%',#{deptNameShort},'%')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<sql id="likeSQL" databaseId="oracle">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,98 @@
|
|||
package com.engine.organization.mapper.job;
|
||||
|
||||
import com.engine.organization.entity.job.dto.JobListDTO;
|
||||
import com.engine.organization.entity.job.po.JobPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/20
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface JobMapper {
|
||||
|
||||
/**
|
||||
* 根据搜索条件查询数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<JobListDTO> listByFilter(JobPO jobPO);
|
||||
|
||||
/**
|
||||
* 展示所有列表数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<JobListDTO> listNoFilter();
|
||||
|
||||
/**
|
||||
* 根据ID查询元素
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
JobPO getJobById(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 根据父ID查询元素
|
||||
*
|
||||
* @param pid
|
||||
* @return
|
||||
*/
|
||||
List<JobPO> getJobsByPid(@Param("pid") Long pid);
|
||||
|
||||
/**
|
||||
* 浏览按钮展示数据用
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> listJobsByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据编号查询数据
|
||||
*
|
||||
* @param jobNo
|
||||
* @return
|
||||
*/
|
||||
List<JobPO> listByNo(@Param("jobNo") String jobNo);
|
||||
|
||||
/**
|
||||
* 添加数据
|
||||
*
|
||||
* @param jobPO
|
||||
* @return
|
||||
*/
|
||||
int insertIgnoreNull(JobPO jobPO);
|
||||
|
||||
|
||||
/**
|
||||
* 更新主表内容
|
||||
*
|
||||
* @param jobPO
|
||||
* @return
|
||||
*/
|
||||
int updateBaseJob(JobPO jobPO);
|
||||
|
||||
/**
|
||||
* 更新禁用标识
|
||||
*
|
||||
* @param id
|
||||
* @param forbiddenTag
|
||||
* @return
|
||||
*/
|
||||
int updateForbiddenTagById(@Param("id") long id, @Param("forbiddenTag") int forbiddenTag);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
int deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,343 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.organization.mapper.job.JobMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.job.po.JobPO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="job_no" property="jobNo"/>
|
||||
<result column="job_name" property="jobName"/>
|
||||
<result column="parent_comp" property="parentComp"/>
|
||||
<result column="parent_dept" property="parentDept"/>
|
||||
<result column="sequence_id" property="sequenceId"/>
|
||||
<result column="scheme_id" property="schemeId"/>
|
||||
<result column="parent_job" property="parentJob"/>
|
||||
<result column="is_key" property="isKey"/>
|
||||
<result column="workplace" property="workplace"/>
|
||||
<result column="work_duty" property="workDuty"/>
|
||||
<result column="work_authority" property="workAuthority"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="forbidden_tag" property="forbiddenTag"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t
|
||||
.
|
||||
id
|
||||
,
|
||||
t.job_no,
|
||||
t.job_name,
|
||||
t.parent_comp,
|
||||
t.parent_dept,
|
||||
t.sequence_id,
|
||||
t.scheme_id,
|
||||
t.parent_job,
|
||||
t.is_key,
|
||||
t.workplace,
|
||||
t.description,
|
||||
t.work_duty,
|
||||
t.work_authority,
|
||||
t.forbidden_tag
|
||||
</sql>
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.job.po.JobPO"
|
||||
keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
INSERT INTO jcl_org_job
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
|
||||
<if test="jobNo != null ">
|
||||
job_no,
|
||||
</if>
|
||||
<if test="jobName != null ">
|
||||
job_name,
|
||||
</if>
|
||||
<if test="parentComp != null ">
|
||||
parent_comp,
|
||||
</if>
|
||||
<if test="parentDept != null ">
|
||||
parent_dept,
|
||||
</if>
|
||||
<if test="sequenceId != null ">
|
||||
sequence_id,
|
||||
</if>
|
||||
<if test="schemeId != null ">
|
||||
scheme_id,
|
||||
</if>
|
||||
<if test="parentJob != null ">
|
||||
parent_job,
|
||||
</if>
|
||||
<if test="isKey != null ">
|
||||
is_key,
|
||||
</if>
|
||||
<if test="workplace != null ">
|
||||
workplace,
|
||||
</if>
|
||||
<if test="description != null ">
|
||||
description,
|
||||
</if>
|
||||
<if test="workDuty != null ">
|
||||
work_duty,
|
||||
</if>
|
||||
<if test="workAuthority != null ">
|
||||
work_authority,
|
||||
</if>
|
||||
forbidden_tag,
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="jobNo != null ">
|
||||
#{jobNo},
|
||||
</if>
|
||||
<if test="jobName != null ">
|
||||
#{jobName},
|
||||
</if>
|
||||
|
||||
<if test="parentComp != null ">
|
||||
#{parentComp},
|
||||
</if>
|
||||
<if test="parentDept != null ">
|
||||
#{parentDept},
|
||||
</if>
|
||||
<if test="sequenceId != null ">
|
||||
#{sequenceId},
|
||||
</if>
|
||||
<if test="schemeId != null ">
|
||||
#{schemeId},
|
||||
</if>
|
||||
<if test="parentJob != null ">
|
||||
#{parentJob},
|
||||
</if>
|
||||
<if test="isKey != null ">
|
||||
#{isKey},
|
||||
</if>
|
||||
<if test="workplace != null ">
|
||||
#{workplace},
|
||||
</if>
|
||||
<if test="description != null ">
|
||||
#{description},
|
||||
</if>
|
||||
<if test="workDuty != null ">
|
||||
#{workDuty},
|
||||
</if>
|
||||
<if test="workAuthority != null ">
|
||||
#{workAuthority},
|
||||
</if>
|
||||
0,
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateBaseJob" parameterType="com.engine.organization.entity.job.po.JobPO">
|
||||
update jcl_org_job
|
||||
<set>
|
||||
creator=#{creator},
|
||||
update_time=#{updateTime},
|
||||
jobName=#{jobName},
|
||||
parent_comp=#{parentComp},
|
||||
parent_dept=#{parentDept},
|
||||
sequence_id=#{sequenceId},
|
||||
scheme_id=#{schemeId},
|
||||
parent_job=#{parentJob},
|
||||
is_key=#{isKey},
|
||||
workplace=#{workplace},
|
||||
description=#{description},
|
||||
work_duty=#{workDuty},
|
||||
work_authority=#{workAuthority},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
<update id="updateForbiddenTagById">
|
||||
update jcl_org_job
|
||||
<set>
|
||||
forbidden_tag=#{forbiddenTag},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
<update id="deleteByIds">
|
||||
UPDATE jcl_org_job
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="listByFilter" resultType="com.engine.organization.entity.job.dto.JobListDTO"
|
||||
parameterType="com.engine.organization.entity.job.po.JobPO">
|
||||
SELECT
|
||||
a.comp_name ,
|
||||
b.dept_name ,
|
||||
c.sequence_name,
|
||||
d.scheme_name,
|
||||
<include refid="baseColumns"/>
|
||||
FROM jcl_org_job t
|
||||
inner join jcl_org_comp a on
|
||||
t.parent_comp = a.id
|
||||
inner join jcl_org_dept b on
|
||||
t.parent_dept = b.id
|
||||
left join jcl_org_sequence c on
|
||||
t.sequence_id = c.id
|
||||
left join jcl_org_scheme d on
|
||||
t.scheme_id = d.id
|
||||
WHERE t.delete_type = 0
|
||||
<include refid="likeSQL"/>
|
||||
<if test=" parentComp != null ">
|
||||
and t.parent_comp = #{parentComp}
|
||||
</if>
|
||||
<if test=" parentDept != null ">
|
||||
and t.parent_dept = #{parentDept}
|
||||
</if>
|
||||
<if test=" sequenceId != null ">
|
||||
and t.sequence_id = #{sequenceId}
|
||||
</if>
|
||||
<if test=" schemeId != null ">
|
||||
and t.scheme_id = #{schemeId}
|
||||
</if>
|
||||
<if test=" isKey != null ">
|
||||
and t.is_key = #{isKey}
|
||||
</if>
|
||||
<if test=" forbiddenTag != null ">
|
||||
and t.forbidden_tag = #{forbiddenTag}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="listNoFilter" resultType="com.engine.organization.entity.job.dto.JobListDTO">
|
||||
SELECT
|
||||
a.comp_name ,
|
||||
b.dept_name ,
|
||||
c.sequence_name,
|
||||
d.scheme_name,
|
||||
<include refid="baseColumns"/>
|
||||
FROM jcl_org_job t
|
||||
inner join jcl_org_comp a on
|
||||
t.parent_comp = a.id
|
||||
inner join jcl_org_dept b on
|
||||
t.parent_dept = b.id
|
||||
left join jcl_org_sequence c on
|
||||
t.sequence_id = c.id
|
||||
left join jcl_org_scheme d on
|
||||
t.scheme_id = d.id
|
||||
WHERE t.delete_type = 0
|
||||
</select>
|
||||
|
||||
<select id="getJobById" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_job t
|
||||
where delete_type = 0
|
||||
and id = #{id}
|
||||
</select>
|
||||
<select id="listJobsByIds" resultType="java.util.Map">
|
||||
select
|
||||
id,
|
||||
job_name as name
|
||||
from jcl_org_job t
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="listByNo" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_job t where job_no = #{jobNo} AND delete_type = 0
|
||||
</select>
|
||||
<select id="getJobsByPid" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_job t
|
||||
where delete_type = 0
|
||||
and parent_job = #{pid}
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="likeSQL">
|
||||
<if test=" jobNo != null and jobNo != '' ">
|
||||
and t.job_no like CONCAT('%',#{jobNo},'%')
|
||||
</if>
|
||||
<if test=" jobName != null and jobName != '' ">
|
||||
and t.job_name like CONCAT('%',#{jobName},'%')
|
||||
</if>
|
||||
<if test=" workplace != null and workplace != '' ">
|
||||
and t.workplace like CONCAT('%',#{workplace},'%')
|
||||
</if>
|
||||
<if test=" description != null and description != '' ">
|
||||
and t.description like CONCAT('%',#{description},'%')
|
||||
</if>
|
||||
<if test=" workDuty != null and workDuty != '' ">
|
||||
and t.work_duty like CONCAT('%',#{workDuty},'%')
|
||||
</if>
|
||||
<if test=" workAuthority != null and workAuthority != '' ">
|
||||
and t.work_authority like CONCAT('%',#{workAuthority},'%')
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<sql id="likeSQL" databaseId="oracle">
|
||||
<if test=" jobNo != null and jobNo != '' ">
|
||||
and t.job_no like '%'||#{jobNo}||'%'
|
||||
</if>
|
||||
<if test=" jobName != null and jobName != '' ">
|
||||
and t.job_name like '%'||#{jobName}||'%'
|
||||
</if>
|
||||
<if test=" workplace != null and workplace != '' ">
|
||||
and t.workplace like '%'||#{workplace}||'%'
|
||||
</if>
|
||||
<if test=" description != null and description != '' ">
|
||||
and t.description like '%'||#{description}||'%'
|
||||
</if>
|
||||
<if test=" workDuty != null and workDuty != '' ">
|
||||
and t.work_duty like '%'||#{workDuty}||'%'
|
||||
</if>
|
||||
<if test=" workAuthority != null and workAuthority != '' ">
|
||||
and t.work_authority like '%'||#{workAuthority}||'%'
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<sql id="likeSQL" databaseId="sqlserver">
|
||||
<if test=" jobNo != null and jobNo != '' ">
|
||||
and t.job_no like '%'+#{jobNo}+'%'
|
||||
</if>
|
||||
<if test=" jobName != null and jobName != '' ">
|
||||
and t.job_name like '%'+#{jobName}+'%'
|
||||
</if>
|
||||
<if test=" workplace != null and workplace != '' ">
|
||||
and t.workplace like '%'+#{workplace}+'%'
|
||||
</if>
|
||||
<if test=" description != null and description != '' ">
|
||||
and t.description like '%'+#{description}+'%'
|
||||
</if>
|
||||
<if test=" workDuty != null and workDuty != '' ">
|
||||
and t.work_duty like '%'+#{workDuty}+'%'
|
||||
</if>
|
||||
<if test=" workAuthority != null and workAuthority != '' ">
|
||||
and t.work_authority like '%'+#{workAuthority}+'%'
|
||||
</if>
|
||||
</sql>
|
||||
</mapper>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.engine.organization.mapper.post;
|
||||
|
||||
|
||||
import com.engine.organization.entity.post.po.PostInfoPO;
|
||||
import com.engine.organization.entity.postion.po.PostInfoPO;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.organization.mapper.post.PostInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.post.po.PostInfoPO">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.postion.po.PostInfoPO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="post_info_no" property="postInfoNo"/>
|
||||
<result column="post_info_name" property="postInfoName"/>
|
||||
|
|
@ -35,14 +35,14 @@
|
|||
, t.create_time
|
||||
, t.update_time
|
||||
</sql>
|
||||
<select id="getPostInfoByID" parameterType="com.engine.organization.entity.post.po.PostInfoPO"
|
||||
<select id="getPostInfoByID" parameterType="com.engine.organization.entity.postion.po.PostInfoPO"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_post_info t where id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<select id="listByNo" parameterType="com.engine.organization.entity.post.po.PostInfoPO"
|
||||
<select id="listByNo" parameterType="com.engine.organization.entity.postion.po.PostInfoPO"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
</foreach>
|
||||
</select>
|
||||
|
||||
<update id="updatePostInfo" parameterType="com.engine.organization.entity.post.po.PostInfoPO">
|
||||
<update id="updatePostInfo" parameterType="com.engine.organization.entity.postion.po.PostInfoPO">
|
||||
update jcl_org_post_info
|
||||
<set>
|
||||
creator=#{creator},
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.post.po.PostInfoPO" keyProperty="id"
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.postion.po.PostInfoPO" keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
INSERT INTO jcl_org_post_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.post.po.PostInfoPO">
|
||||
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.postion.po.PostInfoPO">
|
||||
update jcl_org_post_info
|
||||
<set>
|
||||
forbidden_tag=#{forbiddenTag},
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.engine.organization.mapper.post;
|
|||
|
||||
|
||||
import com.engine.organization.entity.TreeData;
|
||||
import com.engine.organization.entity.post.po.PostPO;
|
||||
import com.engine.organization.entity.postion.po.PostPO;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.organization.mapper.post.PostMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.post.po.PostPO">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.postion.po.PostPO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="post_no" property="postNo"/>
|
||||
<result column="post_name" property="postName"/>
|
||||
|
|
@ -30,14 +30,14 @@
|
|||
, t.create_time
|
||||
, t.update_time
|
||||
</sql>
|
||||
<select id="getPostByID" parameterType="com.engine.organization.entity.post.po.PostPO"
|
||||
<select id="getPostByID" parameterType="com.engine.organization.entity.postion.po.PostPO"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_post t where id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<select id="listByNo" parameterType="com.engine.organization.entity.post.po.PostPO" resultMap="BaseResultMap">
|
||||
<select id="listByNo" parameterType="com.engine.organization.entity.postion.po.PostPO" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_post t where post_no = #{postNo} AND delete_type = 0
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
select id , post_name from jcl_org_post where delete_type ='0'
|
||||
</select>
|
||||
|
||||
<update id="updatePost" parameterType="com.engine.organization.entity.post.po.PostPO">
|
||||
<update id="updatePost" parameterType="com.engine.organization.entity.postion.po.PostPO">
|
||||
update jcl_org_post
|
||||
<set>
|
||||
creator=#{creator},
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.post.po.PostPO" keyProperty="id"
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.postion.po.PostPO" keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
INSERT INTO jcl_org_post
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.comp.param.CompSearchParam;
|
||||
import com.engine.organization.entity.company.param.CompSearchParam;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.job.param.JobSearchParam;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -17,4 +19,73 @@ public interface JobService {
|
|||
* @return
|
||||
*/
|
||||
Map<String, Object> getSearchTree(SearchTreeParams params);
|
||||
|
||||
/**
|
||||
* 列表数据展示
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> listPage(JobSearchParam param);
|
||||
|
||||
/**
|
||||
* 获取列表页面按钮信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getHasRight();
|
||||
|
||||
/**
|
||||
* 获取搜索条件
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getSearchCondition();
|
||||
|
||||
/**
|
||||
* 获取新增表单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getSaveForm();
|
||||
|
||||
/**
|
||||
* 获取详细表单
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getJobBaseForm(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 保存基础信息
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
int saveBaseForm(JobSearchParam params);
|
||||
|
||||
/**
|
||||
* 更新主表、拓展表、明细表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
int updateForm(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 更新禁用标记
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
int updateForbiddenTagById(JobSearchParam params);
|
||||
|
||||
/**
|
||||
* 根据ID批量删除
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
int deleteByIds(Collection<Long> ids);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.post.param.PostInfoSearchParam;
|
||||
import com.engine.organization.entity.postion.param.PostInfoSearchParam;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.TreeData;
|
||||
import com.engine.organization.entity.post.po.PostPO;
|
||||
import com.engine.organization.entity.postion.po.PostPO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import com.cloudstore.eccom.result.WeaResultMsg;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.component.OrganizationWeaTable;
|
||||
import com.engine.organization.entity.comp.bo.CompBO;
|
||||
import com.engine.organization.entity.comp.dto.CompListDTO;
|
||||
import com.engine.organization.entity.comp.param.CompSearchParam;
|
||||
import com.engine.organization.entity.comp.po.CompPO;
|
||||
import com.engine.organization.entity.company.bo.CompBO;
|
||||
import com.engine.organization.entity.company.dto.CompListDTO;
|
||||
import com.engine.organization.entity.company.param.CompSearchParam;
|
||||
import com.engine.organization.entity.company.po.CompPO;
|
||||
import com.engine.organization.mapper.comp.CompMapper;
|
||||
import com.engine.organization.mapper.extend.ExtendGroupMapper;
|
||||
import com.engine.organization.service.CompService;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
* 2:部门
|
||||
* 3:岗位
|
||||
*/
|
||||
private static final String EXTEND_TYPE = "w";
|
||||
private static final String EXTEND_TYPE = "2";
|
||||
/**
|
||||
* 主表拓展表
|
||||
*/
|
||||
|
|
@ -152,7 +152,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
public int updateForm(Map<String, Object> params) {
|
||||
DeptSearchParam searchParam = JSONObject.parseObject(JSONObject.toJSONString(params), DeptSearchParam.class);
|
||||
String groupId = (String) params.get("viewCondition");
|
||||
DepartmentPO departmentPO = DepartmentBO.convertParamsToPO(searchParam, (long) user.getUID());
|
||||
DepartmentPO departmentPO = DepartmentBO.convertParamsToPO(searchParam,user.getUID());
|
||||
int updateCount = 0;
|
||||
// 更新主表数据
|
||||
updateCount += getDepartmentMapper().updateBaseDept(departmentPO);
|
||||
|
|
@ -326,8 +326,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
private List<SearchConditionItem> getBaseForm(int viewAttr, long id) {
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
// 编号
|
||||
SearchConditionItem deptNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "编号", "deptNo");
|
||||
deptNoItem.setRules("required|string");
|
||||
SearchConditionItem deptNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 1, 50, "编号", "deptNo");
|
||||
// 名称
|
||||
SearchConditionItem deptNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "名称", "deptName");
|
||||
deptNameItem.setRules("required|string");
|
||||
|
|
|
|||
|
|
@ -28,6 +28,13 @@ import java.util.stream.Collectors;
|
|||
public class ExtServiceImpl extends Service implements ExtService {
|
||||
|
||||
private static final Integer BROWSER_TYPE = 3;
|
||||
/**
|
||||
* 分组类型
|
||||
* 1:分部
|
||||
* 2:部门
|
||||
* 3:岗位
|
||||
*/
|
||||
private static final String TYPE_JOB = "3";
|
||||
|
||||
private ExtendInfoMapper getExtendInfoMapper() {
|
||||
return MapperProxyFactory.getProxy(ExtendInfoMapper.class);
|
||||
|
|
@ -60,7 +67,7 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
for (ExtendInfoPO extendInfoPO : infoPOList) {
|
||||
SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, null == compExtMap ? null : compExtMap.get(extendInfoPO.getFieldName()));
|
||||
item.setFieldcol(16);
|
||||
if ( 2 == viewAttr && 1 == extendInfoPO.getIsrequired()) {
|
||||
if (2 == viewAttr && 1 == extendInfoPO.getIsrequired()) {
|
||||
item.setViewAttr(3);
|
||||
item.setRules("required|string");
|
||||
}
|
||||
|
|
@ -91,6 +98,9 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
}
|
||||
return item.getFieldName();
|
||||
}).collect(Collectors.joining(","));
|
||||
//if (TYPE_JOB.equals(extendType)) {
|
||||
// fields += "";
|
||||
//}
|
||||
// 去除null 元素
|
||||
List<Map<String, Object>> maps = getExtDTMapper().listCompExtDT(tableName, id, fields);
|
||||
maps.removeIf(Objects::isNull);
|
||||
|
|
@ -167,6 +177,13 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
}
|
||||
map.put(extendInfoPO.getFieldName(), params.get(extendInfoPO.getFieldName() + "_" + i));
|
||||
}
|
||||
//// 岗位管理,添加特殊字段
|
||||
//if (TYPE_JOB.equals(extendType)) {
|
||||
// map.put("level_id", params.get("level_id_" + i));
|
||||
// map.put("level_id_span", params.get("level_id_span_" + i));
|
||||
// map.put("grade_id", params.get("grade_id_" + i));
|
||||
// map.put("grade_id_span", params.get("grade_id_span_" + i));
|
||||
//}
|
||||
map.put("mainid", id);
|
||||
map.put("creator", user.getUID());
|
||||
map.put("delete_type", 0);
|
||||
|
|
|
|||
|
|
@ -1,22 +1,48 @@
|
|||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.api.browser.bean.BrowserBean;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.api.hrm.bean.TreeNode;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.component.OrganizationWeaTable;
|
||||
import com.engine.organization.entity.QueryParam;
|
||||
import com.engine.organization.entity.comp.bo.CompBO;
|
||||
import com.engine.organization.entity.comp.po.CompPO;
|
||||
import com.engine.organization.entity.company.bo.CompBO;
|
||||
import com.engine.organization.entity.company.po.CompPO;
|
||||
import com.engine.organization.entity.department.bo.DepartmentBO;
|
||||
import com.engine.organization.entity.department.dto.DepartmentListDTO;
|
||||
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||
import com.engine.organization.entity.job.bo.JobBO;
|
||||
import com.engine.organization.entity.job.dto.JobListDTO;
|
||||
import com.engine.organization.entity.job.param.JobSearchParam;
|
||||
import com.engine.organization.entity.job.po.JobPO;
|
||||
import com.engine.organization.entity.searchtree.SearchTree;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.mapper.comp.CompMapper;
|
||||
import com.engine.organization.mapper.department.DepartmentMapper;
|
||||
import com.engine.organization.mapper.extend.ExtendGroupMapper;
|
||||
import com.engine.organization.mapper.job.JobMapper;
|
||||
import com.engine.organization.mapper.scheme.SchemeMapper;
|
||||
import com.engine.organization.mapper.sequence.SequenceMapper;
|
||||
import com.engine.organization.service.ExtService;
|
||||
import com.engine.organization.service.JobService;
|
||||
import com.engine.organization.util.MenuBtn;
|
||||
import com.engine.organization.util.OrganizationAssert;
|
||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import com.engine.organization.util.page.Column;
|
||||
import com.engine.organization.util.page.PageInfo;
|
||||
import com.engine.organization.util.page.PageUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.StringUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -29,10 +55,37 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
public class JobServiceImpl extends Service implements JobService {
|
||||
|
||||
/**
|
||||
* 左侧树 类型表示
|
||||
* <p>
|
||||
* 0:集团
|
||||
* 1:分部
|
||||
* 2:部门
|
||||
*/
|
||||
private static final String TYPE_GROUP = "0";
|
||||
private static final String TYPE_COMP = "1";
|
||||
private static final String TYPE_DEPT = "2";
|
||||
|
||||
/**
|
||||
* 分组类型
|
||||
* 1:分部
|
||||
* 2:部门
|
||||
* 3:岗位
|
||||
*/
|
||||
private static final String EXTEND_TYPE = "3";
|
||||
/**
|
||||
* 主表拓展表
|
||||
*/
|
||||
private static final String JCL_ORG_JOBEXT = "JCL_ORG_JOBEXT";
|
||||
/**
|
||||
* 明细表拓展表
|
||||
*/
|
||||
private static final String JCL_ORG_JOBEXT_DT1 = "JCL_ORG_JOBEXT_DT1";
|
||||
|
||||
private JobMapper getJobMapper() {
|
||||
return MapperProxyFactory.getProxy(JobMapper.class);
|
||||
}
|
||||
|
||||
private CompMapper getCompMapper() {
|
||||
return MapperProxyFactory.getProxy(CompMapper.class);
|
||||
}
|
||||
|
|
@ -41,6 +94,23 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
return MapperProxyFactory.getProxy(DepartmentMapper.class);
|
||||
}
|
||||
|
||||
private SequenceMapper getSequenceMapper() {
|
||||
return MapperProxyFactory.getProxy(SequenceMapper.class);
|
||||
}
|
||||
|
||||
private SchemeMapper getSchemeMapper() {
|
||||
return MapperProxyFactory.getProxy(SchemeMapper.class);
|
||||
}
|
||||
|
||||
private ExtendGroupMapper getExtendGroupMapper() {
|
||||
return MapperProxyFactory.getProxy(ExtendGroupMapper.class);
|
||||
}
|
||||
|
||||
private ExtService getExtService(User user) {
|
||||
return ServiceUtil.getService(ExtServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getSearchTree(SearchTreeParams params) {
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
|
|
@ -70,6 +140,249 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
return dataMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listPage(JobSearchParam param) {
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
JobPO jobPO = JobBO.convertParamsToPO(param, (long) user.getUID());
|
||||
boolean filter = isFilter(jobPO);
|
||||
PageInfo<JobListDTO> pageInfos;
|
||||
List<JobListDTO> allList = getJobMapper().listNoFilter();
|
||||
// 通过子级遍历父级元素
|
||||
if (filter) {
|
||||
// 根据条件获取元素
|
||||
List<JobListDTO> filterJobPOs = getJobMapper().listByFilter(jobPO);
|
||||
// 添加父级元素
|
||||
List<JobListDTO> compListDTOS = JobBO.buildJobDTOList(allList, filterJobPOs);
|
||||
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
|
||||
pageInfos = new PageInfo<>(subList, JobListDTO.class);
|
||||
pageInfos.setTotal(compListDTOS.size());
|
||||
} else {
|
||||
// 组合list
|
||||
List<JobListDTO> compListDTOS = JobBO.buildDTOList(allList);
|
||||
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
|
||||
pageInfos = new PageInfo<>(subList, JobListDTO.class);
|
||||
pageInfos.setTotal(compListDTOS.size());
|
||||
}
|
||||
|
||||
pageInfos.setPageNum(param.getCurrent());
|
||||
pageInfos.setPageSize(param.getPageSize());
|
||||
|
||||
OrganizationWeaTable<DepartmentListDTO> table = new OrganizationWeaTable<>(user, DepartmentListDTO.class);
|
||||
List<Column> columns = pageInfos.getColumns();
|
||||
List<WeaTableColumn> weaTableColumn = columns.stream().map(v -> new WeaTableColumn("100", v.getTitle(), v.getKey())).collect(Collectors.toList());
|
||||
|
||||
table.setColumns(weaTableColumn);
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
||||
datas.put("pageInfo", pageInfos);
|
||||
datas.put("dataKey", result.getResultMap());
|
||||
return datas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getHasRight() {
|
||||
Map<String, Object> btnDatas = new HashMap<>();
|
||||
ArrayList<MenuBtn> topMenuList = new ArrayList<>();
|
||||
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
|
||||
// 新增
|
||||
topMenuList.add(MenuBtn.topMenu_addNew());
|
||||
// 批量删除
|
||||
topMenuList.add(MenuBtn.topMenu_batchDelete());
|
||||
// 复制
|
||||
topMenuList.add(MenuBtn.topMenu_copy());
|
||||
btnDatas.put("topMenu", topMenuList);
|
||||
// 新增
|
||||
rightMenuList.add(MenuBtn.rightMenu_addNew());
|
||||
// 复制
|
||||
rightMenuList.add(MenuBtn.rightMenu_copy());
|
||||
// 日志
|
||||
rightMenuList.add(MenuBtn.rightMenu_btnLog());
|
||||
btnDatas.put("rightMenu", rightMenuList);
|
||||
return btnDatas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getSearchCondition() {
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
// 编号
|
||||
SearchConditionItem jobNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "编号", "jobNo");
|
||||
// 名称
|
||||
SearchConditionItem jobNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "jobName");
|
||||
// 所属分部
|
||||
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "161", "parentComp", "compBrowser");
|
||||
// 所属部门
|
||||
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "161", "parentDept", "deptBrowser");
|
||||
// 岗位序列
|
||||
SearchConditionItem sequenceBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位序列", "161", "sequenceId", "sequenceBrowser");
|
||||
// 等级方案
|
||||
SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位序列", "161", "schemeId", "schemeBrowser");
|
||||
// 上级岗位
|
||||
SearchConditionItem parentJobBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级岗位", "161", "parentJob", "jobBrowser");
|
||||
// 是否关键岗
|
||||
List<SearchConditionOption> isKeyOptions = new ArrayList<>();
|
||||
SearchConditionOption yesOption = new SearchConditionOption("0", "否");
|
||||
SearchConditionOption noOption = new SearchConditionOption("1", "是");
|
||||
isKeyOptions.add(yesOption);
|
||||
isKeyOptions.add(noOption);
|
||||
SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "禁用标记", "forbiddenTag");
|
||||
// 工作地点
|
||||
SearchConditionItem workplaceItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作地点", "workplace");
|
||||
// 工作概述
|
||||
SearchConditionItem descriptionItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作概述", "description");
|
||||
// 任职职责
|
||||
SearchConditionItem workDutyItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "任职职责", "workDuty");
|
||||
// 工作权限
|
||||
SearchConditionItem workAuthorityItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作权限", "workAuthority");
|
||||
// 禁用标记
|
||||
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
||||
SearchConditionOption enableOption = new SearchConditionOption("true", "启用");
|
||||
SearchConditionOption disableOption = new SearchConditionOption("false", "禁用");
|
||||
selectOptions.add(enableOption);
|
||||
selectOptions.add(disableOption);
|
||||
SearchConditionItem forbiddenTagItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "禁用标记", "forbiddenTag");
|
||||
|
||||
conditionItems.add(jobNoItem);
|
||||
conditionItems.add(jobNameItem);
|
||||
conditionItems.add(parentCompBrowserItem);
|
||||
conditionItems.add(parentDeptBrowserItem);
|
||||
conditionItems.add(sequenceBrowserItem);
|
||||
conditionItems.add(schemeBrowserItem);
|
||||
conditionItems.add(parentJobBrowserItem);
|
||||
conditionItems.add(isKeyItem);
|
||||
conditionItems.add(workplaceItem);
|
||||
conditionItems.add(descriptionItem);
|
||||
conditionItems.add(workDutyItem);
|
||||
conditionItems.add(workAuthorityItem);
|
||||
conditionItems.add(forbiddenTagItem);
|
||||
|
||||
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||
apiDatas.put("conditions", addGroups);
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getSaveForm() {
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
// 编号
|
||||
SearchConditionItem jobNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "编号", "jobNo");
|
||||
jobNoItem.setRules("required|string");
|
||||
// 名称
|
||||
SearchConditionItem jobNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "名称", "jobName");
|
||||
jobNoItem.setRules("required|string");
|
||||
// 所属分部
|
||||
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "161", "parentComp", "compBrowser");
|
||||
parentCompBrowserItem.setRules("required|string");
|
||||
// 所属部门
|
||||
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "161", "parentDept", "deptBrowser");
|
||||
parentDeptBrowserItem.setRules("required|string");
|
||||
// 岗位序列
|
||||
SearchConditionItem sequenceBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位序列", "161", "sequenceId", "sequenceBrowser");
|
||||
// 等级方案
|
||||
SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位序列", "161", "schemeId", "schemeBrowser");
|
||||
// 上级岗位
|
||||
SearchConditionItem parentJobBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级岗位", "161", "parentJob", "jobBrowser");
|
||||
// 是否关键岗
|
||||
List<SearchConditionOption> isKeyOptions = new ArrayList<>();
|
||||
SearchConditionOption yesOption = new SearchConditionOption("0", "否");
|
||||
SearchConditionOption noOption = new SearchConditionOption("1", "是");
|
||||
isKeyOptions.add(yesOption);
|
||||
isKeyOptions.add(noOption);
|
||||
SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "禁用标记", "forbiddenTag");
|
||||
|
||||
conditionItems.add(jobNoItem);
|
||||
conditionItems.add(jobNameItem);
|
||||
conditionItems.add(parentCompBrowserItem);
|
||||
conditionItems.add(parentDeptBrowserItem);
|
||||
conditionItems.add(sequenceBrowserItem);
|
||||
conditionItems.add(schemeBrowserItem);
|
||||
conditionItems.add(parentJobBrowserItem);
|
||||
conditionItems.add(isKeyItem);
|
||||
|
||||
addGroups.add(new SearchConditionGroup("基本信息", true, conditionItems));
|
||||
apiDatas.put("condition", addGroups);
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getJobBaseForm(Map<String, Object> params) {
|
||||
OrganizationAssert.notNull(params.get("viewAttr"), "请标识操作类型");
|
||||
|
||||
// 2编辑 1查看
|
||||
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
|
||||
long id = Long.parseLong((String) params.get("id"));
|
||||
String groupId = (String) params.get("viewCondition");
|
||||
|
||||
HashMap<String, Object> buttonsMap = new HashMap<>();
|
||||
buttonsMap.put("hasEdit", true);
|
||||
buttonsMap.put("hasSave", true);
|
||||
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
if (StringUtil.isEmpty(groupId) || "0".equals(groupId)) {
|
||||
addGroups.add(new SearchConditionGroup("基本信息", true, getBaseForm(viewAttr, id)));
|
||||
} else {
|
||||
addGroups.add(new SearchConditionGroup(getExtendGroupMapper().getGroupNameById(groupId), true, getExtService(user).getExtForm(user, EXTEND_TYPE, JCL_ORG_JOBEXT, viewAttr, id, groupId)));
|
||||
}
|
||||
|
||||
HashMap<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("buttons", buttonsMap);
|
||||
resultMap.put("conditions", addGroups);
|
||||
resultMap.put("id", id);
|
||||
// 拓展页面分组
|
||||
resultMap.put("tabInfo", getExtService(user).getTabInfo(EXTEND_TYPE, JCL_ORG_JOBEXT));
|
||||
// 处理明细表
|
||||
resultMap.put("tables", getExtService(user).getExtendTables(user, EXTEND_TYPE, JCL_ORG_JOBEXT_DT1, id, viewAttr, false));
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
|
||||
apiDatas.put("result", resultMap);
|
||||
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int saveBaseForm(JobSearchParam params) {
|
||||
List<JobPO> list = getJobMapper().listByNo(Util.null2String(params.getJobNo()));
|
||||
OrganizationAssert.isEmpty(list, "编号不允许重复");
|
||||
JobPO jobPO = JobBO.convertParamsToPO(params, (long) user.getUID());
|
||||
return getJobMapper().insertIgnoreNull(jobPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateForm(Map<String, Object> params) {
|
||||
JobSearchParam searchParam = JSONObject.parseObject(JSONObject.toJSONString(params), JobSearchParam.class);
|
||||
String groupId = (String) params.get("viewCondition");
|
||||
JobPO jobPO = JobBO.convertParamsToPO(searchParam, user.getUID());
|
||||
int updateCount = 0;
|
||||
// 更新主表数据
|
||||
updateCount += getJobMapper().updateBaseJob(jobPO);
|
||||
// 更新主表拓展表
|
||||
updateCount += getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOBEXT, params, groupId, jobPO.getId());
|
||||
//更新明细表
|
||||
getExtService(user).updateExtDT(user, EXTEND_TYPE, JCL_ORG_JOBEXT_DT1, params, jobPO.getId());
|
||||
return updateCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateForbiddenTagById(JobSearchParam params) {
|
||||
JobPO jobPO = JobPO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build();
|
||||
return getJobMapper().updateForbiddenTagById(jobPO.getId(), jobPO.getForbiddenTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
||||
Collection<Long> deleteIds = new ArrayList<>();
|
||||
// 递归删除子节点
|
||||
getChildIds(ids, deleteIds);
|
||||
return getJobMapper().deleteByIds(deleteIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加查询元素的父级元素
|
||||
*
|
||||
|
|
@ -263,4 +576,145 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
}).filter(item -> isTop(item.getPid())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有搜索查询
|
||||
*
|
||||
* @param jobPO
|
||||
* @return
|
||||
*/
|
||||
private boolean isFilter(JobPO jobPO) {
|
||||
return !(StringUtil.isEmpty(jobPO.getJobNo())
|
||||
&& StringUtil.isEmpty(jobPO.getJobName())
|
||||
&& StringUtil.isEmpty(jobPO.getWorkplace())
|
||||
&& StringUtil.isEmpty(jobPO.getDescription())
|
||||
&& StringUtil.isEmpty(jobPO.getWorkDuty())
|
||||
&& StringUtil.isEmpty(jobPO.getWorkAuthority())
|
||||
&& null == jobPO.getParentComp()
|
||||
&& null == jobPO.getParentDept()
|
||||
&& null == jobPO.getSequenceId()
|
||||
&& null == jobPO.getSchemeId()
|
||||
&& null == jobPO.getIsKey())
|
||||
&& null == jobPO.getForbiddenTag();
|
||||
}
|
||||
|
||||
/**
|
||||
* 基本信息基础表单
|
||||
*
|
||||
* @param viewAttr
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
private List<SearchConditionItem> getBaseForm(int viewAttr, long id) {
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
// 编号
|
||||
SearchConditionItem jobNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 1, 50, "编号", "jobNo");
|
||||
// 名称
|
||||
SearchConditionItem jobNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "名称", "jobName");
|
||||
jobNoItem.setRules("required|string");
|
||||
// 所属分部
|
||||
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "161", "parentComp", "compBrowser");
|
||||
parentCompBrowserItem.setRules("required|string");
|
||||
// 所属部门
|
||||
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "161", "parentDept", "deptBrowser");
|
||||
parentDeptBrowserItem.setRules("required|string");
|
||||
// 岗位序列
|
||||
SearchConditionItem sequenceBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位序列", "161", "sequenceId", "sequenceBrowser");
|
||||
// 等级方案
|
||||
SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位序列", "161", "schemeId", "schemeBrowser");
|
||||
// 上级岗位
|
||||
SearchConditionItem parentJobBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级岗位", "161", "parentJob", "jobBrowser");
|
||||
// 是否关键岗
|
||||
List<SearchConditionOption> isKeyOptions = new ArrayList<>();
|
||||
SearchConditionOption yesOption = new SearchConditionOption("0", "否");
|
||||
SearchConditionOption noOption = new SearchConditionOption("1", "是");
|
||||
isKeyOptions.add(yesOption);
|
||||
isKeyOptions.add(noOption);
|
||||
SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "禁用标记", "forbiddenTag");
|
||||
// 工作地点
|
||||
SearchConditionItem workplaceItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作地点", "workplace");
|
||||
// 工作概述
|
||||
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, false, 2, 50, "工作概述", "description");
|
||||
// 任职职责
|
||||
SearchConditionItem workDutyItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, false, 2, 50, "任职职责", "workDuty");
|
||||
// 工作权限
|
||||
SearchConditionItem workAuthorityItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, false, 2, 50, "工作权限", "workAuthority");
|
||||
|
||||
conditionItems.add(jobNoItem);
|
||||
conditionItems.add(jobNameItem);
|
||||
conditionItems.add(parentCompBrowserItem);
|
||||
conditionItems.add(parentDeptBrowserItem);
|
||||
conditionItems.add(sequenceBrowserItem);
|
||||
conditionItems.add(schemeBrowserItem);
|
||||
conditionItems.add(parentJobBrowserItem);
|
||||
conditionItems.add(isKeyItem);
|
||||
conditionItems.add(workplaceItem);
|
||||
conditionItems.add(descriptionItem);
|
||||
conditionItems.add(workDutyItem);
|
||||
conditionItems.add(workAuthorityItem);
|
||||
|
||||
|
||||
// 编辑、查看状态赋值,设置只读状态
|
||||
JobPO jobPO = getJobMapper().getJobById(id);
|
||||
OrganizationAssert.notNull(jobPO, "数据不存在或数据已删除");
|
||||
jobNoItem.setValue(jobPO.getJobNo());
|
||||
jobNameItem.setValue(jobPO.getJobName());
|
||||
isKeyItem.setValue(jobPO.getIsKey());
|
||||
workplaceItem.setValue(jobPO.getWorkplace());
|
||||
descriptionItem.setValue(jobPO.getDescription());
|
||||
workDutyItem.setValue(jobPO.getWorkDuty());
|
||||
workAuthorityItem.setValue(jobPO.getWorkAuthority());
|
||||
|
||||
if (null != jobPO.getParentComp()) {
|
||||
BrowserBean browserBean = parentCompBrowserItem.getBrowserConditionParam();
|
||||
List<Map<String, Object>> compMaps = getCompMapper().listCompsByIds(QueryParam.builder().ids(jobPO.getParentComp().toString()).build().getIds());
|
||||
browserBean.setReplaceDatas(compMaps);
|
||||
parentCompBrowserItem.setBrowserConditionParam(browserBean);
|
||||
}
|
||||
if (null != jobPO.getParentDept()) {
|
||||
BrowserBean browserBean = parentDeptBrowserItem.getBrowserConditionParam();
|
||||
List<Map<String, Object>> deptMaps = getDepartmentMapper().listDeptsByIds(QueryParam.builder().ids(jobPO.getParentDept().toString()).build().getIds());
|
||||
browserBean.setReplaceDatas(deptMaps);
|
||||
parentDeptBrowserItem.setBrowserConditionParam(browserBean);
|
||||
}
|
||||
if (null != jobPO.getSequenceId()) {
|
||||
BrowserBean browserBean = sequenceBrowserItem.getBrowserConditionParam();
|
||||
List<Map<String, Object>> deptMaps = getSequenceMapper().listSequencesByIds(QueryParam.builder().ids(jobPO.getSequenceId().toString()).build().getIds());
|
||||
browserBean.setReplaceDatas(deptMaps);
|
||||
sequenceBrowserItem.setBrowserConditionParam(browserBean);
|
||||
}
|
||||
if (null != jobPO.getSchemeId()) {
|
||||
BrowserBean browserBean = schemeBrowserItem.getBrowserConditionParam();
|
||||
List<Map<String, Object>> deptMaps = getSchemeMapper().listSchemesByIds(QueryParam.builder().ids(jobPO.getSchemeId().toString()).build().getIds());
|
||||
browserBean.setReplaceDatas(deptMaps);
|
||||
schemeBrowserItem.setBrowserConditionParam(browserBean);
|
||||
}
|
||||
if (null != jobPO.getParentJob()) {
|
||||
BrowserBean browserBean = parentJobBrowserItem.getBrowserConditionParam();
|
||||
List<Map<String, Object>> deptMaps = getJobMapper().listJobsByIds(QueryParam.builder().ids(jobPO.getParentJob().toString()).build().getIds());
|
||||
browserBean.setReplaceDatas(deptMaps);
|
||||
schemeBrowserItem.setBrowserConditionParam(browserBean);
|
||||
}
|
||||
|
||||
// 查看,全部置为只读
|
||||
if (1 == viewAttr) {
|
||||
for (SearchConditionItem item : conditionItems) {
|
||||
item.setViewAttr(viewAttr);
|
||||
}
|
||||
}
|
||||
return conditionItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取待删除数据的子级元素
|
||||
*
|
||||
* @param ids
|
||||
* @param deleteIds
|
||||
*/
|
||||
private void getChildIds(Collection<Long> ids, Collection<Long> deleteIds) {
|
||||
for (Long id : ids) {
|
||||
deleteIds.add(id);
|
||||
Collection<Long> childIds = getJobMapper().getJobsByPid(id).stream().map(JobPO::getId).collect(Collectors.toList());
|
||||
getChildIds(childIds, deleteIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ import com.cloudstore.eccom.result.WeaResultMsg;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.component.OrganizationWeaTable;
|
||||
import com.engine.organization.entity.QueryParam;
|
||||
import com.engine.organization.entity.post.dto.PostInfoDTO;
|
||||
import com.engine.organization.entity.post.param.PostInfoSearchParam;
|
||||
import com.engine.organization.entity.post.po.PostInfoPO;
|
||||
import com.engine.organization.entity.post.vo.PostInfoTableVO;
|
||||
import com.engine.organization.entity.postion.dto.PostInfoDTO;
|
||||
import com.engine.organization.entity.postion.param.PostInfoSearchParam;
|
||||
import com.engine.organization.entity.postion.po.PostInfoPO;
|
||||
import com.engine.organization.entity.postion.vo.PostInfoTableVO;
|
||||
import com.engine.organization.mapper.post.PostInfoMapper;
|
||||
import com.engine.organization.mapper.post.PostMapper;
|
||||
import com.engine.organization.service.PostInfoService;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import com.api.browser.bean.SearchConditionGroup;
|
|||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.TreeData;
|
||||
import com.engine.organization.entity.post.dto.PostDTO;
|
||||
import com.engine.organization.entity.post.po.PostPO;
|
||||
import com.engine.organization.entity.postion.dto.PostDTO;
|
||||
import com.engine.organization.entity.postion.po.PostPO;
|
||||
import com.engine.organization.mapper.post.PostMapper;
|
||||
import com.engine.organization.service.PostService;
|
||||
import com.engine.organization.util.OrganizationAssert;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.engine.organization.entity.staff.po.StaffPO;
|
|||
import com.engine.organization.entity.staff.vo.StaffTableVO;
|
||||
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.StaffService;
|
||||
|
|
@ -51,9 +52,10 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|||
private DepartmentMapper getDepartmentMapper() {
|
||||
return MapperProxyFactory.getProxy(DepartmentMapper.class);
|
||||
}
|
||||
//private JobMapper getJobMapper() {
|
||||
// return MapperProxyFactory.getProxy(JobMapper.class);
|
||||
//}
|
||||
|
||||
private JobMapper getJobMapper() {
|
||||
return MapperProxyFactory.getProxy(JobMapper.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
@ -189,11 +191,11 @@ public class StaffServiceImpl extends Service implements StaffService {
|
|||
List<Map<String, Object>> deptIdMaps = getDepartmentMapper().listDeptsByIds(QueryParam.builder().ids(staffPO.getPlanId().toString()).build().getIds());
|
||||
deptIdItemBean.setReplaceDatas(deptIdMaps);
|
||||
deptIdItem.setBrowserConditionParam(deptIdItemBean);
|
||||
// TODO
|
||||
//BrowserBean jobIdItemBean = jobIdItem.getBrowserConditionParam();
|
||||
//List<Map<String, Object>> jobIdMaps = getJobMapper().listJobsByIds(QueryParam.builder().ids(staffPO.getPlanId().toString()).build().getIds());
|
||||
//jobIdItemBean.setReplaceDatas(jobIdMaps);
|
||||
//jobIdItem.setBrowserConditionParam(jobIdItemBean);
|
||||
|
||||
BrowserBean jobIdItemBean = jobIdItem.getBrowserConditionParam();
|
||||
List<Map<String, Object>> jobIdMaps = getJobMapper().listJobsByIds(QueryParam.builder().ids(staffPO.getPlanId().toString()).build().getIds());
|
||||
jobIdItemBean.setReplaceDatas(jobIdMaps);
|
||||
jobIdItem.setBrowserConditionParam(jobIdItemBean);
|
||||
|
||||
staffNumItem.setValue(staffPO.getStaffNum());
|
||||
controlPolicyItem.setValue(staffPO.getControlPolicy());
|
||||
|
|
|
|||
|
|
@ -15,4 +15,12 @@ public class JobTransMethod {
|
|||
//return names;
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String getIsKeySpan(String isKey) {
|
||||
if ("0".equals(isKey))
|
||||
return "是";
|
||||
else
|
||||
return "否";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,6 +45,15 @@ public class MenuBtn {
|
|||
return MenuBtn.builder().isBatch("1").isTop("1").menuFun("batchDelete").menuIcon("icon-coms-Batch-delete").menuName("批量删除").type( "BTN_BatchDelete").build();
|
||||
}
|
||||
|
||||
/**
|
||||
* topMenu批量删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static MenuBtn topMenu_copy() {
|
||||
return MenuBtn.builder().isBatch("1").isTop("1").menuFun("copy").menuIcon("icon-coms-form-copy").menuName("复制").type( "BTN_Copy").build();
|
||||
}
|
||||
|
||||
/**
|
||||
* rightMenu新增
|
||||
*
|
||||
|
|
@ -63,6 +72,15 @@ public class MenuBtn {
|
|||
return MenuBtn.builder().isBatch("0").isTop("0").menuFun("log").menuIcon("icon-coms-Print-log").menuName("日志").type("BTN_log").build();
|
||||
}
|
||||
|
||||
/**
|
||||
* topMenu批量删除
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static MenuBtn rightMenu_copy() {
|
||||
return MenuBtn.builder().isBatch("0").isTop("0").menuFun("copy").menuIcon("icon-coms-form-copy").menuName("复制").type( "BTN_Copy").build();
|
||||
}
|
||||
|
||||
/**
|
||||
* rightMenu显示列定制
|
||||
*
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.engine.organization.web;
|
|||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.QueryParam;
|
||||
import com.engine.organization.entity.comp.param.CompSearchParam;
|
||||
import com.engine.organization.entity.company.param.CompSearchParam;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.CompWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
|
|
|
|||
|
|
@ -4,14 +4,19 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.QueryParam;
|
||||
import com.engine.organization.entity.job.param.JobSearchParam;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.JobWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
|
|
@ -29,6 +34,13 @@ public class JobController {
|
|||
return ServiceUtil.getService(JobWrapper.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 左侧树接口
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getSearchTree")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
|
@ -39,4 +51,183 @@ public class JobController {
|
|||
return getJobWrapper(user).getSearchTree(params);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取list列表
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/listPage")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult listDept(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody JobSearchParam params) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getJobWrapper(user).listPage(params));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存表单
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getSaveForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getSaveForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getJobWrapper(user).getSaveForm());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取基础表单
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getJobBaseForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getJobBaseForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getJobWrapper(user).getJobBaseForm(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存基础信息
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/saveBaseForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult saveBaseComp(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody JobSearchParam params) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getJobWrapper(user).saveBaseForm(params));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新禁用标记
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/updateForbiddenTagById")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody JobSearchParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getJobWrapper(user).updateForbiddenTagById(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新表单
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/updateForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult updateForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getJobWrapper(user).updateForm(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID批量删除数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/deleteByIds")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QueryParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getJobWrapper(user).deleteByIds(param.getIds()));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表页顶部按钮
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getHasRight")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getHasRight(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getJobWrapper(user).getHasRight());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 高级搜索条件
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getSearchCondition")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getJobWrapper(user).getSearchCondition());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.engine.organization.web;
|
|||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.QueryParam;
|
||||
import com.engine.organization.entity.post.po.PostPO;
|
||||
import com.engine.organization.entity.postion.po.PostPO;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.PostWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.engine.organization.web;
|
|||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.QueryParam;
|
||||
import com.engine.organization.entity.post.param.PostInfoSearchParam;
|
||||
import com.engine.organization.entity.postion.param.PostInfoSearchParam;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.PostInfoWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.engine.organization.webservice;
|
||||
|
||||
import com.engine.organization.entity.comp.po.CompPO;
|
||||
import com.engine.organization.entity.company.po.CompPO;
|
||||
|
||||
import javax.jws.WebMethod;
|
||||
import javax.jws.WebService;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.engine.organization.webservice;
|
||||
|
||||
import com.engine.organization.entity.comp.po.CompPO;
|
||||
import com.engine.organization.entity.company.po.CompPO;
|
||||
import com.engine.organization.mapper.comp.CompMapper;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.engine.organization.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.comp.param.CompSearchParam;
|
||||
import com.engine.organization.entity.company.param.CompSearchParam;
|
||||
import com.engine.organization.service.CompService;
|
||||
import com.engine.organization.service.impl.CompServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@ package com.engine.organization.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.job.param.JobSearchParam;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.service.JobService;
|
||||
import com.engine.organization.service.impl.JobServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -20,8 +22,101 @@ public class JobWrapper extends Service {
|
|||
return ServiceUtil.getService(JobServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 左侧树
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getSearchTree(SearchTreeParams params) {
|
||||
return getJobService(user).getSearchTree(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> listPage(JobSearchParam param) {
|
||||
return getJobService(user).listPage(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 顶部按钮
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getHasRight() {
|
||||
return getJobService(user).getHasRight();
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索条件
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getSearchCondition() {
|
||||
return getJobService(user).getSearchCondition();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新增表单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getSaveForm() {
|
||||
return getJobService(user).getSaveForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取详细表单
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getJobBaseForm(Map<String, Object> params) {
|
||||
return getJobService(user).getJobBaseForm(params);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存基础信息
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public int saveBaseForm(JobSearchParam params) {
|
||||
return getJobService(user).saveBaseForm(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新主表、拓展表、明细表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public int updateForm(Map<String, Object> params) {
|
||||
return getJobService(user).updateForm(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public int updateForbiddenTagById(JobSearchParam params) {
|
||||
return getJobService(user).updateForbiddenTagById(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getJobService(user).deleteByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.engine.organization.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.post.param.PostInfoSearchParam;
|
||||
import com.engine.organization.entity.postion.param.PostInfoSearchParam;
|
||||
import com.engine.organization.service.PostInfoService;
|
||||
import com.engine.organization.service.impl.PostInfoServiceImpl;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.engine.organization.wrapper;
|
|||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.TreeData;
|
||||
import com.engine.organization.entity.post.po.PostPO;
|
||||
import com.engine.organization.entity.postion.po.PostPO;
|
||||
import com.engine.organization.service.PostService;
|
||||
import com.engine.organization.service.impl.PostServiceImpl;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
|
|||
Loading…
Reference in New Issue