commit
6df0c69c56
@ -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 "";
|
||||
}
|
@ -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,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,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;
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -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;
|
@ -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,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;
|
||||
|
||||
}
|
@ -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>
|
@ -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>
|
@ -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,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);
|
||||
}
|
@ -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);
|
||||
}
|
@ -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…
Reference in New Issue