!43 s生产合并

Merge pull request !43 from reset/develop
pull/103/MERGE
reset 3 years ago committed by Gitee
commit 6df0c69c56
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -5,6 +5,7 @@ CREATE TABLE JCL_ORG_SCHEME (
scheme_name varchar(100) NULL,
scheme_description text NULL,
forbidden_tag int NULL,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -19,6 +20,7 @@ CREATE TABLE JCL_ORG_LEVEL (
description text NULL,
scheme_id int null,
forbidden_tag int NULL,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -34,6 +36,7 @@ CREATE TABLE JCL_ORG_GRADE (
scheme_id int null,
level_id varchar(100) null,
forbidden_tag int NULL,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -49,6 +52,7 @@ CREATE TABLE JCL_ORG_SEQUENCE (
description text NULL,
scheme_id int null,
forbidden_tag int NULL,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -62,6 +66,7 @@ CREATE TABLE JCL_ORG_POST (
post_no varchar(100) null,
post_name varchar(100) NULL,
description text NULL,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -80,6 +85,7 @@ CREATE TABLE JCL_ORG_POST_INFO (
post_id int null,
description text NULL,
forbidden_tag int NULL,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -99,6 +105,7 @@ CREATE TABLE JCL_ORG_COMP (
comp_principal int null,
description text NULL,
forbidden_tag int NULL,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -176,6 +183,7 @@ CREATE TABLE JCL_ORG_DEPT (
show_order int null,
description text NULL,
forbidden_tag int NULL,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -183,43 +191,6 @@ CREATE TABLE JCL_ORG_DEPT (
CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (id)
);
-- JCL_FIELD_EXTENDGROUP_DEPT
CREATE TABLE JCL_FIELD_EXTENDGROUP_DEPT (
id int auto_increment NOT NULL,
extend_type int null,
group_name varchar(100) NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_FIELD_EXTENDGROUP_DEPT_PK PRIMARY KEY (id)
);
-- JCL_FIELD_EXTENDINFO_DEPT
CREATE TABLE JCL_FIELD_EXTENDINFO_DEPT (
id int auto_increment NOT NULL,
extend_type int null,
table_name varchar(100) NULL,
field_name varchar(100) NULL,
field_name_desc varchar(100) NULL,
field_type varchar(1000) NULL,
control_type int null,
extend_group int null,
isenable int null,
isrequired int null,
list_show int null,
search_show int null,
edit_show int null,
add_show int null,
button_show int null,
show_order int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_FIELD_EXTENDINFO_DEPT_PK PRIMARY KEY (id)
);
-- JCL_ORG_DEPTPEXT
CREATE TABLE JCL_ORG_DEPTPEXT (
id int auto_increment NOT NULL,
@ -248,15 +219,16 @@ 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,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -268,50 +240,13 @@ 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,
update_time date null,
CONSTRAINT CL_ORG_DEPTPEXT_PK PRIMARY KEY (id)
);
-- JCL_FIELD_EXTENDGROUP_JOB
CREATE TABLE JCL_FIELD_EXTENDGROUP_JOB (
id int auto_increment NOT NULL,
extend_type int null,
group_name varchar(100) NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_FIELD_EXTENDGROUP_JOB_PK PRIMARY KEY (id)
);
-- JCL_FIELD_EXTENDINFO_JOB
CREATE TABLE JCL_FIELD_EXTENDINFO_JOB (
id int auto_increment NOT NULL,
extend_type int null,
table_name varchar(100) NULL,
field_name varchar(100) NULL,
field_name_desc varchar(100) NULL,
field_type varchar(1000) NULL,
control_type int null,
extend_group int null,
isenable int null,
isrequired int null,
list_show int null,
search_show int null,
edit_show int null,
add_show int null,
button_show int null,
show_order int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_FIELD_EXTENDINFO_JOB_PK PRIMARY KEY (id)
CONSTRAINT JCL_ORG_JOBDT_PK PRIMARY KEY (id)
);
-- JCL_ORG_JOBPEXT
@ -346,7 +281,8 @@ CREATE TABLE JCL_ORG_STAFFPLAN (
time_end date NULL,
company_id varchar(100) NULL,
description text NULL,
status int NULL,
forbidden_tag int NULL,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -363,11 +299,12 @@ CREATE TABLE JCL_ORG_STAFF (
job_id int null,
staff_num int null,
control_policy int null,
staff_permanent_num int null,
permanent_num int null,
freeze_num int null,
lack_status int null,
staff_description varchar(100) NULL,
staff_desc varchar(100) NULL,
description text null,
is_used int not null,
creator int null,
delete_type int null,
create_time date null,
@ -380,7 +317,7 @@ CREATE TABLE JCL_ORG_STAFFS (
id int auto_increment NOT NULL,
staff_id int null,
business_type int null,
business_change_num int null,
change_num int null,
business_source int null,
requestid int null,
creator int null,
@ -391,6 +328,49 @@ CREATE TABLE JCL_ORG_STAFFS (
);
--JCL_CODERULE
CREATE TABLE JCL_CODERULE (
id int auto_increment NOT NULL,
serial_type varchar(50) null,
serial_enable char(1) null,
oneself_type varchar(50) null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_CODERULE PRIMARY KEY (id)
);
--JCL_CODERULE_DETAIL
CREATE TABLE JCL_CODERULE_DETAIL (
id int auto_increment NOT NULL,
coderule_id int(11) null,
rule_type varchar(50) null,
rule_value varchar(255) null,
show_order int(11) null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_CODERULE_DETAIL PRIMARY KEY (id)
);
--JCL_CODERULE_RESERVED
CREATE TABLE JCL_CODERULE_RESERVED (
id int auto_increment NOT NULL,
coderule_id int(11) null,
reserved_code varchar(255) null,
reserved_desc varchar (1000) null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_CODERULE_RESERVED PRIMARY KEY (id)
);

@ -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,
@ -347,7 +347,7 @@ CREATE TABLE JCL_ORG_STAFFPLAN (
TIME_END DATE NULL,
COMPANY_ID NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
STATUS NUMBER NULL,
FORBIDDEN_TAG NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
@ -364,10 +364,10 @@ CREATE TABLE JCL_ORG_STAFF (
JOB_ID NUMBER NULL,
STAFF_NUM NUMBER NULL,
CONTROL_POLICY NUMBER NULL,
STAFF_PERMANENT_NUM NUMBER NULL,
PERMANENT_NUM NUMBER NULL,
FREEZE_NUM NUMBER NULL,
LACK_STATUS NUMBER NULL,
STAFF_DESCRIPTION NVARCHAR2(100) NULL,
STAFF_DESC NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
@ -381,7 +381,7 @@ CREATE TABLE JCL_ORG_STAFFS (
ID NUMBER NOT NULL,
STAFF_ID NUMBER NULL,
BUSINESS_TYPE NUMBER NULL,
BUSINESS_CHANGE_NUM NUMBER NULL,
CHANGE_NUM NUMBER NULL,
BUSINESS_SOURCE NUMBER NULL,
REQUESTID NUMBER NULL,
CREATOR NUMBER 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,
@ -346,7 +346,7 @@ CREATE TABLE JCL_ORG_STAFFPLAN (
time_end date NULL,
company_id varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text NULL,
status int NULL,
forbidden_tag int NULL,
creator int null,
delete_type int null,
create_time date null,
@ -363,10 +363,10 @@ CREATE TABLE JCL_ORG_STAFF (
job_id int null,
staff_num int null,
control_policy int null,
staff_permanent_num int null,
permanent_num int null,
freeze_num int null,
lack_status int null,
staff_description varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
staff_desc varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text null,
creator int null,
delete_type int null,
@ -380,7 +380,7 @@ CREATE TABLE JCL_ORG_STAFFS (
id int IDENTITY(1,1) NOT NULL,
staff_id int null,
business_type int null,
business_change_num int null,
change_num int null,
business_source int null,
requestid int null,
creator int null,

@ -0,0 +1,13 @@
package com.api.organization.web;
import javax.ws.rs.Path;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/30
* @Version V1.0
**/
@Path("/bs/hrmorganization/codeSetting")
public class CodeSettingController extends com.engine.organization.web.CodeSettingController {
}

@ -0,0 +1,13 @@
package com.api.organization.web;
import javax.ws.rs.Path;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/27
* @version: 1.0
*/
@Path("/bs/hrmorganization/job")
public class JobController extends com.engine.organization.web.JobController{
}

@ -0,0 +1,13 @@
package com.api.organization.web;
import javax.ws.rs.Path;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
@Path("/bs/hrmorganization/staff")
public class StaffController extends com.engine.organization.web.StaffController {
}

@ -0,0 +1,13 @@
package com.api.organization.web;
import javax.ws.rs.Path;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
@Path("/bs/hrmorganization/staffplan")
public class StaffPlanController extends com.engine.organization.web.StaffPlanController {
}

@ -0,0 +1,21 @@
package com.engine.organization.annotation;
import java.lang.annotation.*;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/30
* @Version V1.0
**/
@Target({ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface CheckboxPopedom {
String id() default "";
String showmethod() default "";
String popedompara() default "";
}

@ -0,0 +1,25 @@
package com.engine.organization.annotation;
import java.lang.annotation.*;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/30
* @Version V1.0
**/
@Target({ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface OperatePopedom {
boolean async() default true;
String transmethod() default "";
String otherpara() default "";
String otherpara2() default "";
String column() default "";
}

@ -2,6 +2,7 @@ package com.engine.organization.annotation;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.enums.DeleteTypeEnum;
import java.lang.annotation.*;
@ -59,9 +60,16 @@ public @interface OrganizationTable {
*/
OrganizationTableOperate[] operates() default {};
/**
*
* @return
*/
OperatePopedom operatePopedom() default @OperatePopedom;
/**
*
*/
WeaTableType tableType() default WeaTableType.NONE;
CheckboxPopedom checkboxPopedom() default @CheckboxPopedom;
}

@ -22,4 +22,6 @@ public @interface OrganizationTableOperate {
String index() default "0";
}

@ -2,9 +2,7 @@ package com.engine.organization.component;
import com.cloudstore.eccom.constant.WeaBoolAttr;
import com.cloudstore.eccom.pc.table.*;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableColumn;
import com.engine.organization.annotation.OrganizationTableOperate;
import com.engine.organization.annotation.*;
import org.apache.commons.lang3.StringUtils;
import weaver.general.PageIdConst;
import weaver.hrm.User;
@ -64,6 +62,13 @@ public class OrganizationWeaTable<T> extends WeaTable {
operateList.add(weaTableOperate);
});
WeaTableOperates weaTableOperates = new WeaTableOperates();
OperatePopedom popedoms = table.operatePopedom();
WeaTablePopedom popedom = new WeaTablePopedom();
if (popedoms != null && !"".equals(popedoms.transmethod())) {
popedom.setTransmethod(popedoms.transmethod());
popedom.setOtherpara(popedoms.otherpara());
weaTableOperates.setPopedom(popedom);
}
weaTableOperates.setOperate(operateList);
super.setOperates(weaTableOperates);
}
@ -72,9 +77,13 @@ public class OrganizationWeaTable<T> extends WeaTable {
//设置check是否可用
if (weaTableTypeEnum == WeaTableType.CHECKBOX) {
super.setTableType(weaTableTypeEnum);
// WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
// checkboxpopedom.setShowmethod("true");
// super.setCheckboxpopedom(checkboxpopedom);
CheckboxPopedom checkPopedom = table.checkboxPopedom();
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
if (checkPopedom != null && !"".equals(checkPopedom.showmethod())){
checkboxpopedom.setShowmethod(checkPopedom.showmethod());
checkboxpopedom.setPopedompara(checkPopedom.popedompara());
}
super.setCheckboxpopedom(checkboxpopedom);
}
}

@ -22,7 +22,7 @@ import java.util.stream.Collectors;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class QueryParam {
public class DeleteParam {
private String ids;
public Collection<Long> getIds() {

@ -0,0 +1,84 @@
package com.engine.organization.entity.codesetting.bo;
import com.engine.organization.entity.codesetting.param.CodeBaseParam;
import com.engine.organization.entity.codesetting.param.CodeSaveDetailParam;
import com.engine.organization.entity.codesetting.param.CodeSaveParam;
import com.engine.organization.entity.codesetting.po.CodeRuleDetailPO;
import com.engine.organization.entity.codesetting.po.CodeRulePO;
import com.engine.organization.enums.DeleteTypeEnum;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.general.Util;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/31
* @Version V1.0
**/
public class CodeSettingBO {
public static CodeRulePO buildCodeRule(CodeSaveParam params,Long uid,Long codeRuleId) {
StringBuilder sb = new StringBuilder();
parseOneSelfType(params.getDateSerial(), sb);
parseOneSelfType(params.getDeptSerial(), sb);
parseOneSelfType(params.getJobtitlesSerial(), sb);
CodeRulePO codeRulePO = CodeRulePO.builder()
.serialType(params.getSerialType())
.serialEnable(Optional.of(params.getSerialEnable()).orElse("0"))
.oneselfType(sb.toString())
.creator(uid)
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
.updateTime(new Date())
.build();
if (codeRuleId == null) {
codeRulePO.setCreateTime(new Date());
}else {
codeRulePO.setId(codeRuleId);
}
return codeRulePO;
}
public static List<CodeRuleDetailPO> bulidCodeDetailList(List<CodeSaveDetailParam> codeSaveDetailParams, Long uid,Long codeRuleId) {
if(CollectionUtils.isEmpty(codeSaveDetailParams)) {
return null;
}
return codeSaveDetailParams.stream().map(e -> CodeRuleDetailPO.builder()
.coderuleId(codeRuleId)
.ruleType(e.getRuletype())
.ruleValue(e.getRulevalue())
.showOrder(e.getShoworder())
.creator(uid)
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
.createTime(new Date())
.updateTime(new Date())
.build()
).collect(Collectors.toList());
}
/**
*
* @param param
* @param sb
*/
private static void parseOneSelfType(CodeBaseParam param, StringBuilder sb) {
if(Objects.nonNull(param)) {
String enable = Util.null2String(param.getEnable(),"0");
String key = param.getKey();
if (enable.equals("1") && StringUtils.isNotEmpty(key)) {
sb.append(key);
sb.append(",");
}
}
}
}

@ -0,0 +1,24 @@
package com.engine.organization.entity.codesetting.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/31
* @Version V1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CodeBaseParam {
private String enable;
private String key;
}

@ -0,0 +1,27 @@
package com.engine.organization.entity.codesetting.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/31
* @Version V1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CodeSaveDetailParam {
private String ruletype;
private String rulevalue;
private int showorder;
}

@ -0,0 +1,34 @@
package com.engine.organization.entity.codesetting.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/31
* @Version V1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CodeSaveParam {
private String serialEnable;
private List<CodeSaveDetailParam> codeSaveDetailParams;
private String serialType;
private CodeBaseParam dateSerial;
private CodeBaseParam deptSerial;
private CodeBaseParam jobtitlesSerial;
}

@ -0,0 +1,46 @@
package com.engine.organization.entity.codesetting.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/30
* @Version V1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CodeRuleDetailPO {
/**
*
*/
private Long id;
private Long coderuleId;
/**
*
*/
private String ruleType;
/**
*
*/
private String ruleValue;
private int showOrder;
private Long creator;
private int deleteType;
private Date createTime;
private Date updateTime;
}

@ -0,0 +1,47 @@
package com.engine.organization.entity.codesetting.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/30
* @Version V1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CodeRulePO {
/**
*
*/
private Long id;
/**
*
*/
private String serialType;
/**
*
*/
private String serialEnable;
/**
* year,month,day
*/
private String oneselfType;
private Long creator;
private int deleteType;
private Date createTime;
private Date updateTime;
}

@ -0,0 +1,38 @@
package com.engine.organization.entity.codesetting.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/31
* @Version V1.0
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CodeRuleReservedPO {
/**
*
*/
private Long id;
private int codeRuleId;
private String reservedCode;
private String reservedDesc;
private Long creator;
private int deleteType;
private Date createTime;
private Date updateTime;
}

@ -1,130 +0,0 @@
package com.engine.organization.entity.comp.bo;
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 org.apache.commons.collections.CollectionUtils;
import weaver.crm.Maint.SectorInfoComInfo;
import weaver.general.StringUtil;
import weaver.hrm.resource.ResourceComInfo;
import java.util.*;
import java.util.stream.Collectors;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/16
* @version: 1.0
*/
public class CompBO {
public static List<CompListDTO> buildCompDTOList(Collection<CompPO> list) {
// 递归添加父级数据
Map<Long, 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));
return dtoList.stream().map(e -> {
e.setChildren(collects.get(e.getId()));
return e;
}).filter(item -> null == item.getParentCompany() || 0 == item.getParentCompany()).collect(Collectors.toList());
}
public static List<CompListDTO> buildCompDTOList(Collection<CompPO> list, List<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) {
dealParentData(addedList, po, poMaps);
}
List<CompListDTO> dtoList = addedList.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));
return dtoList.stream().map(e -> {
e.setChildren(collects.get(e.getId()));
return e;
}).filter(item -> null == item.getParentCompany() || 0 == item.getParentCompany()).collect(Collectors.toList());
}
public static 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();
}
/**
*
*
* @param addedList
* @param po
* @param poMaps
*/
private static void dealParentData(List<CompPO> addedList, CompPO po, Map<Long, CompPO> poMaps) {
if (!addedList.contains(po)) {
addedList.add(po);
}
CompPO parentCompPO = poMaps.get(po.getParentCompany());
if (null != parentCompPO) {
dealParentData(addedList, parentCompPO, poMaps);
}
}
private static String getUserNameById(String userId) {
try {
if (StringUtil.isEmpty(userId)) {
return "";
}
return new ResourceComInfo().getLastname(userId);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

@ -0,0 +1,117 @@
package com.engine.organization.entity.company.bo;
import com.api.hrm.bean.TreeNode;
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 com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.collections.CollectionUtils;
import weaver.crm.Maint.SectorInfoComInfo;
import weaver.general.StringUtil;
import weaver.hrm.resource.ResourceComInfo;
import java.util.*;
import java.util.stream.Collectors;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/16
* @version: 1.0
*/
public class CompBO {
public static List<CompListDTO> buildCompDTOList(Collection<CompPO> list) {
Map<Long, CompPO> poMaps = list.stream().collect(Collectors.toMap(CompPO::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));
// 处理被引用数据
List<String> usedIds = MapperProxyFactory.getProxy(CompMapper.class).listUsedId();
List<String> collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList());
return dtoList.stream().peek(e -> {
List<CompListDTO> childList = collects.get(e.getId());
if (CollectionUtils.isNotEmpty(childList)) {
e.setChildren(childList);
e.setIsUsed(1);
} else {
if (collect.contains(e.getId() + "")) {
e.setIsUsed(1);
} else {
e.setIsUsed(0);
}
}
}).filter(item -> null == item.getParentCompany() || 0 == item.getParentCompany()).collect(Collectors.toList());
}
public static List<CompListDTO> buildCompDTOList(Collection<CompPO> list, List<CompPO> filterList) {
// 搜索结果为空,直接返回空
if (CollectionUtils.isEmpty(filterList)) {
return Collections.emptyList();
}
// 递归添加父级数据
Map<Long, CompPO> poMaps = list.stream().collect(Collectors.toMap(CompPO::getId, item -> item));
List<CompPO> addedList = new ArrayList<>();
for (CompPO po : filterList) {
dealParentData(addedList, po, poMaps);
}
return buildCompDTOList(addedList);
}
public static 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();
}
public static List<TreeNode> buildSetToSearchTree(Set<CompPO> comps) {
return comps.stream().map(item -> {
SearchTree tree = new SearchTree();
tree.setCanClick(true);
tree.setCanceled(false);
tree.setIcon("icon-coms-LargeArea");
tree.setId(item.getId().toString());
tree.setIsParent(false);
tree.setIsVirtual("0");
tree.setName(item.getCompName());
tree.setPid(null == item.getParentCompany() ? "0" : item.getParentCompany().toString());
tree.setSelected(false);
tree.setType("1");
return tree;
}).collect(Collectors.toList());
}
/**
*
*
* @param addedList
* @param po
* @param poMaps
*/
private static void dealParentData(List<CompPO> addedList, CompPO po, Map<Long, CompPO> poMaps) {
if (!addedList.contains(po)) {
addedList.add(po);
}
CompPO parentCompPO = poMaps.get(po.getParentCompany());
if (null != parentCompPO) {
dealParentData(addedList, parentCompPO, poMaps);
}
}
private static String getUserNameById(String userId) {
try {
if (StringUtil.isEmpty(userId)) {
return "";
}
return new ResourceComInfo().getLastname(userId);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

@ -1,6 +1,5 @@
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;
import com.engine.organization.annotation.OrganizationTableOperate;
import com.engine.organization.annotation.TableTitle;
@ -9,7 +8,6 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List;
/**
@ -23,9 +21,8 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "2c66b3a4-d4f8-11ec-9774-00ffcbed7508",
tableType = WeaTableType.NONE,
operates = {
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除"),
@OrganizationTableOperate(index = "2", text = "查看部门")
})
@ -34,7 +31,10 @@ public class CompListDTO {
* id
*/
private Long id;
/**
*
*/
private Integer isUsed;
/**
*
*/
@ -88,16 +88,11 @@ public class CompListDTO {
/**
*
*/
@TableTitle(title = "操作", dataIndex = "operate", key = "operate")
@TableTitle(title = "", dataIndex = "operate", key = "operate")
private String operate;
/**
*
*/
private List<CompListDTO> children;
private Long creator;
private int deleteType;
private Date createTime;
private Date updateTime;
}

@ -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;

@ -4,6 +4,7 @@ import com.engine.organization.entity.department.dto.DepartmentListDTO;
import com.engine.organization.entity.department.param.DeptSearchParam;
import com.engine.organization.entity.department.po.DepartmentPO;
import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
import com.engine.organization.entity.searchtree.SearchTree;
import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.employee.EmployeeMapper;
import com.engine.organization.util.db.MapperProxyFactory;
@ -20,43 +21,63 @@ import java.util.stream.Collectors;
**/
public class DepartmentBO {
public static List<DepartmentListDTO> buildDeptDTOList(Collection<DepartmentPO> list) {
// 递归添加父级数据
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(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));
// 处理被引用数据
List<String> usedIds = MapperProxyFactory.getProxy(DepartmentMapper.class).listUsedId();
List<String> collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList());
return dtoList.stream().peek(e -> {
List<DepartmentListDTO> childList = collects.get(e.getId());
if (CollectionUtils.isNotEmpty(childList)) {
e.setChildren(childList);
e.setIsUsed(1);
} else {
if (collect.contains(e.getId() + "")) {
e.setIsUsed(1);
} else {
e.setIsUsed(0);
}
}
}).filter(item -> null == item.getParentDept() || 0 == item.getParentDept()).collect(Collectors.toList());
}
public static List<DepartmentListDTO> buildDeptDTOList(Collection<DepartmentPO> list, List<DepartmentPO> filterList) {
// 搜索结果为空,直接返回空
if (CollectionUtils.isEmpty(filterList)) {
return Collections.emptyList();
}
// 递归添加父级数据
Map<Long, DepartmentPO> poMaps = list.stream().collect(Collectors.toMap(item -> item.getId(), item -> item));
Map<Long, DepartmentPO> poMaps = list.stream().collect(Collectors.toMap(DepartmentPO::getId, item -> item));
List<DepartmentPO> addedList = new ArrayList<>();
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((long) 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().map(e -> {
e.setChildren(collects.get(e.getId()));
return e;
}).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()
return DepartmentPO
.builder()
.id(param.getId() == null ? 0 : param.getId())
.deptNo(param.getDeptNo())
.deptName(param.getDeptName())
@ -66,35 +87,43 @@ public class DepartmentBO {
.deptPrincipal(param.getDeptPrincipal())
.showOrder(param.getShowOrder())
.forbiddenTag(param.getForbiddenTag() == null ? null : param.getForbiddenTag() ? 0 : 1)
.deleteType(0)
.description(param.getDescription()).deleteType(0)
.createTime(new Date())
.updateTime(new Date())
.creator(employeeId).build();
.creator(employeeId)
.build();
}
public static List<SingleDeptTreeVO> buildSingleDeptTreeVOS(List<DepartmentPO> departmentPOs,Long parentComp) {
public static List<SingleDeptTreeVO> buildSingleDeptTreeVOS(List<DepartmentPO> departmentPOs, Long parentComp) {
if (CollectionUtils.isEmpty(departmentPOs)) {
return Collections.emptyList();
}
List<SingleDeptTreeVO> singleDeptTreeVOS = departmentPOs.stream().map(e -> SingleDeptTreeVO.builder()
.id(e.getId())
.deptName(e.getDeptName())
.parentComp(e.getParentComp())
.parentDept(e.getParentDept())
.parentDeptName(e.getParentDept() == null ? "" : getDeptNameById(e.getParentDept().intValue()))
.deptPrincipalName(getEmployeeNameById((long) e.getDeptPrincipal()))
.build()
).collect(Collectors.toList());
List<SingleDeptTreeVO> singleDeptTreeVOS = departmentPOs.stream().map(e -> SingleDeptTreeVO.builder().id(e.getId()).deptName(e.getDeptName()).parentComp(e.getParentComp()).parentDept(e.getParentDept()).parentDeptName(e.getParentDept() == null ? "" : getDeptNameById(e.getParentDept().intValue())).deptPrincipalName(getEmployeeNameById(e.getDeptPrincipal())).build()).collect(Collectors.toList());
//获取非一级部门
Map<Long, List<SingleDeptTreeVO>> collects = singleDeptTreeVOS.stream().filter(item -> !parentComp.equals(item.getParentComp()) && null != item.getParentDept()).collect(Collectors.groupingBy(SingleDeptTreeVO :: getParentDept));
Map<Long, List<SingleDeptTreeVO>> collects = singleDeptTreeVOS.stream().filter(item -> !parentComp.equals(item.getParentComp()) && null != item.getParentDept()).collect(Collectors.groupingBy(SingleDeptTreeVO::getParentDept));
return singleDeptTreeVOS.stream().peek(e -> e.setChildren(collects.get(e.getId()))).filter(item -> parentComp.equals(item.getParentComp())).collect(Collectors.toList());
}
return singleDeptTreeVOS.stream().map(e -> {
e.setChildren(collects.get(e.getId()));
return e;
}).filter(item -> parentComp.equals(item.getParentComp())).collect(Collectors.toList());
public static List<SearchTree> buildSetToSearchTree(Set<DepartmentPO> departmentPOS) {
return departmentPOS.stream().map(item -> {
SearchTree tree = new SearchTree();
tree.setCanClick(true);
tree.setCanceled(false);
tree.setIcon("icon-coms-Branch");
tree.setId(item.getId().toString());
tree.setIsParent(false);
tree.setIsVirtual("0");
tree.setName(item.getDeptName());
tree.setPid(null == item.getParentDept() ? "0" : item.getParentDept().toString());
tree.setSelected(false);
tree.setType("2");
tree.setParentComp(null == item.getParentComp() ? "0" : item.getParentComp().toString());
return tree;
}).collect(Collectors.toList());
}
@ -125,6 +154,4 @@ public class DepartmentBO {
}
}

@ -24,7 +24,7 @@ import java.util.List;
@OrganizationTable(pageId = "96f2bb0d-da73-11ec-a0da-00ffcbed7508",
tableType = WeaTableType.NONE,
operates = {
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除"),
@OrganizationTableOperate(index = "2", text = "合并"),
@OrganizationTableOperate(index = "3", text = "转移"),
@ -34,7 +34,10 @@ import java.util.List;
public class DepartmentListDTO {
private Long id;
/**
*
*/
private Integer isUsed;
/**
*
*/
@ -90,7 +93,11 @@ public class DepartmentListDTO {
*/
@TableTitle(title = "禁用标记", dataIndex = "forbiddenTag", key = "forbiddenTag")
private int forbiddenTag;
/**
*
*/
@TableTitle(title = "", dataIndex = "operate", key = "operate")
private String operate;
/**
*
*/

@ -29,9 +29,11 @@ public class DeptSearchParam extends BaseQueryParam {
private Long parentDept;
private Integer deptPrincipal;
private Long deptPrincipal;
private Integer showOrder;
private String description;
private Boolean forbiddenTag;
}

@ -31,7 +31,7 @@ public class DepartmentPO {
private Long parentDept;
private Integer deptPrincipal; //部门负责人
private Long deptPrincipal; //部门负责人
private Integer showOrder;

@ -0,0 +1,43 @@
package com.engine.organization.entity.employee.vo;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/31
* @version: 1.0
*/
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableColumn;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "80e7830c-18e8-4e14-8241-18821195ef31",
fields = "t.id," +
"t.lastname," +
"t.sex",
fromSql = "FROM HrmResource t ",
orderby = "id desc",
primarykey = "id",
tableType = WeaTableType.NONE
)
public class EmployeeTableVO {
@OrganizationTableColumn(column = "id", display = false)
private Long id;
@OrganizationTableColumn(text = "姓名", width = "50%", column = "lastname")
private String lastname;
@OrganizationTableColumn(text = "性别", width = "50%", column = "sex")
private String sex;
}

@ -41,14 +41,14 @@ public class ExtendInfoBO {
// 封装对象为table组件
public static List<Map<String, Object>> convertInfoListToTable(User user, List<ExtendInfoPO> infoPOList, int viewAttr, boolean showLabel) {
List<Map<String, Object>> lsCol = new ArrayList<Map<String, Object>>();
Map<String, Object> col = null;
List<Map<String, Object>> lsCol = new ArrayList<>();
Map<String, Object> col;
int width = 100 / infoPOList.size();
for (int i = 0; infoPOList != null && i < infoPOList.size(); i++) {
ExtendInfoPO extendInfoPO = infoPOList.get(i);
String tmpkey = extendInfoPO.getFieldName();
col = new HashMap<String, Object>();
col = new HashMap<>();
col.put("title", extendInfoPO.getFieldNameDesc());
col.put("key", tmpkey);
@ -114,7 +114,7 @@ public class ExtendInfoBO {
// 浏览按钮特殊处理
if (FieldType.BROWSER.equals(fieldItem.getType())) {
BrowserBean browserConditionParam = OrganizationFormItemUtil.browserItem(user, 2, 16, fieldItem.getViewAttr(), false, extendInfoPO.getFieldNameDesc(), extendInfoPO.getBrowserType(), extendInfoPO.getFieldName(), "").getBrowserConditionParam();
BrowserBean browserConditionParam = OrganizationFormItemUtil.browserItem(user, 2, 16, fieldItem.getViewAttr(), false, extendInfoPO.getFieldNameDesc(), extendInfoPO.getBrowserType(), extendInfoPO.getFieldName(), extendInfoPO.getCustomBrowserId()).getBrowserConditionParam();
fieldItem.setBrowserConditionParam(browserConditionParam);
}

@ -99,6 +99,11 @@ public class ExtendInfoPO {
*/
private Integer browserShow;
/**
*
*/
private String customBrowserId;
/**
*
*/

@ -0,0 +1,121 @@
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.mapper.job.JobMapper;
import com.engine.organization.transmethod.JobTransMethod;
import com.engine.organization.util.db.MapperProxyFactory;
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));
// 处理被引用数据
List<String> usedIds = MapperProxyFactory.getProxy(JobMapper.class).listUsedId();
List<String> collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList());
return dtoList.stream().peek(e -> {
List<JobListDTO> childList = collects.get(e.getId());
if (CollectionUtils.isNotEmpty(childList)) {
e.setChildren(childList);
e.setIsUsed(1);
} else {
if (collect.contains(e.getId() + "")) {
e.setIsUsed(1);
} else {
e.setIsUsed(0);
}
}
}).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,100 @@
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(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;
/**
*
*/
private Integer isUsed;
/**
*
*/
@TableTitle(title = "编号", dataIndex = "jobNo", key = "jobNo")
private String jobNo;
/**
*
*/
@TableTitle(title = "名称", dataIndex = "jobName", key = "jobName")
private String jobName;
/**
*
*/
@TableTitle(title = "所属分部", dataIndex = "compName", key = "compName")
private String compName;
/**
*
*/
@TableTitle(title = "所属部门", dataIndex = "deptName", key = "deptName")
private String deptName;
/**
*
*/
@TableTitle(title = "岗位序列", dataIndex = "sequenceName", key = "sequenceName")
private String sequenceName;
/**
*
*/
@TableTitle(title = "等级方案", dataIndex = "schemeName", key = "schemeName")
private String schemeName;
/**
*
*/
@TableTitle(title = "上级岗位", dataIndex = "parentJobName", key = "parentJobName")
private String parentJobName;
private Long parentJob;
/**
*
*/
@TableTitle(title = "是否关键岗", dataIndex = "isKey", key = "isKey")
private String isKey;
/**
*
*/
@TableTitle(title = "禁用标记", dataIndex = "forbiddenTag", key = "forbiddenTag")
private Integer forbiddenTag;
/**
*
*/
@TableTitle(title = "", dataIndex = "operate", key = "operate")
private String operate;
/**
*
*/
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,32 @@
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/31
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class JobDTPO {
private Long id;
private Long mainId;
private String levelId;
private String gradeId;
private String levelIdspan;
private String gradeIdspan;
private Long creator;
private int deleteType;
private Date createTime;
private Date updateTime;
}

@ -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;

@ -46,6 +46,10 @@ public class GradePO {
*
*/
private int forbiddenTag;
/**
*
*/
private int isUsed;
/**
*
*/

@ -44,6 +44,10 @@ public class LevelPO {
*
*/
private int forbiddenTag;
/**
*
*/
private int isUsed;
/**
*
*/

@ -13,25 +13,29 @@ import java.util.Date;
@AllArgsConstructor
public class SchemePO {
/**
*
*
*/
private long id;
/**
*
*
*/
private String schemeNo;
/**
*
*
*/
private String schemeName;
/**
*
*
*/
private String schemeDescription;
/**
*
*
*/
private int forbiddenTag;
/**
*
*/
private int isUsed;
/**
*
*/

@ -1,8 +1,7 @@
package com.engine.organization.entity.scheme.vo;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableColumn;
import com.engine.organization.annotation.OrganizationTableOperate;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -25,14 +24,19 @@ import lombok.NoArgsConstructor;
" t.description ," +
" a.scheme_name ," +
" t.level_id ," +
" t.forbidden_tag",
" t.forbidden_tag," +
"t.is_used",
fromSql = "from jcl_org_grade t inner join jcl_org_scheme a on t.scheme_id = a.id ",
orderby = "id desc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除")
}
},
tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates", otherpara = "column:is_used"),
checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom", popedompara = "column:is_used")
)
public class GradeTableVO {
/**
@ -40,6 +44,11 @@ public class GradeTableVO {
*/
@OrganizationTableColumn(column = "id", display = false)
private Long id;
/**
*
*/
@OrganizationTableColumn(column = "isUsed", display = false)
private Integer isUsed;
/**
*
*/
@ -67,7 +76,7 @@ public class GradeTableVO {
/**
*
*/
@OrganizationTableColumn(text = "职等", width = "20%", column = "level_id",transmethod = "com.engine.organization.transmethod.LevelTransMethod.getLevelId")
@OrganizationTableColumn(text = "职等", width = "20%", column = "level_id", transmethod = "com.engine.organization.transmethod.LevelTransMethod.getLevelId")
private String levelId;
/**

@ -1,8 +1,7 @@
package com.engine.organization.entity.scheme.vo;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableColumn;
import com.engine.organization.annotation.OrganizationTableOperate;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -21,6 +20,7 @@ import lombok.NoArgsConstructor;
"s.scheme_name," +
"t.scheme_id," +
"t.forbidden_tag," +
"t.is_used," +
"t.creator," +
"t.delete_type," +
"t.create_time," +
@ -29,9 +29,11 @@ import lombok.NoArgsConstructor;
orderby = "id desc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除")
}
}, tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates", otherpara = "column:is_used"),
checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom", popedompara = "column:is_used")
)
public class LevelTableVO {
/**
@ -39,6 +41,11 @@ public class LevelTableVO {
*/
@OrganizationTableColumn(column = "id", display = false)
private Long id;
/**
*
*/
@OrganizationTableColumn(column = "isUsed", display = false)
private Integer isUsed;
/**
*
@ -56,11 +63,6 @@ public class LevelTableVO {
*/
@OrganizationTableColumn(text = "描述说明", width = "20%", column = "description")
private String description;
/**
*
*/
// @OrganizationTableColumn(text = "等级方案", width = "20%", column = "level_scheme")
private String schemeId;
/**
*

@ -1,8 +1,7 @@
package com.engine.organization.entity.scheme.vo;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableColumn;
import com.engine.organization.annotation.OrganizationTableOperate;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -19,6 +18,7 @@ import lombok.NoArgsConstructor;
"t.scheme_name," +
"t.scheme_description," +
"t.forbidden_tag," +
"t.is_used," +
"t.creator," +
"t.delete_type," +
"t.create_time," +
@ -29,7 +29,10 @@ import lombok.NoArgsConstructor;
operates = {
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除")
}
},
tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates", otherpara = "column:is_used"),
checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom", popedompara = "column:is_used")
)
public class SchemeTableVO {
/**
@ -37,7 +40,11 @@ public class SchemeTableVO {
*/
@OrganizationTableColumn(column = "id", display = false)
private Long id;
/**
*
*/
@OrganizationTableColumn(column = "isUsed", display = false)
private Integer isUsed;
/**
*

@ -0,0 +1,21 @@
package com.engine.organization.entity.searchtree;
import com.api.hrm.bean.TreeNode;
import lombok.Data;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/26
* @version: 1.0
*/
@Data
public class SearchTree extends TreeNode {
private String companyid;
private String isVirtual;
private String psubcompanyid;
private String displayType;
private boolean isCanceled;
private String requestParams;
private String parentComp;
}

@ -0,0 +1,30 @@
package com.engine.organization.entity.searchtree;
import lombok.Data;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/26
* @version: 1.0
*/
@Data
public class SearchTreeParams {
/**
*
* <p>
* 0
* 1
* 2
* 3
*/
private String type;
private String id;
private String isVirtual;
// 树搜索条件
private String keyword;
private String virtualCompanyid;
private String isLoadSubDepartment;
}

@ -1,8 +1,7 @@
package com.engine.organization.entity.sequence.vo;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableColumn;
import com.engine.organization.annotation.OrganizationTableOperate;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -25,6 +24,7 @@ import lombok.NoArgsConstructor;
"t.description," +
"s.scheme_name," +
"t.forbidden_tag," +
"t.is_used," +
"t.creator," +
"t.delete_type," +
"t.create_time," +
@ -33,9 +33,13 @@ import lombok.NoArgsConstructor;
orderby = "id desc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除")
}
},
tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates", otherpara = "column:is_used"),
checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom", popedompara = "column:is_used")
)
public class SequenceTableVO {
@ -44,7 +48,11 @@ public class SequenceTableVO {
*/
@OrganizationTableColumn(column = "id", display = false)
private Long id;
/**
*
*/
@OrganizationTableColumn(column = "isUsed", display = false)
private Integer isUsed;
/**
*
*/

@ -0,0 +1,38 @@
package com.engine.organization.entity.staff.bo;
import com.engine.organization.entity.staff.param.StaffSearchParam;
import com.engine.organization.entity.staff.po.StaffPO;
import java.util.Date;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
public class StaffBO {
public static StaffPO convertParamToPO(StaffSearchParam param, Long employeeId) {
if (param == null) {
return null;
}
return StaffPO.builder()
.id(param.getId())
.planId(param.getPlanId())
.compId(param.getCompId())
.deptId(param.getDeptId())
.jobId(param.getJobId())
.staffNum(param.getStaffNum())
.controlPolicy(param.getControlPolicy())
.permanentNum(param.getPermanentNum())
.freezeNum(param.getFreezeNum())
.lackStatus(param.getLackStatus())
.staffDesc(param.getStaffDesc())
.description(param.getDescription())
.deleteType(0)
.createTime(new Date())
.updateTime(new Date())
.creator(employeeId)
.build();
}
}

@ -0,0 +1,35 @@
package com.engine.organization.entity.staff.bo;
import com.engine.organization.entity.staff.param.StaffPlanSearchParam;
import com.engine.organization.entity.staff.po.StaffPlanPO;
import java.util.Date;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
public class StaffPlanBO {
public static StaffPlanPO convertParamToPO(StaffPlanSearchParam param, Long employeeId) {
if (param == null) {
return null;
}
return StaffPlanPO.builder()
.id(param.getId())
.planNo(param.getPlanNo())
.planName(param.getPlanName())
.planYear(param.getPlanYear())
.timeStart(param.getTimeStart())
.timeEnd(param.getTimeEnd())
.companyId(param.getCompanyId())
.description(param.getDescription())
.forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 0 : 1)
.deleteType(0)
.createTime(new Date())
.updateTime(new Date())
.creator(employeeId)
.build();
}
}

@ -0,0 +1,57 @@
package com.engine.organization.entity.staff.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class StaffPlanSearchParam {
/**
*
*/
private Long id;
/**
*
*/
private String planNo;
/**
*
*/
private String planName;
/**
*
*/
private Integer planYear;
/**
*
*/
private Date timeStart;
/**
*
*/
private Date timeEnd;
/**
*
*/
private String companyId;
/**
*
*/
private String description;
/**
*
*/
private Boolean forbiddenTag;
}

@ -0,0 +1,68 @@
package com.engine.organization.entity.staff.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class StaffSearchParam {
/**
*
*/
private Long id;
/**
* id
*/
private Long planId;
/**
*
*/
private Long compId;
/**
*
*/
private Long deptId;
/**
*
*/
private Long jobId;
/**
*
*/
private Integer staffNum;
/**
*
*/
private Integer controlPolicy;
/**
*
*/
private Integer permanentNum;
/**
*
*/
private Integer freezeNum;
/**
*
*/
private Integer lackStatus;
/**
*
*/
private String staffDesc;
/**
*
*/
private String description;
}

@ -0,0 +1,75 @@
package com.engine.organization.entity.staff.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class StaffPO {
/**
*
*/
private Long id;
/**
* id
*/
private Long planId;
/**
*
*/
private Long compId;
/**
*
*/
private Long deptId;
/**
*
*/
private Long jobId;
/**
*
*/
private Integer staffNum;
/**
*
*/
private Integer controlPolicy;
/**
*
*/
private Integer permanentNum;
/**
*
*/
private Integer freezeNum;
/**
*
*/
private Integer lackStatus;
/**
*
*/
private String staffDesc;
/**
*
*/
private String description;
private Long creator;
private int deleteType;
private Date createTime;
private Date updateTime;
}

@ -37,11 +37,11 @@ public class StaffPlanPO {
/**
*
*/
private Date time_start;
private Date timeStart;
/**
*
*/
private Date time_end;
private Date timeEnd;
/**
*
*/

@ -0,0 +1,79 @@
package com.engine.organization.entity.staff.vo;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@OrganizationTable(pageId = "e04abd72-dbd6-11ec-b69e-00ffcbed7508",
fields = "t.id,t.is_used, t.plan_no, t.plan_name, t.plan_year, t.time_start, t.time_end, t.forbidden_tag",
fromSql = "FROM jcl_org_staffplan t ",
orderby = "id desc",
primarykey = "id",
operates = {
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除"),
@OrganizationTableOperate(index = "2", text = "发起编制流程")
}, tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatStaffOperates", otherpara = "column:is_used"),
checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom", popedompara = "column:is_used")
)
public class StaffPlanTableVO {
/**
*
*/
@OrganizationTableColumn(column = "id", display = false)
private Long id;
/**
*
*/
@OrganizationTableColumn(column = "isUsed", display = false)
private Integer isUsed;
/**
*
*/
@OrganizationTableColumn(text = "编号", width = "16%", column = "plan_no")
private String planNo;
/**
*
*/
@OrganizationTableColumn(text = "名称", width = "16%", column = "plan_name")
private String planName;
/**
*
*/
@OrganizationTableColumn(text = "年度", width = "16%", column = "plan_year")
private Integer planYear;
/**
*
*/
@OrganizationTableColumn(text = "时间开始", width = "16%", column = "time_start")
private Date timeStart;
/**
*
*/
@OrganizationTableColumn(text = "时间结束", width = "16%", column = "time_end")
private Date timeEnd;
/**
*
*/
@OrganizationTableColumn(text = "状态", width = "16%", column = "forbidden_tag")
private Integer forbiddenTag;
}

@ -0,0 +1,91 @@
package com.engine.organization.entity.staff.vo;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@OrganizationTable(pageId = "0cdfd5bb-dc09-11ec-b69e-00ffcbed7508",
fields = "id,is_used,plan_id,comp_id,dept_id,job_id,staff_num,permanent_num,freeze_num,lack_status,staff_desc",
fromSql = "FROM jcl_org_staff t ",
orderby = "id desc",
primarykey = "id",
operates = {
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除"),
@OrganizationTableOperate(index = "2", text = "变更")
}, tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatStaffOperates", otherpara = "column:is_used"),
checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom", popedompara = "column:is_used")
)
public class StaffTableVO {
/**
*
*/
@OrganizationTableColumn(column = "id", display = false)
private Long id;
/**
*
*/
@OrganizationTableColumn(column = "isUsed", display = false)
private Integer isUsed;
/**
* id
*/
@OrganizationTableColumn(text = "方案", width = "10%", column = "plan_id", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getSpanById")
private String planId;
/**
*
*/
@OrganizationTableColumn(text = "分部", width = "10%", column = "comp_id", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
private String compId;
/**
*
*/
@OrganizationTableColumn(text = "部门", width = "10%", column = "dept_id", transmethod = "com.engine.organization.transmethod.DepartmentTransMethod.getSpanById")
private String deptId;
/**
*
*/
@OrganizationTableColumn(text = "岗位", width = "10%", column = "job_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getSpanById")
private String jobId;
/**
*
*/
@OrganizationTableColumn(text = "编制数", width = "10%", column = "staff_num")
private Integer staffNum;
/**
*
*/
@OrganizationTableColumn(text = "在编", width = "10%", column = "permanent_num")
private Integer permanentNum;
/**
*
*/
@OrganizationTableColumn(text = "冻结数", width = "10%", column = "freeze_num")
private Integer freezeNum;
/**
*
*/
@OrganizationTableColumn(text = "缺编状态", width = "10%", column = "lack_status")
private Integer lackStatus;
/**
*
*/
@OrganizationTableColumn(text = "编制描述", width = "10%", column = "staff_desc")
private String staffDesc;
}

@ -0,0 +1,45 @@
package com.engine.organization.enums;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/31
* @Version V1.0
**/
public enum RuleCodeTypeEnum {
SUBCOMPANY("SUBCOMPANY"),
DEPARTMENT("DEPARTMENT"),
JOBTITLES("JOBTITLES"),
USER("USER"),
YEAR("YEAR"),
MONTH("MONTH"),
DAY("DAY"),
STRING("STRING"),
NUMBER("NUMBER");
private String value;
RuleCodeTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static RuleCodeTypeEnum getByValue(String value) {
for (RuleCodeTypeEnum ruleCodeType : values()) {
if (ruleCodeType.getValue().equals(value)) {
return ruleCodeType;
}
}
return null;
}
}

@ -0,0 +1,12 @@
package com.engine.organization.mapper.codesetting;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/31
* @Version V1.0
**/
public interface CodeRuleDetailMapper {
void delete(Long codeRuleId);
}

@ -0,0 +1,9 @@
<?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.codesetting.CodeRuleDetailMapper">
<delete id="delete">
delete from JCL_CODERULE_DETAIL where coderule_id = #{codeRuleId}
</delete>
</mapper>

@ -0,0 +1,19 @@
package com.engine.organization.mapper.codesetting;
import com.engine.organization.entity.codesetting.po.CodeRulePO;
import org.apache.ibatis.annotations.Param;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/31
* @Version V1.0
**/
public interface CodeRuleMapper {
Long getCodeRuleId(@Param("serialType") String serialType);
void updateCodeRule(@Param("codeRulePO") CodeRulePO codeRulePO);
void insertCodeRule(CodeRulePO codeRulePO);
}

@ -0,0 +1,76 @@
<?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.codesetting.CodeRuleMapper">
<select id="getCodeRuleId" resultType="long">
select t.id
from JCL_CODERULE t
where serial_type = #{serialType}
</select>
<update id="updateCodeRule" parameterType="com.engine.organization.entity.codesetting.po.CodeRulePO">
update JCL_CODERULE
<set>
serial_enable = #{serialEnable}
oneself_type = #{oneselfType}
creator=#{creator},
update_time=#{updateTime},
</set>
WHERE id = #{codeRuleId} AND delete_type = 0
</update>
<insert id="insertCodeRule" parameterType="com.engine.organization.entity.codesetting.po.CodeRulePO" keyProperty="id"
keyColumn="id" useGeneratedKeys="true">
INSERT INTO JCL_CODERULE
<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="serial_type != null ">
serial_type,
</if>
<if test="serial_enable != null ">
serial_enable,
</if>
<if test="oneself_type != null ">
oneself_type,
</if>
</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="serialType != null ">
serialType,
</if>
<if test="serialEnable != null ">
serialEnable,
</if>
<if test="oneselfType != null ">
oneselfType,
</if>
</trim>
</insert>
</mapper>

@ -0,0 +1,17 @@
package com.engine.organization.mapper.common;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/06/01
* @version: 1.0
*/
public interface RefreshUseMapper {
int updateIsUsedByIds(@Param("tableName") String tableName, @Param("ids") Collection<String> ids, @Param("isUsed") int isUsed);
int initIsUseStatus(@Param("tableName") String tableName);
}

@ -0,0 +1,20 @@
<?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.common.RefreshUseMapper">
<update id="updateIsUsedByIds">
update ${tableName} set is_used = #{isUsed} where delete_type = 0 and id
<if test=" isUsed == 0 ">
not
</if>
in
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</update>
<update id="initIsUseStatus">
update ${tableName}
set is_used = 0
where delete_type = 0
</update>
</mapper>

@ -1,10 +1,11 @@
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;
import java.util.List;
import java.util.Map;
/**
* @description: TODO
@ -20,6 +21,13 @@ public interface CompMapper {
*/
List<CompPO> list();
/**
* ID
*
* @return
*/
List<String> listUsedId();
/**
*
*
@ -42,6 +50,23 @@ public interface CompMapper {
*/
List<CompPO> listChild(@Param("ids") Collection ids);
/**
* ID
*
* @param pid
* @return
*/
List<CompPO> listChildByPID(@Param("pid") String pid);
/**
* ID
*
* @param pid
* @return
*/
int countChildByPID(@Param("pid") long pid);
/**
* ID
*
@ -60,6 +85,23 @@ public interface CompMapper {
List<CompPO> listByNo(@Param("compNo") String compNo);
/**
*
*
* @param ids
* @return
*/
List<Map<String, Object>> listCompsByIds(@Param("ids") Collection<Long> ids);
/**
* ID
* @param ids
* @return
*/
List<CompPO> getCompsByIds(@Param("ids") Collection<Long> ids);
/**
* /
*
@ -86,7 +128,7 @@ public interface CompMapper {
int updateForbiddenTagById(CompPO compPO);
/**
*
*
*
* @param ids
*/

@ -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,13 @@
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
@ -197,6 +198,60 @@
</if>
</select>
<select id="listCompsByIds" resultType="java.util.Map">
select
id,
comp_name as name
from jcl_org_comp t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<select id="listChildByPID" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM
jcl_org_comp t
WHERE t.delete_type = 0
and parent_company = #{pid}
</select>
<select id="countChildByPID" resultType="java.lang.Integer">
SELECT count(1)
FROM jcl_org_comp t
WHERE t.delete_type = 0
and parent_company = #{pid}
</select>
<select id="getCompsByIds" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_comp t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<select id="listUsedId" resultType="java.lang.String">
select parent_comp
from JCL_ORG_DEPT
where delete_type = 0
union
select parent_comp
from JCL_ORG_JOB
where delete_type = 0
union
select company_id
from JCL_ORG_STAFFPLAN
where delete_type = 0
union
select comp_id
from JCL_ORG_STAFF
where delete_type = 0
</select>
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.sequence.po.SequencePO">
update jcl_org_comp
<set>
@ -215,7 +270,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},

@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
* @Author weaver_cl
@ -14,28 +15,94 @@ import java.util.List;
**/
public interface DepartmentMapper {
List<DepartmentPO> getDeptListByCompId();
List<DepartmentPO> getDeptListByCompId(@Param("parentComp") Integer parentComp);
List<DepartmentPO> getDeptListByPId(@Param("PId") Long PId);
List<DepartmentPO> getDeptList(DepartmentPO departmentPO);
int countChildByPID(@Param("pid") Long pid);
/**
*
*
* @return
*/
List<DepartmentPO> list();
/**
* No
*
* @param deptNo
* @return
*/
List<DepartmentPO> listByNo(@Param("deptNo") String deptNo);
/**
*
*
*
* @return
*/
List<DepartmentPO> listParent();
List<DepartmentPO> listByFilter(DepartmentPO departmentPO);
/**
*
*
*
* @param ids
* @return
*/
List<DepartmentPO> listChild(@Param("ids") Collection ids);
List<Map<String, Object>> listDeptsByIds(@Param("ids") Collection<Long> ids);
DepartmentPO getDeptById(@Param("id") int id);
/**
* ID
*
* @param id
* @return
*/
DepartmentPO getDeptById(@Param("id") long id);
/**
* ID
*
* @param id
* @return
*/
String getDeptNameById(@Param("id") int id);
/**
*
*
* @param departmentPO
* @return
*/
int insertIgnoreNull(DepartmentPO departmentPO);
/**
*
*
* @param departmentPO
* @return
*/
int updateBaseDept(DepartmentPO departmentPO);
/**
*
*
* @param departmentPO
* @return
*/
int updateForbiddenTagById(DepartmentPO departmentPO);
/**
*
*
* @param ids
*/
int deleteByIds(@Param("ids") Collection<Long> ids);
/**
* ID
*
* @return
*/
List<String> listUsedId();
}

@ -18,10 +18,27 @@
<result column="update_time" property="updateTime"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t
.
id
,
t.dept_no,
t.dept_name,
t.dept_name_short,
t.parent_comp,
t.parent_dept,
t.dept_principal,
t.show_order,
t.forbidden_tag
</sql>
<select id="getDeptListByCompId" resultType="com.engine.organization.entity.department.po.DepartmentPO">
select t.id, t.dept_name, t.parent_dept, t.dept_principal,t.parent_dept,t.parent_comp
select t.id, t.dept_name, t.parent_dept, t.dept_principal, t.parent_dept, t.parent_comp
from jcl_org_dept t
where delete_type = 0
and parent_comp = #{parentComp}
</select>
<select id="getDeptListByPId" resultType="com.engine.organization.entity.department.po.DepartmentPO">
@ -37,17 +54,10 @@
where id = #{id}
</select>
<select id="getDeptList" parameterType="com.engine.organization.entity.department.po.DepartmentPO"
<select id="listByFilter" parameterType="com.engine.organization.entity.department.po.DepartmentPO"
resultMap="BaseResultMap">
select t.id,
t.dept_no,
t.dept_name,
t.dept_name_short,
t.parent_comp,
t.parent_dept,
t.dept_principal,
t.show_order,
t.forbidden_tag
select
<include refid="baseColumns"/>
from jcl_org_dept t
where delete_type = 0
<include refid="likeSQL"/>
@ -69,55 +79,170 @@
</select>
<select id="getDeptById" resultType="com.engine.organization.entity.department.po.DepartmentPO">
select t.id,
t.dept_no,
t.dept_name,
t.dept_name_short,
t.parent_comp,
t.parent_dept,
t.dept_principal,
t.show_order,
t.forbidden_tag
select
<include refid="baseColumns"/>
from jcl_org_dept t
where delete_type = 0
and id = #{id}
and id = #{id}
</select>
<select id="listParent" resultMap="BaseResultMap">
SELECT
t.id,
t.dept_no,
t.dept_name,
t.dept_name_short,
t.parent_comp,
t.parent_dept,
t.dept_principal,
t.show_order,
t.forbidden_tag
FROM
jcl_org_dept t
WHERE t.delete_type = 0
<include refid="nullSql"/>
<select id="listDeptsByIds" resultType="java.util.Map">
select
id,
dept_name as name
from jcl_org_dept t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<select id="listChild" resultMap="BaseResultMap">
<select id="list" resultType="com.engine.organization.entity.department.po.DepartmentPO">
SELECT
t.id,
t.dept_no,
t.dept_name,
t.dept_name_short,
t.parent_comp,
t.parent_dept,
t.dept_principal,
t.show_order,
t.forbidden_tag
FROM
jcl_org_dept t
<include refid="baseColumns"/>
FROM jcl_org_dept t
WHERE t.delete_type = 0
AND parent_dept IN
</select>
<select id="listByNo" resultType="com.engine.organization.entity.department.po.DepartmentPO">
select
<include refid="baseColumns"/>
from jcl_org_dept t where dept_no = #{deptNo} AND delete_type = 0
</select>
<select id="countChildByPID" resultType="java.lang.Integer">
select count(1)
from jcl_org_dept t
where delete_type = 0
and parent_dept = #{pid}
</select>
<select id="listUsedId" resultType="java.lang.String">
select parent_dept
from JCL_ORG_JOB
where delete_type = 0
union
select dept_id
from JCL_ORG_STAFF
where delete_type = 0
</select>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.department.po.DepartmentPO"
keyProperty="id"
keyColumn="id" useGeneratedKeys="true">
INSERT INTO jcl_org_dept
<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="deptNo != null ">
dept_no,
</if>
<if test="deptName != null ">
dept_name,
</if>
<if test="deptNameShort != null ">
dept_name_short,
</if>
<if test="parentComp != null ">
parent_comp,
</if>
<if test="parentDept != null ">
parent_dept,
</if>
<if test="deptPrincipal != null ">
dept_principal,
</if>
<if test="showOrder != null ">
show_order,
</if>
<if test="description != null ">
description,
</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="deptNo != null ">
#{deptNo},
</if>
<if test="deptName != null ">
#{deptName},
</if>
<if test="deptNameShort != null ">
#{deptNameShort},
</if>
<if test="parentComp != null ">
#{parentComp},
</if>
<if test="parentDept != null ">
#{parentDept},
</if>
<if test="deptPrincipal != null ">
#{deptPrincipal},
</if>
<if test="showOrder != null ">
#{showOrder},
</if>
<if test="description != null ">
#{description},
</if>
0,
</trim>
</insert>
<update id="updateBaseDept" parameterType="com.engine.organization.entity.department.po.DepartmentPO">
update jcl_org_dept
<set>
creator=#{creator},
update_time=#{updateTime},
dept_name=#{deptName},
dept_name_short=#{deptNameShort},
parent_comp=#{parentComp},
parent_dept=#{parentDept},
dept_principal=#{deptPrincipal},
show_order=#{showOrder},
description=#{description},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.department.po.DepartmentPO">
update jcl_org_dept
<set>
forbidden_tag=#{forbiddenTag},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<update id="deleteByIds">
UPDATE jcl_org_dept
SET delete_type = 1
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
</update>
<sql id="likeSQL">

@ -1,9 +1,7 @@
package com.engine.organization.mapper.employee;
import com.engine.organization.entity.department.po.DepartmentPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Author weaver_cl

@ -0,0 +1,37 @@
package com.engine.organization.mapper.job;
import com.engine.organization.entity.job.po.JobDTPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/31
* @version: 1.0
*/
public interface JobDTMapper {
/**
*
*
* @param mainId
* @return
*/
List<JobDTPO> listJobDTByMainID(@Param("mainId") Long mainId);
/**
*
*
* @param mainId
*/
int deleteByIds(@Param("mainId") Long mainId);
/**
*
*
* @param jobDTPO
* @return
*/
int insertIgnoreNull(JobDTPO jobDTPO);
}

@ -0,0 +1,108 @@
<?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.JobDTMapper">
<resultMap id="BaseResultMap" type="com.engine.organization.entity.job.po.JobDTPO">
<result column="id" property="id"/>
<result column="mainid" property="mainId"/>
<result column="level_id" property="levelId"/>
<result column="grade_id" property="gradeId"/>
<result column="level_id_span" property="levelIdspan"/>
<result column="grade_id_span" property="gradeIdspan"/>
<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.mainid,
t.level_id,
t.grade_id,
t.level_id_span,
t.grade_id_span
</sql>
<insert id="insertIgnoreNull">
INSERT INTO jcl_org_jobdt
<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="mainId != null ">
mainid,
</if>
<if test="levelId != null ">
level_id,
</if>
<if test="gradeId != null ">
grade_id,
</if>
<if test="levelIdspan != null ">
level_id_span,
</if>
<if test="gradeIdspan != null ">
grade_id_span,
</if>
</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="mainId != null ">
#{mainId},
</if>
<if test="levelId != null ">
#{levelId},
</if>
<if test="gradeId != null ">
#{gradeId},
</if>
<if test="levelIdspan != null ">
#{levelIdspan},
</if>
<if test="gradeIdspan != null ">
#{gradeIdspan},
</if>
</trim>
</insert>
<delete id="deleteByIds">
delete
from jcl_org_jobdt
where mainid = #{mainId}
</delete>
<select id="listJobDTByMainID" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_jobdt t
WHERE delete_type = 0
AND mainid = #{mainId}
</select>
</mapper>

@ -0,0 +1,104 @@
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;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/24
* @version: 1.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);
/**
* ID
*
* @return
*/
List<String> listUsedId();
}

@ -0,0 +1,348 @@
<?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},
job_name=#{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>
<select id="listUsedId" resultType="java.lang.String">
select job_id
from JCL_ORG_STAFF
where delete_type = 0
</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=",">

@ -23,8 +23,17 @@ public interface GradeMapper {
*/
List<GradePO> listByNo(@Param("gradeNo") String gradeNo);
/**
*
*
* @param schemeId
* @return
*/
List<GradePO> listGradesBySchemeId(@Param("schemeId") long schemeId);
/**
* ID
*
* @param id
* @return
*/
@ -32,6 +41,7 @@ public interface GradeMapper {
/**
*
*
* @param gradePO
* @return
*/
@ -62,8 +72,11 @@ public interface GradeMapper {
/**
*
*
* @param tag
* @return
*/
int getCountByTag(@Param("tag") int tag);
List<String> listUsedId();
}

@ -38,17 +38,27 @@
from jcl_org_grade t where id = #{id} AND delete_type = 0
</select>
<select id="listByNo" parameterType="com.engine.organization.entity.scheme.po.GradePO" resultMap="BaseResultMap">
<select id="listByNo" parameterType="com.engine.organization.entity.scheme.po.GradePO" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_grade t where grade_no = #{gradeNo} AND delete_type = 0
</select>
<select id="getCountByTag" resultType="java.lang.Integer">
select count(1) from jcl_org_grade where 1=1 AND delete_type = 0
<if test=" tag != -1 " >
<if test=" tag != -1 ">
and forbidden_tag = #{tag}
</if>
</select>
<select id="listGradesBySchemeId" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_grade t where delete_type = 0 and scheme_id = #{schemeId}
</select>
<select id="listUsedId" resultType="java.lang.String">
select grade_id
from JCL_ORG_JOBDT
where delete_type = 0
</select>
<update id="updateGrade" parameterType="com.engine.organization.entity.scheme.po.GradePO">
update jcl_org_grade
@ -91,7 +101,8 @@
</if>
<if test="schemeId != null ">
scheme_id,
</if><if test="levelId != null ">
</if>
<if test="levelId != null ">
level_id,
</if>
forbidden_tag,
@ -120,7 +131,8 @@
</if>
<if test="schemeId != null ">
#{schemeId},
</if><if test="levelId != null ">
</if>
<if test="levelId != null ">
#{levelId},
</if>
0,

@ -25,6 +25,13 @@ public interface LevelMapper {
*/
List<LevelPO> listByNo(@Param("levelNo") String levelNo);
/**
* ID
*
* @return
*/
List<String> listUsedId();
/**
* ID
* @param id

@ -36,14 +36,14 @@
from jcl_org_level t where id = #{id} AND delete_type = 0
</select>
<select id="listByNo" parameterType="com.engine.organization.entity.scheme.po.LevelPO" resultMap="BaseResultMap">
<select id="listByNo" parameterType="com.engine.organization.entity.scheme.po.LevelPO" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_level t where level_no = #{levelNo} AND delete_type = 0
</select>
<select id="getCountByTag" resultType="java.lang.Integer">
select count(1) from jcl_org_level where delete_type = 0
<if test=" tag != -1 " >
select count(1) from jcl_org_level where delete_type = 0
<if test=" tag != -1 ">
and forbidden_tag = #{tag}
</if>
</select>
@ -59,6 +59,15 @@
#{id}
</foreach>
</select>
<select id="listUsedId" resultType="java.lang.String">
select level_id
from JCL_ORG_GRADE
where delete_type = 0
union
select level_id
from JCL_ORG_JOBDT
where delete_type = 0
</select>
<update id="updateLevel" parameterType="com.engine.organization.entity.scheme.po.LevelPO">
update jcl_org_level

@ -26,6 +26,12 @@ public interface SchemeMapper {
*/
List<SchemePO> listByNo(@Param("schemeNo") String schemeNo);
/**
* ID
*
* @return
*/
List<String> listUsedId();
/**
* ID
*
@ -41,7 +47,7 @@ public interface SchemeMapper {
* @return
*/
@MapKey("id")
List<Map<String,Object>> listSchemesByIds(@Param("ids") Collection<Long> ids);
List<Map<String, Object>> listSchemesByIds(@Param("ids") Collection<Long> ids);
/**
* null

@ -51,6 +51,23 @@
#{id}
</foreach>
</select>
<select id="listUsedId" resultType="java.lang.String">
select scheme_id
from jcl_org_level
where delete_type = 0
union
select scheme_id
from jcl_org_grade
where delete_type = 0
union
select scheme_id
from JCL_ORG_SEQUENCE
where delete_type = 0
union
select scheme_id
from JCL_ORG_JOB
where delete_type = 0
</select>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.scheme.po.SchemePO" keyProperty="id"
keyColumn="id" useGeneratedKeys="true">

@ -25,6 +25,13 @@ public interface SequenceMapper {
*/
List<SequencePO> listByNo(@Param("sequenceNo") String sequenceNo);
/**
* ID
*
* @return
*/
List<String> listUsedId();
/**
* ID
* @param id
@ -77,4 +84,5 @@ public interface SequenceMapper {
* @return
*/
int getCountByTag(@Param("tag") int tag);
}

@ -36,14 +36,15 @@
from jcl_org_sequence t where id = #{id} AND delete_type = 0
</select>
<select id="listByNo" parameterType="com.engine.organization.entity.sequence.po.SequencePO" resultMap="BaseResultMap">
<select id="listByNo" parameterType="com.engine.organization.entity.sequence.po.SequencePO"
resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_sequence t where sequence_no = #{sequenceNo} AND delete_type = 0
</select>
<select id="getCountByTag" resultType="java.lang.Integer">
select count(1) from jcl_org_sequence where 1=1 AND delete_type = 0
<if test=" tag != -1 " >
<if test=" tag != -1 ">
and forbidden_tag = #{tag}
</if>
</select>
@ -59,6 +60,10 @@
#{id}
</foreach>
</select>
<select id="listUsedId" resultType="java.lang.String">
select sequence_id
from JCL_ORG_JOB
</select>
<update id="updateSequence" parameterType="com.engine.organization.entity.sequence.po.SequencePO">
update jcl_org_sequence

@ -0,0 +1,56 @@
package com.engine.organization.mapper.staff;
import com.engine.organization.entity.staff.po.StaffPO;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
/**
* @Author dxfeng
* @Description: TODO
* @Date 2022/5/25
* @Version V1.0
**/
public interface StaffMapper {
/**
* ID
*
* @param id
* @return
*/
StaffPO getStaffByID(@Param("id") long id);
/**
*
*
* @param staffPO
* @return
*/
int insertIgnoreNull(StaffPO staffPO);
/**
*
*
* @param staffPO
* @return
*/
int updateStaff(StaffPO staffPO);
/**
*
*
* @param ids
*/
int deleteByIds(@Param("ids") Collection<Long> ids);
/**
* ID
*
* @return
*/
List<String> listUsedId();
}

@ -0,0 +1,182 @@
<?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.staff.StaffMapper">
<resultMap id="BaseResultMap" type="com.engine.organization.entity.staff.po.StaffPO">
<result column="id" property="id"/>
<result column="plan_id" property="planId"/>
<result column="comp_id" property="compId"/>
<result column="dept_id" property="deptId"/>
<result column="job_id" property="jobId"/>
<result column="staff_num" property="staffNum"/>
<result column="control_policy" property="controlPolicy"/>
<result column="permanent_num" property="permanentNum"/>
<result column="freeze_num" property="freezeNum"/>
<result column="lack_status" property="lackStatus"/>
<result column="staff_desc" property="staffDesc"/>
<result column="description" property="description"/>
<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.plan_id
, t.comp_id
, t.dept_id
, t.job_id
, t.staff_num
, t.control_policy
, t.permanent_num
, t.freeze_num
, t.lack_status
, t.staff_desc
, t.description
</sql>
<select id="getStaffByID" parameterType="com.engine.organization.entity.staff.po.StaffPO"
resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_staff t where id = #{id} AND delete_type = 0
</select>
<select id="listUsedId" resultType="java.lang.String">
select staff_id
from jcl_org_staffs
where delete_type = 0
</select>
<update id="updateStaff" parameterType="com.engine.organization.entity.staff.po.StaffPO">
update jcl_org_staff
<set>
creator=#{creator},
update_time=#{updateTime},
plan_id=#{planId},
comp_id=#{compId},
dept_id=#{deptId},
job_id=#{jobId},
staff_num=#{staffNum},
control_policy=#{controlPolicy},
permanent_num=#{permanentNum},
freeze_num=#{freezeNum},
lack_status=#{lackStatus},
staff_desc=#{staffDesc},
description=#{description},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.staff.po.StaffPO" keyProperty="id"
keyColumn="id" useGeneratedKeys="true">
INSERT INTO jcl_org_staff
<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="planId != null ">
plan_id,
</if>
<if test="compId != null ">
comp_id,
</if>
<if test="deptId != null ">
dept_id,
</if>
<if test="jobId != null ">
job_id,
</if>
<if test="staffNum != null ">
staff_num,
</if>
<if test="controlPolicy != null ">
control_policy,
</if>
<if test="permanentNum != null ">
permanent_num,
</if>
<if test="freezeNum != null ">
freeze_num,
</if>
<if test="lackStatus != null ">
lack_status,
</if>
<if test="staffDesc != null ">
staff_desc,
</if>
<if test="description != null ">
description,
</if>
</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="planId != null ">
#{planId},
</if>
<if test="compId != null ">
#{compId},
</if>
<if test="deptId != null ">
#{deptId},
</if>
<if test="jobId != null ">
#{jobId},
</if>
<if test="staffNum != null ">
#{staffNum},
</if>
<if test="controlPolicy != null ">
#{controlPolicy},
</if>
<if test="permanentNum != null ">
#{permanentNum},
</if>
<if test="freezeNum != null ">
#{freezeNum},
</if>
<if test="lackStatus != null ">
#{lackStatus},
</if>
<if test="staffDesc != null ">
#{staffDesc},
</if>
<if test="description != null ">
#{description},
</if>
</trim>
</insert>
<update id="deleteByIds">
UPDATE jcl_org_staff
SET delete_type = 1
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

@ -0,0 +1,75 @@
package com.engine.organization.mapper.staff;
import com.engine.organization.entity.staff.po.StaffPlanPO;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
import java.util.Map;
/**
* @Author dxfeng
* @Description: TODO
* @Date 2022/5/25
* @Version V1.0
**/
public interface StaffPlanMapper {
/**
* No
*
* @param planNo
* @return
*/
List<StaffPlanPO> listByNo(@Param("planNo") String planNo);
List<Map<String, Object>> listPlansByIds(@Param("ids") Collection<Long> ids);
/**
* ID
*
* @param id
* @return
*/
StaffPlanPO getStaffPlanByID(@Param("id") long id);
/**
*
*
* @param staffPlanPO
* @return
*/
int insertIgnoreNull(StaffPlanPO staffPlanPO);
/**
*
*
* @param staffPlanPO
* @return
*/
int updateStaffPlan(StaffPlanPO staffPlanPO);
/**
*
*
* @param staffPlanPO
* @return
*/
int updateForbiddenTagById(StaffPlanPO staffPlanPO);
/**
*
*
* @param ids
*/
int deleteByIds(@Param("ids") Collection<Long> ids);
/**
* ID
*
* @return
*/
List<String> listUsedId();
}

@ -0,0 +1,179 @@
<?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.staff.StaffPlanMapper">
<resultMap id="BaseResultMap" type="com.engine.organization.entity.staff.po.StaffPlanPO">
<result column="id" property="id"/>
<result column="plan_no" property="planNo"/>
<result column="plan_name" property="planName"/>
<result column="plan_year" property="planYear"/>
<result column="time_start" property="timeStart"/>
<result column="time_end" property="timeEnd"/>
<result column="company_id" property="companyId"/>
<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.plan_no
, t.plan_name
, t.plan_year
, t.time_start
, t.time_end
, t.company_id
, t.description
, t.forbidden_tag
, t.creator
, t.delete_type
, t.create_time
, t.update_time
</sql>
<select id="getStaffPlanByID" parameterType="com.engine.organization.entity.staff.po.StaffPlanPO"
resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_staffplan t where id = #{id} AND delete_type = 0
</select>
<select id="listByNo" parameterType="com.engine.organization.entity.staff.po.StaffPlanPO"
resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_staffplan t where plan_no = #{planNo} AND delete_type = 0
</select>
<select id="listPlansByIds" resultType="java.util.Map">
select
id,
plan_name as name
from jcl_org_staffplan t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<select id="listUsedId" resultType="java.lang.String">
select plan_id
from JCL_ORG_STAFF
where delete_type = 0
</select>
<update id="updateStaffPlan" parameterType="com.engine.organization.entity.staff.po.StaffPlanPO">
update jcl_org_staffplan
<set>
creator=#{creator},
update_time=#{updateTime},
plan_no=#{planNo},
plan_name=#{planName},
plan_year=#{planYear},
time_start=#{timeStart},
time_end=#{timeEnd},
company_id=#{companyId},
description=#{description},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.staff.po.StaffPlanPO" keyProperty="id"
keyColumn="id" useGeneratedKeys="true">
INSERT INTO jcl_org_staffplan
<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="planNo != null ">
plan_no,
</if>
<if test="planName != null ">
plan_name,
</if>
<if test="planYear != null ">
plan_year,
</if>
<if test="timeStart != null ">
time_start,
</if>
<if test="timeEnd != null ">
time_end,
</if>
<if test="companyId != null ">
company_id,
</if>
<if test="description != null ">
description,
</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="planNo != null ">
#{planNo},
</if>
<if test="planName != null ">
#{planName},
</if>
<if test="planYear != null ">
#{planYear},
</if>
<if test="timeStart != null ">
#{timeStart},
</if>
<if test="timeEnd != null ">
#{timeEnd},
</if>
<if test="companyId != null ">
#{companyId},
</if>
<if test="description != null ">
#{description},
</if>
0,
</trim>
</insert>
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.staff.po.StaffPlanPO">
update jcl_org_staffplan
<set>
forbidden_tag=#{forbiddenTag},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<update id="deleteByIds">
UPDATE jcl_org_staffplan
SET delete_type = 1
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

@ -0,0 +1,33 @@
package com.engine.organization.service;
import com.engine.organization.entity.codesetting.param.CodeSaveParam;
import com.engine.organization.util.response.ReturnResult;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/5/30
* @Version V1.0
**/
public interface CodeSettingService {
/***
*
* @param serialtype
* @return
*/
ReturnResult getHasRight(String serialtype);
/**
*
* @param params
*/
void saveOrUpdateCodeSetting(CodeSaveParam params);
/**
* id
* @param serialType
* @return
*/
Long getCodeRuleId(String serialType);
}

@ -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;

@ -5,6 +5,7 @@ import com.engine.organization.entity.department.param.QuerySingleDeptListParam;
import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
import com.engine.organization.util.page.PageInfo;
import java.util.Collection;
import java.util.Map;
/**
@ -38,7 +39,53 @@ public interface DepartmentService {
* @param params
* @return
*/
int saveBaseComp(DeptSearchParam params);
int saveBaseForm(DeptSearchParam params);
/**
*
*
* @param params
*/
int updateForbiddenTagById(DeptSearchParam params);
/**
*
*
* @param params
* @return
*/
int updateForm(Map<String, Object> params);
/**
* ID
*
* @param ids
*/
int deleteByIds(Collection<Long> ids);
/**
*
*
* @param params
* @return
*/
Map<String, Object> getSearchCondition(Map<String, Object> params);
/**
*
*
* @return
*/
Map<String, Object> getHasRight();
/**
*
*
* @param params
* @return
*/
Map<String, Object> getDeptBaseForm(Map<String, Object> params);
/**
@ -48,5 +95,4 @@ public interface DepartmentService {
*/
Map<String, Object> getSaveForm();
}

@ -0,0 +1,101 @@
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;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/26
* @version: 1.0
*/
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 id
* @param departmentId
* @return
*/
int copyJobItem(long id, long departmentId);
/**
*
*
* @param params
* @return
*/
int updateForbiddenTagById(JobSearchParam params);
/**
* ID
*
* @param ids
*/
int deleteByIds(Collection<Long> ids);
Map<String, Object> getHrmListByJobId(Long jobId);
}

@ -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;

@ -0,0 +1,74 @@
package com.engine.organization.service;
import com.engine.organization.entity.staff.param.StaffPlanSearchParam;
import java.util.Collection;
import java.util.Map;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
public interface StaffPlanService {
/**
*
*
* @param params
* @return
*/
Map<String, Object> listPage(StaffPlanSearchParam params);
/**
*
* @param param
* @return
*/
int saveStaffPlan(StaffPlanSearchParam param);
/**
*
*
* @param param
* @return
*/
int updateStaffPlan(StaffPlanSearchParam param);
/**
*
*
* @param params
*/
int updateForbiddenTagById(StaffPlanSearchParam params);
/**
* ID
*
* @param ids
*/
int deleteByIds(Collection<Long> ids);
/**
*
*
* @param params
* @return
*/
Map<String, Object> getSearchCondition(Map<String, Object> params);
/**
*
*
* @param params
* @return
*/
Map<String, Object> getForm(Map<String, Object> params);
/**
*
* @return
*/
Map<String, Object> getHasRight();
}

@ -0,0 +1,67 @@
package com.engine.organization.service;
import com.engine.organization.entity.staff.param.StaffSearchParam;
import java.util.Collection;
import java.util.Map;
/**
* @description: TODO
* @author:dxfeng
* @createTime: 2022/05/25
* @version: 1.0
*/
public interface StaffService {
/**
*
*
* @param params
* @return
*/
Map<String, Object> listPage(StaffSearchParam params);
/**
*
* @param param
* @return
*/
int saveStaff(StaffSearchParam param);
/**
*
*
* @param param
* @return
*/
int updateStaff(StaffSearchParam param);
/**
* ID
*
* @param ids
*/
int deleteByIds(Collection<Long> ids);
/**
*
*
* @param params
* @return
*/
Map<String, Object> getSearchCondition(Map<String, Object> params);
/**
*
*
* @param params
* @return
*/
Map<String, Object> getForm(Map<String, Object> params);
/**
*
* @return
*/
Map<String, Object> getHasRight();
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save