Compare commits

..

4 Commits

190 changed files with 1765 additions and 82697 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,6 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.Util;
import weaver.hrm.company.SubCompanyComInfo;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -78,14 +77,13 @@ public class JobBrowserService extends BrowserService {
Map<String, Object> apidatas = new HashMap<>();
String q = Util.null2String(httpServletRequest.getParameter("q"));
List<String> sqlParams = new ArrayList<>();
SubCompanyComInfo subInfo = new SubCompanyComInfo();
String keyword = "";
if (q.length() > 0) {
keyword = "%" + q + "%";
}
RecordSet rs = new RecordSet();
String sqlwhere = " where t.delete_type = 0 ";
String backfields = "t.id,t.ec_company, t.job_no, h.jobtitlename as name ";
String backfields = "t.id, t.job_no, h.jobtitlename as name ";
String fromSql = "FROM jcl_org_job t left join hrmjobtitles h on t.ec_jobTitle = h.id ";
String orderby = " order by t.id ";
sqlwhere += " ";
@ -106,8 +104,7 @@ public class JobBrowserService extends BrowserService {
Map<String, String> item = new HashMap<>(3);
item.put("id", Util.null2String(rs.getString("id")));
String name = Util.null2String(rs.getString("name"));
String subCompanyname = subInfo.getSubCompanyname(Util.null2String(rs.getString("ec_company")));
item.put("name", name+"("+subCompanyname+")");
item.put("name", name);
item.put("title", name);
datas.add(item);
}
@ -121,13 +118,13 @@ public class JobBrowserService extends BrowserService {
Map<String, List<SearchConditionItem>> apiDatas = new HashMap<>();
List<SearchConditionItem> conditions = new ArrayList<>();
// 编号
SearchConditionItem jobNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547118, "jobNo");
SearchConditionItem jobNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "编号", "jobNo");
// 名称
SearchConditionItem jobNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "jobName");
SearchConditionItem jobNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "jobName");
// 所属分部
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "ecCompany", "");
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "ecCompany", "");
// 所属部门
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547431, "4", "ecDepartment", "");
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "4", "ecDepartment", "");
conditions.add(jobNoItem);
conditions.add(jobNameItem);
@ -237,7 +234,7 @@ public class JobBrowserService extends BrowserService {
compList = MapperProxyFactory.getProxy(CompMapper.class).listParent();
}
// 获取顶层分部
compList.stream().sorted(Comparator.comparingDouble(item -> null == item.getShowOrder() ? 0 : item.getShowOrder())).forEach(item -> buildCompNodes(treeNodes, compHasSubs, item));
compList.stream().sorted(Comparator.comparing(item -> null == item.getShowOrder() ? 0 : item.getShowOrder())).forEach(item -> buildCompNodes(treeNodes, compHasSubs, item));
} else if ("1".equals(params.getType())) {
// 当前节点下的元素
CompPO compBuild = CompPO.builder().supSubComId(Integer.parseInt(params.getId())).canceled(0).build();

View File

@ -29,7 +29,4 @@ public @interface OrganizationTableColumn {
// 额外参数
String otherPara() default "";
// 多语言转换
boolean multiLanguage() default false;
}

View File

@ -7,7 +7,6 @@ import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface TableTitle {
int labelId() default -1;
String title();
String dataIndex();
String key();

View File

@ -1,25 +0,0 @@
package com.engine.organization.common;
import java.util.HashMap;
/**
* @author:dxfeng
* @createTime: 2024/07/11
* @version: 1.0
*/
public class IgnoreCaseMap<V> extends HashMap<String, V> {
@Override
public V get(Object key) {
if (key instanceof String) {
// 将键转为小写形式再进行查找
return super.get(((String) key).toLowerCase());
}
return null;
}
@Override
public V put(String key, V value) {
// 将键转为小写形式后作为真正的键
return super.put(key.toLowerCase(), value);
}
}

View File

@ -83,7 +83,7 @@ public class OrganizationWeaTable<T> extends WeaTable {
super.setTableType(weaTableTypeEnum);
CheckboxPopedom checkPopedom = table.checkboxPopedom();
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
if (checkPopedom != null && !"".equals(checkPopedom.showmethod())) {
if (checkPopedom != null && !"".equals(checkPopedom.showmethod())){
checkboxpopedom.setShowmethod(checkPopedom.showmethod());
checkboxpopedom.setPopedompara(checkPopedom.popedompara());
}
@ -114,13 +114,8 @@ public class OrganizationWeaTable<T> extends WeaTable {
weaTableColumn.setTransmethod(transmethod);
}
String otherPara = columnAnn.otherPara();
if (StringUtils.isNotBlank(otherPara)) {
if(StringUtils.isNotBlank(otherPara)) {
weaTableColumn.setOtherpara(otherPara);
} else {
// 未设置其他参数但是设置了多语言自动添加其它参数为语言类型
if (columnAnn.multiLanguage()) {
weaTableColumn.setOtherpara(String.valueOf(user.getLanguage()));
}
}
if (!display) {
weaTableColumn.setDisplay(WeaBoolAttr.FALSE);

View File

@ -4,10 +4,11 @@ import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.collections.CollectionUtils;
import weaver.general.StringUtil;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
@ -21,18 +22,13 @@ import java.util.stream.Collectors;
@NoArgsConstructor
@AllArgsConstructor
public class DeleteParam {
private String ids;
private String ids;
public List<Long> getIds() {
if (StringUtil.isEmpty(ids)) {
return new ArrayList<>();
}
ArrayList<Long> list = new ArrayList<>();
Set<Long> collect = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toSet());
if (CollectionUtils.isNotEmpty(collect)) {
list.addAll(collect);
}
return list;
}
public List<Long> getIds() {
if(StringUtil.isEmpty(ids)){
return new ArrayList<>();
}
return Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList());
}
}

View File

@ -26,7 +26,7 @@ public class CusBowserTreeBO {
.domid("sel_" + item.getId())
.hasChild(item.getIsParent())
.isLeaf(!item.getIsParent())
.isopen(true)
.isopen(false)
.key(getKey(item))
.name(item.getName())
.build()).collect(Collectors.toList());

View File

@ -47,12 +47,6 @@ public class ChartPO {
// 部门层级
private int departmentDepth;
//账号类型
private String accountType;
//直接上级
private String managerId;
// 在编数
private int onJobNum;
// 编制数

View File

@ -22,7 +22,6 @@ public class CompanyTreePO {
private boolean isLeaf;
private String key;
private boolean disabled;
private String type;
public boolean getIsLeaf() {
return isLeaf;
@ -39,11 +38,4 @@ public class CompanyTreePO {
public String getValue() {
return id;
}
public String getType() {
if(id.startsWith("d")){
return "2";
}
return "1";
}
}

View File

@ -1,23 +0,0 @@
package com.engine.organization.entity.chart;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author liang.cheng
* @Date 2024/6/3 2:57 PM
* @Description: TODO
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class HrmLabelVO {
private String labelName;
}

View File

@ -1,5 +1,6 @@
package com.engine.organization.entity.chart;
import com.icbc.api.internal.apache.http.impl.cookie.S;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

View File

@ -24,10 +24,7 @@ public class CompBO {
}
public static List<SearchTree> buildSetToSearchTree(Set<CompPO> comps) {
return comps.stream().sorted(Comparator
.comparingDouble(CompPO::getShowOrder)
.thenComparingDouble(CompPO::getShowOrderOfTree)
).map(item -> {
return comps.stream().sorted(Comparator.comparing(item -> null == item.getShowOrder() ? 0 : item.getShowOrder())).map(item -> {
SearchTree tree = new SearchTree();
tree.setCanClick(true);
tree.setCanceled(item.getCanceled() != null && item.getCanceled() != 0);
@ -36,11 +33,10 @@ public class CompBO {
tree.setIsParent(false);
tree.setIsVirtual("0");
tree.setName(item.getSubCompanyName());
tree.setPid(item.getSupSubComId() == null ? "0" :item.getSupSubComId().toString());
tree.setPid(item.getSupSubComId().toString());
tree.setSelected(false);
tree.setType("1");
tree.setOrderNum(null == item.getShowOrder() ? 0 : item.getShowOrder());
tree.setShowOrderOfTree(null == item.getShowOrderOfTree() ? 0 : item.getShowOrderOfTree());
return tree;
}).collect(Collectors.toList());
}
@ -105,7 +101,7 @@ public class CompBO {
.subCompanyCode(e.getSubCompanyCode())
.subCompanyDesc(e.getSubCompanyDesc())
.subCompanyName(e.getSubCompanyName())
.supSubComId(e.getSupSubComId() == null ? 0 : e.getSupSubComId())
.supSubComId(e.getSupSubComId())
.supSubComName(null == poMaps.get(e.getSupSubComId()) ? "" : poMaps.get(e.getSupSubComId()).getSubCompanyName())
.showOrder(e.getShowOrder())
.canceled(null == e.getCanceled() ? 0 : e.getCanceled())

View File

@ -2,6 +2,7 @@ package com.engine.organization.entity.company.dto;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.TableTitle;
import com.engine.organization.entity.department.dto.DepartmentListDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -34,37 +35,37 @@ public class CompListDTO {
/**
* 名称
*/
@TableTitle(labelId = 547141, title = "名称", dataIndex = "subCompanyDesc", key = "subCompanyDesc")
@TableTitle(title = "名称", dataIndex = "subCompanyDesc", key = "subCompanyDesc")
private String subCompanyDesc;
/**
* 编号
*/
@TableTitle(labelId = 547118, title = "编号", dataIndex = "subCompanyCode", key = "subCompanyCode")
@TableTitle(title = "编号", dataIndex = "subCompanyCode", key = "subCompanyCode")
private String subCompanyCode;
/**
* 简称
*/
@TableTitle(labelId = 547181, title = "简称", dataIndex = "subCompanyName", key = "subCompanyName")
@TableTitle(title = "简称", dataIndex = "subCompanyName", key = "subCompanyName")
private String subCompanyName;
/**
* 上级公司
*/
@TableTitle(labelId = 547410, title = "上级分部", dataIndex = "supSubComName", key = "supSubComName")
@TableTitle(title = "上级分部", dataIndex = "supSubComName", key = "supSubComName")
private String supSubComName;
private Integer supSubComId;
@TableTitle(labelId = 547185, title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
private Double showOrder;
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
private Integer showOrder;
/**
* 禁用标记
*/
@TableTitle(labelId = 547186, title = "启用", dataIndex = "canceled", key = "canceled")
@TableTitle(title = "启用", dataIndex = "canceled", key = "canceled")
private Integer canceled;
/**
@ -78,8 +79,8 @@ public class CompListDTO {
*/
private List<CompListDTO> children;
public Double getShowOrder() {
return null == showOrder ? 0.00 : showOrder;
public Integer getShowOrder() {
return null == showOrder ? 0 : showOrder;
}
private String orderType;
@ -89,9 +90,9 @@ public class CompListDTO {
return children;
}
if ("asc".equalsIgnoreCase(orderType)) {
return children.stream().sorted(Comparator.comparingDouble(CompListDTO::getShowOrder)).collect(Collectors.toList());
return children.stream().sorted(Comparator.comparing(CompListDTO::getShowOrder)).collect(Collectors.toList());
} else {
return children.stream().sorted(Comparator.comparingDouble(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
return children.stream().sorted(Comparator.comparing(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
}
}
}

View File

@ -25,6 +25,6 @@ public class CompParam extends BaseQueryParam {
private String outKey;
private Integer limitUsers;
private String uuid;
private Double showOrder;
private Double showOrderOfTree;
private Integer showOrder;
private Integer showOrderOfTree;
}

View File

@ -32,20 +32,6 @@ public class CompPO {
private Date modified;
private Integer modifier;
private String uuid;
private Double showOrder;
private Double showOrderOfTree;
public Double getShowOrder() {
if (null == showOrder) {
return 0.00;
}
return showOrder;
}
public Double getShowOrderOfTree() {
if (null == showOrderOfTree) {
return 0.00;
}
return showOrderOfTree;
}
private Integer showOrder;
private Integer showOrderOfTree;
}

View File

@ -5,7 +5,6 @@ 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.exception.OrganizationRunTimeException;
import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.collections.CollectionUtils;
@ -32,26 +31,18 @@ public class DepartmentBO {
* @param list
* @return
*/
public static List<DepartmentListDTO> buildDeptDTOShowNames(List<DepartmentListDTO> list) {
setDeptLeader(list);
return list;
}
public static void setDeptLeader(List<DepartmentListDTO> departments) {
for (DepartmentListDTO dept : departments) {
dept.setBmfzr(getEmployeeNameById(dept.getId()));
List<DepartmentListDTO> children = dept.getChildren();
if (CollectionUtils.isNotEmpty(children)){
setDeptLeader(children);
}
}
public static List<DepartmentListDTO> buildDeptDTOShowNames(Collection<DepartmentListDTO> list) {
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
return list.stream().peek(e -> {
e.setSubCompanyName((null == e.getSubCompanyId1() || 0 == e.getSubCompanyId1()) ? "" : subCompanyComInfo.getSubCompanyname(Util.null2String(e.getSubCompanyId1())));
e.setSupDepName((null == e.getSupDepId() || 0 == e.getSupDepId()) ? "" : departmentComInfo.getDepartmentname(Util.null2String(e.getSupDepId())));
e.setBmfzr(getEmployeeNameById(e.getId()));
}
).collect(Collectors.toList());
}
public static List<DepartmentListDTO> buildDeptDTOList(Collection<DepartmentPO> list, String orderType) {
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
// 递归添加父级数据
List<DepartmentListDTO> dtoList = list.stream().map(e ->
DepartmentListDTO
@ -62,8 +53,6 @@ public class DepartmentBO {
.departmentCode(e.getDepartmentCode())
.subCompanyId1(e.getSubCompanyId1())
.supDepId(e.getSupDepId())
.subCompanyName((null == e.getSubCompanyId1() || 0 == e.getSubCompanyId1()) ? "" : subCompanyComInfo.getSubCompanyname(Util.null2String(e.getSubCompanyId1())))
.supDepName((null == e.getSupDepId() || 0 == e.getSupDepId()) ? "" : departmentComInfo.getDepartmentname(Util.null2String(e.getSupDepId())))
.showOrder(null == e.getShowOrder() ? 0 : e.getShowOrder())
.canceled(null == e.getCanceled() ? 0 : e.getCanceled())
.orderType(orderType)
@ -132,19 +121,16 @@ public class DepartmentBO {
if (CollectionUtils.isEmpty(departmentPOs)) {
return Collections.emptyList();
}
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
List<SingleDeptTreeVO> singleDeptTreeVOS = departmentPOs.stream().map(e ->
SingleDeptTreeVO
.builder()
.id(e.getId())
//.departmentCode(e.getDepartmentCode())
.departmentCode(e.getDepartmentCode())
.departmentMark(e.getDepartmentMark())
.departmentName(e.getDepartmentName())
.subCompanyName((null == e.getSubCompanyId1() || 0 == e.getSubCompanyId1()) ? "" : subCompanyComInfo.getSubCompanyname(Util.null2String(e.getSubCompanyId1())))
.subCompanyId1(e.getSubCompanyId1())
.supDepId(e.getSupDepId())
.supDepName((null == e.getSupDepId() || 0 == e.getSupDepId()) ? "" : departmentComInfo.getDepartmentname(Util.null2String(e.getSupDepId())))
.supDepName(null == e.getSupDepId() || e.getSupDepId() == 0 ? "" : getDeptNameById(e.getSupDepId()))
//.deptPrincipalName(getEmployeeNameById(e.getDeptPrincipal()))
.build()).collect(Collectors.toList());
//获取非一级部门
@ -167,13 +153,12 @@ public class DepartmentBO {
tree.setId(item.getId().toString());
tree.setIsParent(false);
tree.setIsVirtual("0");
tree.setName(item.getDepartmentMark());
tree.setName(item.getDepartmentName());
tree.setPid(null == item.getSupDepId() ? "0" : item.getSupDepId().toString());
tree.setSelected(false);
tree.setType("2");
tree.setParentComp(null == item.getSubCompanyId1() ? "0" : item.getSubCompanyId1().toString());
tree.setOrderNum(null == item.getShowOrder() ? 0.00 : item.getShowOrder().intValue());
tree.setShowOrderOfTree(null == item.getShowOrderOfTree() ? 0.00 : item.getShowOrderOfTree());
tree.setParentComp(item.getSubCompanyId1().toString());
tree.setOrderNum(null == item.getShowOrder() ? 0 : item.getShowOrder().intValue());
return tree;
}).collect(Collectors.toList());
}
@ -204,7 +189,7 @@ public class DepartmentBO {
}
}
} catch (Exception e) {
throw new OrganizationRunTimeException(e);
throw new RuntimeException(e);
}
return StringUtils.join(employeeNameById, ",");
}

View File

@ -36,32 +36,32 @@ public class DepartmentListDTO {
/**
* 名称
*/
@TableTitle(labelId = 547181, title = "", dataIndex = "departmentMark", key = "departmentMark", width = "200")
@TableTitle(title = "", dataIndex = "departmentMark", key = "departmentMark", width = "200")
private String departmentMark;
/**
* 编号
*/
@TableTitle(labelId = 547118, title = "编号", dataIndex = "departmentCode", key = "departmentCode")
@TableTitle(title = "编号", dataIndex = "departmentCode", key = "departmentCode")
private String departmentCode;
/**
* 简称
*/
@TableTitle(labelId = 547141, title = "", dataIndex = "departmentName", key = "departmentName")
@TableTitle(title = "", dataIndex = "departmentName", key = "departmentName")
private String departmentName;
/**
* 所属分部
*/
@TableTitle(labelId = 547128, title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
@TableTitle(title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
private String subCompanyName;
private Integer subCompanyId1;
/**
* 上级部门
*/
@TableTitle(labelId = 547189, title = "上级部门", dataIndex = "supDepName", key = "supDepName")
@TableTitle(title = "上级部门", dataIndex = "supDepName", key = "supDepName")
private String supDepName;
private Integer supDepId;
@ -69,20 +69,20 @@ public class DepartmentListDTO {
/**
* 部门负责人
*/
@TableTitle(labelId = 547190, title = "部门负责人", dataIndex = "bmfzr", key = "bmfzr")
@TableTitle(title = "部门负责人", dataIndex = "bmfzr", key = "bmfzr")
private String bmfzr;
/**
* 显示顺序
*/
@TableTitle(labelId = 547185, title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
private Double showOrder;
/**
* 禁用标记
*/
@TableTitle(labelId = 547186, title = "启用", dataIndex = "canceled", key = "canceled")
@TableTitle(title = "启用", dataIndex = "canceled", key = "canceled")
private int canceled;
/**
* 操作列
@ -105,9 +105,9 @@ public class DepartmentListDTO {
return children;
}
if ("asc".equalsIgnoreCase(orderType)) {
return children.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
return children.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
} else {
return children.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
return children.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
}
}
}

View File

@ -28,5 +28,5 @@ public class DeptSearchParam extends BaseQueryParam {
private String uuid;
private Double showOrder;
private Double showOrderOfTree;
private Integer showOrderOfTree;
}

View File

@ -35,6 +35,6 @@ public class DepartmentPO {
private Integer modifier;
private String uuid;
private Double showOrder;
private Double showOrderOfTree;
private Integer showOrderOfTree;
}

View File

@ -26,23 +26,17 @@ public class SingleDeptTreeVO {
private Integer id;
//@TableTitle(labelId = 547118, title = "编号", dataIndex = "departmentCode", key = "departmentCode")
//private String departmentCode;
@TableTitle(title = "编号", dataIndex = "departmentCode", key = "departmentCode")
private String departmentCode;
@TableTitle(labelId = 547598, title = "部门名称", dataIndex = "departmentMark", key = "departmentMark")
@TableTitle(title = "部门名称", dataIndex = "departmentMark", key = "departmentMark")
private String departmentMark;
@TableTitle(labelId = 547599, title = "部门简称", dataIndex = "departmentName", key = "departmentName")
private String departmentName;
@TableTitle(labelId = 547128, title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
private String subCompanyName;
private Integer subCompanyId1; //上级分部
private Integer supDepId; //上级部门id
@TableTitle(labelId = 547189, title = "上级部门", dataIndex = "supDepName", key = "supDepName")
@TableTitle(title = "上级部门", dataIndex = "supDepName", key = "supDepName")
private String supDepName; //上级部门
//@TableTitle(title = "部门负责人", dataIndex = "deptPrincipalName", key = "deptPrincipalName")

View File

@ -24,8 +24,6 @@ public class ManagerDetachParam {
private Integer ecManager;
private Integer roleId;
private Integer jclManager;
private String ecRolelevel;

View File

@ -22,7 +22,6 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@OrganizationTable(pageId = "0bf9b7bc-c8b0-4225-bf28-4cd015d96e98",
fields = "t.id," +
"t.manager_type," +
"t.ec_manager," +
"t.ec_rolelevel," +
"t.manage_module," +
@ -35,8 +34,8 @@ import lombok.NoArgsConstructor;
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除")
},
tableType = WeaTableType.CHECKBOX
)
@ -46,18 +45,15 @@ public class ManagerDetachVO {
@OrganizationTableColumn(column = "id", display = false)
private Long id;
@OrganizationTableColumn(labelId = 513540, text = "管理员类型", width = "20%", column = "manager_type")
private Integer managerType;
@OrganizationTableColumn(labelId = 547405, text = "管理员", width = "20%", column = "ec_manager", transmethod = "com.engine.organization.transmethod.ManagerDetachTransMethod.getManagerName",otherPara = "column:manager_type")
@OrganizationTableColumn(text = "管理员", width = "20%", column = "ec_manager", transmethod = "com.engine.organization.transmethod.ManagerDetachTransMethod.getManagerName")
private Integer ecManager;
@OrganizationTableColumn(labelId = 547407, text = "可管理组织机构", width = "40%", column = "ec_rolelevel", transmethod = "com.engine.organization.transmethod.ManagerDetachTransMethod.getRoleLevel")
@OrganizationTableColumn(text = "可管理组织机构", width = "40%", column = "ec_rolelevel",transmethod = "com.engine.organization.transmethod.ManagerDetachTransMethod.getRoleLevel")
private String ecRolelevel;
@OrganizationTableColumn(labelId = 547408, text = "可管理模块", width = "40%", column = "manage_module")
@OrganizationTableColumn(text = "可管理模块", width = "40%", column = "manage_module")
private String manageModule;
}

View File

@ -22,9 +22,13 @@ import lombok.NoArgsConstructor;
@OrganizationTable(pageId = "80e7830c-18e8-4e14-8241-18821195ef31",
fields = "t.id," +
"t.lastname," +
"t.mobile," +
"t.companystartdate," +
"t.sex",
"t.workcode," +
"t.sex," +
"t.status," +
"t.managerid," +
"t.jobtitle," +
"t.loginid," +
"t.seclevel",
fromSql = "FROM hrmresource t ",
orderby = "id",
primarykey = "id",
@ -35,17 +39,26 @@ public class EmployeeTableVO {
@OrganizationTableColumn(column = "id", display = false)
private Long id;
@OrganizationTableColumn(labelId = 547329, text = "姓名", width = "25%", column = "lastname")
@OrganizationTableColumn(text = "姓名", width = "10%", column = "lastname")
private String lastname;
@OrganizationTableColumn(labelId = 547330, text = "性别", width = "25%", column = "sex",transmethod = "com.engine.organization.transmethod.JobTransMethod.getSexName")
@OrganizationTableColumn(text = "编号", width = "10%", column = "workcode")
private String workcode;
@OrganizationTableColumn(text = "性别", width = "10%", column = "sex",transmethod = "com.engine.organization.transmethod.JobTransMethod.getSexName")
private String sex;
@OrganizationTableColumn(labelId = 547334, text = "手机", width = "25%", column = "mobile")
private String mobile;
@OrganizationTableColumn(text = "直接上级", width = "10%", column = "managerid",transmethod = "com.engine.organization.transmethod.ManagerDetachTransMethod.getManagerName")
private String managerid;
@OrganizationTableColumn(labelId = 547669, text = "入职日期", width = "25%", column = "companystartdate")
private String companystartdate;
@OrganizationTableColumn(text = "岗位", width = "10%", column = "jobtitle",transmethod = "com.engine.organization.transmethod.JobTransMethod.getJobTitleName")
private String jobtitle;
@OrganizationTableColumn(text = "登录名", width = "10%", column = "loginid")
private String loginid;
@OrganizationTableColumn(text = "安全级别", width = "10%", column = "seclevel")
private String seclevel;
}

View File

@ -276,11 +276,6 @@ public class ExtendInfoBO {
fieldItem.setFormat("YYYY-MM");
}
break;
case INPUT:
Map<String, Object> otherParams = new HashMap<>(2);
otherParams.put("inputType","multilang");
fieldItem.setOtherParams(otherParams);
break;
default:
break;
}
@ -411,10 +406,6 @@ public class ExtendInfoBO {
searchConditionItem = new SearchConditionItem(ConditionType.BROWSER, fieldlabel, new String[]{fieldname}, browserbean);
} else {
searchConditionItem = conditionFactory.createCondition(ConditionType.BROWSER, fieldlabel, fieldname, detailtype);
//隐藏虚拟组织
if(searchConditionItem != null ) {
searchConditionItem.getBrowserConditionParam().setHideVirtualOrg(true);
}
}
// 岗位浏览按钮
if ("666".equals(detailtype)) {
@ -587,7 +578,7 @@ public class ExtendInfoBO {
}
if (Util.null2String(extendInfoPO.getFieldNameDesc()).length() > 0) {
searchConditionItem.setLabel(Util.formatMultiLang(extendInfoPO.getFieldNameDesc()));
searchConditionItem.setLabel(extendInfoPO.getFieldNameDesc());
}
}

View File

@ -1,41 +0,0 @@
package com.engine.organization.entity.hrmresource.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author liang.cheng
* @Date 2024/5/29 2:54 PM
* @Description: TODO
* @Version 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class HrmStatusHistoryParam {
private Long resourceId;
private String changeDate;
private String changeReason;
private Integer oldJobtitleId;
private Integer newjobtitleId;
private Integer typeN;
private Integer oldDepartmentId;
private Integer newDepartmentId;
private Integer oldSubcompanyId;
private Integer newSubcompanyId;
}

View File

@ -5,8 +5,6 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Objects;
/**
* @author:dxfeng
* @createTime: 2023/01/05
@ -21,21 +19,4 @@ public class SearchTemplateParam {
//private boolean selected;
private String showname;
private String fields;
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SearchTemplateParam that = (SearchTemplateParam) o;
return key.equals(that.key);
}
@Override
public int hashCode() {
return Objects.hash(key);
}
}

View File

@ -64,6 +64,4 @@ public class JclOrgCustomTemplatePO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer overall;
}

View File

@ -27,7 +27,7 @@ public class ResourcePO {
private Integer jobtitle;
private String lastName;
private Double dspOrder;
private Integer dspOrder;
/**
* 临时关联聚才林岗位ID

View File

@ -26,5 +26,4 @@ public class SearchTemplatePO {
private Integer creator;
private Date createTime;
private Date updateTime;
private Integer overall;
}

View File

@ -34,6 +34,7 @@ import lombok.NoArgsConstructor;
primarykey = "id",
operates = {
@OrganizationTableOperate(text = "查看"),
@OrganizationTableOperate(index = "1", text = "另存为版本")
},
tableType = WeaTableType.CHECKBOX
)

View File

@ -33,11 +33,12 @@ import lombok.NoArgsConstructor;
" left join HRMJOBTITLES t3 on t.JOBTITLE=t3.id" +
" left join HRMJOBACTIVITIES t4 on t3.JOBACTIVITYID=t4.ID" +
" left join HRMJOBGROUPS t5 on t4.JOBGROUPID=t5.ID ",
orderby = " t.dsporder",
orderby = " t.dsporder ",
sortway = " asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(labelId = 547490, text = "查看")
@OrganizationTableOperate(text = "查看"),
@OrganizationTableOperate(index = "1", text = "另存为版本")
},
tableType = WeaTableType.CHECKBOX
)
@ -51,21 +52,21 @@ public class HrmResourceVO {
/**
* 姓名
*/
@OrganizationTableColumn(labelId = 547329, text = "姓名", width = "25%", column = "lastname")
@OrganizationTableColumn(text = "姓名", width = "25%", column = "lastname")
private String lastName;
/**
* 部门
*/
@OrganizationTableColumn(labelId = 547331, text = "部门", width = "25%", column = "departmentid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getDepartmentName")
@OrganizationTableColumn(text = "部门", width = "25%", column = "departmentid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getDepartmentName")
private String departmentName;
/**
* 分部
*/
@OrganizationTableColumn(labelId = 547332, text = "分部", width = "25%", column = "subcompanyid1", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getCompanyName")
@OrganizationTableColumn(text = "分部", width = "25%", column = "subcompanyid1", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getCompanyName")
private String companyName;
@OrganizationTableColumn(labelId = 547333, text = "岗位", width = "25%", column = "jobtitle", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getJobName")
@OrganizationTableColumn(text = "岗位", width = "25%", column = "jobtitle", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getJobName")
private String jobName;
/**
@ -84,6 +85,6 @@ public class HrmResourceVO {
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getManagerName")
private String managerName;
@OrganizationTableColumn(labelId = 547185, text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
@OrganizationTableColumn(text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
private Integer showOrder;
}

View File

@ -0,0 +1,67 @@
package com.engine.organization.entity.hrmresource.vo;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableColumn;
import com.engine.organization.annotation.OrganizationTableOperate;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "8df45b09-0cda-4f57-a93a-ca9f96a4c111",
fields = "t.id," +
"t.name," +
"t.basic_fields," +
"t.personal_fields," +
"t.work_fields," +
"t.isused," +
"t.creator," +
"t.create_time," +
"t.update_time",
fromSql = "FROM jcl_org_custom_template t ",
orderby = "id",
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(index = "1", text = "另存为"),
@OrganizationTableOperate(index = "2", text = "删除")
},
tableType = WeaTableType.CHECKBOX
)
public class JclOrgCustomTemplateVO {
@OrganizationTableColumn(column = "id", display = false)
private Integer id;
@OrganizationTableColumn(text = "模板名称", width = "30%", column = "name")
private String name;
@OrganizationTableColumn(column = "basic_fields", display = false)
private String basicFields;
@OrganizationTableColumn(column = "personal_fields", display = false)
private String personalFields;
@OrganizationTableColumn(column = "work_fields", display = false)
private String workFields;
@OrganizationTableColumn(column = "isused", display = false)
private Integer isUsed;
@OrganizationTableColumn(column = "creator", display = false)
private Integer creator;
@OrganizationTableColumn(text = "创建时间",column = "create_time", width = "30%")
private Date createTime;
@OrganizationTableColumn(text = "更新时间",column = "update_time", display = false)
private Date updateTime;
}

View File

@ -32,8 +32,8 @@ import lombok.NoArgsConstructor;
sortway = "asc",
primarykey = "fid",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除"),
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除"),
@OrganizationTableOperate(index = "2", text = "恢复")
},
tableType = WeaTableType.CHECKBOX,
@ -54,13 +54,13 @@ public class ResourceBasicInfoVO {
/**
* 编号
*/
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "fno", orderkey = "fno")
@OrganizationTableColumn(text = "编号", width = "20%", column = "fno", orderkey = "fno")
private String fNo;
/**
* 名称
*/
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "fname")
@OrganizationTableColumn(text = "名称", width = "20%", column = "fname")
private String fName;
/**

View File

@ -80,6 +80,6 @@ public class ScHrmResourceVO {
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScManagerName")
private String managerName;
@OrganizationTableColumn(labelId = 547185, text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
@OrganizationTableColumn(text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
private Integer showOrder;
}

View File

@ -156,7 +156,7 @@ public class JobBO {
tree.setSelected(false);
tree.setType("3");
tree.setParentComp(null == item.getEcDepartment() ? "0" : item.getEcDepartment().toString());
tree.setOrderNum(null == item.getShowOrder() ? 0.00 : item.getShowOrder());
tree.setOrderNum(null == item.getShowOrder() ? 0 : item.getShowOrder());
return tree;
}).collect(Collectors.toList());

View File

@ -34,34 +34,34 @@ public class JobListDTO {
/**
* 名称
*/
@TableTitle(labelId = 547141, title = "名称", dataIndex = "jobTitleName", key = "jobTitleName", width = "150")
@TableTitle(title = "名称", dataIndex = "jobTitleName", key = "jobTitleName", width = "150")
private String jobTitleName;
/**
* 编号
*/
@TableTitle(labelId = 547118, title = "编号", dataIndex = "jobNo", key = "jobNo")
@TableTitle(title = "编号", dataIndex = "jobNo", key = "jobNo")
private String jobNo;
/**
* 所属分部
*/
@TableTitle(labelId = 547128, title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
@TableTitle(title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
private String subCompanyName;
/**
* 所属部门
*/
@TableTitle(labelId = 547431, title = "所属部门", dataIndex = "departmentName", key = "departmentName")
@TableTitle(title = "所属部门", dataIndex = "departmentName", key = "departmentName")
private String departmentName;
/**
* 职务类别
*/
@TableTitle(labelId = 547433, title = "职务类别", dataIndex = "jobGroupName", key = "jobGroupName")
@TableTitle(title = "职务类别", dataIndex = "jobGroupName", key = "jobGroupName")
private String jobGroupName;
/**
* 所属职务
*/
@TableTitle(labelId = 547434, title = "所属职务", dataIndex = "jobActivityName", key = "jobActivityName")
@TableTitle(title = "所属职务", dataIndex = "jobActivityName", key = "jobActivityName")
private String jobActivityName;
/**
* 上级岗位
@ -74,13 +74,13 @@ public class JobListDTO {
/**
* 是否关键岗
*/
@TableTitle(labelId = 547417, title = "是否关键岗", dataIndex = "isKey", key = "isKey")
@TableTitle(title = "是否关键岗", dataIndex = "isKey", key = "isKey")
private String isKey;
/**
* 显示顺序
*/
@TableTitle(labelId = 547185, title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
private Integer showOrder;
/**
@ -89,8 +89,6 @@ public class JobListDTO {
//@TableTitle(title = "是否启用", dataIndex = "forbiddenTag", key = "forbiddenTag")
//private Integer forbiddenTag;
/**
* 操作列
*/

View File

@ -75,7 +75,7 @@ public class JobSearchParam extends BaseQueryParam {
/**
* 显示顺序
*/
private Double showOrder;
private Integer showOrder;
private Integer subcompanyid1;

View File

@ -87,7 +87,7 @@ public class JobPO {
/**
* 显示顺序
*/
private Double showOrder;
private Integer showOrder;
private String gradeId;

View File

@ -19,7 +19,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "98e9c62f-cd12-11ec-a15f-00ffcbed7123",
fields = "t.id, t.job_no,t.ec_company ,t.ec_department, h.jobtitlename as name, t.sequence_id, t.scheme_id , t.grade_id , t.level_id , e.jobactivityname, f.jobgroupname ",
fields = "t.id, t.job_no, h.jobtitlename as name, t.sequence_id, t.scheme_id , t.grade_id , t.level_id , e.jobactivityname, f.jobgroupname ",
fromSql = "FROM jcl_org_job t" +
" left join hrmjobtitles h on t.ec_jobTitle = h.id" +
" left join hrmjobactivities e on h.jobactivityid =e.id" +
@ -28,32 +28,35 @@ import lombok.NoArgsConstructor;
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除")
},
tableType = WeaTableType.CHECKBOX
)
public class JobBrowserVO {
@OrganizationTableColumn(labelId = 547597, text = "标识", width = "25%", column = "id", display = false)
@OrganizationTableColumn(text = "标识", width = "25%", column = "id", display = false)
private Long id;
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "25%", column = "job_no")
@OrganizationTableColumn(text = "编号", width = "25%", column = "job_no")
private String jobNo;
@OrganizationTableColumn(labelId = 547332, text = "分部", width = "25%", column = "ec_company", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
private String subCompanyName;
@OrganizationTableColumn(labelId = 547331, text = "部门", width = "25%", column = "ec_department", transmethod = "com.engine.organization.transmethod.DepartmentTransMethod.getSpanById")
private String departmentName;
@OrganizationTableColumn(labelId = 547595, text = "岗位名称", width = "25%", column = "name")
@OrganizationTableColumn(text = "岗位名称", width = "25%", column = "name")
private String jobName;
@OrganizationTableColumn(labelId = 547433, text = "职务类别", width = "25%", column = "jobGroupName")
@OrganizationTableColumn(text = "职务类别", width = "25%", column = "jobGroupName")
private String jobGroupName;
@OrganizationTableColumn(labelId = 547434, text = "所属职务", width = "25%", column = "jobActivityName")
@OrganizationTableColumn(text = "所属职务", width = "25%", column = "jobActivityName")
private String jobActivityName;
//@OrganizationTableColumn(text = "等级方案", width = "25%", column = "scheme_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getSchemeName")
//private String schemeName;
//@OrganizationTableColumn(text = "职等", width = "25%", column = "level_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getLevelName")
//private String levelName;
//@OrganizationTableColumn(text = "职级", width = "25%", column = "grade_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getGradeName")
//private String gradeName;
//@OrganizationTableColumn(text = "岗位序列", width = "25%", column = "sequence_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getSequenceName")
//private String sequenceName;
}

View File

@ -26,18 +26,12 @@ public class SingleJobTreeVO {
private Long id;
@TableTitle(labelId = 547118, title = "编号", dataIndex = "jobNo", key = "jobNo")
@TableTitle(title = "编号", dataIndex = "jobNo", key = "jobNo")
private String jobNo;
@TableTitle(labelId = 547595, title = "岗位名称", dataIndex = "jobName", key = "jobName")
@TableTitle(title = "岗位名称", dataIndex = "jobName", key = "jobName")
private String jobName;
@TableTitle(labelId = 547433, title = "职务类别", dataIndex = "jobGroupName", key = "jobGroupName")
private String jobGroupName;
@TableTitle(labelId = 547434, title = "所属职务", dataIndex = "jobActivityName", key = "jobActivityName")
private String jobActivityName;
//@TableTitle(title = "上级岗位", dataIndex = "parentJobName", key = "parentJobName")
//private String parentJobName;

View File

@ -27,31 +27,31 @@ import java.util.Date;
)
public class LogViewVO {
@OrganizationTableColumn(labelId = 547159, text = "操作时间", width = "20%", column = "create_time", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getDateTimeFormat")
@OrganizationTableColumn(text = "操作时间", width = "20%", column = "create_time", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getDateTimeFormat")
private Date createTime;
@OrganizationTableColumn(labelId = 547160, text = "操作者", width = "16%", column = "operator_name")
@OrganizationTableColumn(text = "操作者", width = "16%", column = "operator_name")
private String operator;
@OrganizationTableColumn(labelId = 547161, text = "操作类型", width = "16%", column = "operate_type", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateType", multiLanguage = true)
@OrganizationTableColumn(text = "操作类型", width = "16%", column = "operate_type", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateType")
private String operateType;
//@OrganizationTableColumn(labelId = 547162, text = "操作描述", width = "16%", column = "operate_desc")
//private String operateDesc;
@OrganizationTableColumn(text = "操作描述", width = "16%", column = "operate_desc")
private String operateDesc;
@OrganizationTableColumn(labelId = 547163, text = "对象", width = "16%", column = "value")
@OrganizationTableColumn(text = "对象", width = "16%", column = "value")
private String value;
@OrganizationTableColumn(labelId = 547164, text = "所属模块", width = "16%", column = "operate_module_name", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateModuleName", multiLanguage = true)
@OrganizationTableColumn(text = "所属模块", width = "16%", column = "operate_module_name")
private String operateModuleName;
@OrganizationTableColumn(labelId = 547165, text = "修改详情", width = "16%", column = "message", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateDetail", multiLanguage = true)
@OrganizationTableColumn(text = "修改详情", width = "16%", column = "message")
private String showDetail;
@OrganizationTableColumn(labelId = 547166, text = "操作IP", width = "16%", column = "client_ip")
@OrganizationTableColumn(text = "操作IP", width = "16%", column = "client_ip")
private String clientIp;
@OrganizationTableColumn(labelId = 547413, text = "操作参数", width = "16%", column = "params_str", display = false)
@OrganizationTableColumn(text = "操作参数", width = "16%", column = "params_str", display = false)
private String paramsStr;
}

View File

@ -40,22 +40,22 @@ public class CardAccessVO {
@OrganizationTableColumn(column = "id", display = false)
private Long id;
@OrganizationTableColumn(labelId = 547389, text = "栏目", width = "15%", column = "type_name",transmethod = "com.engine.organization.transmethod.CardAccessTrans.getMultiLanguage",multiLanguage = true)
@OrganizationTableColumn(text = "栏目", width = "15%", column = "type_name")
private Integer typeName;
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "15%", column = "status")
@OrganizationTableColumn(text = "是否启用", width = "15%", column = "status")
private Integer status;
@OrganizationTableColumn(labelId = 547390, text = "所有人可见", width = "15%", column = "all_people")
@OrganizationTableColumn(text = "所有人可见", width = "15%", column = "all_people")
private Integer allPeople;
@OrganizationTableColumn(labelId = 547391, text = "上级可见", width = "15%", column = "superior")
@OrganizationTableColumn(text = "上级可见", width = "15%", column = "superior")
private Integer superior;
@OrganizationTableColumn(labelId = 547392, text = "所有上级可见", width = "15%", column = "all_superior")
@OrganizationTableColumn(text = "所有上级可见", width = "15%", column = "all_superior")
private Integer allSuperior;
@OrganizationTableColumn(labelId = 547414, text = "查看自定义", width = "30%", column = "custom",transmethod = "com.engine.organization.transmethod.SystemTransMethod.getRoleName")
@OrganizationTableColumn(text = "查看自定义", width = "30%", column = "custom",transmethod = "com.engine.organization.transmethod.SystemTransMethod.getRoleName")
private String custom;
}

View File

@ -33,8 +33,8 @@ import lombok.NoArgsConstructor;
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
@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")
@ -48,12 +48,12 @@ public class PostInfoTableVO {
/**
* 编号
*/
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "post_info_no", orderkey = "post_info_no")
@OrganizationTableColumn(text = "编号", width = "20%", column = "post_info_no", orderkey = "post_info_no")
private String postInfoNo;
/**
* 名称
*/
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "post_info_name")
@OrganizationTableColumn(text = "名称", width = "20%", column = "post_info_name")
private String postInfoName;
/**
* 权限
@ -84,6 +84,6 @@ public class PostInfoTableVO {
/**
* 禁用标记
*/
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "10%", column = "forbidden_tag")
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
private Integer forbiddenTag;
}

View File

@ -5,7 +5,6 @@ import net.coobird.thumbnailator.Thumbnails;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.util.IOUtils;
import weaver.file.ImageFileManager;
import weaver.general.BaseBean;
import weaver.general.GCONST;
import weaver.general.Util;
@ -79,10 +78,8 @@ public class PersonnelResumePO {
imageStr = "data:image/" + manager.getImageFileType() + ";base64," + Base64.getEncoder().encodeToString(IOUtils.toByteArray(fileInputStream));
// 删除文件
f.delete();
} catch (Exception e) {
new BaseBean().writeLog(e);
//throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
}
return imageStr;
}

View File

@ -31,8 +31,8 @@ import lombok.NoArgsConstructor;
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除")
},
tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates", otherpara = "column:is_used"),
@ -53,12 +53,12 @@ public class GradeTableVO {
/**
* 编号
*/
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "grade_no", orderkey = "grade_no")
@OrganizationTableColumn(text = "编号", width = "20%", column = "grade_no", orderkey = "grade_no")
private String gradeNo;
/**
* 名称
*/
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "grade_name")
@OrganizationTableColumn(text = "名称", width = "20%", column = "grade_name")
private String gradeName;
/**
@ -68,22 +68,22 @@ public class GradeTableVO {
/**
* 等级方案
*/
@OrganizationTableColumn( labelId = 547124, text = "等级方案", width = "20%", column = "scheme_name")
@OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name")
private String schemeName;
/**
* 职等
*/
@OrganizationTableColumn(labelId = 547139, 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;
/**
* 描述说明
*/
@OrganizationTableColumn(labelId = 547142, text = "描述说明", width = "30%", column = "description")
@OrganizationTableColumn(text = "描述说明", width = "30%", column = "description")
private String description;
/**
* 禁用标记
*/
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "10%", column = "forbidden_tag")
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
private int forbiddenTag;
}

View File

@ -30,8 +30,8 @@ import lombok.NoArgsConstructor;
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, 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")
@ -51,30 +51,30 @@ public class LevelTableVO {
/**
* 编号
*/
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "level_no", orderkey = "level_no")
@OrganizationTableColumn(text = "编号", width = "20%", column = "level_no", orderkey = "level_no")
private String levelNo;
/**
* 名称
*/
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "level_name")
@OrganizationTableColumn(text = "名称", width = "20%", column = "level_name")
private String levelName;
/**
* 等级方案
*/
@OrganizationTableColumn(text = "等级方案", labelId = 547124, width = "20%", column = "scheme_name")
@OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name")
private String schemeName;
/**
* 描述说明
*/
@OrganizationTableColumn(labelId = 547142, text = "描述说明", width = "30%", column = "description")
@OrganizationTableColumn(text = "描述说明", width = "30%", column = "description")
private String description;
/**
* 禁用标记
*/
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "10%", column = "forbidden_tag")
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
private Integer forbiddenTag;
}

View File

@ -29,8 +29,8 @@ import lombok.NoArgsConstructor;
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
@OrganizationTableOperate(index = "0", text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除")
},
tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates", otherpara = "column:is_used"),
@ -51,26 +51,26 @@ public class SchemeTableVO {
/**
* 方案编号
*/
@OrganizationTableColumn(text = "编号", labelId = 547118, width = "25%", column = "scheme_no", orderkey = "scheme_no")
@OrganizationTableColumn(text = "编号", width = "25%", column = "scheme_no", orderkey = "scheme_no")
private String schemeNo;
/**
* 方案名称
*/
@OrganizationTableColumn(text = "方案名称", labelId = 547127, width = "25%", column = "scheme_name")
@OrganizationTableColumn(text = "方案名称", width = "25%", column = "scheme_name")
private String schemeName;
@OrganizationTableColumn(text = "所属分部", labelId = 547128, width = "25%", column = "subcompanyid", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
@OrganizationTableColumn(text = "所属分部", width = "25%", column = "subcompanyid",transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
private String subCompanyName;
/**
* 方案描述
*/
@OrganizationTableColumn(text = "方案说明", labelId = 547129, width = "40%", column = "scheme_description")
@OrganizationTableColumn(text = "方案说明", width = "40%", column = "scheme_description")
private String schemeDescription;
/**
* 禁用标识
*/
@OrganizationTableColumn(text = "是否启用", labelId = 547130, width = "10%", column = "forbidden_tag")
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
private Integer forbiddenTag;
}

View File

@ -18,8 +18,7 @@ public class SearchTree extends TreeNode {
private boolean isCanceled;
private String requestParams;
private String parentComp;
private Double orderNum;
private Double showOrderOfTree;
private Integer orderNum;
public String getCompanyid() {
return companyid;
@ -77,28 +76,14 @@ public class SearchTree extends TreeNode {
this.parentComp = parentComp;
}
public Double getOrderNum() {
if(null==orderNum){
return 0.00;
}
public Integer getOrderNum() {
return orderNum;
}
public void setOrderNum(Double orderNum) {
public void setOrderNum(Integer orderNum) {
this.orderNum = orderNum;
}
public Double getShowOrderOfTree() {
if(null==showOrderOfTree){
return 0.00;
}
return showOrderOfTree;
}
public void setShowOrderOfTree(Double showOrderOfTree) {
this.showOrderOfTree = showOrderOfTree;
}
@Override
public boolean equals(Object o) {
if (this == o) {

View File

@ -34,8 +34,8 @@ import lombok.NoArgsConstructor;
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除")
},
tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates", otherpara = "column:is_used"),
@ -57,30 +57,30 @@ public class SequenceTableVO {
/**
* 编号
*/
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "sequence_no", orderkey = "sequence_no")
@OrganizationTableColumn(text = "编号", width = "20%", column = "sequence_no", orderkey = "sequence_no")
private String sequenceNo;
/**
* 名称
*/
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "sequence_name")
@OrganizationTableColumn(text = "名称", width = "20%", column = "sequence_name")
private String sequenceName;
/**
* 等级方案
*/
@OrganizationTableColumn(text = "等级方案", labelId = 547124, width = "20%", column = "scheme_name")
@OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name")
private String schemeName;
/**
* 描述说明
*/
@OrganizationTableColumn(labelId = 547142, text = "描述说明", width = "30%", column = "description")
@OrganizationTableColumn(text = "描述说明", width = "30%", column = "description")
private String description;
/**
* 禁用标记
*/
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "10%", column = "forbidden_tag")
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
private Integer forbiddenTag;
}

View File

@ -1,37 +0,0 @@
package com.engine.organization.entity.staff.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author liang.cheng
* @Date 2024/7/16 11:34 AM
* @Description:
* @Version 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class StaffPersonCronParam {
private Integer id;
private Integer planId;
private Integer ecCompany;
private Integer ecDepartment;
private Integer jobId;
private Integer staffNum;
private Integer permanentNum;
private Integer freezeNum;
private String controlDimension;
}

View File

@ -24,8 +24,8 @@ import lombok.NoArgsConstructor;
sortway = "asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", 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")
@ -36,7 +36,7 @@ public class StaffPlanTableVO {
/**
* 主键
*/
@OrganizationTableColumn(labelId = 547327, text = "序号", width = "10%",column = "id")
@OrganizationTableColumn(column = "id", display = false)
private Long id;
/**
* 是否被引用
@ -46,37 +46,37 @@ public class StaffPlanTableVO {
/**
* 编号
*/
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "16%", column = "plan_no", orderkey = "plan_no")
@OrganizationTableColumn(text = "编号", width = "16%", column = "plan_no", orderkey = "plan_no")
private String planNo;
/**
* 名称
*/
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "16%", column = "plan_name")
@OrganizationTableColumn(text = "名称", width = "16%", column = "plan_name")
private String planName;
/**
* w维度
*/
@OrganizationTableColumn(labelId = 547293, text = "维度", width = "16%", column = "control_dimension",transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getControlDimension" ,multiLanguage = true)
@OrganizationTableColumn(text = "维度", width = "16%", column = "control_dimension",transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getControlDimension")
private String controlDimension;
/**
* 年度
*/
@OrganizationTableColumn(labelId = 547336, text = "年度", width = "16%", column = "plan_year")
@OrganizationTableColumn(text = "年度", width = "16%", column = "plan_year")
private Integer planYear;
/**
* 时间开始
*/
@OrganizationTableColumn(labelId = 547337, text = "时间开始", width = "16%", column = "time_start", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getFormatDateString")
@OrganizationTableColumn(text = "时间开始", width = "16%", column = "time_start", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getFormatDateString")
private String timeStart;
/**
* 时间结束
*/
@OrganizationTableColumn(labelId = 547338, text = "时间结束", width = "16%", column = "time_end", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getFormatDateString")
@OrganizationTableColumn(text = "时间结束", width = "16%", column = "time_end", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getFormatDateString")
private String timeEnd;
/**
* 状态
*/
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "16%", column = "forbidden_tag")
@OrganizationTableColumn(text = "是否启用", width = "16%", column = "forbidden_tag")
private Integer forbiddenTag;
}

View File

@ -18,15 +18,18 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
@OrganizationTable(pageId = "0cdfd5bb-dc09-11ec-b69e-00ffcbed7508",
fields = "t.id,t.is_used,s.control_dimension,t.plan_id,t.comp_id,t.dept_id,t.job_id,t.staff_num,t.permanent_num,t.freeze_num,t.lack_status,t.staff_desc,t.description",
fields = "t.id,t.is_used,s.control_dimension,t.plan_id,t.comp_id,t.dept_id,t.job_id,t.staff_num,t.permanent_num,t.freeze_num,t.lack_status,t.staff_desc",
fromSql = "FROM jcl_org_staff t inner join jcl_org_staffplan s on t.plan_id = s.id",
orderby = "id desc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除"),
@OrganizationTableOperate(index = "2", labelId = 547176, text = "变更")
}, tableType = WeaTableType.CHECKBOX
@OrganizationTableOperate(text = "编辑"),
@OrganizationTableOperate(index = "1", text = "删除"),
@OrganizationTableOperate(index = "2", text = "变更"),
@OrganizationTableOperate(index = "3", text = "详情")
}, tableType = WeaTableType.CHECKBOX,
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatStaffOperates", otherpara = "column:control_dimension")
)
public class StaffTableVO {
@ -35,67 +38,56 @@ public class StaffTableVO {
*/
@OrganizationTableColumn(column = "id", display = false)
private Long id;
/**
* 是否被引用
*/
@OrganizationTableColumn(column = "isUsed", display = false)
private Integer isUsed;
/**
* 方案id
*/
@OrganizationTableColumn(labelId = 547344, text = "方案", width = "10%", column = "plan_id", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getSpanById")
@OrganizationTableColumn(text = "方案", width = "10%", column = "plan_id", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getSpanById")
private String planId;
/**
* 维度
*/
@OrganizationTableColumn(labelId = 547293, text = "维度", width = "10%", column = "control_dimension", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getControlDimension", multiLanguage = true)
@OrganizationTableColumn(text = "维度", width = "10%", column = "control_dimension", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getControlDimension")
private String controlDimension;
/**
* 分部
*/
@OrganizationTableColumn(labelId = 547332, text = "分部", width = "10%", column = "comp_id", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
@OrganizationTableColumn(text = "分部", width = "10%", column = "comp_id", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
private String compId;
/**
* 部门
*/
@OrganizationTableColumn(labelId = 547331, text = "部门", width = "10%", column = "dept_id", transmethod = "com.engine.organization.transmethod.DepartmentTransMethod.getSpanById")
@OrganizationTableColumn(text = "部门", width = "10%", column = "dept_id", transmethod = "com.engine.organization.transmethod.DepartmentTransMethod.getSpanById")
private String deptId;
/**
* 岗位
*/
@OrganizationTableColumn(labelId = 547333, text = "岗位", width = "10%", column = "job_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getSpanById")
@OrganizationTableColumn(text = "岗位", width = "10%", column = "job_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getSpanById")
private String jobId;
/**
* 编制数
*/
@OrganizationTableColumn(labelId = 547345, text = "编制数", width = "10%", column = "staff_num")
@OrganizationTableColumn(text = "编制数", width = "10%", column = "staff_num")
private Integer staffNum;
/**
* 在编
*/
@OrganizationTableColumn(labelId = 547346, text = "在编", width = "10%", column = "permanent_num")
@OrganizationTableColumn(text = "在编", width = "10%", column = "permanent_num")
private Integer permanentNum;
/**
* 冻结数
*/
@OrganizationTableColumn(labelId = 547347, text = "冻结数", width = "10%", column = "freeze_num")
@OrganizationTableColumn(text = "冻结数", width = "10%", column = "freeze_num")
private Integer freezeNum;
/**
* 缺编状态
*/
@OrganizationTableColumn(labelId = 547348, text = "缺编状态", width = "20%", column = "lack_status", transmethod = "com.engine.organization.transmethod.StaffTransMethod.getLackSpan",multiLanguage = true)
@OrganizationTableColumn(text = "缺编状态", width = "10%", column = "lack_status", transmethod = "com.engine.organization.transmethod.StaffTransMethod.getLackSpan")
private String lackStatus;
/**
* 编制描述
*/
@OrganizationTableColumn(labelId = 547349, text = "编制描述", width = "10%", column = "staff_desc")
@OrganizationTableColumn(text = "编制描述", width = "10%", column = "staff_desc")
private String staffDesc;
/**
* 描述说明
*/
@OrganizationTableColumn(labelId = 547142, text = "描述说明", width = "10%", column = "description")
private String description;
}

View File

@ -6,32 +6,28 @@ package com.engine.organization.enums;
* @version: 1.0
*/
public enum LogModuleNameEnum {
SCHEME("等级方案", 1, 547124),
LEVEL("职等", 2, 547139),
GRADE("职级", 3, 547152),
SEQUENCE("岗位序列", 4, 547147),
POSTINFO("职务管理", 6, 547616),
GROUP("集团管理", 7, 547617),
COMPANY("分部管理", 8, 547178),
DEPARTMENT("部门管理", 9, 547116),
JOB("岗位管理", 10, 547198),
RESOURCE("人员管理", 11, 547618),
STAFFPLAN("编制方案", 12, 547459),
STAFF("编制上报", 13, 547342),
DETACH("模块管理分权", 14, 547402),
OTHER("其他模块", 99, 547619);
SCHEME("等级方案", 1),
LEVEL("职等", 2),
GRADE("职级", 3),
SEQUENCE("岗位序列", 4),
POSTINFO("职务管理", 6),
GROUP("集团管理", 7),
COMPANY("分部管理", 8),
DEPARTMENT("部门管理", 9),
JOB("岗位管理", 10),
RESOURCE("人员管理", 11),
STAFFPLAN("编制方案", 12),
STAFF("编制上报", 13),
DETACH("模块管理分权", 14),
OTHER("其他模块", 99);
private String name;
private Integer value;
private int labelId;
LogModuleNameEnum(String name, Integer value, int labelId) {
LogModuleNameEnum(String name, Integer value) {
this.name = name;
this.value = value;
this.labelId = labelId;
}
public Integer getValue() {
@ -41,17 +37,4 @@ public enum LogModuleNameEnum {
public String getName() {
return name;
}
public int getLabelId() {
return labelId;
}
public static LogModuleNameEnum getByName(String name) {
for (LogModuleNameEnum logModuleNameEnum : values()) {
if (logModuleNameEnum.getName().equals(name)) {
return logModuleNameEnum;
}
}
return null;
}
}

View File

@ -9,10 +9,10 @@ package com.engine.organization.enums;
**/
public enum ModuleTypeEnum implements BaseEnum<Integer> {
subcompanyfielddefined(1, "分部", 547332),
departmentfielddefined(2, "部门", 547331),
jobfielddefined(3, "岗位", 547333),
resourcefielddefined(4, "人员", 547205);
subcompanyfielddefined(1, "分部", -84967),
departmentfielddefined(2, "部门", -84967),
jobfielddefined(3, "岗位", -84967),
resourcefielddefined(4, "人员", -84967);
private int value;

View File

@ -8,37 +8,22 @@ package com.engine.organization.enums;
**/
public enum OperateTypeEnum {
/**
* 操作类型
*/
ADD("1", "新增", 547117),
UPDATE("2", "更新", 547615),
DELETE("4", "删除", 547135),
MOVE("5", "转移", 547594),
MERGE("6", "合并", 547194),
COPY("7", "复制", 547196),
CANCELED("8", "封存", 547494),
RECOVER("9", "恢复", 547495);
ADD("1", "新增"),
UPDATE("2", "更新"),
DELETE("4", "删除"),
MOVE("5", "转移"),
MERGE("6", "合并"),
COPY("7", "复制"),
CANCELED("8", "封存"),
RECOVER("9","恢复");
private String value;
private String label;
private int labelId;
OperateTypeEnum(String value, String label, int labelId) {
OperateTypeEnum(String value, String label) {
this.value = value;
this.label = label;
this.labelId = labelId;
}
public static OperateTypeEnum getByValue(String name) {
for (OperateTypeEnum operateTypeEnum : values()) {
if (operateTypeEnum.getValue().equals(name)) {
return operateTypeEnum;
}
}
return null;
}
public String getValue() {
@ -48,8 +33,4 @@ public enum OperateTypeEnum {
public String getLabel() {
return label;
}
public int getLabelId() {
return labelId;
}
}

View File

@ -1,9 +1,7 @@
package com.engine.organization.enums;
import com.engine.organization.exception.OrganizationRunTimeException;
import com.engine.organization.util.saveimport.JobInfoImportUtil;
import com.engine.organization.util.saveimport.PostInfoImportUtil;
import com.engine.organization.util.saveimport.SequenceImportUtil;
import com.engine.organization.util.saveimport.StaffInfoImportUtil;
import weaver.hrm.User;
@ -31,36 +29,6 @@ public enum OrgImportEnum implements OrgImportAdapter {
return StaffInfoImportUtil.importForm(user);
}
},
JOB("job") {
@Override
public Map<String, Object> orgImport(Map<String, Object> params, User user) {
Map<String, Object> resultMap = new HashMap<>();
String excelFile = (String) params.get("excelfile");
resultMap.put("pId", JobInfoImportUtil.saveImport("add", excelFile, user));
return resultMap;
}
@Override
public List<Map<String, Object>> orgForm(User user) {
return JobInfoImportUtil.importForm(user);
}
},
SEQUENCE("sequence"){
@Override
public Map<String, Object> orgImport(Map<String, Object> params, User user) {
Map<String, Object> resultMap = new HashMap<>();
String excelFile = (String) params.get("excelfile");
resultMap.put("pId", SequenceImportUtil.saveImport("add", excelFile, user));
return resultMap;
}
@Override
public List<Map<String, Object>> orgForm(User user) {
return SequenceImportUtil.importForm(user);
}
},
POSTINFO("postInfo"){
@Override
public Map<String, Object> orgImport(Map<String, Object> params, User user) {
@ -77,7 +45,6 @@ public enum OrgImportEnum implements OrgImportAdapter {
};
private String tableName;
OrgImportEnum(String tableName) {

View File

@ -106,9 +106,9 @@
select
<include refid="baseColumns"/>
from hrmsubcompany t
WHERE (t.canceled is null or t.canceled != '1') and id IN
<foreach collection="ids" index="index" open="(" item="id" separator="," close=")">
<if test="(index % 999) == 998"> NULL) OR id IN(</if>#{id}
WHERE id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
@ -117,25 +117,25 @@
<include refid="baseColumns"/>
FROM
hrmsubcompany t
WHERE t.SUPSUBCOMID = 0 and (t.canceled is null or t.canceled != '1')
WHERE t.SUPSUBCOMID = 0
</select>
<select id="hasSubs" resultType="java.lang.String">
select supsubcomid
from hrmsubcompany
where (canceled is null or canceled != '1')
where 1=1
<include refid="subsWhere"/>
union
select subcompanyid1
from hrmdepartment
where (canceled is null or canceled != '1')
where 1=1
<include refid="subsWhere"/>
</select>
<select id="hasDetachSubs" resultType="java.lang.String">
select supsubcomid
from hrmsubcompany
where (canceled is null or canceled != '1')
where 1=1
<include refid="subsWhere"/>
and id in
<foreach collection="companyIds" open="(" item="id" separator="," close=")">
@ -144,7 +144,7 @@
union
select subcompanyid1
from hrmdepartment
where (canceled is null or canceled != '1')
where 1=1
<include refid="subsWhere"/>
and subcompanyid1 in
<foreach collection="companyIds" open="(" item="id" separator="," close=")">

View File

@ -38,14 +38,6 @@ public interface DepartmentMapper {
*/
List<DepartmentPO> listByFilter(@Param("departmentPO") DepartmentPO departmentPO, @Param("orderSql") String orderSql);
/**
* 根据搜索条件查询数据 保留封存禁用数据
* @param departmentPO
* @param orderSql
* @return
*/
List<DepartmentPO> listByFilterAll(@Param("departmentPO") DepartmentPO departmentPO, @Param("orderSql") String orderSql);
/**
* 浏览按钮展示数据用
*

View File

@ -12,7 +12,6 @@
<result column="departmentCode" property="departmentCode"/>
<result column="coadjutant" property="coadjutant"/>
<result column="showOrder" property="showOrder"/>
<result column="showOrderOfTree" property="showOrderOfTree"/>
<result column="uuid" property="uuid"/>
</resultMap>
@ -31,7 +30,6 @@
t.departmentCode,
t.coadjutant,
t.showOrder,
t.showOrderOfTree,
t.uuid
</sql>
@ -53,26 +51,6 @@
select
<include refid="baseColumns"/>
from hrmdepartment t
where (t.canceled is null or t.canceled != '1')
<include refid="likeSQL"/>
<if test=" departmentPO.subCompanyId1 != null ">
and t.subCompanyId1 = #{departmentPO.subCompanyId1}
</if>
<if test=" departmentPO.supDepId != null ">
and t.supDepId = #{departmentPO.supDepId}
</if>
<if test=" departmentPO.departmentId != null ">
and t.id = #{departmentPO.departmentId}
</if>
<include refid="isCanceled"/>
order by ${orderSql}
</select>
<select id="listByFilterAll" parameterType="com.engine.organization.entity.department.po.DepartmentPO"
resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from hrmdepartment t
where 1=1
<include refid="likeSQL"/>
<if test=" departmentPO.subCompanyId1 != null ">
@ -98,7 +76,7 @@
<select id="listDeptsByIds" resultType="java.util.Map">
select
id as "id",
departmentMark as "name"
departmentName as "name"
from hrmdepartment t
WHERE id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
@ -144,7 +122,7 @@
<select id="getIdByNameAndPid" resultType="java.lang.Integer">
select id
from hrmdepartment
where departmentmark = #{departmentName}
where departmentName = #{departmentName}
and subCompanyId1 = #{subCompanyId1}
and supDepId = #{supDepId}
</select>
@ -159,7 +137,7 @@
<select id="hasSubs" resultType="java.lang.String">
select distinct supDepId
from hrmdepartment
where (canceled is null or canceled != '1')
where 1=1
<include refid="com.engine.organization.mapper.comp.CompMapper.subsWhere"/>
</select>
<select id="countUsedInJob" resultType="java.lang.Integer">

View File

@ -24,9 +24,7 @@ public interface ManagerDetachMapper {
ManagerDetachPO getDetachById(@Param("id") Integer id);
List<ManagerDetachPO> getDetachListById(@Param("ecManager") Integer ecManager,@Param("managerType") Integer managerType);
List<ManagerDetachPO> selectDetachListByManager(@Param("ids") Collection<Integer> ids);
List<ManagerDetachPO> getDetachListById(@Param("ecManager") Integer ecManager);
ManagerDetachPO selectManagerDetachByUid(@Param("uid") Integer uId);
}

View File

@ -216,19 +216,6 @@
from jcl_org_detach t
WHERE delete_type = 0
and ec_manager = #{ecManager}
and manager_type = #{managerType}
</select>
<select id="selectDetachListByManager" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_detach t
WHERE delete_type = 0
and manager_type = 1
and ec_manager in
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectManagerDetachByUid" resultMap="BaseResultMap">

View File

@ -3,6 +3,7 @@ package com.engine.organization.mapper.hrmresource;
import com.engine.organization.entity.commom.RecordInfo;
import com.engine.organization.entity.jclimport.po.CusFormFieldPO;
import com.engine.organization.entity.jclimport.po.JclSelectItem;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
@ -43,6 +44,19 @@ public interface SystemDataMapper {
*/
int updateResourceJobTitleByIds(@Param("jobTitle") String jobTitle, @Param("ids") Collection<Long> ids);
/**
* 人员hrmResource表字段
*
* @return
*/
List<CusFormFieldPO> getHrmFieldBeanList();
List<CusFormFieldPO> getHrmFieldBeanListByFields(@Param("fields") Collection<String> fields);
List<CusFormFieldPO> getHrmCustomFieldList();
List<JclSelectItem> getSelectItems(@Param("tableName") String tableName, @Param("fieldId") Long fieldId);
Long getHrmResourceMaxId();
List<String> getBatchUuidByIds(@Param("tableName") String tableName, @Param("ecIds") List<String> ecIds);

View File

@ -100,6 +100,57 @@
where departmentid = #{departmentId}
And jobTitle = #{jobTitle}
</select>
<select id="getHrmFieldBeanList" resultMap="CustomFieldMap">
select b.labelname as fieldlable,
'0' as scopeid,
a.fieldid,
a.fieldname,
a.ismand,
a.fieldhtmltype,
a.type,
'hrmresource' as tablename
from hrm_formfield a
inner join htmllabelinfo b on a.fieldlabel = b.indexid and b.languageid = 7
where a.fielddbtype != '6'
order by groupid, fieldorder
</select>
<select id="getHrmCustomFieldList" resultMap="CustomFieldMap">
select b.labelname as fieldlable,
a.scopeid,
a.fieldid,
a.hrm_fieldlable as fieldname,
a.ismand,
c.fieldhtmltype,
c.type,
a.dmlurl,
'cus_fielddata' as tablename
from cus_formfield a
inner join htmllabelinfo b on a.fieldlable = b.indexid and b.languageid = 7
inner join cus_formdict c on a.fieldid = c.id and c.fieldhtmltype != '6'
order by groupid, fieldorder
</select>
<select id="getSelectItems" resultMap="SelectItemMap">
select fieldid, selectvalue, selectname
from ${tableName} and fieldid = #{fieldId}
</select>
<select id="getHrmFieldBeanListByFields" resultMap="CustomFieldMap">
select b.labelname as fieldlable,
a.fieldid,
a.fieldname,
a.ismand,
a.fieldhtmltype,
a.type,
'0' as scopeid,
'hrmresource' as tablename
from hrm_formfield a
inner join htmllabelinfo b on a.fieldlabel = b.indexid and b.languageid = 7
where a.fielddbtype != '6' and a.isuse = '1'
and a.fieldname in
<foreach collection="fields" open="(" item="field" separator="," close=")">
#{field}
</foreach>
order by groupid ,fieldorder
</select>
<select id="getHrmResourceMaxId" resultType="java.lang.Long">
select max(id)
from hrmresource
@ -133,7 +184,6 @@
FROM cus_formfield t1,
cus_formdict t2
WHERE t1.fieldid = t2.id
AND t1.isuse = 1
AND t1.scope = 'HrmCustomFieldByInfoType'
AND t1.scopeid = #{scopeId}
UNION ALL
@ -149,7 +199,7 @@
groupid,
#{scopeId} as scopeId,
'hrm' as tablename
FROM hrm_formfield where isuse = 1) hrmallfield
FROM hrm_formfield) hrmallfield
WHERE FIELDHTMLTYPE != '6' and groupid IN (SELECT id FROM hrm_fieldgroup WHERE grouptype = #{scopeId})
ORDER BY hrmallfield.groupid, hrmallfield.fieldorder
</select>

View File

@ -3,7 +3,6 @@ package com.engine.organization.mapper.job;
import com.engine.organization.entity.hrmresource.po.ResourcePO;
import com.engine.organization.entity.job.dto.JobListDTO;
import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.job.vo.SingleJobTreeVO;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
@ -47,8 +46,6 @@ public interface JobMapper {
*/
List<JobPO> listAll();
List<SingleJobTreeVO> jobSearchByDept(@Param("deptId") Integer deptId);
/**
* 根据ID查询元素
*
@ -130,7 +127,7 @@ public interface JobMapper {
*
* @return
*/
Double getMaxShowOrder();
Integer getMaxShowOrder();
/**
* 根据名字和上级查询岗位信息
@ -141,18 +138,17 @@ public interface JobMapper {
* @param parentJob
* @return
*/
List<JobPO> getIdByNameAndPid(@Param("jobName") String jobName, @Param("parentCompany") Integer parentCompany, @Param("parentDepartment") Integer parentDepartment, @Param("parentJob") Long parentJob,
@Param("jobactivitymark") String jobactivitymark,@Param("jobgroupremark") String jobgroupremark);
Long getIdByNameAndPid(@Param("jobName") String jobName, @Param("parentCompany") Integer parentCompany, @Param("parentDepartment") Integer parentDepartment, @Param("parentJob") Long parentJob);
int updateJobCompany(@Param("ids") Collection<Long> ids, @Param("parentCompany") Integer parentCompany, @Param("ecCompany") Integer ecCompany);
int selectByConditions(@Param("resourcePO") ResourcePO resourcePO);
int selectByE9(@Param("jobTitleName") String jobTitleName,@Param("jobactivitymark") String jobactivitymark,@Param("jobgroupremark") String jobgroupremark);
List<String> listUsedId();
List<String> isAllowDelete(@Param("jobId") Long jobId);
JobPO getJobByResource(@Param("resourcePO") ResourcePO resourcePO);
String selectJobTitleById(@Param("id") String id);
}

View File

@ -467,7 +467,7 @@
and t.forbidden_tag = #{jobPO.forbiddenTag}
</if>
</select>
<select id="getMaxShowOrder" resultType="java.lang.Double">
<select id="getMaxShowOrder" resultType="java.lang.Integer">
select max(show_order)
from jcl_org_job
</select>
@ -482,26 +482,14 @@
and delete_type = 0
</select>
<select id="selectByE9" resultType="java.lang.Integer">
select h.id from hrmjobtitles h
left join hrmjobactivities j on h.jobactivityid = j.id
left join hrmjobgroups f on j.jobgroupid = f.id
where j.jobactivitymark = #{jobactivitymark}
and f.jobgroupremark = #{jobgroupremark}
and h.JOBTITLENAME = #{jobTitleName}
</select>
<select id="getIdByNameAndPid" resultMap="BaseResultMap">
<select id="getIdByNameAndPid" resultType="java.lang.Long">
select
<include refid="baseColumns"/>
from jcl_org_job t
t.id
from
jcl_org_job t
left join hrmjobtitles h on t.ec_jobTitle = h.id
left join hrmjobactivities j on h.jobactivityid = j.id
left join hrmjobgroups f on j.jobgroupid = f.id
where delete_type = 0
and j.jobactivitymark = #{jobactivitymark}
and f.jobgroupremark = #{jobgroupremark}
where
delete_type = 0
and h.JOBTITLENAME = #{jobName}
and ec_company = #{parentCompany}
<include refid="nullparentDept"/>
@ -524,12 +512,21 @@
t.ec_department = h.departmentid
where h.status &lt; 4
</select>
<select id="isAllowDelete" resultType="java.lang.String">
select t.id
from jcl_org_job t
inner join hrmresource h on t.ec_jobtitle = h.jobtitle and t.ec_company = h.subcompanyid1 and
t.ec_department = h.departmentid and t.id = #{jobId} and h.status &lt; 4
</select>
<select id="selectJobTitleById" resultType="java.lang.String">
select jobtitlename
from hrmjobtitles where id = #{id}
</select>
<select id="getJobByResource" resultType="com.engine.organization.entity.job.po.JobPO">
select
<include refid="baseColumns"/>
@ -552,23 +549,6 @@
and t.ec_jobTitle = #{resourcePO.jobtitle}
</if>
</select>
<select id="jobSearchByDept" resultType="com.engine.organization.entity.job.vo.SingleJobTreeVO">
select t.id,
t.job_no,
h.jobtitlename as jobName,
t.sequence_id,
t.scheme_id,
t.grade_id,
t.level_id,
e.jobactivityname,
f.jobgroupname
FROM jcl_org_job t
left join hrmjobtitles h on t.ec_jobTitle = h.id
left join hrmjobactivities e on h.jobactivityid = e.id
left join hrmjobgroups f on e.jobgroupid = f.id
where t.ec_department = #{deptId}
order by id
</select>
<update id="updateJobCompany">

View File

@ -61,6 +61,5 @@
<if test="null!=parentId and parentId !=0">
and viewtype = 1
</if>
order by scopeorder
</select>
</mapper>

View File

@ -1,8 +1,9 @@
package com.engine.organization.mapper.resource;
import com.engine.organization.entity.hrmresource.param.SearchTemplateParam;
import com.alibaba.fastjson.JSONObject;
import com.engine.organization.entity.hrmresource.po.ResourceChartPO;
import com.engine.organization.entity.hrmresource.po.ResourcePO;
import com.engine.organization.entity.hrmresource.param.SearchTemplateParam;
import com.engine.organization.entity.hrmresource.po.SearchTemplatePO;
import com.engine.organization.entity.resume.po.HrmFamilyInfoPO;
import com.engine.organization.entity.resume.po.PersonnelResumePO;
@ -55,8 +56,6 @@ public interface HrmResourceMapper {
*/
List<SearchTemplateParam> getCustomTemplatesByUser(@Param("userId") Integer userId);
List<SearchTemplateParam> getCustomOverAll();
SearchTemplatePO getSearchTemplateById(@Param("id") String id);
SearchTemplatePO getSearchTemplateByName(@Param("userId") Integer userId, @Param("name") String name);
@ -67,10 +66,6 @@ public interface HrmResourceMapper {
SearchTemplatePO getUsedCustomTemplateByUser(@Param("userId") Integer userId);
SearchTemplatePO getUsedSerarchTemplateByUser(@Param("userId") Integer userId);
SearchTemplatePO getOverallCustomTemplate();
Integer insertSearchTemplate(SearchTemplatePO templatePO);
Integer deleteSearchTemplate(@Param("id") Integer Id, @Param("userId") Integer userId);
@ -79,10 +74,9 @@ public interface HrmResourceMapper {
Integer deleteCustomTemplate(@Param("id") Integer Id, @Param("userId") Integer userId);
Integer updateCustomTemplateUsed(@Param("userId") Integer userId);
List<JSONObject> queryAllResColumns(@Param("level") String level, @Param("grade") String grade);
String queryLabelName(@Param("fieldName") String fieldName, @Param("scopeId") String scopeId, @Param("language") Integer language);
String queryLabelName(@Param("fieldName") String fieldName, @Param("scopeId") String scopeId);
/**
@ -94,7 +88,5 @@ public interface HrmResourceMapper {
*/
List<ResourceChartPO> selectByDepartmentId(@Param("departmentId")Integer departmentId);
List<ResourceChartPO> selectByIdAndStatus(@Param("statusList") List<String> statusList,@Param("departmentId")Integer departmentId);
}

View File

@ -14,15 +14,12 @@
<result column="name" property="showname"/>
<!-- <result column="selected" property="selected"/>-->
</resultMap>
<update id="updateCustomTemplateUsed">
update JCL_ORG_SEARCH_TEMPLATE set isused = null where creator = #{userId}
</update>
<select id="selectFilterDatas" resultType="com.engine.organization.entity.hrmresource.po.ResourcePO">
select distinct a.subcompanyid1, a.departmentid, a.jobtitle
from hrmresource a
where a.status &lt; 4 and a.seclevel &gt;= 0
where a.status &lt; 4
and not exists
(select 1
from jcl_org_job b
@ -150,14 +147,7 @@
select id,
name
from jcl_org_custom_template
where creator = #{userId} and overall is null
</select>
<select id="getCustomOverAll" resultMap="SearchTemplateMap">
select id,
name
from jcl_org_custom_template
where overall = 1
where creator = #{userId}
</select>
<insert id="insertSearchTemplate" parameterType="com.engine.organization.entity.hrmresource.po.SearchTemplatePO"
@ -186,9 +176,6 @@
<if test="workFields != null">
work_fields,
</if>
<if test="isused != null">
isused,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="creator != null">
@ -212,9 +199,6 @@
<if test="workFields != null">
#{workFields},
</if>
<if test="isused != null">
#{isused},
</if>
</trim>
</insert>
@ -424,7 +408,11 @@
</if>
</sql>
<select id="queryAllResColumns" parameterType="java.lang.String" resultType="com.alibaba.fastjson.JSONObject">
select a.fieldid, a.fieldname, b.labelname, a.issystem, a.ismand
from hrm_formfield a
inner join htmllabelinfo b on a.fieldlabel = b.indexid and b.languageid = 7
</select>
<select id="getSearchTemplateByName"
resultType="com.engine.organization.entity.hrmresource.po.SearchTemplatePO">
select *
@ -445,13 +433,12 @@
from hrm_formfield a
inner join htmllabelinfo b on a.fieldlabel = b.indexid
where a.FIELDNAME = #{fieldName}
and b.LANGUAGEID = ${language}
and b.LANGUAGEID = '7'
union all
SELECT t3.LABELNAME as labelname
SELECT t1.hrm_fieldlable as labelname
FROM cus_formfield t1,
cus_formdict t2,
htmllabelinfo t3
WHERE t1.fieldid = t2.id and t1.FIELDLABLE = t3.indexid and t3.LANGUAGEID = ${language}
cus_formdict t2
WHERE t1.fieldid = t2.id
AND t1.scope = 'HrmCustomFieldByInfoType'
and t1.SCOPEID = #{scopeId}
and t2.fieldname = #{fieldName}
@ -461,39 +448,12 @@
select *
from jcl_org_custom_template
where ISUSED = 1
and overall is null
and creator = #{userId}
</select>
<select id="getOverallCustomTemplate"
resultType="com.engine.organization.entity.hrmresource.po.SearchTemplatePO">
select *
from jcl_org_custom_template
where overall = 1
</select>
<select id="selectByDepartmentId" resultType="com.engine.organization.entity.hrmresource.po.ResourceChartPO">
select id,workcode,lastname,sex,departmentid,subcompanyid1,jobtitle,status,mobile
from hrmresource where departmentid = #{departmentId} and status &lt; 4 order by id
</select>
<select id="selectByIdAndStatus" resultType="com.engine.organization.entity.hrmresource.po.ResourceChartPO">
select id,workcode,lastname,sex,departmentid,subcompanyid1,jobtitle,status,mobile
from hrmresource where departmentid = #{departmentId}
AND status IN
<foreach collection="statusList" open="(" item="status" separator="," close=")">
#{status}
</foreach>
order by id
</select>
<select id="getUsedSerarchTemplateByUser"
resultType="com.engine.organization.entity.hrmresource.po.SearchTemplatePO">
select *
from jcl_org_search_template
where ISUSED = 1
and creator = #{userId}
</select>
</mapper>

View File

@ -26,18 +26,14 @@ public interface JclOrgCustomTemplateMapper {
int updateByPrimaryKey(JclOrgCustomTemplatePO record);
List<JclOrgCustomTemplatePO> listAllByCreator(@Param("creator") Integer creator);
List<JclOrgCustomTemplatePO> listAll();
List<Long> listAllId();
List<Long> listAllIdByCreator(@Param("creator") Integer creator);
int deleteByIds(@Param("ids") Collection<Long> ids);
int updateUsed(@Param("overall")Integer overall,@Param("isused")String isused,@Param("id") String id,@Param("creator") String creator);
int updateUsed(@Param("isused")String isused,@Param("id") String id,@Param("creator") String creator);
JclOrgCustomTemplatePO queryIsusedTemp(@Param("isused")String isused,@Param("creator") String creator);
JclOrgCustomTemplatePO queryOverAll();
}

View File

@ -14,13 +14,12 @@
<result property="creator" column="creator" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="DATE"/>
<result property="updateTime" column="update_time" jdbcType="DATE"/>
<result property="overall" column="overall"/>
</resultMap>
<sql id="Base_Column_List">
id,name,basic_fields,
personal_fields,work_fields,isused,
creator,create_time,update_time,overall
creator,create_time,update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@ -29,10 +28,10 @@
from jcl_org_custom_template
where id = #{id,jdbcType=INTEGER}
</select>
<select id="listAllByCreator" resultMap="BaseResultMap">
<select id="listAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from jcl_org_custom_template where creator = #{creator} order by id
from jcl_org_custom_template order by id
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
@ -133,9 +132,8 @@
<update id="updateUsed" parameterType="java.lang.String">
update JCL_ORG_CUSTOM_TEMPLATE set isused = #{isused}
<where>
overall is null
<if test="id !=null">
and id = #{id}
id = #{id}
</if>
<if test="creator !=null">
and creator = #{creator}
@ -146,21 +144,7 @@
<select id="queryIsusedTemp" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from JCL_ORG_CUSTOM_TEMPLATE t where t.isused = #{isused} and t.creator = #{creator} and overall is null
</select>
<select id="queryOverAll" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from JCL_ORG_CUSTOM_TEMPLATE t where overall = 1
</select>
<select id="listAllIdByCreator" resultType="java.lang.Long">
select
id
from jcl_org_custom_template where creator = #{creator} order by id
from JCL_ORG_CUSTOM_TEMPLATE t where t.isused = #{isused} and t.creator = #{creator}
</select>
</mapper>

View File

@ -99,7 +99,6 @@ public interface SchemeMapper {
List<SchemePO> getSchemesByIds(@Param("ids")Collection<Long> ids);
List<Integer> selectBySubcompanyId(@Param("subCompanyIds") Collection<Integer> subCompanyIds);
List<SchemePO> selectByParams(@Param("subCompanyId") Integer subCompanyId,@Param("schemeName") String schemeName);
List<Integer> selectBySubcompanyId(@Param("subCompanyIds") Collection<Integer> subCompanyIds);
}

View File

@ -276,10 +276,4 @@
</foreach>
</select>
<select id="selectByParams" parameterType="com.engine.organization.entity.scheme.po.SchemePO" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_scheme t where subcompanyid = #{subCompanyId} AND scheme_name = #{schemeName} AND delete_type = 0
</select>
</mapper>

View File

@ -87,6 +87,4 @@ public interface StaffMapper {
List<StaffPO> selectByEcCompany(@Param("companyIds") Collection<Integer> companyIds);
List<StaffPO> selectByEcDepartment(@Param("departmentIds") Collection<Integer> departmentIds);
List<StaffPO> selectByPlanIds(@Param("planIds") Collection<Integer> planIds);
}

View File

@ -394,14 +394,4 @@
AND t.plan_id IN (SELECT id from jcl_org_staffplan s where s.control_dimension = 2)
</select>
<select id="selectByPlanIds" resultMap="BaseResultMap">
SELECT <include refid="baseColumns"/>
FROM jcl_org_staff t
where t.delete_type = 0
AND t.plan_id IN
<foreach collection="planIds" open="(" item="planId" separator="," close=")">
#{planId}
</foreach>
</select>
</mapper>

View File

@ -1,6 +1,5 @@
package com.engine.organization.service;
import com.engine.organization.entity.chart.HrmLabelVO;
import com.engine.organization.entity.chart.params.StatisticsParam;
import weaver.hrm.User;
@ -92,22 +91,4 @@ public interface ChartService {
* @return: java.util.Map<java.lang.String,java.lang.Object>
*/
Map<String, Object> recordStatistics(StatisticsParam param);
/**
* @Description: 多语言设置
* @Author: liang.cheng
* @Date: 2024/6/3 2:59 PM
* @param: []
* @return: java.util.Map<java.lang.Integer,com.engine.organization.entity.chart.HrmLabelVO>
*/
Map<String, HrmLabelVO> selectLabel();
/**
* @Description: 历史版本删除
* @Author: liang.cheng
* @Date: 2024/8/1 4:30 PM
* @param: []
* @return: java.util.Map<java.lang.String,java.lang.Object>
*/
Map<String, Object> versionDelete(Integer versionId);
}

View File

@ -41,13 +41,4 @@ public interface ExportCommonService {
* @return: org.apache.poi.xssf.usermodel.XSSFWorkbook
*/
XSSFWorkbook departmentExport();
/**
* @Description: 编制信息页面导出
* @Author: liang.cheng
* @Date: 2024/6/24 3:04 PM
* @param: [planId]
* @return: org.apache.poi.xssf.usermodel.XSSFWorkbook
*/
XSSFWorkbook staffExport(String planId);
}

View File

@ -133,7 +133,7 @@ public interface HrmResourceService {
* @param params
* @return
*/
Map<String, Object> saveCustomTemplate(SearchTemplateParam params);
Integer saveCustomTemplate(SearchTemplateParam params);
/**
* 批量修改保存定制列模板
@ -176,15 +176,7 @@ public interface HrmResourceService {
* @param: [departmentId]
* @return: java.util.Map<java.lang.String,java.lang.Object>
*/
Map<String, Object> chartResourceList(Integer departmentId,String versionId,String dimension,String statusValue);
Map<String, Object> chartResourceList(Integer departmentId,String versionId,String dimension);
/**
* @Description: 将当前模板应用到所有人
* @Author: liang.cheng
* @Date: 2024/7/23 3:02 PM
* @param: [params]
* @return: java.util.Map<java.lang.String,java.lang.Object>
*/
Map<String, Object> customOverall(Map<String, Object> params);
}

View File

@ -45,13 +45,6 @@ public interface ImportCommonService {
Map<String,Object> saveCommonImport(Map<String, Object> params);
/**
* @Description: 通用导入表单模板
* @Author: liang.cheng
* @Date: 2024/3/11 4:05 PM
* @param: [importModule]
* @return: java.util.Map<java.lang.String,java.lang.Object>
*/
Map<String, Object> getCommonForm(String importModule);
}

View File

@ -19,7 +19,6 @@ import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.general.Util;
import weaver.systeminfo.SystemEnv;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
@ -60,9 +59,8 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
@Override
public Map<String, Object> hasRight() {
Map<String, Object> resultMap = new HashMap<>();
//boolean hasRight = HasRightUtil.hasRight(user, RIGHT_NAME, true);
//脚本未找到该菜单 放开所有
resultMap.put("hasRight", true);
boolean hasRight = HasRightUtil.hasRight(user, RIGHT_NAME, true);
resultMap.put("hasRight", hasRight);
return resultMap;
}
@ -103,10 +101,10 @@ public class CardAccessServiceImpl extends Service implements CardAccessService
@Override
public Map<String, Object> getCardButtonTable() {
List<ExtendInfoPO> infoPOList = new ArrayList<>();
infoPOList.add(ExtendInfoPO.builder().id(null).fieldName("name").fieldNameDesc(SystemEnv.getHtmlLabelName(547386,user.getLanguage())).fieldType("varchar(50)").controlType(1).browserType("1").customValue("[\"input\",\"text\",\"50\"]").showOrder(1).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().id(null).fieldName("status").fieldNameDesc(SystemEnv.getHtmlLabelName(547186, user.getLanguage())).fieldType("char(1)").controlType(7).browserType("1").customValue("[\"check\"]").showOrder(2).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().id(null).fieldName("url").fieldNameDesc(SystemEnv.getHtmlLabelName(547387,user.getLanguage())).fieldType("varchar(1000)").controlType(1).browserType("1").customValue("[\"input\",\"text\",\"1000\"]").showOrder(3).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().id(null).fieldName("roles").fieldNameDesc(SystemEnv.getHtmlLabelName(547388,user.getLanguage())).fieldType("text").controlType(3).browserType("65").customValue("[\"browser\",{\"valueSpan\":\"多角色\",\"replaceDatas\":[{\"itemorderid\":\"65\",\"name\":\"多角色\",\"id\":\"65\",\"parenttitle\":\"人员\",\"title\":\"人员-多角色\"}],\"value\":\"65\"}]").showOrder(4).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().id(null).fieldName("name").fieldNameDesc("按钮名称").fieldType("varchar(50)").controlType(1).browserType("1").customValue("[\"input\",\"text\",\"50\"]").showOrder(1).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().id(null).fieldName("status").fieldNameDesc("启用").fieldType("char(1)").controlType(7).browserType("1").customValue("[\"check\"]").showOrder(2).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().id(null).fieldName("url").fieldNameDesc("跳转地址").fieldType("varchar(1000)").controlType(1).browserType("1").customValue("[\"input\",\"text\",\"1000\"]").showOrder(3).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().id(null).fieldName("roles").fieldNameDesc("角色").fieldType("text").controlType(3).browserType("65").customValue("[\"browser\",{\"valueSpan\":\"多角色\",\"replaceDatas\":[{\"itemorderid\":\"65\",\"name\":\"多角色\",\"id\":\"65\",\"parenttitle\":\"人员\",\"title\":\"人员-多角色\"}],\"value\":\"65\"}]").showOrder(4).isrequired(0).isSystemDefault(0).build());
Map<String, Object> tabInfoMap = new HashMap<>();
tabInfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, infoPOList, 2, false, true));

View File

@ -21,13 +21,11 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.conn.RecordSetTrans;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.hrm.company.DepartmentComInfo;
import weaver.hrm.company.SubCompanyComInfo;
import weaver.hrm.resource.ResourceComInfo;
import weaver.systeminfo.SystemEnv;
import java.time.LocalDate;
import java.time.LocalDateTime;
@ -89,7 +87,6 @@ public class ChartServiceImpl extends Service implements ChartService {
// 根结点
String root = Util.null2String(params.get("root"));
root = StringUtils.isBlank(root) ? "0" : root;
boolean isDepartment = root.startsWith("d");
// 维度
String dimension = Util.null2String(params.get("fclass"));
@ -141,10 +138,6 @@ public class ChartServiceImpl extends Service implements ChartService {
// 向下查询数据
if (null != topChartPO) {
// 如果根结点是部门顶层层级设置为1
if(topChartPO.getFtype().equals("2")){
topChartPO.setDepartmentDepth(1);
}
findChildData(topChartPO, dataList, Integer.parseInt(depth), id, hideDepartment);
}
@ -203,8 +196,6 @@ public class ChartServiceImpl extends Service implements ChartService {
chartPO.setExpand("0");
chartPO.setFisvitual(rs.getString("isvitual"));
chartPO.setHasChildren(getHasChildren(chartPO.getFtype(), chartPO.getFobjid()).toString());
chartPO.setOnJobNum(isRealTime ? Util.getIntValue(rs.getString("on_job_num"),0) : Util.getIntValue(rs.getString("job_num"),0));
chartPO.setStaffNum(Util.getIntValue(rs.getString("staff_num"),0));
filterAndAddData(dataList, chartPO, hideDepartment);
//dataList.add(chartPO);
@ -231,30 +222,12 @@ public class ChartServiceImpl extends Service implements ChartService {
//版本id
String versionId = Util.null2String(params.get("id"));
OrganizationAssert.isFalse(StringUtils.isBlank(rootId) || !rootId.startsWith("d_"), SystemEnv.getHtmlLabelName(547440,user.getLanguage()));
OrganizationAssert.isFalse(StringUtils.isBlank(rootId) || !rootId.startsWith("d_"), "数据有误,未查询到对应数据");
String departmentId = rootId.split("_")[1];
String detauleType = Util.null2String(params.get("detauleType"));
//人员性质
String statusValue = Util.null2String(params.get("statusValue"));
//显示模式
String typeValue = Util.null2String(params.get("typeValue"));
//显示人员上下级
boolean isManager = false;
//显示次账号
boolean isBelongTo = true;
if (typeValue.contains("isManager")) {
isManager = true;
}
if (!typeValue.contains("isBelongTo")) {
isBelongTo = false;
}
if (!"chart".equals(detauleType)) {
// 展示列表模块
return ServiceUtil.getService(HrmResourceServiceImpl.class, user).chartResourceList(Integer.parseInt(departmentId), versionId, dimension,statusValue);
return ServiceUtil.getService(HrmResourceServiceImpl.class, user).chartResourceList(Integer.parseInt(departmentId), versionId, dimension);
}
@ -302,13 +275,9 @@ public class ChartServiceImpl extends Service implements ChartService {
if (showJob) {
// 查询部门下的岗位
if (isRealTime) {
String subcompanyid1 = new DepartmentComInfo().getSubcompanyid1(departmentId);
sql = "select a.id,a.jobtitlename as name from hrmjobtitles a inner join jcl_org_job b on a.id = b.ec_jobtitle and (b.delete_type is null or b.delete_type = 0) where b.ec_department = '" + departmentId + "' and b.ec_company='" + subcompanyid1 + "'";
sql = "select a.id,a.jobtitlename as name from hrmjobtitles a inner join jcl_org_job b on a.id = b.ec_jobtitle and (b.delete_type is null or b.delete_type = 0) where b.ec_department = '" + departmentId + "'";
} else {
rs.executeQuery("select subcompanyid from jcl_chart_department where departmentid = '" + departmentId + "' and versionid = " + versionId);
rs.next();
String subcompanyid = rs.getString("subcompanyid");
sql = "select jobid as id ,jobname as name from jcl_chart_job where departmentid = '" + departmentId + "' and subcompanyid = '" + subcompanyid + "' and versionid = " + versionId;
sql = "select jobid as id ,jobname as name from jcl_chart_job where departmentid = '" + departmentId + "' and versionid = " + versionId;
}
rs.executeQuery(sql);
while (rs.next()) {
@ -327,28 +296,19 @@ public class ChartServiceImpl extends Service implements ChartService {
// 遍历岗位查询对应岗位下的人员
if (isRealTime) {
if (isRealDimension) {
sql = "select a.id,a.lastname as name,a.belongto ,a.companyworkyear,a.dsporder,a.accounttype from hrmresource a where a.status in ("+statusValue+") and a.departmentid = ? and a.jobtitle = ?";
sql = "select a.id,a.lastname as name ,a.belongto ,a.companyworkyear from hrmresource a where a.status < 4 and a.departmentid = ? and a.jobtitle = ?";
} else {
sql = "select a.id,a.lastname as name ,a.belongto ,a.companyworkyear,a.accounttype from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid where a.status in ("+statusValue+") and b.departmentid = ? and a.jobtitle = ?";
sql = "select a.id,a.lastname as name ,a.belongto ,a.companyworkyear from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid where a.status < 4 and b.departmentid = ? and a.jobtitle = ?";
}
} else {
sql = "select a.resourceid as id,a.lastname as name ,a.belongto ,a.companyworkyear,a.accounttype from jcl_chart_resource a where a.status in ("+statusValue+") and a.departmentid = ? and a.jobtitleid = ? and versionid = " + versionId;
sql = "select a.resourceid as id,a.lastname as name ,a.belongto ,a.companyworkyear from jcl_chart_resource a where a.status < 4 and a.departmentid = ? and a.jobtitleid = ? and versionid = " + versionId;
}
if (!isBelongTo) {
sql += " and (a.accounttype = 0 or a.accounttype is null)";
}
if (isRealTime) {
sql += " order by dsporder";
}
for (ChartPO jobTitlePO : jobTitleList) {
resourceNum = 0;
rs.executeQuery(sql, departmentId, jobTitlePO.getFobjid());
String parentId = departmentId + "_" + jobTitlePO.getFobjid();
while (rs.next()) {
String accountType = Util.null2String(rs.getString("accounttype"));
ChartPO chartPO = getResourceChartPO(rs.getString("id"), rs.getString("name"), parentId, rs.getString("belongto"), rs.getString("companyworkyear"),accountType);
ChartPO chartPO = getResourceChartPO(rs.getString("id"), rs.getString("name"), parentId, rs.getString("belongto"), rs.getString("companyworkyear"));
resourceNum++;
dataList.add(chartPO);
}
@ -358,46 +318,23 @@ public class ChartServiceImpl extends Service implements ChartService {
}
departmentChartPO.setHasChildren(CollectionUtils.isNotEmpty(jobTitleList) ? "1" : "0");
} else {
// 直接查询部门下的人员
// 直接查询岗位下的人员
if (isRealTime) {
if (isRealDimension) {
sql = "select a.id,a.lastname as name ,a.belongto ,a.companyworkyear,a.accounttype,a.managerid from hrmresource a where a.status in ("+statusValue+") and a.departmentid = ? ";
sql = "select a.id,a.lastname as name ,a.belongto ,a.companyworkyear from hrmresource a where a.status < 4 and a.departmentid = ? ";
} else {
sql = "select a.id,a.lastname as name ,a.belongto ,a.companyworkyear,a.accounttype,b.managerid from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid where a.status in ("+statusValue+") and b.departmentid = ? ";
sql = "select a.id,a.lastname as name ,a.belongto ,a.companyworkyear from hrmresource a inner join hrmresourcevirtual b on a.id = b.resourceid where a.status < 4 and b.departmentid = ? ";
}
} else {
sql = "select a.resourceid as id,a.lastname as name ,a.belongto ,a.companyworkyear,a.accounttype,a.manager as managerid from jcl_chart_resource a where a.status in ("+statusValue+") and a.departmentid = ? and versionid = " + versionId;
sql = "select a.resourceid as id,a.lastname as name ,a.belongto ,a.companyworkyear from jcl_chart_resource a where a.status < 4 and a.departmentid = ? and versionid = " + versionId;
}
if (!isBelongTo) {
sql += " and (a.accounttype = 0 or a.accounttype is null)";
}
if (isRealTime) {
sql += " order by dsporder";
}
rs.executeQuery(sql, departmentId);
List<ChartPO> personList = new ArrayList<>();
while (rs.next()) {
String accountType = Util.null2String(rs.getString("accounttype"));
String managerId = Util.null2String(rs.getString("managerid"));
ChartPO chartPO = getResourceChartPO(rs.getString("id"), rs.getString("name"), rootId, rs.getString("belongto"), rs.getString("companyworkyear"),accountType);
chartPO.setManagerId(managerId);
personList.add(chartPO);
ChartPO chartPO = getResourceChartPO(rs.getString("id"), rs.getString("name"), rootId, rs.getString("belongto"), rs.getString("companyworkyear"));
dataList.add(chartPO);
departmentOnJob++;
}
if(isManager) {
personList.forEach(element -> personList.stream()
.filter(other -> element.getManagerId().equals(other.getId()))
.findFirst()
.ifPresent(matched -> element.setParentId(matched.getId())));
}
dataList.addAll(personList);
}
departmentChartPO.setFonjob(departmentOnJob);
@ -425,7 +362,7 @@ public class ChartServiceImpl extends Service implements ChartService {
* @param companyWorkYear 司龄
* @return
*/
private ChartPO getResourceChartPO(String id, String name, String parentId, String belongTo, String companyWorkYear,String accountType) {
private ChartPO getResourceChartPO(String id, String name, String parentId, String belongTo, String companyWorkYear) {
ChartPO chartPO = new ChartPO();
chartPO.setFtype("4");
chartPO.setFobjid(id);
@ -433,11 +370,10 @@ public class ChartServiceImpl extends Service implements ChartService {
chartPO.setFname(name);
// 岗位处理后的ID
chartPO.setParentId(parentId);
chartPO.setExpand("1");
chartPO.setExpand("0");
chartPO.setHasChildren("0");
chartPO.setBelongto(Util.null2String(belongTo));
chartPO.setCompanyWorkYear(companyWorkYear);
chartPO.setAccountType("1".equals(accountType) ? SystemEnv.getHtmlLabelName(547713,user.getLanguage()) : SystemEnv.getHtmlLabelName(547712,user.getLanguage()));
try {
chartPO.setFleaderimg(new ResourceComInfo().getMessagerUrls(chartPO.getId()));
} catch (Exception e) {
@ -466,31 +402,14 @@ public class ChartServiceImpl extends Service implements ChartService {
" versionid = " + versionId + " and companyvirtualid = " + dimension;
}
} else {
String numSql = ",a.job_num,a.staff_num";
if (!isRealDimension) {
numSql = "";
}
if (root.startsWith("d")) {
root = root.replace("d", "");
if (hasVirtualFields) {
if (showVirtual) {
return "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual" + numSql + " from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and " + DEPARTMENT_ID + " = '" + root + "' and versionid = " + versionId;
} else {
return "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual" + numSql + " from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and (isvirtual is null or isvirtual != '1') and " + DEPARTMENT_ID + " = '" + root + "' and versionid = " + versionId;
}
if (hasVirtualFields) {
if (showVirtual) {
return "select " + SUB_COMPANY_ID + " as id,subcompanyname as name,'1' as type,isvirtual as isvitual,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where versionid = " + versionId + " and subcompanyid = " + root;
} else {
return "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type" + numSql + " from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and " + DEPARTMENT_ID + " = '" + root + "' and versionid = " + versionId;
return "select " + SUB_COMPANY_ID + " as id,subcompanyname as name,'1' as type,isvirtual as isvitual,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where versionid = " + versionId + " and subcompanyid = " + root + " and (isvirtual is null or isvirtual != '1')";
}
} else {
if (hasVirtualFields) {
if (showVirtual) {
return "select " + SUB_COMPANY_ID + " as id,subcompanyname as name,'1' as type,isvirtual as isvitual" + numSql + " from " + SUB_COMPANY_TABLE + " a where versionid = " + versionId + " and " + SUB_COMPANY_ID + " = " + root;
} else {
return "select " + SUB_COMPANY_ID + " as id,subcompanyname as name,'1' as type,isvirtual as isvitual" + numSql + " from " + SUB_COMPANY_TABLE + " a where versionid = " + versionId + " and " + SUB_COMPANY_ID + " = " + root + " and (isvirtual is null or isvirtual != '1')";
}
} else {
return "select " + SUB_COMPANY_ID + " as id,subcompanyname as name,'1' as type" + numSql + " from " + SUB_COMPANY_TABLE + " a where versionid = " + versionId + " and " + SUB_COMPANY_ID + " = " + root;
}
return "select " + SUB_COMPANY_ID + " as id,subcompanyname as name,'1' as type,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where versionid = " + versionId + " and subcompanyid = " + root;
}
}
}
@ -546,19 +465,6 @@ public class ChartServiceImpl extends Service implements ChartService {
public Map<String, Object> getDepartmentTree(Map<String, Object> params) {
Map<String, Object> result = new HashMap<>(2);
List<CompanyTreePO> departmentTree = getDepartmentTreeList(params);
result.put("departmentTree", departmentTree);
result.put("api_status", true);
return result;
}
/**
* 获取部门树集合
*
* @param params
* @return
*/
public static List<CompanyTreePO> getDepartmentTreeList(Map<String, Object> params) {
RecordSet rs = new RecordSet();
List<CompanyTreePO> departmentTree = new ArrayList<>();
String subCompany = Util.null2String(params.get("subcompany"));
@ -570,9 +476,11 @@ public class ChartServiceImpl extends Service implements ChartService {
String sql = getDepartmentTreeSql(versionId, dimension, subCompany);
rs.executeQuery(sql);
while (rs.next()) {
departmentTree.add(CompanyTreePO.builder().id(rs.getString("id")).pId(rs.getString("pId")).disabled(false).value(rs.getString("value")).title(rs.getString("title")).isLeaf(judgeTreeLeaf(versionId, dimension, rs.getString("id"))).build());
departmentTree.add(CompanyTreePO.builder().id(rs.getString("id")).pId(rs.getString("pId")).disabled(!rs.getString("id").startsWith("d")).value(rs.getString("value")).title(rs.getString("title")).isLeaf(judgeTreeLeaf(versionId, dimension, rs.getString("id"))).build());
}
return departmentTree;
result.put("departmentTree", departmentTree);
result.put("api_status", true);
return result;
}
@Override
@ -714,52 +622,6 @@ public class ChartServiceImpl extends Service implements ChartService {
return result;
}
@Override
public Map<String, HrmLabelVO> selectLabel() {
RecordSet rs = new RecordSet();
Map<String, HrmLabelVO> labelData = new HashMap<>();
//labelId集合
List<Integer> labelIds = Arrays.asList(547190,547194,547196,547262,547282,547283,547284,547285,547286,547287,547292,547293,547294,547296,547298,547299,547300,547301,547302,547303,547304,547305,547307,547310,547313,547314,547315,547316,547317,
547318,547319,547320,547321,547322,547323,547324,547326,547327,547328,547329,547330,547331,547332,547333,547334,547345,547346,547447,547448,547468,547473,547475,547476,547477,547478,547478,547264,547265,547463,547464,547465,
547480,547481,547482,547483,547484,547485,547486,547487,547488,547489,547490,547491,547492,547493,547494,547495,547505,547506,547507,547508,547509,547510,547512,547513,547514,547515,547516,547517,547518,547519,547520,547521,547522,547523,547524,547525,
547526,547712,547713,547714,547715,547716,547717,547718,547719,547720,547721,547722,547723,547724,547725,547728,547729);
labelIds.forEach(item -> {
rs.executeQuery("select labelName from HtmlLabelInfo where indexid = ? and languageid = ?",item,user.getLanguage());
if (rs.next()){
labelData.put(Util.null2String(item),HrmLabelVO.builder().labelName(Util.null2String(rs.getString("labelName"))).build());
}
});
return labelData;
}
@Override
public Map<String, Object> versionDelete(Integer versionId) {
Map<String, Object> data = new HashMap<>();
RecordSet rs = new RecordSet();
//1.删除版本表
rs.executeUpdate("delete from jcl_org_chartversion where id = ?",versionId);
//2.删除历史分部表
rs.executeUpdate("delete from jcl_chart_subcompany where versionid = ?",versionId);
//3.删除历史部门表
rs.executeUpdate("delete from jcl_chart_department where versionid = ?",versionId);
//4.删除历史聚才林岗位表
rs.executeUpdate("delete from jcl_chart_job where versionid = ?",versionId);
//5.删除历史人员表
rs.executeUpdate("delete from jcl_chart_resource where versionid = ?",versionId);
data.put("versionId",versionId);
return data;
}
/**
* 生成人数
* @param stp
@ -773,47 +635,53 @@ public class ChartServiceImpl extends Service implements ChartService {
list.add(stp.getDataId());
StringBuilder jobSql = new StringBuilder();
StringBuilder staffSql = new StringBuilder();
List<Integer> jobList = new ArrayList<>();
if (ModuleTypeEnum.subcompanyfielddefined.getValue().equals(stp.getType())) {
subCompany.getSubCompanyLists(String.valueOf(stp.getDataId()), list);
subCompany.getSubCompanyLists(String.valueOf(stp.getDataId()), list);
String value = StringUtils.join(list,",");
jobSql.append("select count(1) as count from hrmresource where status < 4 and subcompanyid1 in (").append(value).append(")");
staffSql.append("select a.staff_num from jcl_org_staff a inner join jcl_org_staffplan b\n" +
" on a.plan_id = b.id\n" +
" and a.ec_company = ? and a.ec_department is null and a.delete_type = 0\n" +
" and b.plan_year = ?");
rs.executeQuery(staffSql.toString(),stp.getDataId(),OrganizationDateUtil.getFormatYear(new Date()));
if (rs.next()) {
stp.setStaffNum(Util.getIntValue(rs.getString("staff_num"),0));
}
}else {
dept.getAllChildDeptByDepId(list,String.valueOf(stp.getDataId()));
String value = StringUtils.join(list,",");
//编制数维度是岗位 部门展示页面显示当前部门所有岗位编制数之和
rs.executeQuery("select id from jcl_org_job where ec_department = ?",stp.getDataId());
while (rs.next()) {
jobList.add(Util.getIntValue(rs.getString("id")));
}
String join = StringUtils.join(jobList, ",");
jobSql.append("select count(1) as count from hrmresource where status < 4 and departmentid in (").append(value).append(")");
staffSql.append("select a.staff_num from jcl_org_staff a inner join jcl_org_staffplan b\n" +
" on a.plan_id = b.id\n" +
" and a.ec_department = ? and a.job_id is null and a.delete_type = 0\n" +
" and a.job_id in ("+join+") and a.delete_type = 0\n" +
" and b.plan_year = ?");
List<Integer> count = new ArrayList<>();
if (CollectionUtils.isEmpty(jobList)) {
stp.setStaffNum(0);
} else {
rs.executeQuery(staffSql.toString(),OrganizationDateUtil.getFormatYear(new Date()));
while (rs.next()) {
count.add(Util.getIntValue(rs.getString("staff_num")));
}
stp.setStaffNum(count.stream().reduce(0, Integer::sum));
}
}
BaseBean bb = new BaseBean();
if ("false".equals(bb.getPropValue("hrmOrganization","accountType"))) {
jobSql.append(" and accounttype != 1");
}
if ("true".equals(bb.getPropValue("hrmOrganization","filterEnable"))) {
String usekind = bb.getPropValue("hrmOrganization", "usekind");
jobSql.append(" and usekind not in (").append(usekind).append(")");
}
rs.executeQuery(jobSql.toString());
rs.next();
stp.setOnJobNum(Util.getIntValue(rs.getString("count")));
rs.executeQuery(staffSql.toString(),stp.getDataId(),OrganizationDateUtil.getFormatYear(new Date()));
if (rs.next()) {
stp.setStaffNum(Util.getIntValue(rs.getString("staff_num")));
}else {
stp.setStaffNum(0);
}
return stp;
}
@ -852,34 +720,34 @@ public class ChartServiceImpl extends Service implements ChartService {
}
rs.executeQuery(sql.toString());
while (rs.next()) {
while (rs.next()) {
StatisticsPO statisticsPO = StatisticsPO.builder()
.dataId(Util.getIntValue(rs.getString("id")))
.superId(Util.getIntValue(rs.getString("supsubcomid")))
.type(1)
.onJobNum(0)
.staffNum(0)
.creator(user.getUID())
.createTime(OrganizationDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
.updateTime(OrganizationDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
.build();
companyList.add(statisticsPO);
}
StatisticsPO statisticsPO = StatisticsPO.builder()
.dataId(Util.getIntValue(rs.getString("id")))
.superId(Util.getIntValue(rs.getString("supsubcomid")))
.type(1)
.onJobNum(0)
.staffNum(0)
.creator(user.getUID())
.createTime(OrganizationDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
.updateTime(OrganizationDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
.build();
companyList.add(statisticsPO);
}
rs.executeQuery(sql1.toString());
while (rs.next()) {
StatisticsPO statisticsPO = StatisticsPO.builder()
.dataId(Util.getIntValue(rs.getString("id")))
.superId(Util.getIntValue(rs.getString("supdepid")))
.type(2)
.onJobNum(0)
.staffNum(0)
.creator(user.getUID())
.createTime(OrganizationDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
.updateTime(OrganizationDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
.build();
departmentList.add(statisticsPO);
rs.executeQuery(sql1.toString());
while (rs.next()) {
StatisticsPO statisticsPO = StatisticsPO.builder()
.dataId(Util.getIntValue(rs.getString("id")))
.superId(Util.getIntValue(rs.getString("supdepid")))
.type(2)
.onJobNum(0)
.staffNum(0)
.creator(user.getUID())
.createTime(OrganizationDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
.updateTime(OrganizationDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
.build();
departmentList.add(statisticsPO);
}
@ -897,7 +765,7 @@ public class ChartServiceImpl extends Service implements ChartService {
if (CollectionUtils.isNotEmpty(addCompanyList)) {
addCompanyList.forEach(item -> iRs.executeUpdate("insert into jcl_org_onjob(data_id,super_id,type,on_job_num,staff_num,creator,create_time,update_time)" +
" values(?,?,?,?,?,?,?,?)",item.getDataId(),item.getSuperId(),item.getType(),
" values(?,?,?,?,?,?,?,?)",item.getDataId(),item.getSuperId(),item.getType(),
item.getOnJobNum(),item.getStaffNum(),item.getCreator(),item.getCreateTime(),item.getUpdateTime()));
}
@ -1007,7 +875,7 @@ public class ChartServiceImpl extends Service implements ChartService {
" left join JCL_ORG_ONJOB d on a.id=d.data_id and d.type=1 ";
deptQuerySql = "select a.id as departmentid, a.departmentmark, a.departmentname, a.subcompanyid1 as subcompanyid, " +
"b.SUBCOMPANYNAME as subcompany,a.supdepid as supdepartmentid,c.departmentname as supdepartment," +
"a.canceled,a.departmentcode,a.coadjutant,a.tlevel,d.bmlx as isvirtual,d.bmfzr as fleader,e.on_job_num,e.staff_num " +
"a.canceled,a.departmentcode,a.coadjutant,a.tlevel,d.bmlx as isvirtual,a.bmfzr as fleader,e.on_job_num,e.staff_num " +
"from hrmdepartment a left join hrmsubcompany b on a.subcompanyid1 = b.id " +
"left join hrmdepartment c on a.supdepid = c.id " +
"left join hrmdepartmentdefined d on a.id=d.deptid " +
@ -1040,13 +908,12 @@ public class ChartServiceImpl extends Service implements ChartService {
" a.departmentcode,\n" +
" a.coadjutant,\n" +
" a.tlevel,\n" +
" e.bmfzr as fleader,\n" +
" a.bmfzr as fleader,\n" +
" d.on_job_num,\n" +
" d.staff_num" +
" from hrmdepartment a\n" +
" left join hrmsubcompany b on a.subcompanyid1 = b.id\n" +
" left join hrmdepartment c on a.supdepid = c.id\n" +
" left join hrmdepartmentdefined e on a.id=e.deptid\n" +
" left join JCL_ORG_ONJOB d on a.id=d.data_id and d.type=2 ";
}
@ -1358,6 +1225,22 @@ public class ChartServiceImpl extends Service implements ChartService {
"department, subcompanyid, subcompany, costcenter,manager, assistant, workcode, classification, " +
"versiondate, policy, degree,versionid,lastname,companyworkyear) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?," +
"?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
// while (rs.next()) {
// insertList = new ArrayList<>();
// insertList.add(StringUtils.isBlank(rs.getString("resourceid")) ? null : rs.getInt("resourceid"));
// insertList.add(StringUtils.isBlank(rs.getString("managerid")) ? null : rs.getInt("managerid"));
// insertList.add(StringUtils.isBlank(rs.getString("subcompanyid")) ? null : rs.getInt("subcompanyid"));
// insertList.add(StringUtils.isBlank(rs.getString("departmentid")) ? null : rs.getInt("departmentid"));
// insertList.add(rs.getString("managerstr"));
// //insertList.add(rs.getString("virtualtype"));
// insertList.add(currentDate);
// insertList.add(StringUtils.isBlank(versionId) ? null : Util.getIntValue(versionId));
// insertParamList.add(insertList);
// }
// String insertVirtualHrmSql = "insert into jcl_chart_resource(resourceid,MANAGER,subcompanyid," +
// "departmentid,managerstr," +
// //"virtualtype," +
// "versiondate,versionid) values (?,?,?,?,?,?,?)";
insertData(recordSetTrans, insertVirtualHrmSql, insertParamList);
}
@ -1399,28 +1282,15 @@ public class ChartServiceImpl extends Service implements ChartService {
return "select id,companyname as name,'0' as type from " + COMPANY_TABLE + " where id = '" + dimension + "'";
}
} else {
if(root.startsWith("d")) {
root = root.replace("d", "");
if (hasVirtualFields) {
if (showVirtual) {
return "select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual,c.on_job_num,c.staff_num from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid left join jcl_org_onjob c on a.id=c.data_id and c.type=2 where (a.canceled is null or a.canceled != '1') and a.id = '" + root + "'";
} else {
return "select a.id,a.departmentname as name,'2' as type ,b.bmlx as isvitual,c.on_job_num,c.staff_num from " + DEPARTMENT_TABLE + " a left join hrmdepartmentdefined b on a.id = b.deptid left join jcl_org_onjob c on a.id=c.data_id and c.type=2 where (canceled is null or canceled != '1') and (b.bmlx is null or b.bmlx != '1') and a.id = '" + root + "'";
}
if (hasVirtualFields) {
if (showVirtual) {
return "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual,c.on_job_num,c.staff_num from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid left join jcl_org_onjob c on a.id=c.data_id and c.type=1 where a.id = '" + root + "' order by showorder,id";
} else {
return "select a.id,a.departmentname as name,'2' as type,b.on_job_num,b.staff_num from " + DEPARTMENT_TABLE + " a left join jcl_org_onjob b on a.id=b.data_id and b.type=2 where (canceled is null or canceled != '1') and a.id = '" + root + "'";
}
}else {
if (hasVirtualFields) {
if (showVirtual) {
return "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual,c.on_job_num,c.staff_num from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid left join jcl_org_onjob c on a.id=c.data_id and c.type=1 where a.id = '" + root + "' order by showorder,id";
} else {
return "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual,c.on_job_num,c.staff_num from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid left join jcl_org_onjob c on a.id=c.data_id and c.type=1 where a.id = '" + root + "' and (b.fblx is null or b.fblx!='1') order by showorder,id";
return "select a.id,a.subcompanyname as name,'1' as type ,b.fblx as isvitual,c.on_job_num,c.staff_num from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid left join jcl_org_onjob c on a.id=c.data_id and c.type=1 where a.id = '" + root + "' and (b.fblx is null or b.fblx!='1') order by showorder,id";
}
} else {
return "select a.id,a.subcompanyname as name,'1' as type,b.on_job_num,b.staff_num from " + SUB_COMPANY_TABLE + " a left join jcl_org_onjob b on a.id=b.data_id and b.type=1 where a.id = '" + root + "' order by a.showorder,a.id";
}
} else {
return "select a.id,a.subcompanyname as name,'1' as type,b.on_job_num,b.staff_num from " + SUB_COMPANY_TABLE + " a left join jcl_org_onjob b on a.id=b.data_id and b.type=1 where a.id = '" + root + "' order by a.showorder,a.id";
}
}
}
@ -1450,10 +1320,8 @@ public class ChartServiceImpl extends Service implements ChartService {
// 一级分部数据分权处理
if (isRealTime && user.getUID() != 1 && isRealDimension) {
DetachUtil detachUtil = new DetachUtil(user);
if(detachUtil.isDETACH()) {
String ids = detachUtil.getJclRoleLevels();
sql = sql + " and a.id in (" + ids + ")";
}
String ids = detachUtil.getJclRoleLevels();
sql = sql + " and a.id in ("+ids+")";
}
break;
case "1":
@ -1498,21 +1366,17 @@ public class ChartServiceImpl extends Service implements ChartService {
* @return 查询SQL
*/
private String getLastTimeChildSql(String sql, String fType, String fObjId, String versionId) {
String numSql = ",a.job_num,a.staff_num";
if (!isRealDimension) {
numSql = "";
}
if (StringUtils.isNotBlank(fType)) {
switch (fType) {
case "0":
if (hasVirtualFields) {
if (showVirtual) {
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type ,isvirtual as isvitual" + numSql + " from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supsubcompanyid is null or a.supsubcompanyid = '0') and versionid = " + versionId;
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supsubcompanyid is null or a.supsubcompanyid = '0') and versionid = " + versionId;
} else {
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type ,isvirtual as isvitual" + numSql + " from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supsubcompanyid is null or a.supsubcompanyid = '0') and (isvirtual is null or isvirtual != '1') and versionid = " + versionId;
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supsubcompanyid is null or a.supsubcompanyid = '0') and (isvirtual is null or isvirtual != '1') and versionid = " + versionId;
}
} else {
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type" + numSql + " from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supsubcompanyid is null or a.supsubcompanyid = '0') and versionid = " + versionId;
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supsubcompanyid is null or a.supsubcompanyid = '0') and versionid = " + versionId;
}
if (!isRealDimension) {
sql += " and companyid = " + fObjId;
@ -1521,26 +1385,26 @@ public class ChartServiceImpl extends Service implements ChartService {
case "1":
if (hasVirtualFields) {
if (showVirtual) {
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type ,isvirtual as isvitual" + numSql + " from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and a.supsubcompanyid = '" + fObjId + "' and versionid = " + versionId +
" union select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual" + numSql + " from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supdepartmentid is null or a.supdepartmentid = '0') and subcompanyid = '" + fObjId + "' and versionid = " + versionId;
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and a.supsubcompanyid = '" + fObjId + "' and versionid = " + versionId +
" union select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supdepartmentid is null or a.supdepartmentid = '0') and subcompanyid = '" + fObjId + "' and versionid = " + versionId;
} else {
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type ,isvirtual as isvitual" + numSql + " from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and (isvirtual is null or isvirtual != '1') and a.supsubcompanyid = '" + fObjId + "' and versionid = " + versionId +
" union select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual" + numSql + " from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supdepartmentid is null or a.supdepartmentid = '0') and (isvirtual is null or isvirtual != '1') and subcompanyid = '" + fObjId + "' and versionid = " + versionId;
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where (a.canceled is null or a.canceled != '1') and (isvirtual is null or isvirtual != '1') and a.supsubcompanyid = '" + fObjId + "' and versionid = " + versionId +
" union select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and (a.supdepartmentid is null or a.supdepartmentid = '0') and (isvirtual is null or isvirtual != '1') and subcompanyid = '" + fObjId + "' and versionid = " + versionId;
}
} else {
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type" + numSql + " from " + SUB_COMPANY_TABLE + " a where (canceled is null or canceled != '1') and supsubcompanyid = '" + fObjId + "' and versionid = " + versionId +
" union select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type" + numSql + " from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and (supdepid is null or supdepid = '0') and subcompanyid = '" + fObjId + "' and versionid = " + versionId;
sql = "select " + SUB_COMPANY_ID + " as id,a.subcompanyname as name,'1' as type,a.job_num,a.staff_num from " + SUB_COMPANY_TABLE + " a where (canceled is null or canceled != '1') and supsubcompanyid = '" + fObjId + "' and versionid = " + versionId +
" union select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and (supdepid is null or supdepid = '0') and subcompanyid = '" + fObjId + "' and versionid = " + versionId;
}
break;
case "2":
if (hasVirtualFields) {
if (showVirtual) {
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual" + numSql + " from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and supdepartmentid = '" + fObjId + "' and versionid = " + versionId;
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (a.canceled is null or a.canceled != '1') and supdepartmentid = '" + fObjId + "' and versionid = " + versionId;
} else {
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual" + numSql + " from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and (isvirtual is null or isvirtual != '1') and a.supdepartmentid = '" + fObjId + "' and versionid = " + versionId;
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type ,isvirtual as isvitual,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and (isvirtual is null or isvirtual != '1') and a.supdepartmentid = '" + fObjId + "' and versionid = " + versionId;
}
} else {
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type" + numSql + " from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and supdepid = '" + fObjId + "' and versionid = " + versionId;
sql = "select " + DEPARTMENT_ID + " as id,a.departmentname as name,'2' as type,a.job_num,a.staff_num from " + DEPARTMENT_TABLE + " a where (canceled is null or canceled != '1') and supdepid = '" + fObjId + "' and versionid = " + versionId;
}
break;
default:
@ -1586,6 +1450,7 @@ public class ChartServiceImpl extends Service implements ChartService {
// 小于等于所选层级元素展开
chartPO.setExpand(inDepth(selectDepth, chartPO.getDepartmentDepth()) ? "1" : "0");
filterAndAddData(currentList, chartPO, hideDepartment);
//currentList.add(chartPO);
}
@ -1662,6 +1527,35 @@ public class ChartServiceImpl extends Service implements ChartService {
* @return boolean 包含子元素true,不包含子元素false
*/
private Boolean getHasChildren(String fType, String fObjId) {
//String sql = "";
//if (StringUtils.isNotBlank(fType)) {
// switch (fType) {
// case "0":
// sql = "select id from " + SUB_COMPANY_TABLE + " where (supsubcomid is null or supsubcomid = '0') and companyid = '" + fObjId + "'";
// break;
// case "1":
// if (hasVirtualFields && !showVirtual) {
// sql = "select a.id from " + SUB_COMPANY_TABLE + " a left join " + SUB_COMPANY_DEFINED_TABLE + " b on a.id = b.subcomid where (a.canceled is null or a.canceled != '1') and (b.fblx is null or b.fblx != '1') and a.supsubcomid = '" + fObjId + "' union select a.id from " + DEPARTMENT_TABLE + " a left join " + DEPARTMENT_DEFINED_TABLE + " b on a.id = b.deptid where (a.canceled is null or a.canceled != '1') and (a.supdepid is null or a.supdepid = '0') and (b.bmlx is null or b.bmlx != '1') and subcompanyid1 = '" + fObjId + "'";
// } else {
// sql = "select id from " + SUB_COMPANY_TABLE + " where (canceled is null or canceled != '1') and supsubcomid = '" + fObjId + "' union select id from " + DEPARTMENT_TABLE + " where (canceled is null or canceled != '1') and (supdepid is null or supdepid = '0') and subcompanyid1 = '" + fObjId + "'";
// }
// break;
// case "2":
// if (hasVirtualFields && !showVirtual) {
// sql = "select a.id from " + DEPARTMENT_TABLE + " a left join hrmdepartmentdefined b on a.id = b.deptid where (canceled is null or canceled != '1') and (b.bmlx is null or b.bmlx != '1') and a.supdepid = '" + fObjId + "'";
// } else {
// sql = "select id from " + DEPARTMENT_TABLE + " where (canceled is null or canceled != '1') and supdepid = '" + fObjId + "'";
// }
// break;
// default:
// break;
// }
//}
//if (StringUtils.isNotBlank(sql)) {
// RecordSet rs = new RecordSet();
// rs.executeQuery(sql);
// return rs.next();
//}
return false;
}
@ -1672,6 +1566,9 @@ public class ChartServiceImpl extends Service implements ChartService {
* @return 人员名称
*/
private String getDepartmentLeader(String ids) {
if (!isRealTime) {
return ids;
}
if (StringUtils.isBlank(ids)) {
return "";
}
@ -1724,10 +1621,10 @@ public class ChartServiceImpl extends Service implements ChartService {
* @param subCompany 上级Id
* @return SQL
*/
private static String getDepartmentTreeSql(String versionId, String dimension, String subCompany) {
private String getDepartmentTreeSql(String versionId, String dimension, String subCompany) {
// 是否展示当前数据
boolean isSearchCurrent = StringUtils.isBlank(versionId) || "0".equals(versionId);
boolean isNotCurrentDimension = StringUtils.isNotBlank(dimension) && !"0".equals(dimension);
boolean isCurrentDimension = StringUtils.isNotBlank(dimension) && !"0".equals(dimension);
boolean isDepartment = subCompany.startsWith("d");
String sql;
DBType dbType = DBType.get(new RecordSet().getDBType());
@ -1735,37 +1632,36 @@ public class ChartServiceImpl extends Service implements ChartService {
subCompany = subCompany.replace("d", "");
if (isSearchCurrent) {
sql = "select " + dbType.concat("d", "id") + "as id, id as value, departmentname as title, " + dbType.concat("d", "supdepid") + " as pId from hrmdepartment where (canceled is null or canceled != '1') and " + dbType.ifNull("supdepid", "0") + " = " + subCompany;
sql += " order by showorder,id ";
if (isNotCurrentDimension) {
if (isCurrentDimension) {
sql = "select " + dbType.concat("d", "id") + "as id, id as value, departmentname as title, " + dbType.concat("d", "supdepid") + " as pId from hrmdepartmentvirtual where (canceled is null or canceled != '1') and " + dbType.ifNull("supdepid", "0") + " = " + subCompany;
}
sql += " order by showorder,id ";
} else {
sql = "select " + dbType.concat("d", "departmentid") + "as id, departmentid as value, departmentname as title, " + dbType.concat("d", "supdepartmentid") + " as pId from jcl_chart_department where (canceled is null or canceled != '1') and " + dbType.ifNull("supdepartmentid", "0") + " = " + subCompany;
if (isNotCurrentDimension) {
if (isCurrentDimension) {
sql = "select " + dbType.concat("d", "departmentvirtualid") + "as id, departmentvirtualid as value, departmentname as title, " + dbType.concat("d", "supdepid") + " as pId from jcl_chart_departmentvirtual where (canceled is null or canceled != '1') and " + dbType.ifNull("supdepid", "0") + " = " + subCompany;
}
// 添加时间轴条件
sql += " and versionid = " + versionId;
}
} else {
// TODO 分权
if (isSearchCurrent) {
sql = "select " + dbType.concat("", "id") + " as id, id as value, subcompanyname as title, supsubcomid as pId, showorder from hrmsubcompany where (canceled is null or canceled != '1') and " + dbType.ifNull("supsubcomid", "0") + " = " + subCompany +
" union select " + dbType.concat("d", "id") + "as id, id as value, departmentname as title, subcompanyid1 as pId, showorder from hrmdepartment where (canceled is null or canceled != '1') and (supdepid is null or supdepid =0) and " + dbType.ifNull("subcompanyid1", "0") + " = " + subCompany;
sql += " order by showorder,id ";
if (isNotCurrentDimension) {
if (isCurrentDimension) {
sql = "select id as id, id as value, subcompanyname as title, supsubcomid as pId from hrmsubcompanyvirtual where (canceled is null or canceled != '1') and " + dbType.ifNull("supsubcomid", "0") + " = " + subCompany + " and companyid = '" + dimension + "' " +
" union select " + dbType.concat("d", "id") + "as id, id as value, departmentname as title, subcompanyid1 as pId from hrmdepartmentvirtual where (canceled is null or canceled != '1') and (supdepid is null or supdepid =0) and" + dbType.ifNull("subcompanyid1", "0") + " = " + subCompany;
}
sql += " order by showorder,id ";
} else {
sql = "select " + dbType.concat("", "subcompanyid") + " as id, subcompanyid as value, subcompanyname as title, supsubcompanyid as pId from jcl_chart_subcompany where (canceled is null or canceled != '1') and " + dbType.ifNull("supsubcompanyid", "0") + " = " + subCompany + " and versionid = " + versionId +
" union select " + dbType.concat("d", "departmentid") + "as id, departmentid as value, departmentname as title, subcompanyid as pId from jcl_chart_department where (canceled is null or canceled != '1') and (supdepartmentid is null or supdepartmentid =0) and " + dbType.ifNull("subcompanyid", "0") + " = " + subCompany + " and versionid = " + versionId ;
if (isNotCurrentDimension) {
sql = "select " + dbType.concat("", "subcompanyvirtualid") + " as id, subcompanyvirtualid as value, subcompanyname as title, supsubcompanyid as pId from jcl_chart_subcompanyvirtual where (canceled is null or canceled != '1') and " + dbType.ifNull("supsubcompanyid", "0") + " = " + subCompany + " and companyid = '" + dimension + "' " + " and versionid = " + versionId +
" union select " + dbType.concat("d", "departmentvirtualid") + "as id, departmentvirtualid as value, departmentname as title, subcompanyid as pId from jcl_chart_departmentvirtual where (canceled is null or canceled != '1') and (supdepid is null or supdepid =0) and" + dbType.ifNull("subcompanyid", "0") + " = " + subCompany + " and versionid = " + versionId ;
sql = "select " + dbType.concat("", "subcompanyid") + " as id, subcompanyid as value, subcompanyname as title, supsubcompanyid as pId from jcl_chart_subcompany where (canceled is null or canceled != '1') and " + dbType.ifNull("supsubcompanyid", "0") + " = " + subCompany +
" union select " + dbType.concat("d", "subcompanyid") + "as id, subcompanyid as value, departmentname as title, subcompanyid as pId from jcl_chart_department where (canceled is null or canceled != '1') and (supdepartmentid is null or supdepartmentid =0) and " + dbType.ifNull("subcompanyid", "0") + " = " + subCompany;
if (isCurrentDimension) {
sql = "select " + dbType.concat("", "subcompanyvirtualid") + " as id, subcompanyvirtualid as value, subcompanyname as title, supsubcompanyid as pId from jcl_chart_subcompanyvirtual where (canceled is null or canceled != '1') and " + dbType.ifNull("supsubcompanyid", "0") + " = " + subCompany + " and companyid = '" + dimension + "' " +
" union select " + dbType.concat("d", "departmentvirtualid") + "as id, departmentvirtualid as value, departmentname as title, subcompanyid as pId from jcl_chart_departmentvirtual where (canceled is null or canceled != '1') and (supdepid is null or supdepid =0) and" + dbType.ifNull("subcompanyid", "0") + " = " + subCompany;
}
//// 添加时间轴条件
//sql += " and versionid = " + versionId;
// 添加时间轴条件
sql += " and versionid = " + versionId;
}
}
return sql;
@ -1787,7 +1683,7 @@ public class ChartServiceImpl extends Service implements ChartService {
* @param subCompany 上级元素ID
* @return
*/
private static boolean judgeTreeLeaf(String versionId, String dimension, String subCompany) {
private boolean judgeTreeLeaf(String versionId, String dimension, String subCompany) {
RecordSet recordSet = new RecordSet();
String sql = getDepartmentTreeSql(versionId, dimension, subCompany);
recordSet.executeQuery(sql);

View File

@ -55,7 +55,7 @@ public class CodeSettingServiceImpl extends Service implements CodeSettingServic
break;
}
retmap.put("hasRight", hasRight);
return ReturnResult.successed(user,retmap);
return ReturnResult.successed(retmap);
}
@Override

View File

@ -85,19 +85,19 @@ public class CompServiceImpl extends Service implements CompService {
// 添加父级元素
List<CompListDTO> compListDTOS = CompBO.buildCompDTOList(allList, filterCompPOs, orderType.toString());
if ("asc".equalsIgnoreCase(orderType.toString())) {
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(CompListDTO::getShowOrder)).collect(Collectors.toList());
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(CompListDTO::getShowOrder)).collect(Collectors.toList());
} else {
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
}
List<CompListDTO> subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS);
pageInfos = new PageInfo<>(user, subList, CompListDTO.class);
pageInfos = new PageInfo<>(subList, CompListDTO.class);
pageInfos.setTotal(compListDTOS.size());
} else {
// 组合list
List<CompListDTO> compListDTOS = CompBO.buildCompDTOList(allList, orderType.toString());
List<CompListDTO> subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS);
pageInfos = new PageInfo<>(user, subList, CompListDTO.class);
pageInfos = new PageInfo<>(subList, CompListDTO.class);
pageInfos.setTotal(compListDTOS.size());
}
@ -150,7 +150,7 @@ public class CompServiceImpl extends Service implements CompService {
if (CollectionUtils.isNotEmpty(compPOS)) {
addDisableIds(disableIds, compPOS);
}
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supSubComId)), SystemEnv.getHtmlLabelName(547257,user.getLanguage()));
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supSubComId)), "上级分部不能选择分部本身及其下级分部");
}
new OrganizationSyncEc(user, LogModuleNameEnum.COMPANY, OperateTypeEnum.UPDATE, params).sync();
@ -178,13 +178,13 @@ public class CompServiceImpl extends Service implements CompService {
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> conditionItems = new ArrayList<>();
// 编号
SearchConditionItem subCompanyCodeItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547118, "subCompanyCode");
SearchConditionItem subCompanyCodeItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "编号", "subCompanyCode");
// 名称
SearchConditionItem subCompanyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "subCompanyDesc");
SearchConditionItem subCompanyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "subCompanyDesc");
// 简称
SearchConditionItem subCompanyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547181, "subCompanyName");
SearchConditionItem subCompanyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "简称", "subCompanyName");
// 上级公司
SearchConditionItem supSubComIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "supSubComId", "");
SearchConditionItem supSubComIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "supSubComId", "");
conditionItems.add(subCompanyCodeItem);
conditionItems.add(subCompanyDescItem);
@ -197,7 +197,7 @@ public class CompServiceImpl extends Service implements CompService {
@Override
public Map<String, List<MenuBtn>> getHasRight() {
return MenuBtn.getDatasNoBtnColum(user.getLanguage());
return MenuBtn.getDatasNoBtnColum();
}
@Override
@ -351,7 +351,7 @@ public class CompServiceImpl extends Service implements CompService {
retMap.put("conditions", groupList);
retMap.put("buttons", buttonsMap);
List<TopTab> topTabs = new ArrayList<>();
topTabs.add(TopTab.builder().color("#000000").groupId("4").showcount(false).title(SystemEnv.getHtmlLabelName(547180,user.getLanguage())).viewCondition("4").build());
topTabs.add(TopTab.builder().color("#000000").groupId("4").showcount(false).title("分部信息").viewCondition("4").build());
retMap.put("tabInfo", topTabs);
Map<String, Object> apiDatas = new HashMap<>();
@ -374,8 +374,8 @@ public class CompServiceImpl extends Service implements CompService {
public List<SearchConditionGroup> getMoveForm() {
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> condition = new ArrayList<>();
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547275, "164", "company", "compBrowser");
compBrowserItem.setHelpfulTip(SystemEnv.getHtmlLabelName(547258,user.getLanguage()));
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "转移到", "164", "company", "compBrowser");
compBrowserItem.setHelpfulTip("在不选择分部情况下,默认转移到集团下一级分部!!!");
condition.add(compBrowserItem);
addGroups.add(new SearchConditionGroup("", true, condition));
return addGroups;
@ -393,7 +393,7 @@ public class CompServiceImpl extends Service implements CompService {
if (CollectionUtils.isNotEmpty(compPOS)) {
addDisableIds(disableIds, compPOS);
}
OrganizationAssert.isFalse(disableIds.contains(targetCompanyId), SystemEnv.getHtmlLabelName(547259,user.getLanguage()));
OrganizationAssert.isFalse(disableIds.contains(targetCompanyId), "请勿选择当前分部本身及其子分部");
Map<String, Object> map = new HashMap<>();
map.put("id", companyId.toString());

View File

@ -18,7 +18,6 @@ import lombok.SneakyThrows;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.codec.binary.Base64;
import weaver.general.BaseBean;
import weaver.systeminfo.SystemEnv;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
@ -48,7 +47,7 @@ public class ConfigServiceImpl extends Service implements ConfigService {
public String ssoLogin(QTXConfigParam qtx) throws UnsupportedEncodingException {
String hkUrl;
BaseBean bb = new BaseBean();
String enable = bb.getPropValue("hrmOrganization", "enable");
String enable = bb.getPropValue("qtx_sso_login", "enable");
String userAgent = qtx.getUserAgent();
boolean termianal = MobileTerminalEnum.containsEnumValue(userAgent);
if (VALUE_ONE.equals(enable)) {
@ -72,18 +71,18 @@ public class ConfigServiceImpl extends Service implements ConfigService {
Map<String, Object> map = new HashMap<>(16);
BaseBean bb = new BaseBean();
List<EditTableColumns> columns = new ArrayList<>();
columns.add(EditTableColumns.builder().dataIndex("appSecret").key("appSecret").title(SystemEnv.getHtmlLabelName(547397,user.getLanguage())).width("20%").build());
columns.add(EditTableColumns.builder().dataIndex("url").key("url").title(SystemEnv.getHtmlLabelName(547398, user.getLanguage())).width("20%").build());
columns.add(EditTableColumns.builder().dataIndex("secondUrl").key("secondUrl").title(SystemEnv.getHtmlLabelName(547399,user.getLanguage())).width("20%").build());
columns.add(EditTableColumns.builder().dataIndex("pcAddress").key("pcAddress").title(SystemEnv.getHtmlLabelName(547400,user.getLanguage())).width("20%").build());
columns.add(EditTableColumns.builder().dataIndex("mobileAddress").key("mobileAddress").title(SystemEnv.getHtmlLabelName(547401,user.getLanguage())).width("20%").build());
columns.add(EditTableColumns.builder().dataIndex("appSecret").key("appSecret").title("密钥").width("20%").build());
columns.add(EditTableColumns.builder().dataIndex("url").key("url").title("外网").width("20%").build());
columns.add(EditTableColumns.builder().dataIndex("secondUrl").key("secondUrl").title("内网").width("20%").build());
columns.add(EditTableColumns.builder().dataIndex("pcAddress").key("pcAddress").title("PC地址").width("20%").build());
columns.add(EditTableColumns.builder().dataIndex("mobileAddress").key("mobileAddress").title("H5地址").width("20%").build());
columns.forEach(editTableColumns -> editTableColumns.setCom(getFieldDetailInfo(editTableColumns)));
QTXConfigPO qtxConfigPO = getConfigMapper().selectConfigInfo();
EditTableDatas datas = new EditTableDatas();
if (Objects.nonNull(qtxConfigPO)) {
BeanUtils.copyProperties(datas, qtxConfigPO);
}
map.put("isopenconfig",bb.getPropValue("hrmOrganization","enable"));
map.put("isopenconfig",bb.getPropValue("qtx_sso_login","enable"));
map.put("columns",columns);
map.put("datas", Collections.singletonList(datas));
return map;
@ -93,7 +92,7 @@ public class ConfigServiceImpl extends Service implements ConfigService {
@Override
public int saveConfigInfo(QTXConfigPO qtxConfigPO, String isopenconfig) {
ConfigOperator ConfigOperator = new ConfigOperator();
ConfigOperator.setProp("hrmOrganization.properties", "enable", isopenconfig);
ConfigOperator.setProp("qtx_sso_login.properties", "enable", isopenconfig);
qtxConfigPO.setCreator(user.getUID());
qtxConfigPO.setCreateDate(OrganizationDateUtil.getFormatLocalDate(LocalDate.now()));
getConfigMapper().deleteAll();

View File

@ -13,6 +13,7 @@ import com.engine.hrm.entity.RuleCodeType;
import com.engine.hrm.service.impl.OrganizationServiceImpl;
import com.engine.organization.component.OrganizationWeaTable;
import com.engine.organization.entity.TopTab;
import com.engine.organization.entity.codesetting.po.CodeRulePO;
import com.engine.organization.entity.company.bo.CompBO;
import com.engine.organization.entity.company.po.CompPO;
import com.engine.organization.entity.department.bo.DepartmentBO;
@ -20,12 +21,15 @@ import com.engine.organization.entity.department.dto.DepartmentListDTO;
import com.engine.organization.entity.department.param.*;
import com.engine.organization.entity.department.po.DepartmentPO;
import com.engine.organization.entity.department.vo.SingleDeptTreeVO;
import com.engine.organization.entity.job.bo.JobBO;
import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.job.vo.SingleJobTreeVO;
import com.engine.organization.entity.searchtree.SearchTree;
import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.enums.LogModuleNameEnum;
import com.engine.organization.enums.OperateTypeEnum;
import com.engine.organization.exception.OrganizationRunTimeException;
import com.engine.organization.mapper.codesetting.CodeRuleMapper;
import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.job.JobMapper;
@ -71,6 +75,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
return MapperProxyFactory.getProxy(DepartmentMapper.class);
}
private static JobMapper getJobMapper() {
return MapperProxyFactory.getProxy(JobMapper.class);
}
private CompMapper getCompMapper() {
return MapperProxyFactory.getProxy(CompMapper.class);
}
@ -82,7 +90,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
List<DepartmentPO> departmentPOS = MapperProxyFactory.getProxy(DepartmentMapper.class).listAll("showOrder");
PageInfo<DepartmentPO> pageInfo = new PageInfo<>(departmentPOS);
List<SingleDeptTreeVO> singleDeptTreeVOS = DepartmentBO.buildSingleDeptTreeVOS(departmentPOS, param.getParentComp());
PageInfo<SingleDeptTreeVO> pageInfos = new PageInfo<>(user, singleDeptTreeVOS, SingleDeptTreeVO.class);
PageInfo<SingleDeptTreeVO> pageInfos = new PageInfo<>(singleDeptTreeVOS, SingleDeptTreeVO.class);
pageInfos.setTotal(pageInfo.getTotal());
pageInfos.setPageNum(param.getCurrent());
pageInfos.setPageSize(param.getPageSize());
@ -92,9 +100,11 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
@Override
public PageInfo<SingleJobTreeVO> getJobListByPid(QuerySingleDeptListParam param) {
List<SingleJobTreeVO> singleDeptTreeVOS = MapperProxyFactory.getProxy(JobMapper.class).jobSearchByDept(param.getParentDept());
PageInfo<SingleJobTreeVO> pageInfos = new PageInfo<>(user, singleDeptTreeVOS, SingleJobTreeVO.class);
pageInfos.setTotal(singleDeptTreeVOS.size());
List<JobPO> jobPOS = MapperProxyFactory.getProxy(JobMapper.class).listAll();
PageInfo<JobPO> pageInfo = new PageInfo<>(jobPOS);
List<SingleJobTreeVO> singleDeptTreeVOS = JobBO.buildSingleJobTreeVOS(jobPOS, param.getParentDept());
PageInfo<SingleJobTreeVO> pageInfos = new PageInfo<>(singleDeptTreeVOS, SingleJobTreeVO.class);
pageInfos.setTotal(pageInfo.getTotal());
pageInfos.setPageNum(param.getCurrent());
pageInfos.setPageSize(param.getPageSize());
return pageInfos;
@ -129,24 +139,24 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
// 通过子级遍历父级元素
if (filter) {
// 根据条件获取元素
List<DepartmentPO> filterDeptPOs = getDepartmentMapper().listByFilterAll(departmentPO, orderSql);
List<DepartmentPO> filterDeptPOs = getDepartmentMapper().listByFilter(departmentPO, orderSql);
new DetachUtil(user).filterDepartmentList(filterDeptPOs);
// 添加父级元素
List<DepartmentListDTO> compListDTOS = DepartmentBO.buildDeptDTOList(allList, filterDeptPOs, orderType.toString());
if ("asc".equalsIgnoreCase(orderType.toString())) {
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
} else {
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
}
List<DepartmentListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
pageInfos = new PageInfo<>(user, DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
pageInfos = new PageInfo<>(DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
pageInfos.setTotal(compListDTOS.size());
} else {
// 组合list
List<DepartmentListDTO> compListDTOS = DepartmentBO.buildDeptDTOList(allList, orderType.toString());
List<DepartmentListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
pageInfos = new PageInfo<>(user, DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
pageInfos = new PageInfo<>(DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
pageInfos.setTotal(compListDTOS.size());
}
@ -202,7 +212,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if (CollectionUtils.isNotEmpty(deptListByPId)) {
addDisableIds(disableIds, deptListByPId);
}
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supDepId)), SystemEnv.getHtmlLabelName(547411,user.getLanguage()));
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supDepId)), "上级部门不能选择部门本身及其下级部门");
}
new OrganizationSyncEc(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.UPDATE, params).sync();
@ -221,13 +231,13 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> conditionItems = new ArrayList<>();
// 编号
SearchConditionItem departmentCodeItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547118, "departmentCode");
SearchConditionItem departmentCodeItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "编号", "departmentCode");
// 名称
SearchConditionItem departmentNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "departmentName");
SearchConditionItem departmentNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "departmentName");
// 所属分部
SearchConditionItem subCompanyId1Item = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "subCompanyId1", "");
SearchConditionItem subCompanyId1Item = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "subCompanyId1", "");
// 上级部门
SearchConditionItem supDepIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547189, "4", "supDepId", "");
SearchConditionItem supDepIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级部门", "4", "supDepId", "");
conditionItems.add(departmentCodeItem);
conditionItems.add(departmentNameItem);
@ -241,16 +251,16 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
@Override
public Map<String, List<MenuBtn>> getHasRight() {
MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName(SystemEnv.getHtmlLabelName(547117,user.getLanguage())).type("BTN_Addnew").build();
Map<String, List<MenuBtn>> datasNoBtnColum = MenuBtn.getDatasNoBtnColum(user.getLanguage());
datasNoBtnColum.get("topMenu").add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("export").menuIcon("icon-coms-export").menuName(SystemEnv.getHtmlLabelName(547187,user.getLanguage())).type("BTN_Export").build());
datasNoBtnColum.get("rightMenu").add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("export").menuIcon("icon-coms-export").menuName(SystemEnv.getHtmlLabelName(547187,user.getLanguage())).type("BTN_Export").build());
MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新增").type("BTN_Addnew").build();
Map<String, List<MenuBtn>> datasNoBtnColum = MenuBtn.getDatasNoBtnColum();
datasNoBtnColum.get("topMenu").add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("export").menuIcon("icon-coms-export").menuName("全部导出").type("BTN_Export").build());
datasNoBtnColum.get("rightMenu").add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("export").menuIcon("icon-coms-export").menuName("全部导出").type("BTN_Export").build());
return datasNoBtnColum;
}
@Override
public Map<String, Object> getDeptBaseForm(Map<String, Object> params) {
OrganizationAssert.notNull(params.get("viewAttr"), SystemEnv.getHtmlLabelName(547260,user.getLanguage()));
OrganizationAssert.notNull(params.get("viewAttr"), "请标识操作类型");
// 2编辑 1查看
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
@ -395,7 +405,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
resultMap.put("conditions", groupList);
resultMap.put("id", id);
List<TopTab> topTabs = new ArrayList<>();
topTabs.add(TopTab.builder().color("#000000").groupId("4").showcount(false).title(SystemEnv.getHtmlLabelName(547412,user.getLanguage())).viewCondition("4").build());
topTabs.add(TopTab.builder().color("#000000").groupId("4").showcount(false).title("部门信息").viewCondition("4").build());
resultMap.put("tabInfo", topTabs);
Map<String, Object> apiDatas = new HashMap<>();
@ -420,9 +430,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
public List<SearchConditionGroup> getCopyForm() {
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> condition = new ArrayList<>();
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, 547261, "164", "company", "");
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "复制到", "164", "company", "");
compBrowserItem.setRules("required|string");
SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, SystemEnv.getHtmlLabelName(547262,user.getLanguage()), "copySubDept");
SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, "复制子部门信息", "copySubDept");
copySubDeptItem.setDetailtype(2);
condition.add(compBrowserItem);
condition.add(copySubDeptItem);
@ -440,7 +450,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
public int copyDepartment(DeptCopyParam copyParam) {
// 批量复制后续优化
HasRightUtil.hasRight(user, RIGHT_NAME, false);
OrganizationAssert.notBlank(copyParam.getCompany(), SystemEnv.getHtmlLabelName(547263,user.getLanguage()));
OrganizationAssert.notBlank(copyParam.getCompany(), "请指定需要复制的公司/分部");
int insertCount = 0;
// 需复制的部门
List<Integer> idList = Arrays.stream(copyParam.getIds().split(",")).map(Integer::parseInt).collect(Collectors.toList());
@ -456,6 +466,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
private void recursionCopyDept(Integer originalDeptId, Integer parentDepartmentId, Integer companyId, Double maxShowOrder, String copyJob, String copySubDept, String copySubJob) {
// 源部门
DepartmentPO deptById = getDepartmentMapper().getDeptById(originalDeptId);
long timeMillis = System.currentTimeMillis();
// 处理自动编号
deptById.setDepartmentCode(null);
// 设置上级分部
@ -469,6 +480,19 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
Map<String, Object> syncMap = addEcDepartment(deptById);
String ecDepartmentID = Util.null2String(syncMap.get("id"));
OrganizationAssert.isTrue(StringUtils.isNotBlank(ecDepartmentID), syncMap.get("message").toString());
// 更新组织架构图
// new DepartmentTriggerRunnable(deptById.getId()).run();
// 复制当前部门岗位信息
//if ("1".equals(copyJob)) {
// List<JobPO> jobPOS = MapperProxyFactory.getProxy(JobMapper.class).listJobsByDepartmentId(originalDeptId);
// jobPOS = jobPOS.stream().filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
// Integer maxJobOrder = MapperProxyFactory.getProxy(JobMapper.class).getMaxShowOrder();
// if (maxJobOrder == null) {
// maxJobOrder = 0;
// }
// recursionCopyJob(jobPOS, companyId, Integer.parseInt(ecDepartmentID), null, maxJobOrder, timeMillis);
//}
// 是否复制子部门信息
if ("1".equals(copySubDept)) {
@ -485,9 +509,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
public List<SearchConditionGroup> getMergeForm() {
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> condition = new ArrayList<>();
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, 547264, "4", "department", "");
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "合并到部门", "4", "department", "");
deptBrowserItem.setRules("required|string");
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, 547265, "mergeName");
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "合并后名称", "mergeName");
mergeNameItem.setRules("required|string");
condition.add(deptBrowserItem);
@ -505,10 +529,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
// 断言判断
OrganizationAssert.isFalse(null == targetDepartment, SystemEnv.getHtmlLabelName(547266,user.getLanguage()));
OrganizationAssert.isFalse(mergeParam.getId().equals(targetDepartment.getId()), SystemEnv.getHtmlLabelName(547267,user.getLanguage()));
OrganizationAssert.notNull(mergeParam.getDepartment(), SystemEnv.getHtmlLabelName(547268,user.getLanguage()));
OrganizationAssert.notBlank(mergeParam.getMergeName(), SystemEnv.getHtmlLabelName(547270,user.getLanguage()));
OrganizationAssert.isFalse(null == targetDepartment, "被合并部门数据有误,暂时无法合并");
OrganizationAssert.isFalse(mergeParam.getId().equals(targetDepartment.getId()), "所选部门与待合并部门一致,无需操作");
OrganizationAssert.notNull(mergeParam.getDepartment(), "请选择需要合并的部门");
OrganizationAssert.notBlank(mergeParam.getMergeName(), "请输入合并后的名称");
// 不可选择合并的数据本身及子部门
Set<Integer> disableIds = new HashSet<>();
@ -518,7 +542,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if (CollectionUtils.isNotEmpty(deptListByPId)) {
addDisableIds(disableIds, deptListByPId);
}
OrganizationAssert.isFalse(disableIds.contains(targetDepartment.getId()), SystemEnv.getHtmlLabelName(547271,user.getLanguage()));
OrganizationAssert.isFalse(disableIds.contains(targetDepartment.getId()), "请勿选择当前部门本身及其子部门");
// 查询该部门下一级部门
List<DepartmentPO> firstChildDeptList = getDepartmentMapper().getDeptListByPId(mergeParam.getId());
@ -527,24 +551,41 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
departmentPO.setSupDepId(targetDepartment.getId());
departmentPO.setSubCompanyId1(targetDepartment.getSubCompanyId1());
updateEcDepartment(departmentPO);
// 更新组织架构图
// new DepartmentTriggerRunnable(departmentPO.getId()).run();
}
// 查询该部门一级岗位更新岗位所属分部所属部门
//List<JobPO> firstChildJobList = getJobMapper().listJobsByDepartmentId(mergeParam.getId());
//firstChildJobList = firstChildJobList.stream().filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
// 批量更新部门所属分部
RecordSet rs = new RecordSet();
String targetEcDeptId = targetDepartment.getId().toString();
String mergeEcDeptId = mergeParam.getId().toString();
//rs.executeUpdate("update jcl_org_job set parent_comp =?,ec_company =?,parent_dept =?,ec_department =? where ec_department =?", targetDepartment.getSubCompanyId1(), targetDepartment.getSubCompanyId1(), targetDepartment.getId(), targetEcDeptId, mergeParam.getId());
// 更新岗位组织架构图
//for (JobPO jobPO : firstChildJobList) {
// // 刷新组织架构图
// new JobTriggerRunnable(jobPO.getId()).run();
//}
// 更新当前部门下的人员
rs.executeUpdate("update hrmresource set SUBCOMPANYID1 =?,DEPARTMENTID =? where DEPARTMENTID =?", targetDepartment.getSubCompanyId1(), targetEcDeptId, mergeEcDeptId);
//new RecordSet().executeUpdate("update jcl_org_hrmresource set company_id =? ,ec_company = ? ,department_id = ?, ec_department = ?where department_id =?", targetDepartment.getParentComp(), targetDepartment.getEcCompany(), targetDepartment.getId(), targetEcDeptId, mergeParam.getId());
//List<Long> hrmResourceIds = getSystemDataMapper().getHrmResourceIdsByDept(mergeParam.getId().toString());
//// 更新人员组织架构图
//for (Long hrmResourceId : hrmResourceIds) {
// new HrmResourceTriggerRunnable(hrmResourceId).run();
//}
// 更新子部门下岗位的所属分部
for (DepartmentPO departmentPO : firstChildDeptList) {
List<DepartmentPO> deptList = getDepartmentMapper().getDeptListByPId(departmentPO.getId());
forbiddenChildTag(targetDepartment.getSubCompanyId1(), deptList);
}
// 原部门删除
// DepartmentPO mergeDepartment = getDepartmentMapper().getDeptById(mergeParam.getId());
// 删除部门先更改原部门名称释放原部门名称然后删除
DepartmentPO sourceDepartmentPO = getDepartmentMapper().getDeptById(mergeParam.getId());
sourceDepartmentPO.setDepartmentName(sourceDepartmentPO.getDepartmentName() + SystemEnv.getHtmlLabelName(547272,user.getLanguage()));
sourceDepartmentPO.setDepartmentMark(sourceDepartmentPO.getDepartmentMark() + SystemEnv.getHtmlLabelName(547272,user.getLanguage()));
sourceDepartmentPO.setDepartmentName(sourceDepartmentPO.getDepartmentName() + "_被合并");
sourceDepartmentPO.setDepartmentMark(sourceDepartmentPO.getDepartmentMark() + "_被合并");
updateEcDepartment(sourceDepartmentPO);
Map<String, Object> map = new HashMap<>();
map.put("id", Util.null2String(mergeParam.getId()));
@ -552,12 +593,14 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
// 删除原部门下的岗位
// 更新组织架构图
// new DepartmentTriggerRunnable(mergeDepartment).run();
// 更新部门合并后名称
targetDepartment.setDepartmentName(mergeParam.getMergeName());
targetDepartment.setDepartmentMark(mergeParam.getMergeName());
updateEcDepartment(targetDepartment);
// 更新组织架构图
// new DepartmentTriggerRunnable(oldFParentId, targetDepartment.getId()).run();
return 0;
}
@ -565,16 +608,16 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
public List<SearchConditionGroup> getMoveForm() {
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> condition = new ArrayList<>();
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547273, "164", "company", "");
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547274, "4", "department", "");
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择分部", "164", "company", "");
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择部门", "4", "department", "");
List<SearchConditionOption> selectOptions = new ArrayList<>();
SearchConditionOption compOption = new SearchConditionOption("0", SystemEnv.getHtmlLabelName(547332,user.getLanguage()));
SearchConditionOption deptOption = new SearchConditionOption("1", SystemEnv.getHtmlLabelName(547331,user.getLanguage()));
SearchConditionOption compOption = new SearchConditionOption("0", "分部");
SearchConditionOption deptOption = new SearchConditionOption("1", "部门");
selectOptions.add(compOption);
selectOptions.add(deptOption);
SearchConditionItem moveTypeItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, 547275, "moveType");
SearchConditionItem moveTypeItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "转移到", "moveType");
moveTypeItem.setDetailtype(3);
moveTypeItem.setValue("0");
@ -588,34 +631,47 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
@Override
public int moveDepartment(DepartmentMoveParam moveParam) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
OrganizationAssert.notBlank(moveParam.getMoveType(), SystemEnv.getHtmlLabelName(547276,user.getLanguage()));
OrganizationAssert.notBlank(moveParam.getMoveType(), "请选择转移类型");
DepartmentPO deptById = getDepartmentMapper().getDeptById(moveParam.getId());
// 0公司/分部 1部门
if ("0".equals(moveParam.getMoveType())) {
Integer company = moveParam.getCompany();
OrganizationAssert.notNull(company, SystemEnv.getHtmlLabelName(547277,user.getLanguage()));
OrganizationAssert.notNull(company, "请选择要转移到的分部");
deptById.setSubCompanyId1(company);
deptById.setSupDepId(null);
// 更新组织架构图
// new DepartmentTriggerRunnable(company.toString(), deptById).run();
} else if ("1".equals(moveParam.getMoveType())) {
Integer departmentId = moveParam.getDepartment();
OrganizationAssert.notNull(departmentId, SystemEnv.getHtmlLabelName(547278,user.getLanguage()));
OrganizationAssert.notNull(departmentId, "请选择要转移到的部门");
List<DepartmentPO> deptListByPId = getDepartmentMapper().getDeptListByPId(moveParam.getId());
Set<Integer> disableIds = new HashSet<>();
disableIds.add(moveParam.getId());
if (CollectionUtils.isNotEmpty(deptListByPId)) {
addDisableIds(disableIds, deptListByPId);
}
OrganizationAssert.isFalse(disableIds.contains(departmentId), SystemEnv.getHtmlLabelName(547271,user.getLanguage()));
OrganizationAssert.isFalse(disableIds.contains(departmentId), "请勿选择当前部门本身及其子部门");
deptById.setSupDepId(departmentId);
DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(departmentId);
deptById.setSubCompanyId1(parentDepartment.getSubCompanyId1());
// 更新组织架构图
// new DepartmentTriggerRunnable(Integer.toString(100000000 + department.intValue()), deptById).run();
}
// 更新EC部门
updateEcDepartment(deptById);
// 刷新岗位分部
//refreshJobComp(deptById.getId(), deptById.getSubCompanyId1());
List<DepartmentPO> deptList = getDepartmentMapper().getDeptListByPId(deptById.getId());
// 更新当前部门下的人员
// new RecordSet().executeUpdate("update hrmresource set SUBCOMPANYID1 =? where DEPARTMENTID = ?", deptById.getSubCompanyId1(), deptById.getId());
//// 更新人员组织架构图
//List<Long> hrmResourceIds = getSystemDataMapper().getHrmResourceIdsByDept(deptById.getId().toString());
//for (Long hrmResourceId : hrmResourceIds) {
// new HrmResourceTriggerRunnable(hrmResourceId).run();
//}
forbiddenChildTag(deptById.getSubCompanyId1(), deptList);
// 递归更新下级部门岗位
return 1;
@ -639,7 +695,8 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
String supId = "";
String ftype = "";
String querySupIdSql;
OrganizationAssert.isFalse("-1".equals(dragPostion), SystemEnv.getHtmlLabelName(547279,user.getLanguage()));
// OrganizationAssert.isFalse("s".equals(sourceType) && "d".equals(targetType), "分部不能转移到部门下");
OrganizationAssert.isFalse("-1".equals(dragPostion), "分部、部门不能转移至与集团平级");
if ("s".equals(targetType)) {// 分部
querySupIdSql = "select companyId as supComId,supsubcomid as supId,'s' as ftype from hrmsubcompany where id = ?";
} else {
@ -656,7 +713,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
Map<String, Object> params = new HashMap<>();
params.put("id", sourceId);
if ("0".equals(dragPostion)) {//内部
OrganizationAssert.isFalse("d".equals(targetType), SystemEnv.getHtmlLabelName(547280,user.getLanguage()));
OrganizationAssert.isFalse("d".equals(targetType), "分部不能拖拽至部门下");
if ("c".equals(targetType)) {// 集团下上级分部为0
params.put("supsubcomid", "0");
} else if ("s".equals(targetType)) {
@ -666,7 +723,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if ("s".equals(targetType)) {// 分部外平级
params.put("supsubcomid", supId);
} else {// 部门外找上级
OrganizationAssert.isFalse("d".equals(ftype), SystemEnv.getHtmlLabelName(547280,user.getLanguage()));
OrganizationAssert.isFalse("d".equals(ftype), "分部不能拖拽至部门下");
params.put("supsubcomid", supId);
}
}
@ -675,7 +732,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
List<DepartmentPO> deptListByPId;
Set<Integer> disableIds = new HashSet<>();
if ("0".equals(dragPostion)) {//内部
OrganizationAssert.isFalse("c".equals(targetType), SystemEnv.getHtmlLabelName(547281,user.getLanguage()));
OrganizationAssert.isFalse("c".equals(targetType), "部门不能拖拽至集团下");
if ("s".equals(targetType)) {
deptById.setSubCompanyId1(Util.getIntValue(targetId));
deptById.setSupDepId(null);
@ -685,14 +742,14 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
if (CollectionUtils.isNotEmpty(deptListByPId)) {
addDisableIds(disableIds, deptListByPId);
}
OrganizationAssert.isFalse("d".equals(targetType) && disableIds.contains(Util.getIntValue(targetId)), SystemEnv.getHtmlLabelName(547271,user.getLanguage()));
OrganizationAssert.isFalse("d".equals(targetType) && disableIds.contains(Util.getIntValue(targetId)), "请勿选择当前部门本身及其子部门");
deptById.setSupDepId(Util.getIntValue(targetId));
DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(Util.getIntValue(targetId));
deptById.setSubCompanyId1(parentDepartment.getSubCompanyId1());
}
} else {//外部
if ("s".equals(targetType)) {
OrganizationAssert.isFalse("0".equals(supId), SystemEnv.getHtmlLabelName(547281,user.getLanguage()));
OrganizationAssert.isFalse("0".equals(supId), "部门不能拖拽至集团下");
deptById.setSubCompanyId1(Util.getIntValue(supId));
deptById.setSupDepId(null);
} else {
@ -728,6 +785,19 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
// 更新EC表部门
updateEcDepartment(departmentPO);
// 更新组织架构图
// new DepartmentTriggerRunnable(departmentPO.getId()).run();
// 刷新岗位所属分部
//refreshJobComp(departmentPO.getId(), subCompanyId1);
// 更新当前部门下的人员
// String ecDepartmentId = EcHrmRelationUtil.getEcDepartmentId(departmentPO.getId().toString());
//new RecordSet().executeUpdate("update hrmresource set SUBCOMPANYID1 =? where DEPARTMENTID = ?", ecCompanyId, ecDepartmentId);
//new RecordSet().executeUpdate("update jcl_org_hrmresource set company_id =? ,ec_company = ? where department_id =?", parentComp, ecCompanyId, departmentPO.getId());
//List<Long> hrmResourceIds = getSystemDataMapper().getHrmResourceIdsByDept(departmentPO.getId().toString());
//// 更新人员组织架构图
//for (Long hrmResourceId : hrmResourceIds) {
// new HrmResourceTriggerRunnable(hrmResourceId).run();
//}
List<DepartmentPO> childList = getDepartmentMapper().getDeptListByPId(departmentPO.getId());
forbiddenChildTag(subCompanyId1, childList);
}
@ -789,6 +859,23 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
}
}
/**
* 判断编号是否重复
*
* @return
*/
public static String repeatDetermine(String deptNo) {
CodeRulePO codeRuleByType = MapperProxyFactory.getProxy(CodeRuleMapper.class).getCodeRuleByType(RuleCodeType.DEPARTMENT.getValue());
if (StringUtils.isNotBlank(deptNo)) {
deptNo = CodeRuleUtil.generateCode(RuleCodeType.DEPARTMENT, deptNo);
List<DepartmentPO> list = getDepartmentMapper().listByNo(Util.null2String(deptNo));
OrganizationAssert.isEmpty(list, "编号不允许重复");
} else {
OrganizationAssert.isTrue(null != codeRuleByType && "1".equals(codeRuleByType.getSerialEnable()), "编号不允许为空");
deptNo = autoCreateCompanyNo();
}
return deptNo;
}
/**
* 自动编号处理
@ -848,7 +935,19 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
}
}
/**
* 更新岗位的所属分部
*
* @param parentDepartment
* @param parentComp
*/
private void refreshJobComp(Integer parentDepartment, Integer parentComp) {
List<JobPO> jobPOS = getJobMapper().listJobsByDepartmentId(parentDepartment);
jobPOS = jobPOS.stream().filter(item -> null == item.getParentJob() || 0 == item.getParentJob()).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(jobPOS)) {
getJobMapper().updateJobCompany(jobPOS.stream().map(JobPO::getId).collect(Collectors.toList()), parentComp, parentComp);
}
}
private List<SearchConditionGroup> getDepartmentConditionGroups(Boolean showAll, Map<String, Object> params) {
List<SearchConditionGroup> groupList = new ArrayList<>();

View File

@ -8,26 +8,18 @@ import com.cloudstore.dev.api.service.Service_DevTable;
import com.cloudstore.eccom.constant.WeaBoolAttr;
import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.organization.component.OrganizationWeaTable;
import com.engine.organization.entity.department.bo.DepartmentBO;
import com.engine.organization.entity.department.dto.DepartmentListDTO;
import com.engine.organization.entity.department.po.DepartmentPO;
import com.engine.organization.entity.hrmresource.po.JclOrgCustomTemplatePO;
import com.engine.organization.entity.hrmresource.po.SearchTemplatePO;
import com.engine.organization.entity.hrmresource.vo.HrmResourceVO;
import com.engine.organization.entity.staff.po.StaffPO;
import com.engine.organization.entity.staff.vo.StaffTableVO;
import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.resource.HrmResourceMapper;
import com.engine.organization.mapper.resource.JclOrgCustomTemplateMapper;
import com.engine.organization.mapper.resource.ResourceMapper;
import com.engine.organization.mapper.staff.StaffMapper;
import com.engine.organization.mapper.staff.StaffPlanMapper;
import com.engine.organization.service.ExportCommonService;
import com.engine.organization.transmethod.JobTransMethod;
import com.engine.organization.transmethod.StaffPlanTransMethod;
import com.engine.organization.transmethod.StaffTransMethod;
import com.engine.organization.util.HrmI18nUtil;
import com.engine.organization.util.PageInfoSortUtil;
import com.engine.organization.util.db.MapperProxyFactory;
@ -35,15 +27,12 @@ import com.engine.organization.util.detach.DetachUtil;
import com.engine.organization.util.excel.ExcelUtil;
import org.apache.commons.lang.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.company.DepartmentComInfo;
import weaver.hrm.company.SubCompanyComInfo;
import weaver.systeminfo.SystemEnv;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
@ -60,15 +49,6 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
return MapperProxyFactory.getProxy(DepartmentMapper.class);
}
private static StaffMapper getStaffMapper() {
return MapperProxyFactory.getProxy(StaffMapper.class);
}
private static StaffPlanMapper getStaffPlanMapper() {
return MapperProxyFactory.getProxy(StaffPlanMapper.class);
}
@Override
public XSSFWorkbook resourceExport(List<Long> ids) {
@ -124,7 +104,7 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
List<String> headerList = new ArrayList<>();
List<Object> headerNameList = new ArrayList<>();
OrganizationWeaTable<HrmResourceVO> table = new OrganizationWeaTable<>(user, HrmResourceVO.class);
String sqlWhere = " where 1 = 1 and (t.accounttype is null or t.accounttype != 1)";
String sqlWhere = " where 1 = 1 and t.status < 4 and (t.accounttype is null or t.accounttype != 1)";
// 分权查询
DetachUtil detachUtil = new DetachUtil(user);
String parentCompanyIds = detachUtil.getJclRoleLevels();
@ -139,35 +119,21 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
table.setSqlwhere(sqlWhere);
List<WeaTableColumn> weaTableColumnList = new ArrayList<>();
List<String> fields = new ArrayList<>();
HrmResourceServiceImpl hrmResourceService = ServiceUtil.getService(HrmResourceServiceImpl.class,user);
HrmResourceServiceImpl hrmResourceService = new HrmResourceServiceImpl();
List<SearchConditionGroup> allConditions = hrmResourceService.getAllConditions();
JclOrgCustomTemplatePO jclOrgCustomTemplatePO = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).queryIsusedTemp("1", String.valueOf(user.getUID()));
List<String> columnList;
//2.是否存在通用模板
if (null == jclOrgCustomTemplatePO) {
jclOrgCustomTemplatePO = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).queryOverAll();
}
String columns = "";
if (jclOrgCustomTemplatePO != null) {
if (org.apache.commons.lang3.StringUtils.isNotBlank(jclOrgCustomTemplatePO.getBasicFields())) {
columns = jclOrgCustomTemplatePO.getBasicFields();
}
if (org.apache.commons.lang3.StringUtils.isNotBlank(jclOrgCustomTemplatePO.getPersonalFields())) {
columns = columns + "," + jclOrgCustomTemplatePO.getPersonalFields();
}
if (org.apache.commons.lang3.StringUtils.isNotBlank(jclOrgCustomTemplatePO.getWorkFields())) {
columns = columns + "," + jclOrgCustomTemplatePO.getWorkFields();
}
// 查询当前台账定制列
SearchTemplatePO usedCustomTemplate = MapperProxyFactory.getProxy(HrmResourceMapper.class).getUsedCustomTemplateByUser(user.getUID());
if (null == usedCustomTemplate) {
// 默认列定制
String selectKeys = "-1_hrm_lastname,-1_hrm_departmentid,-1_hrm_jobtitle,-1_hrm_mobile,-1_hrm_telephone,-1_hrm_managerid";
columnList = Arrays.asList(selectKeys.split(","));
} else {
//初次使用无模板初始值
columns = "-1_hrm_lastname,-1_hrm_departmentid,-1_hrm_subcompanyid1,-1_hrm_jobtitle,-1_hrm_mobile,-1_hrm_telephone,-1_hrm_managerid,-1_hrm_sporder";
columnList = hrmResourceService.getSelectKeys(usedCustomTemplate);
}
List<String> columnList = Arrays.asList(columns.split(","));
String propValue = new BaseBean().getPropValue("hrmOrganization", "orgId");
Map<String, WeaTableColumn> columnMap = new HashMap<>();
BigDecimal decimal = new BigDecimal(100 / columnList.size());
@ -175,40 +141,24 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
List<SearchConditionItem> items = allCondition.getItems();
for (SearchConditionItem item : items) {
String columnName = item.getDomkey()[0];
WeaTableColumn weaTableColumn = new WeaTableColumn();
if (columnName.equals("-1_cus_"+propValue)){
fields.add("t.id as " + hrmResourceService.buildTableSql(columnName).replace(".", "_"));
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getOrgValueExp");
}else{
fields.add(hrmResourceService.buildTableSql(columnName) + " as " + hrmResourceService.buildTableSql(columnName).replace(".", "_"));
// 导出专用转换去除html标签
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValueExp");
}
fields.add(hrmResourceService.buildTableSql(columnName) + " as " + hrmResourceService.buildTableSql(columnName).replace(".", "_"));
String scopeId = columnName.split("_")[0];
String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1);
weaTableColumn.setText(MapperProxyFactory.getProxy(HrmResourceMapper.class).queryLabelName(fieldName, scopeId, user.getLanguage()));
WeaTableColumn weaTableColumn = new WeaTableColumn();
weaTableColumn.setText(MapperProxyFactory.getProxy(HrmResourceMapper.class).queryLabelName(fieldName, scopeId));
weaTableColumn.setColumn(hrmResourceService.buildTableSql(columnName).replace(".", "_"));
weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE);
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValue");
weaTableColumn.setOtherpara(columnName);
//weaTableColumn.setWidth(decimal.setScale(2, RoundingMode.HALF_UP).doubleValue() + "%");
columnMap.put(columnName, weaTableColumn);
weaTableColumn.setWidth(decimal.setScale(2, RoundingMode.HALF_UP).doubleValue() + "%");
if (weaTableColumn.getDisplay().getBoolVal()) {
weaTableColumnList.add(weaTableColumn);
headerList.add(weaTableColumn.getColumn());
headerNameList.add(weaTableColumn.getText());
}
}
}
for (String columnName : columnList) {
WeaTableColumn weaTableColumn = columnMap.get(columnName);
if (weaTableColumn != null && weaTableColumn.getDisplay().getBoolVal()) {
weaTableColumnList.add(weaTableColumn);
headerList.add(weaTableColumn.getColumn());
headerNameList.add(weaTableColumn.getText());
}
}
// 增加id字段,跳转人员卡片
WeaTableColumn weaTableColumn = new WeaTableColumn();
weaTableColumn.setColumn("id");
@ -265,11 +215,10 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
@Override
public XSSFWorkbook departmentExport() {
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
String orderSql = PageInfoSortUtil.getSortSql("", " showorder ");
List<DepartmentPO> allList = getDepartmentMapper().listAll(orderSql);
new DetachUtil(user).filterDepartmentList(allList);
Map<Integer, DepartmentPO> poMaps = allList.stream().collect(Collectors.toMap(DepartmentPO::getId, item -> item));
List<DepartmentListDTO> dtoList = allList.stream().map(e ->
DepartmentListDTO
.builder()
@ -277,29 +226,25 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
.departmentMark(e.getDepartmentMark())
.departmentName(e.getDepartmentName())
.departmentCode(e.getDepartmentCode())
.subCompanyId1(e.getSubCompanyId1())
.supDepId(e.getSupDepId())
.subCompanyName((null == e.getSubCompanyId1() || 0 == e.getSubCompanyId1()) ? "" : subCompanyComInfo.getSubCompanyname(Util.null2String(e.getSubCompanyId1())))
.supDepName((null == e.getSupDepId() || 0 == e.getSupDepId()) ? "" : departmentComInfo.getDepartmentname(Util.null2String(e.getSupDepId())))
.subCompanyName(0 == e.getSubCompanyId1() ? "" : MapperProxyFactory.getProxy(CompMapper.class).listById(e.getSubCompanyId1()).getSubCompanyName())
.supDepName(null == poMaps.get(e.getSupDepId()) ? "" : poMaps.get(e.getSupDepId()).getDepartmentName())
.bmfzr(DepartmentBO.getEmployeeNameById(e.getId()))
.canceled(null == e.getCanceled() ? 0 : e.getCanceled())
.build()).collect(Collectors.toList());
int language = user.getLanguage();
String languageStr = String.valueOf(language);
// 1.工作簿名称
String sheetName = HrmI18nUtil.getI18nLabel(85368, language, "部门档案数据");
String sheetName = HrmI18nUtil.getI18nLabel(85368, "部门档案数据");
// 2.表头(后面动态获取)
List<List<Object>> excelSheetData = new ArrayList<>();
String[] header = {
HrmI18nUtil.getI18nLabel(547598, language, "部门名称"),
HrmI18nUtil.getI18nLabel(547118, language, "编号"),
HrmI18nUtil.getI18nLabel(547599, language, "部门简称"),
HrmI18nUtil.getI18nLabel(547128, language, "所属分部"),
HrmI18nUtil.getI18nLabel(547189, language, "上级部门"),
HrmI18nUtil.getI18nLabel(547190, language, "部门负责人"),
HrmI18nUtil.getI18nLabel(547607, language, "启用状态")
HrmI18nUtil.getI18nLabel( -93270, "部门名称"),
HrmI18nUtil.getI18nLabel( -93272, "编号"),
HrmI18nUtil.getI18nLabel( -93274, "部门简称"),
HrmI18nUtil.getI18nLabel( -93275, "所属分部"),
HrmI18nUtil.getI18nLabel( -93278, "上级部门"),
HrmI18nUtil.getI18nLabel( -93279, "部门负责人"),
HrmI18nUtil.getI18nLabel( -93280, "启用状态")
};
excelSheetData.add(Arrays.asList(header));
@ -307,78 +252,13 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
List<List<Object>> rows = new LinkedList<>();
for (DepartmentListDTO vo : dtoList) {
List<Object> row = new LinkedList<>();
row.add(Util.formatMultiLang(vo.getDepartmentName(), languageStr));
row.add(Util.formatMultiLang(vo.getDepartmentCode(), languageStr));
row.add(Util.formatMultiLang(vo.getDepartmentMark(), languageStr));
row.add(Util.formatMultiLang(vo.getSubCompanyName(), languageStr));
row.add(Util.formatMultiLang(vo.getSupDepName(), languageStr));
row.add(Util.formatMultiLang(vo.getBmfzr(), languageStr));
row.add(vo.getCanceled() == 0 ? SystemEnv.getHtmlLabelName(547186, language) : SystemEnv.getHtmlLabelName(547608,user.getLanguage()));
rows.add(row);
}
excelSheetData.addAll(rows);
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName);
}
@Override
public XSSFWorkbook staffExport(String planId) {
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
List<Integer> collect = Arrays.stream(planId.split(","))
.map(String::trim)
.map(Integer::parseInt)
.collect(Collectors.toList());
List<StaffPO> staffPOS = getStaffMapper().selectByPlanIds(collect);
int language = user.getLanguage();
String languageStr = String.valueOf(language);
List<StaffTableVO> voList = staffPOS.stream().map(e ->
StaffTableVO.builder()
.planId(getStaffPlanMapper().getStaffPlanByID(e.getPlanId()).getPlanName())
.controlDimension(StaffPlanTransMethod.getControlDimension(Util.null2String(e.getControlPolicy()),languageStr))
.compId(null == e.getCompId() ? "" : subCompanyComInfo.getSubCompanyname(Util.null2String(e.getCompId())))
.deptId(null == e.getDeptId() ? "/" : departmentComInfo.getDepartmentname(Util.null2String(e.getDeptId())))
.jobId(JobTransMethod.getSpanById(Util.null2String(e.getJobId())))
.staffNum(e.getStaffNum())
.permanentNum(e.getPermanentNum())
.freezeNum(e.getFreezeNum())
.lackStatus(StaffTransMethod.getLackSpan(Util.null2String(e.getLackStatus()),languageStr))
.build()
).collect(Collectors.toList());
// 1.工作簿名称
String sheetName = HrmI18nUtil.getI18nLabel(547733, language, "编制信息档案");
// 2.表头(后面动态获取)
List<List<Object>> excelSheetData = new ArrayList<>();
String[] header = {
HrmI18nUtil.getI18nLabel(547344, language, "方案"),
HrmI18nUtil.getI18nLabel(547293, language, "维度"),
HrmI18nUtil.getI18nLabel(547332, language, "分部"),
HrmI18nUtil.getI18nLabel(547331, language, "部门"),
HrmI18nUtil.getI18nLabel(547333, language, "岗位"),
HrmI18nUtil.getI18nLabel(547345, language, "编制数"),
HrmI18nUtil.getI18nLabel(547346, language, "在编数"),
HrmI18nUtil.getI18nLabel(547347, language, "冻结数"),
HrmI18nUtil.getI18nLabel(547348, language, "缺编状态")
};
excelSheetData.add(Arrays.asList(header));
//数据
List<List<Object>> rows = new LinkedList<>();
for (StaffTableVO vo : voList) {
List<Object> row = new LinkedList<>();
row.add(Util.formatMultiLang(vo.getPlanId(), languageStr));
row.add(vo.getControlDimension());
row.add(Util.formatMultiLang(vo.getCompId(), languageStr));
row.add(Util.formatMultiLang(vo.getDeptId(), languageStr));
row.add(Util.formatMultiLang(vo.getJobId(), languageStr));
row.add(vo.getStaffNum());
row.add(vo.getPermanentNum());
row.add(vo.getFreezeNum());
row.add(vo.getLackStatus());
row.add(vo.getDepartmentName());
row.add(vo.getDepartmentCode());
row.add(vo.getDepartmentMark());
row.add(vo.getSubCompanyName());
row.add(vo.getSupDepName());
row.add(vo.getBmfzr());
row.add(vo.getCanceled() == 0 ? "启用" : "未启用");
rows.add(row);
}
excelSheetData.addAll(rows);

View File

@ -4,7 +4,6 @@ import com.api.browser.bean.SearchConditionItem;
import com.engine.common.service.HrmCommonService;
import com.engine.common.service.impl.HrmCommonServiceImpl;
import com.engine.core.impl.Service;
import com.engine.organization.common.IgnoreCaseMap;
import com.engine.organization.entity.TopTab;
import com.engine.organization.entity.codesetting.po.CodeRulePO;
import com.engine.organization.entity.extend.ExtendInfoOperateType;
@ -20,6 +19,7 @@ import com.engine.organization.mapper.extend.*;
import com.engine.organization.mapper.personnelcard.CardButtonMapper;
import com.engine.organization.service.ExtService;
import com.engine.organization.util.OrganizationAssert;
import com.engine.organization.util.db.DBType;
import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -85,15 +85,9 @@ public class ExtServiceImpl extends Service implements ExtService {
ExtendInfoParams infoParams = ExtendInfoParams.builder().tableName(tableName).fields(fields).params(null).id(id).build();
Map<String, Object> compExtMap = getExtMapper().listExt(infoParams);
IgnoreCaseMap<Object> ignoreCaseMap = new IgnoreCaseMap<>();
if (null != compExtMap) {
for (Map.Entry<String, Object> entry : compExtMap.entrySet()) {
ignoreCaseMap.put(entry.getKey(), entry.getValue());
}
}
// 组装拓展页内容
for (ExtendInfoPO extendInfoPO : infoPOList) {
SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, ignoreCaseMap.get(extendInfoPO.getFieldName()));
SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, null == compExtMap ? null : compExtMap.get(DBType.isOracle() ? extendInfoPO.getFieldName().toUpperCase() : extendInfoPO.getFieldName()));
item.setFieldcol(16);
if (2 == viewAttr) {
if (CollectionUtils.isNotEmpty(readOnlyFieldList) && readOnlyFieldList.contains(extendInfoPO.getFieldName())) {
@ -302,11 +296,14 @@ public class ExtServiceImpl extends Service implements ExtService {
List<Long> groupIds = dtInfoPOList.stream().map(ExtendInfoPO::getExtendGroupId).distinct().collect(Collectors.toList());
Map<Long, List<ExtendInfoPO>> poMaps = dtInfoPOList.stream().collect(Collectors.groupingBy(ExtendInfoPO::getExtendGroupId));
boolean deleteFlag = true;
for (Long groupId : groupIds) {
int rowNum = Util.getIntValue((String) params.get("rownum" + groupId));
// 删除原有明细表数据
getExtDTMapper().deleteByMainID(tableName, id, groupId);
if (deleteFlag && rowNum > 0) {
// 删除原有明细表数据
getExtDTMapper().deleteByMainID(tableName, id, groupId);
deleteFlag = false;
}
List<ExtendInfoPO> filterS = poMaps.get(groupId);
for (int i = 0; i < rowNum; i++) {
Map<String, Object> map = new HashMap<>();
@ -322,9 +319,6 @@ public class ExtServiceImpl extends Service implements ExtService {
map.put("delete_type", 0);
map.put("create_time", new Date());
map.put("update_time", new Date());
// 去除value为null的元素
map.entrySet().removeIf(entry -> entry.getValue() == null);
getExtDTMapper().insertCompExtDT(tableName, map);
}
}

View File

@ -84,7 +84,7 @@ public class FieldDefinedServiceImpl extends Service implements FieldDefinedServ
for (ExtendTitlePO extendTitle : extendTitleList) {
Map<String, Object> tab = new HashMap<>();
tab.put("tabkey", idx++);
tab.put("title", Util.formatMultiLang(extendTitle.getTitle()));
tab.put("title", extendTitle.getTitle());
tab.put("isShow", extendTitle.getIsShow());
tab.put("groupid", String.valueOf(extendTitle.getId()));
tab.put("viewAttr", extendTitle.getIsSystemDefault() == 0 ? 1 : 2);

View File

@ -1,20 +1,17 @@
package com.engine.organization.service.impl;
import com.alibaba.fastjson.JSON;
import com.engine.organization.entity.staff.param.StaffOutParam;
import com.engine.organization.entity.staff.po.StaffPO;
import com.engine.organization.enums.ModuleTypeEnum;
import com.engine.organization.enums.StaffChangeEnum;
import com.engine.organization.exception.OrganizationRunTimeException;
import com.engine.organization.mapper.staff.StaffMapper;
import com.engine.organization.util.OrganizationAssert;
import com.engine.organization.util.db.MapperProxyFactory;
import lombok.SneakyThrows;
import org.apache.commons.collections.CollectionUtils;
import weaver.general.BaseBean;
import weaver.hrm.User;
import weaver.hrm.company.DepartmentComInfo;
import weaver.hrm.company.SubCompanyComInfo;
import weaver.systeminfo.SystemEnv;
import java.util.*;
import java.util.function.Function;
@ -36,16 +33,13 @@ public class FunctionOutStaffServiceImpl {
return MapperProxyFactory.getProxy(StaffMapper.class);
}
private User user;
FunctionOutStaffServiceImpl(User user){
FunctionOutStaffServiceImpl(){
affairFunctionS.put(StaffChangeEnum.ADD, this::addStaffNums);
affairFunctionS.put(StaffChangeEnum.REDUCE, this::reduceStaffNums);
affairFunctionS.put(StaffChangeEnum.FROZEN, this::frozenStaffNums);
affairFunctionS.put(StaffChangeEnum.ENTRY, this::entryAdd);
affairFunctionS.put(StaffChangeEnum.DIMISSION, this::dimissionReduce);
affairFunctionS.put(StaffChangeEnum.TRANSFER, this::transfer);
this.user = user;
}
@ -68,7 +62,7 @@ public class FunctionOutStaffServiceImpl {
.orElse(0);
Integer sums = staffPO.getPermanentNum() + staffPO.getFreezeNum();
if (staffPO.getControlPolicy().equals(HARDCONTROLLER)) {
OrganizationAssert.isFalse(difference.compareTo(sums) < 0, SystemEnv.getHtmlLabelName(547453,user.getLanguage()));
OrganizationAssert.isFalse(difference.compareTo(sums) < 0,"存在编制超编风险,请先修改控制策略");
}
staffPO.setStaffNum(difference < 0 ? 0 :difference);
buildStaffPO(staffPO);
@ -77,18 +71,13 @@ public class FunctionOutStaffServiceImpl {
private Integer frozenStaffNums(StaffOutParam param) {
StaffPO staffPO = select(param);
if (param.getNum() < 0) {
OrganizationAssert.isFalse(staffPO.getFreezeNum() == 0, SystemEnv.getHtmlLabelName(547949,user.getLanguage()));
}
List<Integer> numberF = Arrays.asList(staffPO.getFreezeNum(),param.getNum());
//1.增加冻结数 num为负数时为减少冻结数
//1.增加冻结数
Integer sum = numberF.stream()
.mapToInt(Integer::intValue)
.sum();
Integer sums = sum + staffPO.getPermanentNum();
if (staffPO.getControlPolicy().equals(HARDCONTROLLER)) {
OrganizationAssert.isFalse(sums.compareTo(staffPO.getStaffNum()) > 0, SystemEnv.getHtmlLabelName(547469,user.getLanguage()));
OrganizationAssert.isFalse(sum.compareTo(staffPO.getStaffNum()) > 0, "冻结数不能大于剩余编制数!");
}
staffPO.setFreezeNum(sum);
buildStaffPO(staffPO);
@ -105,30 +94,27 @@ public class FunctionOutStaffServiceImpl {
.sum();
staffPO.setPermanentNum(sum);
Integer sums = staffPO.getPermanentNum() + staffPO.getFreezeNum();
//强控策略下不容许超编
if (staffPO.getControlPolicy().equals(HARDCONTROLLER)) {
//冻结数释放
OrganizationAssert.isFalse((sums > staffPO.getStaffNum() && staffPO.getFreezeNum() > 0),SystemEnv.getHtmlLabelName(547470,user.getLanguage()));
OrganizationAssert.isFalse( sums > staffPO.getStaffNum(),SystemEnv.getHtmlLabelName(547471,user.getLanguage()));
OrganizationAssert.isFalse(sums.compareTo(staffPO.getStaffNum()) > 0,"强控策略下不容许超编");
}
//向上部门 分部在编数调整
upwardReviewSums(param);
//2.调整方式为流程时释放冻结数废弃 单独走冻结接口释放
// if (param.getChangeMode() == 1) {
// List<Integer> numbersF = Arrays.asList(staffPO.getFreezeNum(),param.getNum());
// int difference = numbersF.stream()
// .reduce((a, b) -> a - b)
// .orElse(0);
// staffPO.setFreezeNum(difference);
// }
//2.调整方式为流程时释放冻结数
if (param.getChangeMode() == 1) {
List<Integer> numbersF = Arrays.asList(staffPO.getFreezeNum(),param.getNum());
int difference = numbersF.stream()
.reduce((a, b) -> a - b)
.orElse(0);
staffPO.setFreezeNum(difference);
}
buildStaffPO(staffPO);
return staffMapper().updateStaff(staffPO);
}
private Integer dimissionReduce(StaffOutParam param) {
StaffPO staffPO = select(param);
OrganizationAssert.isFalse(param.getNum().compareTo(staffPO.getPermanentNum()) > 0,SystemEnv.getHtmlLabelName(547472,user.getLanguage()));
OrganizationAssert.isFalse(param.getNum().compareTo(staffPO.getPermanentNum()) > 0,"调整数量不可大于在编数");
List<Integer> numbers = Arrays.asList(staffPO.getPermanentNum(),param.getNum());
Integer difference = numbers.stream()
.reduce((a, b) -> a - b)
@ -137,13 +123,13 @@ public class FunctionOutStaffServiceImpl {
//向上部门 分部在编数调整
upwardReviewSums(param);
//2.调整方式为流程时释放冻结数
// if (param.getChangeMode() == 1) {
// List<Integer> numbersF = Arrays.asList(staffPO.getFreezeNum(),param.getNum());
// int differenceF = numbersF.stream()
// .reduce((a, b) -> a - b)
// .orElse(0);
// staffPO.setFreezeNum(differenceF);
// }
if (param.getChangeMode() == 1) {
List<Integer> numbersF = Arrays.asList(staffPO.getFreezeNum(),param.getNum());
int differenceF = numbersF.stream()
.reduce((a, b) -> a - b)
.orElse(0);
staffPO.setFreezeNum(differenceF);
}
buildStaffPO(staffPO);
return staffMapper().updateStaff(staffPO);
}
@ -230,11 +216,7 @@ public class FunctionOutStaffServiceImpl {
private StaffPO select(StaffOutParam param) {
List<StaffPO> staffPO = staffMapper().customSelect(param.getPlanId(), param.getCompany(), param.getDepartment(), param.getJob());
BaseBean bb = new BaseBean();
bb.writeLog("编制参数"+ JSON.toJSONString(param));
bb.writeLog("查询结果"+ JSON.toJSONString(staffPO));
bb.writeLog("user对象"+JSON.toJSONString(user));
OrganizationAssert.notEmpty(staffPO,SystemEnv.getHtmlLabelName(547474,user.getLanguage()));
OrganizationAssert.notEmpty(staffPO,"未查询到对应编制方案下的组织编制信息!");
return staffPO.get(0);
}

View File

@ -24,7 +24,6 @@ import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.StringUtil;
import weaver.general.Util;
import weaver.systeminfo.SystemEnv;
import java.util.*;
@ -75,7 +74,7 @@ public class GradeServiceImpl extends Service implements GradeService {
@Override
public int saveGrade(GradeSearchParam param) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
OrganizationAssert.isTrue(checkRepeatNo(param.getSchemeId(), param.getGradeNo(), null), SystemEnv.getHtmlLabelName(547177, user.getLanguage()));
OrganizationAssert.isTrue(checkRepeatNo(param.getSchemeId(), param.getGradeNo(), null), "同一等级方案下编号不能重复");
GradePO gradePO = GradeDTO.convertParamToPO(param, (long) user.getUID());
return getGradeMapper().insertIgnoreNull(gradePO);
}
@ -84,7 +83,7 @@ public class GradeServiceImpl extends Service implements GradeService {
public int updateGrade(GradeSearchParam param) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
GradePO gradePO = GradeDTO.convertParamToPO(param, (long) user.getUID());
OrganizationAssert.isTrue(checkRepeatNo(gradePO.getSchemeId(), gradePO.getGradeNo(), gradePO.getId()), SystemEnv.getHtmlLabelName(547177, user.getLanguage()));
OrganizationAssert.isTrue(checkRepeatNo(gradePO.getSchemeId(), gradePO.getGradeNo(), gradePO.getId()), "同一等级方案下编号不能重复");
return getGradeMapper().updateGrade(gradePO);
}
@ -98,7 +97,7 @@ public class GradeServiceImpl extends Service implements GradeService {
@Override
public int deleteByIds(Collection<Long> ids) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
OrganizationAssert.notEmpty(ids, SystemEnv.getHtmlLabelName(547138,user.getLanguage()));
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
return getGradeMapper().deleteByIds(ids);
}
@ -108,8 +107,8 @@ public class GradeServiceImpl extends Service implements GradeService {
Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> conditionItems = new ArrayList<>();
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547124, "161", "schemeId", "schemeBrowser");
SearchConditionItem gradeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "gradeName");
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "等级方案", "161", "schemeId", "schemeBrowser");
SearchConditionItem gradeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "gradeName");
conditionItems.add(browserItem);
conditionItems.add(gradeNameCondition);
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
@ -126,12 +125,12 @@ public class GradeServiceImpl extends Service implements GradeService {
List<SearchConditionGroup> addGroups = new ArrayList<>();
String id = Util.null2String(params.get("id"));
String schemeId = Util.null2String(params.get("schemeId"));
SearchConditionItem gradeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, 547141, "gradeName");
SearchConditionItem gradeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "gradeName");
gradeNameCondition.setRules("required|string");
SearchConditionItem gradeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, 547118, "gradeNo");
SearchConditionItem gradeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "gradeNo");
gradeNoCondition.setRules("required|string");
SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 200, 547142, "description");
SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, 547124, "161", "schemeId", "schemeBrowser");
SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 200, "描述说明", "description");
SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "等级方案", "161", "schemeId", "schemeBrowser");
schemeBrowserItem.setRules("required|string");
BrowserBean schemeBrowserBean = schemeBrowserItem.getBrowserConditionParam();
if (StringUtils.isNotBlank(schemeId) && !"-1".equals(schemeId) && StringUtil.isEmpty(id)) {
@ -140,13 +139,13 @@ public class GradeServiceImpl extends Service implements GradeService {
schemeBrowserBean.setReplaceDatas(maps);
schemeBrowserItem.setBrowserConditionParam(schemeBrowserBean);
}
SearchConditionItem levelBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, 547139, "162", "levelId", "LevelBrowser");
SearchConditionItem levelBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "职等", "162", "levelId", "LevelBrowser");
levelBrowserItem.setRules("required|string");
// 编辑状态下赋值操作
if (!StringUtil.isEmpty(id)) {
GradePO gradePO = getGradeMapper().getGradeByID(Integer.parseInt(id));
OrganizationAssert.notNull(gradePO, SystemEnv.getHtmlLabelName(547154,user.getLanguage()));
OrganizationAssert.notNull(gradePO, "选择的数据不存在,或数据已删除");
gradeNameCondition.setValue(gradePO.getGradeName());
gradeNoCondition.setValue(gradePO.getGradeNo());
@ -199,16 +198,16 @@ public class GradeServiceImpl extends Service implements GradeService {
@Override
public Map<String, List<MenuBtn>> getHasRight() {
return MenuBtn.getCommonBtnDatas(user.getLanguage());
return MenuBtn.getCommonBtnDatas();
}
@Override
public Map<String, Object> getTabInfo() {
Map<String, Object> apiDatas = new HashMap<>();
List<TopTab> topTabs = new ArrayList<>();
topTabs.add(TopTab.builder().color("#000000").groupId("flowAll").showcount(true).title(SystemEnv.getHtmlLabelName(547191, user.getLanguage())).viewCondition("-1").build());
topTabs.add(TopTab.builder().color("#ff3232").groupId("enable").showcount(true).title(SystemEnv.getHtmlLabelName(547186, user.getLanguage())).viewCondition("0").build());
topTabs.add(TopTab.builder().color("#fea468").groupId("disable").showcount(true).title(SystemEnv.getHtmlLabelName(547192, user.getLanguage())).viewCondition("1").build());
topTabs.add(TopTab.builder().color("#000000").groupId("flowAll").showcount(true).title("全部").viewCondition("-1").build());
topTabs.add(TopTab.builder().color("#ff3232").groupId("enable").showcount(true).title("启用").viewCondition("0").build());
topTabs.add(TopTab.builder().color("#fea468").groupId("disable").showcount(true).title("禁用").viewCondition("1").build());
apiDatas.put("topTabs", topTabs);
HashMap<String, Integer> countMap = new HashMap<>();

View File

@ -12,7 +12,6 @@ import com.engine.organization.util.OrganizationFormItemUtil;
import weaver.conn.RecordSet;
import weaver.general.StringUtil;
import weaver.general.Util;
import weaver.systeminfo.SystemEnv;
import java.util.ArrayList;
import java.util.HashMap;
@ -33,10 +32,10 @@ public class GroupServiceImpl extends Service implements GroupService {
Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionItem> selectItems = new ArrayList<>();
List<SearchConditionGroup> addGroups = new ArrayList<>();
SearchConditionItem companyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, 547172, "companyname");
SearchConditionItem companyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "总部名称", "companyname");
companyNameItem.setRules("required|string");
SearchConditionItem companyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547173, "companydesc");
SearchConditionItem companyWebItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, 547174, "companyweb");
SearchConditionItem companyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "总部全称", "companydesc");
SearchConditionItem companyWebItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, "公司网站", "companyweb");
// 赋值
String id = Util.null2String(params.get("id"));
@ -77,12 +76,13 @@ public class GroupServiceImpl extends Service implements GroupService {
public boolean updateGroup(Map<String, Object> params) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
String id = Util.null2String(params.get("id"));
OrganizationAssert.notNull(id, SystemEnv.getHtmlLabelName(547440,user.getLanguage()));
OrganizationAssert.notNull(id, "数据有误");
String companyname = (String) params.get("companyname");
String companydesc = (String) params.get("companydesc");
String companyweb = (String) params.get("companyweb");
RecordSet rs = new RecordSet();
boolean executeUpdate = rs.executeUpdate("update HrmCompany set COMPANYNAME = ?,COMPANYDESC=?,COMPANYWEB=? where id = ?", companyname, companydesc, companyweb, id);
//TODO new GroupTriggerRunnable(params).run();
return executeUpdate;
}
@ -93,10 +93,10 @@ public class GroupServiceImpl extends Service implements GroupService {
ArrayList<MenuBtn> topMenuList = new ArrayList<>();
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
// 编辑
topMenuList.add(MenuBtn.builder().isTop("1").menuFun("doEdit").menuIcon("icon-coms-edit").menuName(SystemEnv.getHtmlLabelName(547132,user.getLanguage())).type("BTN_EDIT").build());
topMenuList.add(MenuBtn.builder().isTop("1").menuFun("doEdit").menuIcon("icon-coms-edit").menuName("编辑").type("BTN_EDIT").build());
btnDatas.put("topMenu", topMenuList);
// 编辑
rightMenuList.add(MenuBtn.builder().isTop("1").menuFun("doEdit").menuIcon("icon-coms-edit").menuName(SystemEnv.getHtmlLabelName(547132,user.getLanguage())).type("BTN_EDIT").build());
rightMenuList.add(MenuBtn.builder().isTop("1").menuFun("doEdit").menuIcon("icon-coms-edit").menuName("编辑").type("BTN_EDIT").build());
btnDatas.put("rightMenu", rightMenuList);
btnDatas.put("hasRight", HasRightUtil.hasRight(user, RIGHT_NAME, true));
return btnDatas;
@ -106,7 +106,7 @@ public class GroupServiceImpl extends Service implements GroupService {
public Map<String, Object> getTabInfo() {
Map<String, Object> apiDatas = new HashMap<>();
List<TopTab> topTabs = new ArrayList<>();
topTabs.add(TopTab.builder().title(SystemEnv.getHtmlLabelName(547171 ,user.getLanguage())).viewCondition("1").build());
topTabs.add(TopTab.builder().title("总部信息").viewCondition("1").build());
apiDatas.put("topTabs", topTabs);
return apiDatas;
}

View File

@ -59,7 +59,7 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
userInfo = getPersonnelCardMapper().getUserById(uId);
userInfo.setEcId(uId.toString());
OrganizationAssert.notNull(uId, SystemEnv.getHtmlLabelName(547440, user.getLanguage()));
OrganizationAssert.notNull(uId, "未找到对应数据");
// 人员基本信息
// 统计报表
@ -186,11 +186,6 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
continue;
}
JSONObject hrmFieldConf = hfm.getHrmFieldConf(fieldName);
String fieldhtmltype = hrmFieldConf.getString("fieldhtmltype");
if("6".equals(fieldhtmltype)){
// 去除附件类型字段
continue;
}
String fieldLabel = Util.toScreen(SystemEnv.getHtmlLabelName(hrmFieldConf.getInt("fieldlabel"), user.getLanguage()), user.getLanguage());
if ("resourceimageid".equals(fieldName) || "messagerurl".equals(fieldName) || "职等职级".equals(fieldLabel)) {
continue;
@ -297,7 +292,7 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
List<String> accessRoleIds = new ArrayList<>(Arrays.asList(Util.null2String(cardButton.getRoles()).split(",")));
roleIds.retainAll(accessRoleIds);
if (isAdmin || (isMySelf && "0".equals(cardButton.getSysDefault())) || CollectionUtils.isNotEmpty(roleIds)) {
buttonList.add(CardButtonPO.builder().name(Util.formatMultiLang(cardButton.getName())).url(cardButton.getUrl()).sysDefault(cardButton.getSysDefault()).build());
buttonList.add(CardButtonPO.builder().name(cardButton.getName()).url(cardButton.getUrl()).sysDefault(cardButton.getSysDefault()).build());
}
}
return buttonList;

View File

@ -34,7 +34,6 @@ import com.engine.organization.entity.search.QuickSearchDetail;
import com.engine.organization.entity.searchtree.SearchTree;
import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.enums.HrmGroupEnum;
import com.engine.organization.exception.OrganizationRunTimeException;
import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.condition.QuickSearchMapper;
import com.engine.organization.mapper.department.DepartmentMapper;
@ -59,15 +58,10 @@ import org.json.JSONException;
import org.json.JSONObject;
import weaver.common.DateUtil;
import weaver.conn.RecordSet;
import weaver.general.BaseBean;
import weaver.general.StringUtil;
import weaver.general.TimeUtil;
import weaver.general.Util;
import weaver.hrm.company.DepartmentComInfo;
import weaver.hrm.company.SubCompanyComInfo;
import weaver.hrm.definedfield.HrmFieldManager;
import weaver.hrm.privacy.PrivacyComInfo;
import weaver.systeminfo.SystemEnv;
import java.math.BigDecimal;
import java.math.RoundingMode;
@ -154,18 +148,10 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
table.setSqlwhere(sqlWhere);
List<WeaTableColumn> weaTableColumnList = new ArrayList<>();
JclOrgCustomTemplatePO jclOrgCustomTemplatePO = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).queryIsusedTemp("1", String.valueOf(user.getUID()));
//2.是否存在通用模板
if (null == jclOrgCustomTemplatePO) {
jclOrgCustomTemplatePO = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).queryOverAll();
}
String columns = "";
List<String> fields = new ArrayList<>();
List<SearchConditionGroup> allConditions = getAllConditions();
String propValue = new BaseBean().getPropValue("hrmOrganization", "orgId");
if (jclOrgCustomTemplatePO != null) {
if (StringUtils.isNotBlank(jclOrgCustomTemplatePO.getBasicFields())) {
columns = jclOrgCustomTemplatePO.getBasicFields();
@ -183,57 +169,30 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
List<String> columnList = Arrays.asList(columns.split(","));
BigDecimal decimal = new BigDecimal(100 / columnList.size());
List<SearchConditionItem> all = new ArrayList<>();
for (SearchConditionGroup allCondition : allConditions) {
all.addAll(allCondition.getItems());
}
List<SearchConditionItem> items = filterByDomkey(all, columnList);
List<String> privacyList = Arrays.asList("-1_hrm_mobile","-1_hrm_telephone","-1_hrm_mobilecall","-1_hrm_fax","-1_hrm_email");
for (SearchConditionItem item : items) {
String columnName = item.getDomkey()[0];
WeaTableColumn weaTableColumn = new WeaTableColumn();
if (columnName.equals("-1_cus_"+propValue)){
weaTableColumn.setOtherpara(columnName);
fields.add("t.id as " + buildTableSql(columnName).replace(".", "_"));
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getOrgValue");
}else if(privacyList.contains(columnName)) {
List<SearchConditionItem> items = allCondition.getItems();
for (SearchConditionItem item : items) {
String columnName = item.getDomkey()[0];
fields.add(buildTableSql(columnName) + " as " + buildTableSql(columnName).replace(".", "_"));
PrivacyComInfo pc = new PrivacyComInfo();
Map<String, String> mapShowSets = pc.getMapShowSets();
String[] parts = columnName.split("_");
String fieldName = parts[parts.length - 1];
if (mapShowSets != null && mapShowSets.get("mobile") != null) {
weaTableColumn.setOtherpara("column:id+" + user.getUID() + "+"+fieldName+"");
weaTableColumn.setTransmethod("weaver.hrm.privacy.PrivacyComInfo.getSearchContent");
}else {
weaTableColumn.setOtherpara(fieldName+":"+user.getLanguage());
weaTableColumn.setTransmethod("weaver.hrm.HrmTransMethod.getDefineContent");
}
} else{
weaTableColumn.setOtherpara(columnName);
fields.add(buildTableSql(columnName) + " as " + buildTableSql(columnName).replace(".", "_"));
String scopeId = columnName.split("_")[0];
String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1);
WeaTableColumn weaTableColumn = new WeaTableColumn();
weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId));
weaTableColumn.setColumn(buildTableSql(columnName).replace(".", "_"));
weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE);
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValue");
weaTableColumn.setOtherpara(columnName);
weaTableColumn.setWidth(decimal.setScale(2, RoundingMode.HALF_UP).doubleValue() + "%");
weaTableColumnList.add(weaTableColumn);
}
String scopeId = columnName.split("_")[0];
String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1);
weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId, user.getLanguage()));
weaTableColumn.setColumn(buildTableSql(columnName).replace(".", "_"));
weaTableColumn.setDisplay(columnList.contains(columnName) ? WeaBoolAttr.TRUE : WeaBoolAttr.FALSE);
weaTableColumn.setWidth(decimal.setScale(2, RoundingMode.HALF_UP).doubleValue() + "%");
weaTableColumnList.add(weaTableColumn);
}
// 增加id字段,跳转人员卡片
WeaTableColumn weaTableColumn = new WeaTableColumn();
weaTableColumn.setColumn("id");
weaTableColumn.setDisplay(WeaBoolAttr.FALSE);
weaTableColumnList.add(weaTableColumn);
fields.add("t.id");
table.setBackfields(StringUtils.join(fields, ","));
@ -252,28 +211,6 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
return apiDatas;
}
private List<SearchConditionItem> filterByDomkey(List<SearchConditionItem> items, List<String> domkeys) {
List<SearchConditionItem> tempResult = items.stream()
.filter(item -> domkeys.contains(item.getDomkey()[0]))
.collect(Collectors.toList());
Map<String, SearchConditionItem> hashMap = new HashMap<>();
for (SearchConditionItem item : tempResult) {
String domkeyElement = item.getDomkey()[0];
hashMap.put(domkeyElement, item);
}
List<SearchConditionItem> resultList = new ArrayList<>();
for (String domkeyElement : domkeys) {
SearchConditionItem item = hashMap.get(domkeyElement);
if (item != null) {
resultList.add(item);
}
}
return resultList;
}
@Override
public Long saveBaseForm(Map<String, Object> params) {
return 0L;
@ -293,7 +230,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
public Integer saveSearchTemplate(SearchTemplateParam params) {
// 重复名称校验
SearchTemplatePO searchTemplateByName = getHrmResourceMapper().getSearchTemplateByName(user.getUID(), params.getShowname());
OrganizationAssert.isFalse("默认模板".equals(params.getShowname()) || null != searchTemplateByName, SystemEnv.getHtmlLabelName(547439, user.getLanguage()));
OrganizationAssert.isFalse("默认模板".equals(params.getShowname()) || null != searchTemplateByName, "该模板名称已存在");
SearchTemplatePO templatePO = buildSearchTemplateByFields(params.getFields());
if (null == templatePO) {
return -1;
@ -302,9 +239,6 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
templatePO.setCreator(user.getUID());
templatePO.setCreateTime(new Date());
templatePO.setUpdateTime(new Date());
templatePO.setIsused("1");
// 将之前的模板isused置为null
getHrmResourceMapper().updateCustomTemplateUsed(user.getUID());
getHrmResourceMapper().insertSearchTemplate(templatePO);
return templatePO.getId();
}
@ -319,14 +253,13 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
String templateId = Util.null2String(params.get("templateId"));
templateId = StringUtils.isBlank(templateId) ? "-1" : templateId;
String type = Util.null2String(params.get("type"));
OrganizationAssert.isTrue(StringUtils.isNotBlank(templateId), SystemEnv.getHtmlLabelName(547440, user.getLanguage()));
OrganizationAssert.isTrue(StringUtils.isNotBlank(templateId), "数据有误,未找到对应数据");
// 判断是否为搜索模板
SearchTemplatePO searchTemplateById;
List<String> selectKeys;
if ("custom".equals(type)) {
if ("-1".equals(templateId)) {
//selectKeys = Arrays.asList("-1_hrm_lastname,-1_hrm_departmentid,-1_hrm_jobtitle,-1_hrm_mobile,-1_hrm_telephone,-1_hrm_managerid".split(","));
selectKeys = Arrays.asList("-1_hrm_lastname,-1_hrm_departmentid,-1_hrm_subcompanyid1,-1_hrm_jobtitle,-1_hrm_mobile,-1_hrm_telephone,-1_hrm_managerid,-1_hrm_sporder".split(","));
selectKeys = Arrays.asList("-1_hrm_lastname,-1_hrm_departmentid,-1_hrm_jobtitle,-1_hrm_mobile,-1_hrm_telephone,-1_hrm_managerid".split(","));
} else {
searchTemplateById = getHrmResourceMapper().getCustomTemplateById(templateId);
selectKeys = getSelectKeys(searchTemplateById);
@ -347,68 +280,48 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
public Map<String, Object> getSearchTemplate(Map<String, Object> params) {
Map<String, Object> returnMap = new HashMap<>();
String type = Util.null2String(params.get("type"));
String id = Util.null2String(params.get("id"));
if ("".equals(id)) {
id = "-1";
}
int userUID = user.getUID();
// 根据ID查询所存储的模板
List<SearchTemplateParam> templates;
boolean addDefault = true;
if ("custom".equals(type)) {
templates = getHrmResourceMapper().getCustomTemplatesByUser(userUID);
SearchTemplatePO overallCustomTemplate = getHrmResourceMapper().getOverallCustomTemplate();
if (null != overallCustomTemplate) {
if("-1".equals(id)) {
id = overallCustomTemplate.getId().toString();
}
templates.add(SearchTemplateParam.builder().key(overallCustomTemplate.getId().toString()).showname(overallCustomTemplate.getName()).build());
//}
addDefault = false;
SearchTemplatePO usedCustomTemplate = getHrmResourceMapper().getUsedCustomTemplateByUser(user.getUID());
if (null != usedCustomTemplate) {
returnMap.put("templateId", usedCustomTemplate.getId().toString());
} else {
returnMap.put("templateId", "-1");
}
returnMap.put("id", id);
} else {
templates = getHrmResourceMapper().getSearchTemplatesByUser(userUID);
}
if (addDefault) {
templates.add(0, SearchTemplateParam.builder().key("-1").showname("默认模板").build());
}
LinkedHashSet<Object> objects = new LinkedHashSet<>(templates);
returnMap.put("templates", objects);
templates.add(0, SearchTemplateParam.builder().key("-1").showname("默认模板").build());
returnMap.put("templates", templates);
return returnMap;
}
@Override
public Map<String, Object> saveCustomTemplate(SearchTemplateParam params) {
public Integer saveCustomTemplate(SearchTemplateParam params) {
// 重复名称校验
Map<String, Object> data = new HashMap<>();
SearchTemplatePO searchTemplateByName = getHrmResourceMapper().getCustomTemplateByName(user.getUID(), params.getShowname());
OrganizationAssert.isFalse("默认模板".equals(params.getShowname()) || null != searchTemplateByName, SystemEnv.getHtmlLabelName(547439, user.getLanguage()));
OrganizationAssert.isFalse("默认模板".equals(params.getShowname()) || null != searchTemplateByName, "该模板名称已存在");
SearchTemplatePO templatePO = buildSearchTemplateByFields(params.getFields());
OrganizationAssert.notNull(templatePO,"模板存储失败");
if (null == templatePO) {
return -1;
}
templatePO.setName(params.getShowname());
templatePO.setCreator(user.getUID());
templatePO.setIsused("0");
templatePO.setCreateTime(new Date());
templatePO.setUpdateTime(new Date());
templatePO.setOverall(0);
getHrmResourceMapper().insertCustomTemplate(templatePO);
Map<String, Object> param = new HashMap<>();
param.put("type","custom");
param.put("id",templatePO.getId());
data.put("result",getSearchTemplate(param));
return data;
return templatePO.getId();
}
@Override
public Integer updateCustomTemplate(Map<String, Object> params) {
int rowNum = getIntValue((String) params.get("rownum"));
int count = 0;
// 只查询当前人员的模板数据
List<Long> allIds = getJclOrgCustomTemplateMapper().listAllIdByCreator(user.getUID());
List<Long> allIds = getJclOrgCustomTemplateMapper().listAllId();
String currentDate = OrganizationDateUtil.getFormatLocalDate(new java.util.Date());
List<String> nameList = new ArrayList<>();
for (int i = 0; i < rowNum; i++) {
@ -435,7 +348,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
allIds.remove(jclId);
} else {
//插入
OrganizationAssert.isFalse("".equals(name), SystemEnv.getHtmlLabelName(547442, user.getLanguage()));
OrganizationAssert.isFalse("".equals(name), "模板名称不能为空");
jclOrgCustomTemplatePO.setName(name);
jclOrgCustomTemplatePO.setCreator(user.getUID());
jclOrgCustomTemplatePO.setCreateTime(new java.sql.Date(OrganizationDateUtil.stringToDate(currentDate).getTime()));
@ -471,21 +384,20 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
}
transferOptions.add(SearchTemplateParam.builder().key(Integer.toString(idx.getAndIncrement())).showname(allCondition.getTitle()).build());
}
// 查询当前使用的模板没有使用的则展示默认模板
if ("-1".equals(templateId)) {
String selectKeys = "-1_hrm_lastname,-1_hrm_departmentid,-1_hrm_jobtitle,-1_hrm_mobile,-1_hrm_telephone,-1_hrm_managerid";
transferKeys = Arrays.asList(selectKeys.split(","));
SearchTemplatePO overallCustomTemplate = getHrmResourceMapper().getOverallCustomTemplate();
if (null != overallCustomTemplate) {
transferKeys = getSelectKeys(overallCustomTemplate);
// 查询当前使用的模板没有使用的则展示默认模板
SearchTemplatePO usedCustomTemplate = getHrmResourceMapper().getUsedCustomTemplateByUser(user.getUID());
if (null == usedCustomTemplate) {
String selectKeys = "-1_hrm_lastname,-1_hrm_departmentid,-1_hrm_jobtitle,-1_hrm_mobile,-1_hrm_telephone,-1_hrm_managerid";
transferKeys = Arrays.asList(selectKeys.split(","));
} else {
transferKeys = getSelectKeys(usedCustomTemplate);
templateId = usedCustomTemplate.getId().toString();
}
} else {
SearchTemplatePO searchTemplateById = getHrmResourceMapper().getCustomTemplateById(templateId);
transferKeys = getSelectKeys(searchTemplateById);
}
transferOptions.add(0, SearchTemplateParam.builder().key("").showname("").build());
resultMap.put("transferDatas", transferDatas);
resultMap.put("transferKeys", transferKeys);
@ -502,22 +414,18 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
SearchTemplatePO templatePO = buildSearchTemplateByFields(columns);
JclOrgCustomTemplatePO jclOrgCustomTemplatePO = new JclOrgCustomTemplatePO();
if (StringUtils.isNotBlank(templateId)) {
if ("-1".equals(templateId)) {
getJclOrgCustomTemplateMapper().updateUsed(0,"0", null, String.valueOf(user.getUID()));
if (templateId.equals("-1")) {
getJclOrgCustomTemplateMapper().updateUsed("0", null, String.valueOf(user.getUID()));
} else {
jclOrgCustomTemplatePO = getJclOrgCustomTemplateMapper().selectByPrimaryKey(Long.parseLong(templateId));
if (jclOrgCustomTemplatePO != null) {
//取消已启用模板
getJclOrgCustomTemplateMapper().updateUsed(0, "0", null, String.valueOf(user.getUID()));
if (!user.isAdmin() && jclOrgCustomTemplatePO.getOverall() != null && "1".equals(jclOrgCustomTemplatePO.getOverall().toString())) {
throw new OrganizationRunTimeException(SystemEnv.getHtmlLabelName(547857, user.getLanguage()));
}
jclOrgCustomTemplatePO.setId(Integer.valueOf(templateId));
jclOrgCustomTemplatePO.setBasicFields(templatePO.getBasicFields());
jclOrgCustomTemplatePO.setPersonalFields(templatePO.getPersonalFields());
jclOrgCustomTemplatePO.setWorkFields(templatePO.getWorkFields());
jclOrgCustomTemplatePO.setIsused(1);
//取消已启用模板
getJclOrgCustomTemplateMapper().updateUsed("0", null, String.valueOf(user.getUID()));
//启用当前模板
getJclOrgCustomTemplateMapper().updateByPrimaryKeySelective(jclOrgCustomTemplatePO);
}
@ -527,7 +435,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
}
@Override
public Map<String, Object> chartResourceList(Integer departmentId, String versionId, String dimension, String statusValue) {
public Map<String, Object> chartResourceList(Integer departmentId, String versionId, String dimension) {
Map<String, Object> dataMap = new HashMap<>();
List<ResourceListColumns> resourceListColumns = getTableColumns();
List<ResourceChartPO> resourceChartPOS = new ArrayList<>();
@ -536,13 +444,10 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
if ("0".equals(dimension)) {
if ("0".equals(versionId)) {
//当前数据
List<String> statusList = Arrays.stream(statusValue.split(","))
.map(String::trim)
.collect(Collectors.toList());
resourceChartPOS = getHrmResourceMapper().selectByIdAndStatus(statusList, departmentId);
resourceChartPOS = getHrmResourceMapper().selectByDepartmentId(departmentId);
resourceChartVOS = ResourceChartBO.convertToVO(resourceChartPOS);
} else {
rs.executeQuery("select resourceid,workcode,lastname,sex,department,subcompany,jobtitle,mobile from jcl_chart_resource where status in (" + statusValue + ") and departmentid = ? and versionid = ?", departmentId, versionId);
rs.executeQuery("select resourceid,workcode,lastname,sex,department,subcompany,jobtitle,mobile from jcl_chart_resource where departmentid = ? and versionid = ?", departmentId, versionId);
while (rs.next()) {
ResourceChartVO build = ResourceChartVO.builder()
.id((long) Util.getIntValue(rs.getString("resourceid")))
@ -560,7 +465,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
}
} else {
rs.executeQuery("select h.id,h.workcode,h.lastname,h.sex,h.departmentid,h.subcompanyid1,h.jobtitle,h.status,h.mobile " +
" from hrmresourcevirtual v inner join hrmresource h on v.resourceid = h.id and h.status in (" + statusValue + ") and v.virtualtype = ? and v.departmentid = ?", dimension, departmentId);
" from hrmresourcevirtual v inner join hrmresource h on v.resourceid = h.id and v.virtualtype = ? and v.departmentid = ?", dimension, departmentId);
while (rs.next()) {
ResourceChartPO build = ResourceChartPO.builder()
.id((long) Util.getIntValue(rs.getString("id")))
@ -583,31 +488,17 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
return dataMap;
}
@Override
public Map<String, Object> customOverall(Map<String, Object> params) {
RecordSet rs = new RecordSet();
Map<String, Object> data = new HashMap<>(2);
//1.将已有所有人的模板状态改变
rs.executeUpdate("update jcl_org_custom_template set overall = null where overall = 1");
//2.应用当前模板到所有人
String templateId = Util.null2String(params.get("templateId"));
boolean b = rs.executeUpdate("update jcl_org_custom_template set overall = 1,isused=1 where id = ?", templateId);
data.put("result", b);
return data;
}
private List<ResourceListColumns> getTableColumns() {
List<ResourceListColumns> list = new ArrayList<>();
int language = user.getLanguage();
list.add(ResourceListColumns.builder().title(SystemEnv.getHtmlLabelName(547327, language)).dataIndex("id").key("id").build());
list.add(ResourceListColumns.builder().title(SystemEnv.getHtmlLabelName(547328, language)).dataIndex("workCode").key("workCode").build());
list.add(ResourceListColumns.builder().title(SystemEnv.getHtmlLabelName(547329, language)).dataIndex("lastName").key("lastName").build());
list.add(ResourceListColumns.builder().title(SystemEnv.getHtmlLabelName(547330, language)).dataIndex("sex").key("sex").build());
list.add(ResourceListColumns.builder().title(SystemEnv.getHtmlLabelName(547331, language)).dataIndex("departmentName").key("departmentName").build());
list.add(ResourceListColumns.builder().title(SystemEnv.getHtmlLabelName(547332, language)).dataIndex("subcompanyName").key("subcompanyName").build());
list.add(ResourceListColumns.builder().title(SystemEnv.getHtmlLabelName(547333, language)).dataIndex("jobTitle").key("jobTitle").build());
list.add(ResourceListColumns.builder().title("序号").dataIndex("id").key("id").build());
list.add(ResourceListColumns.builder().title("工号").dataIndex("workCode").key("workCode").build());
list.add(ResourceListColumns.builder().title("姓名").dataIndex("lastName").key("lastName").build());
list.add(ResourceListColumns.builder().title("性别").dataIndex("sex").key("sex").build());
list.add(ResourceListColumns.builder().title("部门").dataIndex("departmentName").key("departmentName").build());
list.add(ResourceListColumns.builder().title("分部").dataIndex("subcompanyName").key("subcompanyName").build());
list.add(ResourceListColumns.builder().title("岗位").dataIndex("jobTitle").key("jobTitle").build());
//list.add(ResourceListColumns.builder().title("状态").dataIndex("status").key("status").build());
list.add(ResourceListColumns.builder().title(SystemEnv.getHtmlLabelName(547334, language)).dataIndex("mobile").key("mobile").build());
list.add(ResourceListColumns.builder().title("手机号").dataIndex("mobile").key("mobile").build());
return list;
@ -622,7 +513,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
}
Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionGroup> allConditions = getAllConditions(true);
List<SearchConditionGroup> allConditions = getAllConditions();
// 穿梭框ID展示所选字段信息
HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo = new HrmFieldSearchConditionComInfo();
if ("-1".equals(templateId)) {
@ -653,64 +544,81 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
ArrayList<MenuBtn> topMenuList = new ArrayList<>();
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
if (HasRightUtil.hasRight(user, RIGHT_NAME, true)) {
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName(SystemEnv.getHtmlLabelName(547443, user.getLanguage())).type("BTN_Addnew").build());
rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName(SystemEnv.getHtmlLabelName(547443, user.getLanguage())).type("BTN_Addnew").build());
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
}
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("customization").menuIcon("icon-coms-task-list").menuName(SystemEnv.getHtmlLabelName(547136, user.getLanguage())).type("BTN_COLUMN").build());
rightMenuList.add(MenuBtn.rightMenu_btnLog(user.getLanguage()));
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("customization").menuIcon("icon-coms-task-list").menuName("列定制").type("BTN_COLUMN").build());
rightMenuList.add(MenuBtn.rightMenu_btnLog());
btnDatas.put("topMenu", topMenuList);
btnDatas.put("rightMenu", rightMenuList);
btnDatas.put("hasRight", true);
btnDatas.put("loginId", user.getUID());
btnDatas.put("cardType", new BaseBean().getPropValue("hrmOrganization", "cardType"));
//获取当前用户使用的列定制模板Id
btnDatas.put("customTemplateId", getCustomTemplateId());
btnDatas.put("searchTemplateId", getSearchTemplateId());
return btnDatas;
}
/**
* 获取当前用户使用的列定制模板Id
*
* @return
*/
private String getCustomTemplateId() {
String customTemplateId = "-1";
SearchTemplatePO usedCustomTemplate = getHrmResourceMapper().getUsedCustomTemplateByUser(user.getUID());
if (null != usedCustomTemplate) {
customTemplateId = usedCustomTemplate.getId().toString();
} else {
//查询全局模板
SearchTemplatePO overallCustomTemplate = getHrmResourceMapper().getOverallCustomTemplate();
if (null != overallCustomTemplate) {
customTemplateId = overallCustomTemplate.getId().toString();
}
}
return customTemplateId;
}
/**
* 获取当前用户使用的查询模板Id
*
* @return
*/
private String getSearchTemplateId() {
String searchTemplateId = "-1";
SearchTemplatePO usedCustomTemplate = getHrmResourceMapper().getUsedSerarchTemplateByUser(user.getUID());
if (null != usedCustomTemplate) {
searchTemplateId = usedCustomTemplate.getId().toString();
}
return searchTemplateId;
}
@Override
public Map<String, Object> getTabForm(Map<String, Object> params) {
String viewAttrStr = (String) params.get("viewAttr");
OrganizationAssert.notBlank(viewAttrStr, "未指定操作类型,请确认");
String id = Util.null2String(params.get("id"));
OrganizationAssert.notBlank(id, "数据有误,请确认");
int viewAttr = Integer.parseInt(viewAttrStr);
Map<String, Object> apiDatas = new HashMap<>();
//List<SearchConditionGroup> addGroups = new ArrayList<>();
//SearchConditionItem schemeId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "等级方案", "161", "schemeId", "schemeBrowser");
//schemeId.setRules("required");
//SearchConditionItem gradeId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职级", "161", "gradeId", "gradeBrowser");
//gradeId.setRules("required");
//SearchConditionItem levelId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职等", "162", "levelId", "levelBrowser");
//levelId.setRules("required");
//SearchConditionItem sequenceId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "岗位序列", "161", "sequenceId", "sequenceBrowser");
//sequenceId.setRules("required");
//SearchConditionItem postId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职务分类", "161", "postId", "postBrowser");
//postId.setRules("required");
//SearchConditionItem postInfoId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职务信息", "161", "postInfoId", "postInfoBrowser");
//postInfoId.setRules("required");
//SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "分部", "164", "companyId", "");
//companyId.setRules("required");
//SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "部门", "4", "departmentId", "");
//departmentId.setRules("required");
//SearchConditionItem jobId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "岗位", "161", "jobId", "jobBrowser");
//jobId.setRules("required");
//
//
//// 编辑状态下赋值操作
//HrmRelationPO relationPO = getHrmRelationMapper().getRelationById(Long.parseLong(id));
//if (null != relationPO) {
// setBrowserValue(schemeId, relationPO.getSchemeId(), getSchemeMapper().listSchemesByIds(Stream.of(relationPO.getSchemeId()).collect(Collectors.toList())), null, null);
// setBrowserValue(gradeId, relationPO.getGradeId(), getGradeMapper().listGradessByIds(Stream.of(relationPO.getGradeId()).collect(Collectors.toList())), "scheme_id", relationPO.getSchemeId());
// setBrowserValue(levelId, relationPO.getLevelId(), getLevelMapper().listLevelsByIds(DeleteParam.builder().ids(relationPO.getLevelId()).build().getIds()), "grade_id", relationPO.getGradeId());
// setBrowserValue(sequenceId, relationPO.getSequenceId(), getSequenceMapper().listSequencesByIds(Stream.of(relationPO.getSequenceId()).collect(Collectors.toList())), "scheme_id", relationPO.getSchemeId());
// setBrowserValue(postId, relationPO.getPostId(), getPostMapper().listPostsByIds(Stream.of(relationPO.getPostId()).collect(Collectors.toList())), null, null);
// setBrowserValue(postInfoId, relationPO.getPostInfoId(), getPostInfoMapper().listPostInfosByIds(Stream.of(relationPO.getPostInfoId()).collect(Collectors.toList())), "post_id", relationPO.getPostId());
//
// List<Map<String, Object>> companyMaps = new ArrayList<>();
// String scCompanyNameById = MapperProxyFactory.getProxy(SystemDataMapper.class).getScCompanyNameById(relationPO.getCompanyId().toString());
// Map<String, Object> companyMap = new HashMap<>();
// companyMap.put(relationPO.getCompanyId().toString(), scCompanyNameById);
// companyMaps.add(companyMap);
// setBrowserValue(companyId, relationPO.getCompanyId(), companyMaps, null, null);
//
// List<Map<String, Object>> departmentMaps = new ArrayList<>();
// String departmentNameById = MapperProxyFactory.getProxy(SystemDataMapper.class).getScDepartmentNameById(relationPO.getDepartmentId().toString());
// Map<String, Object> departmentMap = new HashMap<>();
// departmentMap.put(relationPO.getDepartmentId().toString(), departmentNameById);
// departmentMaps.add(departmentMap);
// setBrowserValue(departmentId, relationPO.getDepartmentId(), departmentMaps, "subcompany1", relationPO.getCompanyId());
//
// setBrowserValue(jobId, relationPO.getJobId(), getJobMapper().listJobsByIds(Stream.of(relationPO.getJobId()).collect(Collectors.toList())), "departmentid", relationPO.getDepartmentId());
//}
//
//addGroups.add(new SearchConditionGroup("岗职位体系", true, Stream.of(schemeId, gradeId, levelId, sequenceId, postId, postInfoId).collect(Collectors.toList())));
//addGroups.add(new SearchConditionGroup("组织机构", true, Stream.of(companyId, departmentId, jobId).collect(Collectors.toList())));
//HashMap<String, Object> buttonsMap = new HashMap<>();
//buttonsMap.put("hasEdit", true);
//buttonsMap.put("hasSave", true);
//apiDatas.put("buttons", buttonsMap);
//apiDatas.put("conditions", addGroups);
return apiDatas;
}
@ -747,24 +655,16 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
@Override
public Map<String, Object> getCustomTemplate(Map<String, Object> params) {
List<ExtendInfoPO> infoPOList = new ArrayList<>();
infoPOList.add(ExtendInfoPO.builder().viewAttr(2).id(null).fieldName("name").fieldNameDesc(SystemEnv.getHtmlLabelName(547580, user.getLanguage())).fieldType("varchar(255)").controlType(1).browserType("1").customValue("[\"input\",\"text\",\"50\"]").showOrder(1).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().viewAttr(1).id(null).fieldName("createTime").fieldNameDesc(SystemEnv.getHtmlLabelName(547521, user.getLanguage())).fieldType("date").controlType(1).browserType("1").customValue("[\"input\",\"text\",\"50\"]").showOrder(2).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().viewAttr(2).id(null).fieldName("name").fieldNameDesc("模板名称").fieldType("varchar(255)").controlType(1).browserType("1").customValue("[\"input\",\"text\",\"50\"]").showOrder(1).isrequired(0).isSystemDefault(0).build());
infoPOList.add(ExtendInfoPO.builder().viewAttr(1).id(null).fieldName("createTime").fieldNameDesc("创建时间").fieldType("date").controlType(1).browserType("1").customValue("[\"input\",\"text\",\"50\"]").showOrder(2).isrequired(0).isSystemDefault(0).build());
Map<String, Object> tabInfoMap = new HashMap<>();
tabInfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, infoPOList, false, true));
List<JclOrgCustomTemplatePO> jclOrgCustomTemplatePOS = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).listAllByCreator(user.getUID());
//获取当前使用的模板过滤掉
String customTemplateId = getCustomTemplateId();
jclOrgCustomTemplatePOS = jclOrgCustomTemplatePOS.stream()
.filter(item -> !customTemplateId.equals(String.valueOf(item.getId())))
.collect(Collectors.toList());
List<JclOrgCustomTemplatePO> jclOrgCustomTemplatePOS = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).listAll();
List<Integer> isUsed = new ArrayList<>();
AtomicInteger index = new AtomicInteger(0);
List<Map<String, Object>> collect = jclOrgCustomTemplatePOS.stream().map(item -> {
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("id", item.getId());
resultMap.put("viewAttr", 1);
resultMap.put("editTable", false);
resultMap.put("name", item.getName());
resultMap.put("createTime", DateUtil.getDate(item.getCreateTime(), "yyyy-MM-dd"));
@ -786,6 +686,15 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
tabInfoMap.put("selectedData", isUsedMap);
tabInfoMap.put("isModalEdit", false);
return tabInfoMap;
// OrganizationWeaTable<JclOrgCustomTemplateVO> table = new OrganizationWeaTable<>(user, JclOrgCustomTemplateVO.class);
// String sqlWhere = buildSqlWhere(params);
// table.setSqlwhere(sqlWhere);
// WeaResultMsg result = new WeaResultMsg(false);
// result.putAll(table.makeDataResult());
// result.success();
// return new HashMap<>(result.getResultMap());
}
/**
@ -805,25 +714,13 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
createConditionItems(hrmFieldSearchConditionComInfo, hrmFieldsByScopeId, conditionItems);
Map<String, SearchConditionItem> allFieldsMap = conditionItems.stream().collect(Collectors.toMap(item -> item.getDomkey()[0], item -> item, (k1, k2) -> k1));
boolean isQuickSearch = "true".equals(Util.null2String(params.get("isQuickSearch")));
DepartmentComInfo deptInfo = new DepartmentComInfo();
SubCompanyComInfo subInfo = new SubCompanyComInfo();
DBType dbType = DBType.get(new RecordSet().getDBType());
StringBuilder sb = new StringBuilder(" where 1=1 ");
// 默认去除外部人员显示
sb.append( " and t.seclevel >= 0 ");
if (params.containsKey("lastName") || !params.containsKey("-1_hrm_status")) {
// sb.append(" and t.status = 1");
sb.append(" and t.status < 4");
}
if (params.containsKey("-1_hrm_subcompanyid1")) {
String value = Util.null2String(params.get("-1_hrm_subcompanyid1"));
if (StringUtils.isNotBlank(value)) {
sb.append(" and t.subcompanyid1 in(").append(value).append(")");
}
params.remove("-1_hrm_subcompanyid1");
}
for (Map.Entry<String, Object> entry : params.entrySet()) {
String key = entry.getKey();
String value = Util.null2String(entry.getValue());
@ -834,18 +731,10 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
sb.append(" and t.lastname ").append(dbType.like(value));
}
if ("companyId".equals(key)) {
ArrayList<Integer> list = new ArrayList<>();
list.add(Integer.parseInt(value));
subInfo.getSubCompanyLists(value,list);
String allSub = StringUtils.join(list,",");
sb.append(" and t.subcompanyid1 in(").append(allSub).append(")");
sb.append(" and t.subcompanyid1 ='").append(value).append("'");
}
if ("departmentId".equals(key)) {
ArrayList<Integer> list = new ArrayList<>();
list.add(Integer.parseInt(value));
deptInfo.getAllChildDeptByDepId(list,value);
String allDept = StringUtils.join(list,",");
sb.append(" and t.departmentId in (").append(allDept).append(")");
sb.append(" and t.departmentId ='").append(value).append("'");
}
if ("jobTitle".equals(key)) {
JobPO jobById = getJobMapper().getJobById(Long.parseLong(value));
@ -943,9 +832,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
Map<Integer, DepartmentPO> departmentPOMap = getDepartmentMapper().listAll("showorder").stream().collect(Collectors.toMap(DepartmentPO::getId, item -> item));
for (DepartmentPO departmentPO : filterDeparts) {
if (departmentPO.getCanceled() == null || departmentPO.getCanceled() == 0) {
buildParentDepts(departmentPO, builderDeparts, departmentPOMap);
}
buildParentDepts(departmentPO, builderDeparts, departmentPOMap);
}
List<SearchTree> departmentList = DepartmentBO.buildSetToSearchTree(builderDeparts);
List<SearchTree> deptTrees = SearchTreeUtil.builderTreeMode(departmentList);
@ -995,9 +882,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
// 查询分部信息
Set<DepartmentPO> builderDeparts = new HashSet<>();
for (DepartmentPO departmentPO : filterDeparts) {
if (departmentPO.getCanceled() == null || departmentPO.getCanceled() == 0) {
buildParentDepts(departmentPO, builderDeparts, departmentPOMap);
}
buildParentDepts(departmentPO, builderDeparts, departmentPOMap);
}
return SearchTreeUtil.builderTreeMode(DepartmentBO.buildSetToSearchTree(builderDeparts), jobTrees);
}
@ -1034,15 +919,12 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
}
public List<SearchConditionGroup> getAllConditions() {
return getAllConditions(false);
}
/**
* 获取所有搜索字段信息构建的高级搜索表单
*
* @return
*/
public List<SearchConditionGroup> getAllConditions(boolean isSearch) {
public List<SearchConditionGroup> getAllConditions() {
HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo = new HrmFieldSearchConditionComInfo();
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> basicConditionItems = new ArrayList<>();
@ -1053,55 +935,25 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
List<CusFormFieldPO> hrmFieldsByScopeId = getSystemDataMapper().getHrmFieldsByScopeId(HrmGroupEnum.HRM_BASIC.getGroupType().toString());
createConditionItems(hrmFieldSearchConditionComInfo, hrmFieldsByScopeId, basicConditionItems);
if (CollectionUtils.isNotEmpty(basicConditionItems)) {
SearchConditionItem searchConditionItem = buildSubCompanyCondition(hrmFieldSearchConditionComInfo,isSearch);
basicConditionItems.add(0,searchConditionItem);
addGroups.add(new SearchConditionGroup(SystemEnv.getHtmlLabelName(547175, user.getLanguage()), true, basicConditionItems));
addGroups.add(new SearchConditionGroup("基本信息", true, basicConditionItems));
}
// 个人信息1
hrmFieldsByScopeId = getSystemDataMapper().getHrmFieldsByScopeId(HrmGroupEnum.HRM_PERSONAL.getGroupType().toString());
createConditionItems(hrmFieldSearchConditionComInfo, hrmFieldsByScopeId, personalConditionItems);
if (CollectionUtils.isNotEmpty(personalConditionItems)) {
addGroups.add(new SearchConditionGroup(SystemEnv.getHtmlLabelName(547578, user.getLanguage()), true, personalConditionItems));
addGroups.add(new SearchConditionGroup("个人信息", true, personalConditionItems));
}
// 工作信息3
hrmFieldsByScopeId = getSystemDataMapper().getHrmFieldsByScopeId(HrmGroupEnum.HRM_WORK.getGroupType().toString());
createConditionItems(hrmFieldSearchConditionComInfo, hrmFieldsByScopeId, workConditionItems);
if (CollectionUtils.isNotEmpty(workConditionItems)) {
addGroups.add(new SearchConditionGroup(SystemEnv.getHtmlLabelName(547579, user.getLanguage()), true, workConditionItems));
addGroups.add(new SearchConditionGroup("工作信息", true, workConditionItems));
}
return addGroups;
}
/**
* 花名册构建
*
* @param hrmFieldSearchConditionComInfo
* @param isSearch
* @return
*/
private SearchConditionItem buildSubCompanyCondition(HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo, boolean isSearch) {
HrmFieldBean hrmFieldBean = new HrmFieldBean();
hrmFieldBean.setFieldid("");
hrmFieldBean.setFieldname("-1_hrm_subcompanyid1");
hrmFieldBean.setFieldlabel("-2458");
hrmFieldBean.setFieldhtmltype("3");
if (isSearch) {
hrmFieldBean.setType("170");
} else {
hrmFieldBean.setType("164");
}
hrmFieldBean.setIsQuickSearch(false);
hrmFieldBean.setIsScope(false);
hrmFieldBean.setDmlurl("");
hrmFieldBean.setIssystem("1");
hrmFieldBean.setIsFormField(true);
SearchConditionItem searchConditionItem = hrmFieldSearchConditionComInfo.getSearchConditionItem(hrmFieldBean, user);
return searchConditionItem;
}
/**
* 构建查询条件Item
*
@ -1154,37 +1006,32 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
HrmFieldManager hfm = new HrmFieldManager("HrmCustomFieldByInfoType", scopeid);
List<SearchConditionItem> conditionItems = new ArrayList<>();
for (String field : fieldNames) {
if ("-1_hrm_subcompanyid1".equals(field)) {
SearchConditionItem searchConditionItem = buildSubCompanyCondition(hrmFieldSearchConditionComInfo,true);
conditionItems.add(searchConditionItem);
} else {
String fieldName = field.substring(field.lastIndexOf("_") + 1);
JSONObject hrmFieldConf = hfm.getHrmFieldConf(fieldName);
if (null == hrmFieldConf) {
continue;
}
boolean baseField = hfm.isBaseField(fieldName);
HrmFieldBean hrmFieldBean = new HrmFieldBean();
hrmFieldBean.setFieldid(Util.null2String(hrmFieldConf.getString("id")));
hrmFieldBean.setFieldname(scopeid + "_" + (baseField ? "hrm" : "cus") + "_" + fieldName);
hrmFieldBean.setFieldlabel(hrmFieldConf.getString("fieldlabel"));
hrmFieldBean.setFieldhtmltype(hrmFieldConf.getString("fieldhtmltype"));
hrmFieldBean.setType(hrmFieldConf.getString("type"));
hrmFieldBean.setDmlurl(hrmFieldConf.getString("dmlurl"));
hrmFieldBean.setIssystem(baseField ? "1" : "0");
hrmFieldBean.setIsFormField(true);
hrmFieldBean.setIsQuickSearch(false);
hrmFieldBean.setIsScope(false);
if ("jobactivity".equals(fieldName)) {
// 职务282
hrmFieldBean.setType("282");
}
SearchConditionItem searchConditionItem = hrmFieldSearchConditionComInfo.getSearchConditionItem(hrmFieldBean, user);
conditionItems.add(searchConditionItem);
// 如果为下拉框,添加一条空选项
if (searchConditionItem.getConditionType().equals(ConditionType.SELECT)) {
addEmptyForSelect(searchConditionItem);
}
String fieldName = field.substring(field.lastIndexOf("_") + 1);
JSONObject hrmFieldConf = hfm.getHrmFieldConf(fieldName);
if (null == hrmFieldConf) {
continue;
}
boolean baseField = hfm.isBaseField(fieldName);
HrmFieldBean hrmFieldBean = new HrmFieldBean();
hrmFieldBean.setFieldid(Util.null2String(hrmFieldConf.getString("id")));
hrmFieldBean.setFieldname(scopeid + "_" + (baseField ? "hrm" : "cus") + "_" + fieldName);
hrmFieldBean.setFieldlabel(hrmFieldConf.getString("fieldlabel"));
hrmFieldBean.setFieldhtmltype(hrmFieldConf.getString("fieldhtmltype"));
hrmFieldBean.setType(hrmFieldConf.getString("type"));
hrmFieldBean.setDmlurl(hrmFieldConf.getString("dmlurl"));
hrmFieldBean.setIssystem(baseField ? "1" : "0");
hrmFieldBean.setIsFormField(true);
hrmFieldBean.setIsQuickSearch(false);
hrmFieldBean.setIsScope(false);
if ("jobactivity".equals(fieldName)) {
// 职务282
hrmFieldBean.setType("282");
}
SearchConditionItem searchConditionItem = hrmFieldSearchConditionComInfo.getSearchConditionItem(hrmFieldBean, user);
conditionItems.add(searchConditionItem);
// 如果为下拉框,添加一条空选项
if (searchConditionItem.getConditionType().equals(ConditionType.SELECT)) {
addEmptyForSelect(searchConditionItem);
}
}
if (CollectionUtils.isNotEmpty(conditionItems)) {
@ -1231,16 +1078,16 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
private void buildSearchConditionGroup(SearchTemplatePO templatePO, HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo, List<SearchConditionGroup> addGroups) {
String[] basicFields = Util.null2String(templatePO.getBasicFields()).split(",");
if (basicFields.length > 0) {
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, SystemEnv.getHtmlLabelName(547175, user.getLanguage()), HrmGroupEnum.HRM_BASIC.getGroupType(), basicFields);
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, "基本信息", HrmGroupEnum.HRM_BASIC.getGroupType(), basicFields);
}
String[] personalFields = Util.null2String(templatePO.getPersonalFields()).split(",");
if (personalFields.length > 0) {
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, SystemEnv.getHtmlLabelName(547578, user.getLanguage()), HrmGroupEnum.HRM_PERSONAL.getGroupType(), personalFields);
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, "个人信息", HrmGroupEnum.HRM_PERSONAL.getGroupType(), personalFields);
}
String[] workFields = Util.null2String(templatePO.getWorkFields()).split(",");
if (workFields.length > 0) {
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, SystemEnv.getHtmlLabelName(547579, user.getLanguage()), HrmGroupEnum.HRM_WORK.getGroupType(), workFields);
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, "工作信息", HrmGroupEnum.HRM_WORK.getGroupType(), workFields);
}
}
@ -1313,7 +1160,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
case BROWSER://浏览按钮
// 兼容多选浏览按钮
sb.append(" and ").append(dbType.concat(tableSql)).append(dbType.like("," + value + ","));
sb.append(" and ").append(dbType.concat(tableSql)).append(dbType.like(value));
break;
case INPUTNUMBER:// 数字
@ -1441,7 +1288,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
List<SearchConditionOption> options = searchConditionItem.getOptions();
SearchConditionOption searchConditionOption = new SearchConditionOption();
searchConditionOption.setKey("-1");
searchConditionOption.setShowname(SystemEnv.getHtmlLabelName(547191, user.getLanguage()));
searchConditionOption.setShowname("全部");
options.add(0, searchConditionOption);
options.forEach(item -> item.setSelected(false));
}

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