Compare commits
217 Commits
上海顺胜组织架构图v2
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
a77721403f | |
|
|
5da46ee91a | |
|
|
61840cf0cd | |
|
|
0b976934f2 | |
|
|
6d3ed2d9f8 | |
|
|
11419ab320 | |
|
|
dab7ce5729 | |
|
|
7cc38df2e9 | |
|
|
9cf8a7cdf0 | |
|
|
b0db84f231 | |
|
|
d2750025a5 | |
|
|
2fe6013af1 | |
|
|
722e1b8fe6 | |
|
|
4d4827a2c4 | |
|
|
b9c00d1e66 | |
|
|
6a5e6e5bec | |
|
|
80248b03d6 | |
|
|
289242d013 | |
|
|
47fb84d10d | |
|
|
d77e9d35d4 | |
|
|
5a2affb1a8 | |
|
|
d5a24e3bfb | |
|
|
421a70491a | |
|
|
1f532ebade | |
|
|
aff49d0bc9 | |
|
|
b9c9d1d65a | |
|
|
3a5c581241 | |
|
|
4beda57943 | |
|
|
280fe586db | |
|
|
76d9138191 | |
|
|
8de60788a7 | |
|
|
fdf4736e34 | |
|
|
cffa697c2f | |
|
|
77b2d12efd | |
|
|
58111e5be4 | |
|
|
918f2e2a6e | |
|
|
8a843480b6 | |
|
|
757b41f8c5 | |
|
|
a91bbf74ee | |
|
|
7595f6bc77 | |
|
|
aa0d573cc3 | |
|
|
14464744b8 | |
|
|
95d3dac14f | |
|
|
4fcbe238b4 | |
|
|
f254feb128 | |
|
|
5ed00c6a24 | |
|
|
d08192032c | |
|
|
4d2e8a8035 | |
|
|
ea5809ac15 | |
|
|
b572bc4d48 | |
|
|
e5f46a8083 | |
|
|
bb021a6f45 | |
|
|
6c973d86cd | |
|
|
1698f8c8d5 | |
|
|
e5a30525f0 | |
|
|
2d240460f1 | |
|
|
4a8c85cd41 | |
|
|
035ae80970 | |
|
|
760b54710a | |
|
|
137273284e | |
|
|
4fd548d777 | |
|
|
c0669d1f58 | |
|
|
a939a6f222 | |
|
|
19f8cefe8a | |
|
|
a303b748b5 | |
|
|
096f1d1c6b | |
|
|
517c3135af | |
|
|
b65dcb9fa2 | |
|
|
82fd63c1a1 | |
|
|
63df0e596f | |
|
|
53afce795a | |
|
|
1705857817 | |
|
|
2114368acc | |
|
|
50c7a9373e | |
|
|
2ea741211f | |
|
|
816601407c | |
|
|
d865bb976b | |
|
|
94994972e3 | |
|
|
4dd6a99c1d | |
|
|
fe60767829 | |
|
|
5c05759ad4 | |
|
|
868a973bc5 | |
|
|
6ccb4ec3d3 | |
|
|
be807d032b | |
|
|
ad9e80e1e8 | |
|
|
64ab363237 | |
|
|
58b57c81b7 | |
|
|
06a3d5b225 | |
|
|
fc79e336c0 | |
|
|
51d34bd496 | |
|
|
d3f87a3a07 | |
|
|
a6b10dcd8e | |
|
|
d76c85cc19 | |
|
|
a7ee4e47a3 | |
|
|
6af0092549 | |
|
|
555e3dd604 | |
|
|
710d6f5000 | |
|
|
af6b076584 | |
|
|
07b3bd5ae7 | |
|
|
15726f1824 | |
|
|
b58378854b | |
|
|
c33532c241 | |
|
|
ec84cd6ccf | |
|
|
5a230ea962 | |
|
|
3bab245708 | |
|
|
7bc3a97bbb | |
|
|
803331d46f | |
|
|
50b7845f26 | |
|
|
93d672f14c | |
|
|
f033e08f0b | |
|
|
edfbdc9cb9 | |
|
|
51dac61a21 | |
|
|
0e53d8221d | |
|
|
97a3c34159 | |
|
|
869f70b241 | |
|
|
267437f05a | |
|
|
1d5f2a90be | |
|
|
f41d015019 | |
|
|
99901f5cb9 | |
|
|
3bbe1ef027 | |
|
|
f2fabe198d | |
|
|
ec56ff8b46 | |
|
|
e477132c82 | |
|
|
b676495a81 | |
|
|
e655b65329 | |
|
|
c2f1f022c7 | |
|
|
ab5052b3eb | |
|
|
28145a52dc | |
|
|
6054983dbc | |
|
|
0b0fd72931 | |
|
|
6fd0286357 | |
|
|
b31ee6a16b | |
|
|
6e6c66687b | |
|
|
c44a6784fd | |
|
|
4d88d2f063 | |
|
|
251a001eac | |
|
|
75b381f6d8 | |
|
|
37f0361d92 | |
|
|
f928ea04d5 | |
|
|
fcf177c194 | |
|
|
e7dc7e91fc | |
|
|
2dadec37cd | |
|
|
eb477c7016 | |
|
|
e97862f67e | |
|
|
d68b409a63 | |
|
|
6349b0ce04 | |
|
|
91ca23bc27 | |
|
|
165cdfadd3 | |
|
|
5ad0c97dab | |
|
|
c6d82e66ff | |
|
|
92bea38ad3 | |
|
|
04128544ec | |
|
|
ed6edca504 | |
|
|
33b32e602c | |
|
|
1563b76db2 | |
|
|
268b7eb0e6 | |
|
|
2c7b0fe355 | |
|
|
5faffc13b6 | |
|
|
78c94a84d6 | |
|
|
acad79705b | |
|
|
be82ddfb9e | |
|
|
4deb5d9005 | |
|
|
d2603be072 | |
|
|
0c068a81f0 | |
|
|
f0980d5bbd | |
|
|
2949a33d71 | |
|
|
240bb21df2 | |
|
|
82a1462529 | |
|
|
d17cd0be77 | |
|
|
5acd184cf1 | |
|
|
aca41e4283 | |
|
|
4e29257903 | |
|
|
0beebdfc70 | |
|
|
795e15bc9f | |
|
|
785218c144 | |
|
|
31b9267493 | |
|
|
7483b30459 | |
|
|
554b3b75df | |
|
|
830c3f32ad | |
|
|
fb07a71a28 | |
|
|
d802a3b200 | |
|
|
ec4e6fac9a | |
|
|
b3c6f11626 | |
|
|
bbf2c74727 | |
|
|
0b6c0ae11e | |
|
|
7fedc8dcff | |
|
|
750f23d603 | |
|
|
dfc0082afd | |
|
|
0fba281b73 | |
|
|
1d90322edd | |
|
|
eed628b156 | |
|
|
940838cc1d | |
|
|
973862ba97 | |
|
|
1e2b595d99 | |
|
|
414b62d891 | |
|
|
9f991859d6 | |
|
|
3b0a7488cc | |
|
|
f791642364 | |
|
|
6ad332cac8 | |
|
|
dd19927376 | |
|
|
0901dc28e2 | |
|
|
5deca3460e | |
|
|
06e3fbf79c | |
|
|
f18fc1c021 | |
|
|
c9b41c98e6 | |
|
|
f51fd4713e | |
|
|
20ede75d60 | |
|
|
9705c64f96 | |
|
|
703de629f9 | |
|
|
00c1e04392 | |
|
|
b232148b09 | |
|
|
9b3f41df4d | |
|
|
5673b44929 | |
|
|
a805450cf3 | |
|
|
37fd4dca5a | |
|
|
5da821d653 | |
|
|
fcb53a4ff0 |
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
|
|
@ -25,6 +25,7 @@ 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;
|
||||
|
|
@ -77,13 +78,14 @@ 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.job_no, h.jobtitlename as name ";
|
||||
String backfields = "t.id,t.ec_company, 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 += " ";
|
||||
|
|
@ -104,7 +106,8 @@ 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"));
|
||||
item.put("name", name);
|
||||
String subCompanyname = subInfo.getSubCompanyname(Util.null2String(rs.getString("ec_company")));
|
||||
item.put("name", name+"("+subCompanyname+")");
|
||||
item.put("title", name);
|
||||
datas.add(item);
|
||||
}
|
||||
|
|
@ -118,13 +121,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, "编号", "jobNo");
|
||||
SearchConditionItem jobNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547118, "jobNo");
|
||||
// 名称
|
||||
SearchConditionItem jobNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "jobName");
|
||||
SearchConditionItem jobNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "jobName");
|
||||
// 所属分部
|
||||
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "ecCompany", "");
|
||||
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "ecCompany", "");
|
||||
// 所属部门
|
||||
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "4", "ecDepartment", "");
|
||||
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547431, "4", "ecDepartment", "");
|
||||
|
||||
conditions.add(jobNoItem);
|
||||
conditions.add(jobNameItem);
|
||||
|
|
@ -234,7 +237,7 @@ public class JobBrowserService extends BrowserService {
|
|||
compList = MapperProxyFactory.getProxy(CompMapper.class).listParent();
|
||||
}
|
||||
// 获取顶层分部
|
||||
compList.stream().sorted(Comparator.comparing(item -> null == item.getShowOrder() ? 0 : item.getShowOrder())).forEach(item -> buildCompNodes(treeNodes, compHasSubs, item));
|
||||
compList.stream().sorted(Comparator.comparingDouble(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();
|
||||
|
|
|
|||
|
|
@ -29,4 +29,7 @@ public @interface OrganizationTableColumn {
|
|||
|
||||
// 额外参数
|
||||
String otherPara() default "";
|
||||
|
||||
// 多语言转换
|
||||
boolean multiLanguage() default false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import java.lang.annotation.*;
|
|||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface TableTitle {
|
||||
int labelId() default -1;
|
||||
String title();
|
||||
String dataIndex();
|
||||
String key();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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,8 +114,13 @@ 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);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class CusBowserTreeBO {
|
|||
.domid("sel_" + item.getId())
|
||||
.hasChild(item.getIsParent())
|
||||
.isLeaf(!item.getIsParent())
|
||||
.isopen(false)
|
||||
.isopen(true)
|
||||
.key(getKey(item))
|
||||
.name(item.getName())
|
||||
.build()).collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -47,6 +47,12 @@ public class ChartPO {
|
|||
// 部门层级
|
||||
private int departmentDepth;
|
||||
|
||||
//账号类型
|
||||
private String accountType;
|
||||
|
||||
//直接上级
|
||||
private String managerId;
|
||||
|
||||
// 在编数
|
||||
private int onJobNum;
|
||||
// 编制数
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ public class CompanyTreePO {
|
|||
private boolean isLeaf;
|
||||
private String key;
|
||||
private boolean disabled;
|
||||
private String type;
|
||||
|
||||
public boolean getIsLeaf() {
|
||||
return isLeaf;
|
||||
|
|
@ -38,4 +39,11 @@ public class CompanyTreePO {
|
|||
public String getValue() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
if(id.startsWith("d")){
|
||||
return "2";
|
||||
}
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
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;
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@ public class CompBO {
|
|||
}
|
||||
|
||||
public static List<SearchTree> buildSetToSearchTree(Set<CompPO> comps) {
|
||||
return comps.stream().sorted(Comparator.comparing(item -> null == item.getShowOrder() ? 0 : item.getShowOrder())).map(item -> {
|
||||
return comps.stream().sorted(Comparator
|
||||
.comparingDouble(CompPO::getShowOrder)
|
||||
.thenComparingDouble(CompPO::getShowOrderOfTree)
|
||||
).map(item -> {
|
||||
SearchTree tree = new SearchTree();
|
||||
tree.setCanClick(true);
|
||||
tree.setCanceled(item.getCanceled() != null && item.getCanceled() != 0);
|
||||
|
|
@ -33,10 +36,11 @@ public class CompBO {
|
|||
tree.setIsParent(false);
|
||||
tree.setIsVirtual("0");
|
||||
tree.setName(item.getSubCompanyName());
|
||||
tree.setPid(item.getSupSubComId().toString());
|
||||
tree.setPid(item.getSupSubComId() == null ? "0" :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());
|
||||
}
|
||||
|
|
@ -101,7 +105,7 @@ public class CompBO {
|
|||
.subCompanyCode(e.getSubCompanyCode())
|
||||
.subCompanyDesc(e.getSubCompanyDesc())
|
||||
.subCompanyName(e.getSubCompanyName())
|
||||
.supSubComId(e.getSupSubComId())
|
||||
.supSubComId(e.getSupSubComId() == null ? 0 : e.getSupSubComId())
|
||||
.supSubComName(null == poMaps.get(e.getSupSubComId()) ? "" : poMaps.get(e.getSupSubComId()).getSubCompanyName())
|
||||
.showOrder(e.getShowOrder())
|
||||
.canceled(null == e.getCanceled() ? 0 : e.getCanceled())
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ 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;
|
||||
|
|
@ -35,37 +34,37 @@ public class CompListDTO {
|
|||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableTitle(title = "名称", dataIndex = "subCompanyDesc", key = "subCompanyDesc")
|
||||
@TableTitle(labelId = 547141, title = "名称", dataIndex = "subCompanyDesc", key = "subCompanyDesc")
|
||||
private String subCompanyDesc;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableTitle(title = "编号", dataIndex = "subCompanyCode", key = "subCompanyCode")
|
||||
@TableTitle(labelId = 547118, title = "编号", dataIndex = "subCompanyCode", key = "subCompanyCode")
|
||||
private String subCompanyCode;
|
||||
|
||||
/**
|
||||
* 简称
|
||||
*/
|
||||
@TableTitle(title = "简称", dataIndex = "subCompanyName", key = "subCompanyName")
|
||||
@TableTitle(labelId = 547181, title = "简称", dataIndex = "subCompanyName", key = "subCompanyName")
|
||||
private String subCompanyName;
|
||||
|
||||
/**
|
||||
* 上级公司
|
||||
*/
|
||||
@TableTitle(title = "上级分部", dataIndex = "supSubComName", key = "supSubComName")
|
||||
@TableTitle(labelId = 547410, title = "上级分部", dataIndex = "supSubComName", key = "supSubComName")
|
||||
private String supSubComName;
|
||||
|
||||
private Integer supSubComId;
|
||||
|
||||
|
||||
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
||||
private Integer showOrder;
|
||||
@TableTitle(labelId = 547185, title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
||||
private Double showOrder;
|
||||
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@TableTitle(title = "启用", dataIndex = "canceled", key = "canceled")
|
||||
@TableTitle(labelId = 547186, title = "启用", dataIndex = "canceled", key = "canceled")
|
||||
private Integer canceled;
|
||||
|
||||
/**
|
||||
|
|
@ -79,8 +78,8 @@ public class CompListDTO {
|
|||
*/
|
||||
private List<CompListDTO> children;
|
||||
|
||||
public Integer getShowOrder() {
|
||||
return null == showOrder ? 0 : showOrder;
|
||||
public Double getShowOrder() {
|
||||
return null == showOrder ? 0.00 : showOrder;
|
||||
}
|
||||
|
||||
private String orderType;
|
||||
|
|
@ -90,9 +89,9 @@ public class CompListDTO {
|
|||
return children;
|
||||
}
|
||||
if ("asc".equalsIgnoreCase(orderType)) {
|
||||
return children.stream().sorted(Comparator.comparing(CompListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
return children.stream().sorted(Comparator.comparingDouble(CompListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
} else {
|
||||
return children.stream().sorted(Comparator.comparing(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
return children.stream().sorted(Comparator.comparingDouble(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@ public class CompParam extends BaseQueryParam {
|
|||
private String outKey;
|
||||
private Integer limitUsers;
|
||||
private String uuid;
|
||||
private Integer showOrder;
|
||||
private Integer showOrderOfTree;
|
||||
private Double showOrder;
|
||||
private Double showOrderOfTree;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,20 @@ public class CompPO {
|
|||
private Date modified;
|
||||
private Integer modifier;
|
||||
private String uuid;
|
||||
private Integer showOrder;
|
||||
private Integer showOrderOfTree;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ 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;
|
||||
|
|
@ -31,18 +32,26 @@ public class DepartmentBO {
|
|||
* @param list
|
||||
* @return
|
||||
*/
|
||||
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> 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> buildDeptDTOList(Collection<DepartmentPO> list, String orderType) {
|
||||
SubCompanyComInfo subCompanyComInfo = new SubCompanyComInfo();
|
||||
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
|
||||
|
||||
// 递归添加父级数据
|
||||
List<DepartmentListDTO> dtoList = list.stream().map(e ->
|
||||
DepartmentListDTO
|
||||
|
|
@ -53,6 +62,8 @@ 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)
|
||||
|
|
@ -121,16 +132,19 @@ 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() || e.getSupDepId() == 0 ? "" : getDeptNameById(e.getSupDepId()))
|
||||
.supDepName((null == e.getSupDepId() || 0 == e.getSupDepId()) ? "" : departmentComInfo.getDepartmentname(Util.null2String(e.getSupDepId())))
|
||||
//.deptPrincipalName(getEmployeeNameById(e.getDeptPrincipal()))
|
||||
.build()).collect(Collectors.toList());
|
||||
//获取非一级部门
|
||||
|
|
@ -153,12 +167,13 @@ public class DepartmentBO {
|
|||
tree.setId(item.getId().toString());
|
||||
tree.setIsParent(false);
|
||||
tree.setIsVirtual("0");
|
||||
tree.setName(item.getDepartmentName());
|
||||
tree.setName(item.getDepartmentMark());
|
||||
tree.setPid(null == item.getSupDepId() ? "0" : item.getSupDepId().toString());
|
||||
tree.setSelected(false);
|
||||
tree.setType("2");
|
||||
tree.setParentComp(item.getSubCompanyId1().toString());
|
||||
tree.setOrderNum(null == item.getShowOrder() ? 0 : item.getShowOrder().intValue());
|
||||
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());
|
||||
return tree;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
|
@ -189,7 +204,7 @@ public class DepartmentBO {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new OrganizationRunTimeException(e);
|
||||
}
|
||||
return StringUtils.join(employeeNameById, ",");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,32 +36,32 @@ public class DepartmentListDTO {
|
|||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableTitle(title = "名称", dataIndex = "departmentMark", key = "departmentMark", width = "200")
|
||||
@TableTitle(labelId = 547181, title = "简称", dataIndex = "departmentMark", key = "departmentMark", width = "200")
|
||||
private String departmentMark;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableTitle(title = "编号", dataIndex = "departmentCode", key = "departmentCode")
|
||||
@TableTitle(labelId = 547118, title = "编号", dataIndex = "departmentCode", key = "departmentCode")
|
||||
private String departmentCode;
|
||||
|
||||
/**
|
||||
* 简称
|
||||
*/
|
||||
@TableTitle(title = "简称", dataIndex = "departmentName", key = "departmentName")
|
||||
@TableTitle(labelId = 547141, title = "名称", dataIndex = "departmentName", key = "departmentName")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 所属分部
|
||||
*/
|
||||
@TableTitle(title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
|
||||
@TableTitle(labelId = 547128, title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
|
||||
private String subCompanyName;
|
||||
private Integer subCompanyId1;
|
||||
|
||||
/**
|
||||
* 上级部门
|
||||
*/
|
||||
@TableTitle(title = "上级部门", dataIndex = "supDepName", key = "supDepName")
|
||||
@TableTitle(labelId = 547189, title = "上级部门", dataIndex = "supDepName", key = "supDepName")
|
||||
private String supDepName;
|
||||
|
||||
private Integer supDepId;
|
||||
|
|
@ -69,20 +69,20 @@ public class DepartmentListDTO {
|
|||
/**
|
||||
* 部门负责人
|
||||
*/
|
||||
@TableTitle(title = "部门负责人", dataIndex = "bmfzr", key = "bmfzr")
|
||||
@TableTitle(labelId = 547190, title = "部门负责人", dataIndex = "bmfzr", key = "bmfzr")
|
||||
private String bmfzr;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
||||
@TableTitle(labelId = 547185, title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
||||
private Double showOrder;
|
||||
|
||||
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@TableTitle(title = "启用", dataIndex = "canceled", key = "canceled")
|
||||
@TableTitle(labelId = 547186, 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.comparing(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
return children.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
} else {
|
||||
return children.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
return children.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,5 +28,5 @@ public class DeptSearchParam extends BaseQueryParam {
|
|||
|
||||
private String uuid;
|
||||
private Double showOrder;
|
||||
private Integer showOrderOfTree;
|
||||
private Double showOrderOfTree;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,6 @@ public class DepartmentPO {
|
|||
private Integer modifier;
|
||||
private String uuid;
|
||||
private Double showOrder;
|
||||
private Integer showOrderOfTree;
|
||||
private Double showOrderOfTree;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,17 +26,23 @@ public class SingleDeptTreeVO {
|
|||
|
||||
private Integer id;
|
||||
|
||||
@TableTitle(title = "编号", dataIndex = "departmentCode", key = "departmentCode")
|
||||
private String departmentCode;
|
||||
//@TableTitle(labelId = 547118, title = "编号", dataIndex = "departmentCode", key = "departmentCode")
|
||||
//private String departmentCode;
|
||||
|
||||
@TableTitle(title = "部门名称", dataIndex = "departmentMark", key = "departmentMark")
|
||||
@TableTitle(labelId = 547598, 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(title = "上级部门", dataIndex = "supDepName", key = "supDepName")
|
||||
@TableTitle(labelId = 547189, title = "上级部门", dataIndex = "supDepName", key = "supDepName")
|
||||
private String supDepName; //上级部门
|
||||
|
||||
//@TableTitle(title = "部门负责人", dataIndex = "deptPrincipalName", key = "deptPrincipalName")
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ public class ManagerDetachParam {
|
|||
|
||||
private Integer ecManager;
|
||||
|
||||
private Integer roleId;
|
||||
|
||||
private Integer jclManager;
|
||||
|
||||
private String ecRolelevel;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ 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," +
|
||||
|
|
@ -34,8 +35,8 @@ import lombok.NoArgsConstructor;
|
|||
sortway = "asc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
|
||||
},
|
||||
tableType = WeaTableType.CHECKBOX
|
||||
)
|
||||
|
|
@ -45,15 +46,18 @@ public class ManagerDetachVO {
|
|||
@OrganizationTableColumn(column = "id", display = false)
|
||||
private Long id;
|
||||
|
||||
@OrganizationTableColumn(labelId = 513540, text = "管理员类型", width = "20%", column = "manager_type")
|
||||
private Integer managerType;
|
||||
|
||||
@OrganizationTableColumn(text = "管理员", width = "20%", column = "ec_manager", transmethod = "com.engine.organization.transmethod.ManagerDetachTransMethod.getManagerName")
|
||||
|
||||
@OrganizationTableColumn(labelId = 547405, text = "管理员", width = "20%", column = "ec_manager", transmethod = "com.engine.organization.transmethod.ManagerDetachTransMethod.getManagerName",otherPara = "column:manager_type")
|
||||
private Integer ecManager;
|
||||
|
||||
@OrganizationTableColumn(text = "可管理组织机构", width = "40%", column = "ec_rolelevel",transmethod = "com.engine.organization.transmethod.ManagerDetachTransMethod.getRoleLevel")
|
||||
@OrganizationTableColumn(labelId = 547407, text = "可管理组织机构", width = "40%", column = "ec_rolelevel", transmethod = "com.engine.organization.transmethod.ManagerDetachTransMethod.getRoleLevel")
|
||||
private String ecRolelevel;
|
||||
|
||||
|
||||
@OrganizationTableColumn(text = "可管理模块", width = "40%", column = "manage_module")
|
||||
@OrganizationTableColumn(labelId = 547408, text = "可管理模块", width = "40%", column = "manage_module")
|
||||
private String manageModule;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,16 +35,16 @@ public class EmployeeTableVO {
|
|||
@OrganizationTableColumn(column = "id", display = false)
|
||||
private Long id;
|
||||
|
||||
@OrganizationTableColumn(text = "姓名", width = "25%", column = "lastname")
|
||||
@OrganizationTableColumn(labelId = 547329, text = "姓名", width = "25%", column = "lastname")
|
||||
private String lastname;
|
||||
|
||||
@OrganizationTableColumn(text = "性别", width = "25%", column = "sex",transmethod = "com.engine.organization.transmethod.JobTransMethod.getSexName")
|
||||
@OrganizationTableColumn(labelId = 547330, text = "性别", width = "25%", column = "sex",transmethod = "com.engine.organization.transmethod.JobTransMethod.getSexName")
|
||||
private String sex;
|
||||
|
||||
@OrganizationTableColumn(text = "手机", width = "25%", column = "mobile")
|
||||
@OrganizationTableColumn(labelId = 547334, text = "手机", width = "25%", column = "mobile")
|
||||
private String mobile;
|
||||
|
||||
@OrganizationTableColumn(text = "入职日期", width = "25%", column = "companystartdate")
|
||||
@OrganizationTableColumn(labelId = 547669, text = "入职日期", width = "25%", column = "companystartdate")
|
||||
private String companystartdate;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -276,6 +276,11 @@ 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;
|
||||
}
|
||||
|
|
@ -406,6 +411,10 @@ 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)) {
|
||||
|
|
@ -578,7 +587,7 @@ public class ExtendInfoBO {
|
|||
}
|
||||
|
||||
if (Util.null2String(extendInfoPO.getFieldNameDesc()).length() > 0) {
|
||||
searchConditionItem.setLabel(extendInfoPO.getFieldNameDesc());
|
||||
searchConditionItem.setLabel(Util.formatMultiLang(extendInfoPO.getFieldNameDesc()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
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;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -5,6 +5,8 @@ import lombok.Builder;
|
|||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/01/05
|
||||
|
|
@ -19,4 +21,21 @@ 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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,4 +64,6 @@ public class JclOrgCustomTemplatePO implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer overall;
|
||||
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ public class ResourcePO {
|
|||
private Integer jobtitle;
|
||||
|
||||
private String lastName;
|
||||
private Integer dspOrder;
|
||||
private Double dspOrder;
|
||||
|
||||
/**
|
||||
* 临时关联聚才林岗位ID
|
||||
|
|
|
|||
|
|
@ -26,4 +26,5 @@ public class SearchTemplatePO {
|
|||
private Integer creator;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
private Integer overall;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ import lombok.NoArgsConstructor;
|
|||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(text = "查看"),
|
||||
@OrganizationTableOperate(index = "1", text = "另存为版本")
|
||||
},
|
||||
tableType = WeaTableType.CHECKBOX
|
||||
)
|
||||
|
|
|
|||
|
|
@ -33,12 +33,11 @@ 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(text = "查看"),
|
||||
@OrganizationTableOperate(index = "1", text = "另存为版本")
|
||||
@OrganizationTableOperate(labelId = 547490, text = "查看")
|
||||
},
|
||||
tableType = WeaTableType.CHECKBOX
|
||||
)
|
||||
|
|
@ -52,21 +51,21 @@ public class HrmResourceVO {
|
|||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@OrganizationTableColumn(text = "姓名", width = "25%", column = "lastname")
|
||||
@OrganizationTableColumn(labelId = 547329, text = "姓名", width = "25%", column = "lastname")
|
||||
private String lastName;
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@OrganizationTableColumn(text = "部门", width = "25%", column = "departmentid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getDepartmentName")
|
||||
@OrganizationTableColumn(labelId = 547331, text = "部门", width = "25%", column = "departmentid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getDepartmentName")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 分部
|
||||
*/
|
||||
@OrganizationTableColumn(text = "分部", width = "25%", column = "subcompanyid1", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getCompanyName")
|
||||
@OrganizationTableColumn(labelId = 547332, text = "分部", width = "25%", column = "subcompanyid1", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getCompanyName")
|
||||
private String companyName;
|
||||
|
||||
@OrganizationTableColumn(text = "岗位", width = "25%", column = "jobtitle", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getJobName")
|
||||
@OrganizationTableColumn(labelId = 547333, text = "岗位", width = "25%", column = "jobtitle", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getJobName")
|
||||
private String jobName;
|
||||
|
||||
/**
|
||||
|
|
@ -85,6 +84,6 @@ public class HrmResourceVO {
|
|||
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getManagerName")
|
||||
private String managerName;
|
||||
|
||||
@OrganizationTableColumn(text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
|
||||
@OrganizationTableColumn(labelId = 547185, text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
|
||||
private Integer showOrder;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
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;
|
||||
}
|
||||
|
|
@ -32,8 +32,8 @@ import lombok.NoArgsConstructor;
|
|||
sortway = "asc",
|
||||
primarykey = "fid",
|
||||
operates = {
|
||||
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除"),
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除"),
|
||||
@OrganizationTableOperate(index = "2", text = "恢复")
|
||||
},
|
||||
tableType = WeaTableType.CHECKBOX,
|
||||
|
|
@ -54,13 +54,13 @@ public class ResourceBasicInfoVO {
|
|||
/**
|
||||
* 编号
|
||||
*/
|
||||
@OrganizationTableColumn(text = "编号", width = "20%", column = "fno", orderkey = "fno")
|
||||
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "fno", orderkey = "fno")
|
||||
private String fNo;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@OrganizationTableColumn(text = "名称", width = "20%", column = "fname")
|
||||
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "fname")
|
||||
private String fName;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -80,6 +80,6 @@ public class ScHrmResourceVO {
|
|||
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScManagerName")
|
||||
private String managerName;
|
||||
|
||||
@OrganizationTableColumn(text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
|
||||
@OrganizationTableColumn(labelId = 547185, text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
|
||||
private Integer showOrder;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 : item.getShowOrder());
|
||||
tree.setOrderNum(null == item.getShowOrder() ? 0.00 : item.getShowOrder());
|
||||
return tree;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
|
|
|||
|
|
@ -34,34 +34,34 @@ public class JobListDTO {
|
|||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableTitle(title = "名称", dataIndex = "jobTitleName", key = "jobTitleName", width = "150")
|
||||
@TableTitle(labelId = 547141, title = "名称", dataIndex = "jobTitleName", key = "jobTitleName", width = "150")
|
||||
private String jobTitleName;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableTitle(title = "编号", dataIndex = "jobNo", key = "jobNo")
|
||||
@TableTitle(labelId = 547118, title = "编号", dataIndex = "jobNo", key = "jobNo")
|
||||
private String jobNo;
|
||||
/**
|
||||
* 所属分部
|
||||
*/
|
||||
@TableTitle(title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
|
||||
@TableTitle(labelId = 547128, title = "所属分部", dataIndex = "subCompanyName", key = "subCompanyName")
|
||||
private String subCompanyName;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableTitle(title = "所属部门", dataIndex = "departmentName", key = "departmentName")
|
||||
@TableTitle(labelId = 547431, title = "所属部门", dataIndex = "departmentName", key = "departmentName")
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 职务类别
|
||||
*/
|
||||
@TableTitle(title = "职务类别", dataIndex = "jobGroupName", key = "jobGroupName")
|
||||
@TableTitle(labelId = 547433, title = "职务类别", dataIndex = "jobGroupName", key = "jobGroupName")
|
||||
private String jobGroupName;
|
||||
|
||||
/**
|
||||
* 所属职务
|
||||
*/
|
||||
@TableTitle(title = "所属职务", dataIndex = "jobActivityName", key = "jobActivityName")
|
||||
@TableTitle(labelId = 547434, title = "所属职务", dataIndex = "jobActivityName", key = "jobActivityName")
|
||||
private String jobActivityName;
|
||||
/**
|
||||
* 上级岗位
|
||||
|
|
@ -74,13 +74,13 @@ public class JobListDTO {
|
|||
/**
|
||||
* 是否关键岗
|
||||
*/
|
||||
@TableTitle(title = "是否关键岗", dataIndex = "isKey", key = "isKey")
|
||||
@TableTitle(labelId = 547417, title = "是否关键岗", dataIndex = "isKey", key = "isKey")
|
||||
private String isKey;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@TableTitle(title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
||||
@TableTitle(labelId = 547185, title = "显示顺序", dataIndex = "showOrder", key = "showOrder", sorter = true)
|
||||
private Integer showOrder;
|
||||
|
||||
/**
|
||||
|
|
@ -89,6 +89,8 @@ public class JobListDTO {
|
|||
//@TableTitle(title = "是否启用", dataIndex = "forbiddenTag", key = "forbiddenTag")
|
||||
//private Integer forbiddenTag;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 操作列
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class JobSearchParam extends BaseQueryParam {
|
|||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer showOrder;
|
||||
private Double showOrder;
|
||||
|
||||
private Integer subcompanyid1;
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public class JobPO {
|
|||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer showOrder;
|
||||
private Double showOrder;
|
||||
|
||||
private String gradeId;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import lombok.NoArgsConstructor;
|
|||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@OrganizationTable(pageId = "98e9c62f-cd12-11ec-a15f-00ffcbed7123",
|
||||
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 ",
|
||||
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 ",
|
||||
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,35 +28,32 @@ import lombok.NoArgsConstructor;
|
|||
sortway = "asc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除")
|
||||
},
|
||||
tableType = WeaTableType.CHECKBOX
|
||||
)
|
||||
public class JobBrowserVO {
|
||||
|
||||
@OrganizationTableColumn(text = "标识", width = "25%", column = "id", display = false)
|
||||
@OrganizationTableColumn(labelId = 547597, text = "标识", width = "25%", column = "id", display = false)
|
||||
private Long id;
|
||||
|
||||
@OrganizationTableColumn(text = "编号", width = "25%", column = "job_no")
|
||||
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "25%", column = "job_no")
|
||||
private String jobNo;
|
||||
|
||||
@OrganizationTableColumn(text = "岗位名称", width = "25%", column = "name")
|
||||
@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")
|
||||
private String jobName;
|
||||
|
||||
@OrganizationTableColumn(text = "职务类别", width = "25%", column = "jobGroupName")
|
||||
@OrganizationTableColumn(labelId = 547433, text = "职务类别", width = "25%", column = "jobGroupName")
|
||||
private String jobGroupName;
|
||||
|
||||
@OrganizationTableColumn(text = "所属职务", width = "25%", column = "jobActivityName")
|
||||
@OrganizationTableColumn(labelId = 547434, 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,12 +26,18 @@ public class SingleJobTreeVO {
|
|||
|
||||
private Long id;
|
||||
|
||||
@TableTitle(title = "编号", dataIndex = "jobNo", key = "jobNo")
|
||||
@TableTitle(labelId = 547118, title = "编号", dataIndex = "jobNo", key = "jobNo")
|
||||
private String jobNo;
|
||||
|
||||
@TableTitle(title = "岗位名称", dataIndex = "jobName", key = "jobName")
|
||||
@TableTitle(labelId = 547595, 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;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,31 +27,31 @@ import java.util.Date;
|
|||
)
|
||||
public class LogViewVO {
|
||||
|
||||
@OrganizationTableColumn(text = "操作时间", width = "20%", column = "create_time", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getDateTimeFormat")
|
||||
@OrganizationTableColumn(labelId = 547159, text = "操作时间", width = "20%", column = "create_time", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getDateTimeFormat")
|
||||
private Date createTime;
|
||||
|
||||
@OrganizationTableColumn(text = "操作者", width = "16%", column = "operator_name")
|
||||
@OrganizationTableColumn(labelId = 547160, text = "操作者", width = "16%", column = "operator_name")
|
||||
private String operator;
|
||||
|
||||
@OrganizationTableColumn(text = "操作类型", width = "16%", column = "operate_type", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateType")
|
||||
@OrganizationTableColumn(labelId = 547161, text = "操作类型", width = "16%", column = "operate_type", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateType", multiLanguage = true)
|
||||
private String operateType;
|
||||
|
||||
@OrganizationTableColumn(text = "操作描述", width = "16%", column = "operate_desc")
|
||||
private String operateDesc;
|
||||
//@OrganizationTableColumn(labelId = 547162, text = "操作描述", width = "16%", column = "operate_desc")
|
||||
//private String operateDesc;
|
||||
|
||||
@OrganizationTableColumn(text = "对象", width = "16%", column = "value")
|
||||
@OrganizationTableColumn(labelId = 547163, text = "对象", width = "16%", column = "value")
|
||||
private String value;
|
||||
|
||||
@OrganizationTableColumn(text = "所属模块", width = "16%", column = "operate_module_name")
|
||||
@OrganizationTableColumn(labelId = 547164, text = "所属模块", width = "16%", column = "operate_module_name", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateModuleName", multiLanguage = true)
|
||||
private String operateModuleName;
|
||||
|
||||
@OrganizationTableColumn(text = "修改详情", width = "16%", column = "message")
|
||||
@OrganizationTableColumn(labelId = 547165, text = "修改详情", width = "16%", column = "message", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateDetail", multiLanguage = true)
|
||||
private String showDetail;
|
||||
|
||||
@OrganizationTableColumn(text = "操作IP", width = "16%", column = "client_ip")
|
||||
@OrganizationTableColumn(labelId = 547166, text = "操作IP", width = "16%", column = "client_ip")
|
||||
private String clientIp;
|
||||
|
||||
@OrganizationTableColumn(text = "操作参数", width = "16%", column = "params_str", display = false)
|
||||
@OrganizationTableColumn(labelId = 547413, text = "操作参数", width = "16%", column = "params_str", display = false)
|
||||
private String paramsStr;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,22 +40,22 @@ public class CardAccessVO {
|
|||
@OrganizationTableColumn(column = "id", display = false)
|
||||
private Long id;
|
||||
|
||||
@OrganizationTableColumn(text = "栏目", width = "15%", column = "type_name")
|
||||
@OrganizationTableColumn(labelId = 547389, text = "栏目", width = "15%", column = "type_name",transmethod = "com.engine.organization.transmethod.CardAccessTrans.getMultiLanguage",multiLanguage = true)
|
||||
private Integer typeName;
|
||||
|
||||
@OrganizationTableColumn(text = "是否启用", width = "15%", column = "status")
|
||||
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "15%", column = "status")
|
||||
private Integer status;
|
||||
|
||||
@OrganizationTableColumn(text = "所有人可见", width = "15%", column = "all_people")
|
||||
@OrganizationTableColumn(labelId = 547390, text = "所有人可见", width = "15%", column = "all_people")
|
||||
private Integer allPeople;
|
||||
|
||||
@OrganizationTableColumn(text = "上级可见", width = "15%", column = "superior")
|
||||
@OrganizationTableColumn(labelId = 547391, text = "上级可见", width = "15%", column = "superior")
|
||||
private Integer superior;
|
||||
|
||||
@OrganizationTableColumn(text = "所有上级可见", width = "15%", column = "all_superior")
|
||||
@OrganizationTableColumn(labelId = 547392, text = "所有上级可见", width = "15%", column = "all_superior")
|
||||
private Integer allSuperior;
|
||||
|
||||
@OrganizationTableColumn(text = "查看自定义", width = "30%", column = "custom",transmethod = "com.engine.organization.transmethod.SystemTransMethod.getRoleName")
|
||||
@OrganizationTableColumn(labelId = 547414, text = "查看自定义", width = "30%", column = "custom",transmethod = "com.engine.organization.transmethod.SystemTransMethod.getRoleName")
|
||||
private String custom;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ import lombok.NoArgsConstructor;
|
|||
sortway = "asc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, 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(text = "编号", width = "20%", column = "post_info_no", orderkey = "post_info_no")
|
||||
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "post_info_no", orderkey = "post_info_no")
|
||||
private String postInfoNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@OrganizationTableColumn(text = "名称", width = "20%", column = "post_info_name")
|
||||
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "post_info_name")
|
||||
private String postInfoName;
|
||||
/**
|
||||
* 权限
|
||||
|
|
@ -84,6 +84,6 @@ public class PostInfoTableVO {
|
|||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
|
||||
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "10%", column = "forbidden_tag")
|
||||
private Integer forbiddenTag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ 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;
|
||||
|
||||
|
|
@ -78,8 +79,10 @@ public class PersonnelResumePO {
|
|||
imageStr = "data:image/" + manager.getImageFileType() + ";base64," + Base64.getEncoder().encodeToString(IOUtils.toByteArray(fileInputStream));
|
||||
// 删除文件
|
||||
f.delete();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
//throw new RuntimeException(e);
|
||||
|
||||
}
|
||||
return imageStr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ import lombok.NoArgsConstructor;
|
|||
sortway = "asc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, 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(text = "编号", width = "20%", column = "grade_no", orderkey = "grade_no")
|
||||
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "grade_no", orderkey = "grade_no")
|
||||
private String gradeNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@OrganizationTableColumn(text = "名称", width = "20%", column = "grade_name")
|
||||
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "grade_name")
|
||||
private String gradeName;
|
||||
|
||||
/**
|
||||
|
|
@ -68,22 +68,22 @@ public class GradeTableVO {
|
|||
/**
|
||||
* 等级方案
|
||||
*/
|
||||
@OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name")
|
||||
@OrganizationTableColumn( labelId = 547124, text = "等级方案", width = "20%", column = "scheme_name")
|
||||
private String schemeName;
|
||||
/**
|
||||
* 职等
|
||||
*/
|
||||
@OrganizationTableColumn(text = "职等", width = "20%", column = "level_id", transmethod = "com.engine.organization.transmethod.LevelTransMethod.getLevelId")
|
||||
@OrganizationTableColumn(labelId = 547139, text = "职等", width = "20%", column = "level_id", transmethod = "com.engine.organization.transmethod.LevelTransMethod.getLevelId")
|
||||
private String levelId;
|
||||
|
||||
/**
|
||||
* 描述说明
|
||||
*/
|
||||
@OrganizationTableColumn(text = "描述说明", width = "30%", column = "description")
|
||||
@OrganizationTableColumn(labelId = 547142, text = "描述说明", width = "30%", column = "description")
|
||||
private String description;
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
|
||||
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "10%", column = "forbidden_tag")
|
||||
private int forbiddenTag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ import lombok.NoArgsConstructor;
|
|||
sortway = "asc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, 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(text = "编号", width = "20%", column = "level_no", orderkey = "level_no")
|
||||
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "level_no", orderkey = "level_no")
|
||||
private String levelNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@OrganizationTableColumn(text = "名称", width = "20%", column = "level_name")
|
||||
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "level_name")
|
||||
private String levelName;
|
||||
|
||||
/**
|
||||
* 等级方案
|
||||
*/
|
||||
@OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name")
|
||||
@OrganizationTableColumn(text = "等级方案", labelId = 547124, width = "20%", column = "scheme_name")
|
||||
private String schemeName;
|
||||
|
||||
/**
|
||||
* 描述说明
|
||||
*/
|
||||
@OrganizationTableColumn(text = "描述说明", width = "30%", column = "description")
|
||||
@OrganizationTableColumn(labelId = 547142, text = "描述说明", width = "30%", column = "description")
|
||||
private String description;
|
||||
|
||||
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
|
||||
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "10%", column = "forbidden_tag")
|
||||
private Integer forbiddenTag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ import lombok.NoArgsConstructor;
|
|||
sortway = "asc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, 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 = "编号", width = "25%", column = "scheme_no", orderkey = "scheme_no")
|
||||
@OrganizationTableColumn(text = "编号", labelId = 547118, width = "25%", column = "scheme_no", orderkey = "scheme_no")
|
||||
private String schemeNo;
|
||||
/**
|
||||
* 方案名称
|
||||
*/
|
||||
@OrganizationTableColumn(text = "方案名称", width = "25%", column = "scheme_name")
|
||||
@OrganizationTableColumn(text = "方案名称", labelId = 547127, width = "25%", column = "scheme_name")
|
||||
private String schemeName;
|
||||
|
||||
@OrganizationTableColumn(text = "所属分部", width = "25%", column = "subcompanyid",transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
|
||||
@OrganizationTableColumn(text = "所属分部", labelId = 547128, width = "25%", column = "subcompanyid", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
|
||||
private String subCompanyName;
|
||||
|
||||
/**
|
||||
* 方案描述
|
||||
*/
|
||||
@OrganizationTableColumn(text = "方案说明", width = "40%", column = "scheme_description")
|
||||
@OrganizationTableColumn(text = "方案说明", labelId = 547129, width = "40%", column = "scheme_description")
|
||||
private String schemeDescription;
|
||||
|
||||
/**
|
||||
* 禁用标识
|
||||
*/
|
||||
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
|
||||
@OrganizationTableColumn(text = "是否启用", labelId = 547130, width = "10%", column = "forbidden_tag")
|
||||
private Integer forbiddenTag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ public class SearchTree extends TreeNode {
|
|||
private boolean isCanceled;
|
||||
private String requestParams;
|
||||
private String parentComp;
|
||||
private Integer orderNum;
|
||||
private Double orderNum;
|
||||
private Double showOrderOfTree;
|
||||
|
||||
public String getCompanyid() {
|
||||
return companyid;
|
||||
|
|
@ -76,14 +77,28 @@ public class SearchTree extends TreeNode {
|
|||
this.parentComp = parentComp;
|
||||
}
|
||||
|
||||
public Integer getOrderNum() {
|
||||
public Double getOrderNum() {
|
||||
if(null==orderNum){
|
||||
return 0.00;
|
||||
}
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(Integer orderNum) {
|
||||
public void setOrderNum(Double 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) {
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ import lombok.NoArgsConstructor;
|
|||
sortway = "asc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, 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(text = "编号", width = "20%", column = "sequence_no", orderkey = "sequence_no")
|
||||
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "20%", column = "sequence_no", orderkey = "sequence_no")
|
||||
private String sequenceNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@OrganizationTableColumn(text = "名称", width = "20%", column = "sequence_name")
|
||||
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "20%", column = "sequence_name")
|
||||
private String sequenceName;
|
||||
|
||||
|
||||
/**
|
||||
* 等级方案
|
||||
*/
|
||||
@OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name")
|
||||
@OrganizationTableColumn(text = "等级方案", labelId = 547124, width = "20%", column = "scheme_name")
|
||||
private String schemeName;
|
||||
|
||||
/**
|
||||
* 描述说明
|
||||
*/
|
||||
@OrganizationTableColumn(text = "描述说明", width = "30%", column = "description")
|
||||
@OrganizationTableColumn(labelId = 547142, text = "描述说明", width = "30%", column = "description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
|
||||
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "10%", column = "forbidden_tag")
|
||||
private Integer forbiddenTag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
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;
|
||||
}
|
||||
|
|
@ -24,8 +24,8 @@ import lombok.NoArgsConstructor;
|
|||
sortway = "asc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, 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(column = "id", display = false)
|
||||
@OrganizationTableColumn(labelId = 547327, text = "序号", width = "10%",column = "id")
|
||||
private Long id;
|
||||
/**
|
||||
* 是否被引用
|
||||
|
|
@ -46,37 +46,37 @@ public class StaffPlanTableVO {
|
|||
/**
|
||||
* 编号
|
||||
*/
|
||||
@OrganizationTableColumn(text = "编号", width = "16%", column = "plan_no", orderkey = "plan_no")
|
||||
@OrganizationTableColumn(labelId = 547118, text = "编号", width = "16%", column = "plan_no", orderkey = "plan_no")
|
||||
private String planNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@OrganizationTableColumn(text = "名称", width = "16%", column = "plan_name")
|
||||
@OrganizationTableColumn(labelId = 547141, text = "名称", width = "16%", column = "plan_name")
|
||||
private String planName;
|
||||
/**
|
||||
* w维度
|
||||
*/
|
||||
@OrganizationTableColumn(text = "维度", width = "16%", column = "control_dimension",transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getControlDimension")
|
||||
@OrganizationTableColumn(labelId = 547293, text = "维度", width = "16%", column = "control_dimension",transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getControlDimension" ,multiLanguage = true)
|
||||
private String controlDimension;
|
||||
/**
|
||||
* 年度
|
||||
*/
|
||||
@OrganizationTableColumn(text = "年度", width = "16%", column = "plan_year")
|
||||
@OrganizationTableColumn(labelId = 547336, text = "年度", width = "16%", column = "plan_year")
|
||||
private Integer planYear;
|
||||
/**
|
||||
* 时间开始
|
||||
*/
|
||||
@OrganizationTableColumn(text = "时间开始", width = "16%", column = "time_start", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getFormatDateString")
|
||||
@OrganizationTableColumn(labelId = 547337, text = "时间开始", width = "16%", column = "time_start", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getFormatDateString")
|
||||
private String timeStart;
|
||||
/**
|
||||
* 时间结束
|
||||
*/
|
||||
@OrganizationTableColumn(text = "时间结束", width = "16%", column = "time_end", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getFormatDateString")
|
||||
@OrganizationTableColumn(labelId = 547338, text = "时间结束", width = "16%", column = "time_end", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getFormatDateString")
|
||||
private String timeEnd;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@OrganizationTableColumn(text = "是否启用", width = "16%", column = "forbidden_tag")
|
||||
@OrganizationTableColumn(labelId = 547130, text = "是否启用", width = "16%", column = "forbidden_tag")
|
||||
private Integer forbiddenTag;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@ 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",
|
||||
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",
|
||||
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(text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除"),
|
||||
@OrganizationTableOperate(index = "2", text = "变更")
|
||||
@OrganizationTableOperate(index = "0", labelId = 547132, text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", labelId = 547135, text = "删除"),
|
||||
@OrganizationTableOperate(index = "2", labelId = 547176, text = "变更")
|
||||
}, tableType = WeaTableType.CHECKBOX
|
||||
|
||||
)
|
||||
|
|
@ -43,52 +43,59 @@ public class StaffTableVO {
|
|||
/**
|
||||
* 方案id
|
||||
*/
|
||||
@OrganizationTableColumn(text = "方案", width = "10%", column = "plan_id", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getSpanById")
|
||||
@OrganizationTableColumn(labelId = 547344, text = "方案", width = "10%", column = "plan_id", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getSpanById")
|
||||
private String planId;
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
@OrganizationTableColumn(text = "维度", width = "10%", column = "control_dimension", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getControlDimension")
|
||||
@OrganizationTableColumn(labelId = 547293, text = "维度", width = "10%", column = "control_dimension", transmethod = "com.engine.organization.transmethod.StaffPlanTransMethod.getControlDimension", multiLanguage = true)
|
||||
private String controlDimension;
|
||||
/**
|
||||
* 分部
|
||||
*/
|
||||
@OrganizationTableColumn(text = "分部", width = "10%", column = "comp_id", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
|
||||
@OrganizationTableColumn(labelId = 547332, text = "分部", width = "10%", column = "comp_id", transmethod = "com.engine.organization.transmethod.CompTransMethod.getSpanById")
|
||||
private String compId;
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@OrganizationTableColumn(text = "部门", width = "10%", column = "dept_id", transmethod = "com.engine.organization.transmethod.DepartmentTransMethod.getSpanById")
|
||||
@OrganizationTableColumn(labelId = 547331, text = "部门", width = "10%", column = "dept_id", transmethod = "com.engine.organization.transmethod.DepartmentTransMethod.getSpanById")
|
||||
private String deptId;
|
||||
/**
|
||||
* 岗位
|
||||
*/
|
||||
@OrganizationTableColumn(text = "岗位", width = "10%", column = "job_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getSpanById")
|
||||
@OrganizationTableColumn(labelId = 547333, text = "岗位", width = "10%", column = "job_id", transmethod = "com.engine.organization.transmethod.JobTransMethod.getSpanById")
|
||||
private String jobId;
|
||||
/**
|
||||
* 编制数
|
||||
*/
|
||||
@OrganizationTableColumn(text = "编制数", width = "10%", column = "staff_num")
|
||||
@OrganizationTableColumn(labelId = 547345, text = "编制数", width = "10%", column = "staff_num")
|
||||
private Integer staffNum;
|
||||
/**
|
||||
* 在编
|
||||
*/
|
||||
@OrganizationTableColumn(text = "在编", width = "10%", column = "permanent_num")
|
||||
@OrganizationTableColumn(labelId = 547346, text = "在编", width = "10%", column = "permanent_num")
|
||||
private Integer permanentNum;
|
||||
/**
|
||||
* 冻结数
|
||||
*/
|
||||
@OrganizationTableColumn(text = "冻结数", width = "10%", column = "freeze_num")
|
||||
@OrganizationTableColumn(labelId = 547347, text = "冻结数", width = "10%", column = "freeze_num")
|
||||
private Integer freezeNum;
|
||||
/**
|
||||
* 缺编状态
|
||||
*/
|
||||
@OrganizationTableColumn(text = "缺编状态", width = "10%", column = "lack_status", transmethod = "com.engine.organization.transmethod.StaffTransMethod.getLackSpan")
|
||||
@OrganizationTableColumn(labelId = 547348, text = "缺编状态", width = "20%", column = "lack_status", transmethod = "com.engine.organization.transmethod.StaffTransMethod.getLackSpan",multiLanguage = true)
|
||||
private String lackStatus;
|
||||
/**
|
||||
* 编制描述
|
||||
*/
|
||||
@OrganizationTableColumn(text = "编制描述", width = "10%", column = "staff_desc")
|
||||
@OrganizationTableColumn(labelId = 547349, text = "编制描述", width = "10%", column = "staff_desc")
|
||||
private String staffDesc;
|
||||
|
||||
/**
|
||||
* 描述说明
|
||||
*/
|
||||
@OrganizationTableColumn(labelId = 547142, text = "描述说明", width = "10%", column = "description")
|
||||
private String description;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,28 +6,32 @@ package com.engine.organization.enums;
|
|||
* @version: 1.0
|
||||
*/
|
||||
public enum LogModuleNameEnum {
|
||||
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);
|
||||
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);
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer value;
|
||||
|
||||
LogModuleNameEnum(String name, Integer value) {
|
||||
private int labelId;
|
||||
|
||||
|
||||
LogModuleNameEnum(String name, Integer value, int labelId) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.labelId = labelId;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
|
|
@ -37,4 +41,17 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ package com.engine.organization.enums;
|
|||
**/
|
||||
public enum ModuleTypeEnum implements BaseEnum<Integer> {
|
||||
|
||||
subcompanyfielddefined(1, "分部", -84967),
|
||||
departmentfielddefined(2, "部门", -84967),
|
||||
jobfielddefined(3, "岗位", -84967),
|
||||
resourcefielddefined(4, "人员", -84967);
|
||||
subcompanyfielddefined(1, "分部", 547332),
|
||||
departmentfielddefined(2, "部门", 547331),
|
||||
jobfielddefined(3, "岗位", 547333),
|
||||
resourcefielddefined(4, "人员", 547205);
|
||||
|
||||
private int value;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,22 +8,37 @@ package com.engine.organization.enums;
|
|||
**/
|
||||
public enum OperateTypeEnum {
|
||||
|
||||
ADD("1", "新增"),
|
||||
UPDATE("2", "更新"),
|
||||
DELETE("4", "删除"),
|
||||
MOVE("5", "转移"),
|
||||
MERGE("6", "合并"),
|
||||
COPY("7", "复制"),
|
||||
CANCELED("8", "封存"),
|
||||
RECOVER("9","恢复");
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
ADD("1", "新增", 547117),
|
||||
UPDATE("2", "更新", 547615),
|
||||
DELETE("4", "删除", 547135),
|
||||
MOVE("5", "转移", 547594),
|
||||
MERGE("6", "合并", 547194),
|
||||
COPY("7", "复制", 547196),
|
||||
CANCELED("8", "封存", 547494),
|
||||
RECOVER("9", "恢复", 547495);
|
||||
|
||||
private String value;
|
||||
|
||||
private String label;
|
||||
|
||||
OperateTypeEnum(String value, String label) {
|
||||
private int labelId;
|
||||
|
||||
OperateTypeEnum(String value, String label, int labelId) {
|
||||
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() {
|
||||
|
|
@ -33,4 +48,8 @@ public enum OperateTypeEnum {
|
|||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public int getLabelId() {
|
||||
return labelId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +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;
|
||||
|
|
@ -30,6 +31,22 @@ 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) {
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
select
|
||||
<include refid="baseColumns"/>
|
||||
from hrmsubcompany t
|
||||
WHERE id IN
|
||||
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}
|
||||
</foreach>
|
||||
|
|
@ -117,25 +117,25 @@
|
|||
<include refid="baseColumns"/>
|
||||
FROM
|
||||
hrmsubcompany t
|
||||
WHERE t.SUPSUBCOMID = 0
|
||||
WHERE t.SUPSUBCOMID = 0 and (t.canceled is null or t.canceled != '1')
|
||||
</select>
|
||||
|
||||
<select id="hasSubs" resultType="java.lang.String">
|
||||
select supsubcomid
|
||||
from hrmsubcompany
|
||||
where 1=1
|
||||
where (canceled is null or canceled != '1')
|
||||
<include refid="subsWhere"/>
|
||||
union
|
||||
select subcompanyid1
|
||||
from hrmdepartment
|
||||
where 1=1
|
||||
where (canceled is null or canceled != '1')
|
||||
<include refid="subsWhere"/>
|
||||
</select>
|
||||
|
||||
<select id="hasDetachSubs" resultType="java.lang.String">
|
||||
select supsubcomid
|
||||
from hrmsubcompany
|
||||
where 1=1
|
||||
where (canceled is null or canceled != '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 1=1
|
||||
where (canceled is null or canceled != '1')
|
||||
<include refid="subsWhere"/>
|
||||
and subcompanyid1 in
|
||||
<foreach collection="companyIds" open="(" item="id" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -38,6 +38,14 @@ 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);
|
||||
|
||||
/**
|
||||
* 浏览按钮展示数据用
|
||||
*
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
<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>
|
||||
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
t.departmentCode,
|
||||
t.coadjutant,
|
||||
t.showOrder,
|
||||
t.showOrderOfTree,
|
||||
t.uuid
|
||||
</sql>
|
||||
|
||||
|
|
@ -51,6 +53,26 @@
|
|||
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 ">
|
||||
|
|
@ -76,7 +98,7 @@
|
|||
<select id="listDeptsByIds" resultType="java.util.Map">
|
||||
select
|
||||
id as "id",
|
||||
departmentName as "name"
|
||||
departmentMark as "name"
|
||||
from hrmdepartment t
|
||||
WHERE id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
|
|
@ -122,7 +144,7 @@
|
|||
<select id="getIdByNameAndPid" resultType="java.lang.Integer">
|
||||
select id
|
||||
from hrmdepartment
|
||||
where departmentName = #{departmentName}
|
||||
where departmentmark = #{departmentName}
|
||||
and subCompanyId1 = #{subCompanyId1}
|
||||
and supDepId = #{supDepId}
|
||||
</select>
|
||||
|
|
@ -137,7 +159,7 @@
|
|||
<select id="hasSubs" resultType="java.lang.String">
|
||||
select distinct supDepId
|
||||
from hrmdepartment
|
||||
where 1=1
|
||||
where (canceled is null or canceled != '1')
|
||||
<include refid="com.engine.organization.mapper.comp.CompMapper.subsWhere"/>
|
||||
</select>
|
||||
<select id="countUsedInJob" resultType="java.lang.Integer">
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ public interface ManagerDetachMapper {
|
|||
|
||||
ManagerDetachPO getDetachById(@Param("id") Integer id);
|
||||
|
||||
List<ManagerDetachPO> getDetachListById(@Param("ecManager") Integer ecManager);
|
||||
List<ManagerDetachPO> getDetachListById(@Param("ecManager") Integer ecManager,@Param("managerType") Integer managerType);
|
||||
|
||||
List<ManagerDetachPO> selectDetachListByManager(@Param("ids") Collection<Integer> ids);
|
||||
|
||||
ManagerDetachPO selectManagerDetachByUid(@Param("uid") Integer uId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,6 +216,19 @@
|
|||
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">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ 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;
|
||||
|
|
@ -44,19 +43,6 @@ 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);
|
||||
|
|
|
|||
|
|
@ -100,57 +100,6 @@
|
|||
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
|
||||
|
|
@ -184,6 +133,7 @@
|
|||
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
|
||||
|
|
@ -199,7 +149,7 @@
|
|||
groupid,
|
||||
#{scopeId} as scopeId,
|
||||
'hrm' as tablename
|
||||
FROM hrm_formfield) hrmallfield
|
||||
FROM hrm_formfield where isuse = 1) hrmallfield
|
||||
WHERE FIELDHTMLTYPE != '6' and groupid IN (SELECT id FROM hrm_fieldgroup WHERE grouptype = #{scopeId})
|
||||
ORDER BY hrmallfield.groupid, hrmallfield.fieldorder
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ 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;
|
||||
|
|
@ -46,6 +47,8 @@ public interface JobMapper {
|
|||
*/
|
||||
List<JobPO> listAll();
|
||||
|
||||
List<SingleJobTreeVO> jobSearchByDept(@Param("deptId") Integer deptId);
|
||||
|
||||
/**
|
||||
* 根据ID查询元素
|
||||
*
|
||||
|
|
@ -127,7 +130,7 @@ public interface JobMapper {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
Integer getMaxShowOrder();
|
||||
Double getMaxShowOrder();
|
||||
|
||||
/**
|
||||
* 根据名字和上级查询岗位信息
|
||||
|
|
@ -138,12 +141,15 @@ public interface JobMapper {
|
|||
* @param parentJob
|
||||
* @return
|
||||
*/
|
||||
Long getIdByNameAndPid(@Param("jobName") String jobName, @Param("parentCompany") Integer parentCompany, @Param("parentDepartment") Integer parentDepartment, @Param("parentJob") Long parentJob);
|
||||
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);
|
||||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@
|
|||
and t.forbidden_tag = #{jobPO.forbiddenTag}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getMaxShowOrder" resultType="java.lang.Integer">
|
||||
<select id="getMaxShowOrder" resultType="java.lang.Double">
|
||||
select max(show_order)
|
||||
from jcl_org_job
|
||||
</select>
|
||||
|
|
@ -482,14 +482,26 @@
|
|||
and delete_type = 0
|
||||
</select>
|
||||
|
||||
<select id="getIdByNameAndPid" resultType="java.lang.Long">
|
||||
|
||||
<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
|
||||
t.id
|
||||
from
|
||||
jcl_org_job t
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_job t
|
||||
left join hrmjobtitles h on t.ec_jobTitle = h.id
|
||||
where
|
||||
delete_type = 0
|
||||
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}
|
||||
and h.JOBTITLENAME = #{jobName}
|
||||
and ec_company = #{parentCompany}
|
||||
<include refid="nullparentDept"/>
|
||||
|
|
@ -540,6 +552,23 @@
|
|||
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">
|
||||
|
|
|
|||
|
|
@ -61,5 +61,6 @@
|
|||
<if test="null!=parentId and parentId !=0">
|
||||
and viewtype = 1
|
||||
</if>
|
||||
order by scopeorder
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package com.engine.organization.mapper.resource;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.organization.entity.hrmresource.param.SearchTemplateParam;
|
||||
import com.engine.organization.entity.hrmresource.po.ResourceChartPO;
|
||||
import com.engine.organization.entity.hrmresource.po.ResourcePO;
|
||||
|
|
@ -56,6 +55,8 @@ 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);
|
||||
|
|
@ -66,6 +67,10 @@ 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);
|
||||
|
|
@ -74,9 +79,10 @@ public interface HrmResourceMapper {
|
|||
|
||||
Integer deleteCustomTemplate(@Param("id") Integer Id, @Param("userId") Integer userId);
|
||||
|
||||
List<JSONObject> queryAllResColumns(@Param("level") String level, @Param("grade") String grade);
|
||||
Integer updateCustomTemplateUsed(@Param("userId") Integer userId);
|
||||
|
||||
String queryLabelName(@Param("fieldName") String fieldName, @Param("scopeId") String scopeId);
|
||||
|
||||
String queryLabelName(@Param("fieldName") String fieldName, @Param("scopeId") String scopeId, @Param("language") Integer language);
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -88,5 +94,7 @@ public interface HrmResourceMapper {
|
|||
*/
|
||||
List<ResourceChartPO> selectByDepartmentId(@Param("departmentId")Integer departmentId);
|
||||
|
||||
List<ResourceChartPO> selectByIdAndStatus(@Param("statusList") List<String> statusList,@Param("departmentId")Integer departmentId);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,12 +14,15 @@
|
|||
<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 < 4
|
||||
where a.status < 4 and a.seclevel >= 0
|
||||
and not exists
|
||||
(select 1
|
||||
from jcl_org_job b
|
||||
|
|
@ -147,7 +150,14 @@
|
|||
select id,
|
||||
name
|
||||
from jcl_org_custom_template
|
||||
where creator = #{userId}
|
||||
where creator = #{userId} and overall is null
|
||||
</select>
|
||||
|
||||
<select id="getCustomOverAll" resultMap="SearchTemplateMap">
|
||||
select id,
|
||||
name
|
||||
from jcl_org_custom_template
|
||||
where overall = 1
|
||||
</select>
|
||||
|
||||
<insert id="insertSearchTemplate" parameterType="com.engine.organization.entity.hrmresource.po.SearchTemplatePO"
|
||||
|
|
@ -176,6 +186,9 @@
|
|||
<if test="workFields != null">
|
||||
work_fields,
|
||||
</if>
|
||||
<if test="isused != null">
|
||||
isused,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
|
|
@ -199,6 +212,9 @@
|
|||
<if test="workFields != null">
|
||||
#{workFields},
|
||||
</if>
|
||||
<if test="isused != null">
|
||||
#{isused},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -408,11 +424,7 @@
|
|||
</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 *
|
||||
|
|
@ -433,12 +445,13 @@
|
|||
from hrm_formfield a
|
||||
inner join htmllabelinfo b on a.fieldlabel = b.indexid
|
||||
where a.FIELDNAME = #{fieldName}
|
||||
and b.LANGUAGEID = '7'
|
||||
and b.LANGUAGEID = ${language}
|
||||
union all
|
||||
SELECT t1.hrm_fieldlable as labelname
|
||||
SELECT t3.LABELNAME as labelname
|
||||
FROM cus_formfield t1,
|
||||
cus_formdict t2
|
||||
WHERE t1.fieldid = t2.id
|
||||
cus_formdict t2,
|
||||
htmllabelinfo t3
|
||||
WHERE t1.fieldid = t2.id and t1.FIELDLABLE = t3.indexid and t3.LANGUAGEID = ${language}
|
||||
AND t1.scope = 'HrmCustomFieldByInfoType'
|
||||
and t1.SCOPEID = #{scopeId}
|
||||
and t2.fieldname = #{fieldName}
|
||||
|
|
@ -448,12 +461,39 @@
|
|||
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 < 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>
|
||||
|
|
@ -26,14 +26,18 @@ public interface JclOrgCustomTemplateMapper {
|
|||
|
||||
int updateByPrimaryKey(JclOrgCustomTemplatePO record);
|
||||
|
||||
List<JclOrgCustomTemplatePO> listAll();
|
||||
List<JclOrgCustomTemplatePO> listAllByCreator(@Param("creator") Integer creator);
|
||||
|
||||
List<Long> listAllId();
|
||||
|
||||
List<Long> listAllIdByCreator(@Param("creator") Integer creator);
|
||||
|
||||
int deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
int updateUsed(@Param("isused")String isused,@Param("id") String id,@Param("creator") String creator);
|
||||
int updateUsed(@Param("overall")Integer overall,@Param("isused")String isused,@Param("id") String id,@Param("creator") String creator);
|
||||
|
||||
JclOrgCustomTemplatePO queryIsusedTemp(@Param("isused")String isused,@Param("creator") String creator);
|
||||
|
||||
JclOrgCustomTemplatePO queryOverAll();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,12 +14,13 @@
|
|||
<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
|
||||
creator,create_time,update_time,overall
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
|
|
@ -28,10 +29,10 @@
|
|||
from jcl_org_custom_template
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="listAll" resultMap="BaseResultMap">
|
||||
<select id="listAllByCreator" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from jcl_org_custom_template order by id
|
||||
from jcl_org_custom_template where creator = #{creator} order by id
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
|
|
@ -132,8 +133,9 @@
|
|||
<update id="updateUsed" parameterType="java.lang.String">
|
||||
update JCL_ORG_CUSTOM_TEMPLATE set isused = #{isused}
|
||||
<where>
|
||||
overall is null
|
||||
<if test="id !=null">
|
||||
id = #{id}
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="creator !=null">
|
||||
and creator = #{creator}
|
||||
|
|
@ -144,7 +146,21 @@
|
|||
<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}
|
||||
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
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -87,4 +87,6 @@ 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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -394,4 +394,14 @@
|
|||
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>
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.chart.HrmLabelVO;
|
||||
import com.engine.organization.entity.chart.params.StatisticsParam;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -91,4 +92,22 @@ 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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,4 +41,13 @@ 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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ public interface HrmResourceService {
|
|||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Integer saveCustomTemplate(SearchTemplateParam params);
|
||||
Map<String, Object> saveCustomTemplate(SearchTemplateParam params);
|
||||
|
||||
/**
|
||||
* 批量修改保存定制列模板
|
||||
|
|
@ -176,7 +176,15 @@ 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);
|
||||
Map<String, Object> chartResourceList(Integer departmentId,String versionId,String dimension,String statusValue);
|
||||
|
||||
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ 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;
|
||||
|
|
@ -59,8 +60,9 @@ 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", hasRight);
|
||||
//boolean hasRight = HasRightUtil.hasRight(user, RIGHT_NAME, true);
|
||||
//脚本未找到该菜单 放开所有
|
||||
resultMap.put("hasRight", true);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
|
@ -101,10 +103,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("按钮名称").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());
|
||||
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());
|
||||
|
||||
Map<String, Object> tabInfoMap = new HashMap<>();
|
||||
tabInfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, infoPOList, 2, false, true));
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ 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;
|
||||
|
|
@ -88,6 +89,7 @@ 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"));
|
||||
|
|
@ -139,6 +141,10 @@ 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);
|
||||
}
|
||||
|
||||
|
|
@ -225,12 +231,30 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
//版本id
|
||||
String versionId = Util.null2String(params.get("id"));
|
||||
|
||||
OrganizationAssert.isFalse(StringUtils.isBlank(rootId) || !rootId.startsWith("d_"), "数据有误,未查询到对应数据");
|
||||
OrganizationAssert.isFalse(StringUtils.isBlank(rootId) || !rootId.startsWith("d_"), SystemEnv.getHtmlLabelName(547440,user.getLanguage()));
|
||||
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);
|
||||
return ServiceUtil.getService(HrmResourceServiceImpl.class, user).chartResourceList(Integer.parseInt(departmentId), versionId, dimension,statusValue);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -278,9 +302,13 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
if (showJob) {
|
||||
// 查询部门下的岗位
|
||||
if (isRealTime) {
|
||||
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 + "'";
|
||||
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 + "'";
|
||||
} else {
|
||||
sql = "select jobid as id ,jobname as name from jcl_chart_job where departmentid = '" + departmentId + "' and versionid = " + versionId;
|
||||
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;
|
||||
}
|
||||
rs.executeQuery(sql);
|
||||
while (rs.next()) {
|
||||
|
|
@ -299,19 +327,28 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
// 遍历岗位、查询对应岗位下的人员
|
||||
if (isRealTime) {
|
||||
if (isRealDimension) {
|
||||
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 = ?";
|
||||
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 = ?";
|
||||
} else {
|
||||
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 = ?";
|
||||
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 = ?";
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
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()) {
|
||||
ChartPO chartPO = getResourceChartPO(rs.getString("id"), rs.getString("name"), parentId, rs.getString("belongto"), rs.getString("companyworkyear"));
|
||||
String accountType = Util.null2String(rs.getString("accounttype"));
|
||||
ChartPO chartPO = getResourceChartPO(rs.getString("id"), rs.getString("name"), parentId, rs.getString("belongto"), rs.getString("companyworkyear"),accountType);
|
||||
resourceNum++;
|
||||
dataList.add(chartPO);
|
||||
}
|
||||
|
|
@ -321,23 +358,46 @@ 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 from hrmresource a where a.status < 4 and a.departmentid = ? ";
|
||||
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 = ? ";
|
||||
} else {
|
||||
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 = ? ";
|
||||
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 = ? ";
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
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()) {
|
||||
ChartPO chartPO = getResourceChartPO(rs.getString("id"), rs.getString("name"), rootId, rs.getString("belongto"), rs.getString("companyworkyear"));
|
||||
dataList.add(chartPO);
|
||||
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);
|
||||
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);
|
||||
|
||||
|
||||
|
|
@ -365,7 +425,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
* @param companyWorkYear 司龄
|
||||
* @return
|
||||
*/
|
||||
private ChartPO getResourceChartPO(String id, String name, String parentId, String belongTo, String companyWorkYear) {
|
||||
private ChartPO getResourceChartPO(String id, String name, String parentId, String belongTo, String companyWorkYear,String accountType) {
|
||||
ChartPO chartPO = new ChartPO();
|
||||
chartPO.setFtype("4");
|
||||
chartPO.setFobjid(id);
|
||||
|
|
@ -373,10 +433,11 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
chartPO.setFname(name);
|
||||
// 岗位处理后的ID
|
||||
chartPO.setParentId(parentId);
|
||||
chartPO.setExpand("0");
|
||||
chartPO.setExpand("1");
|
||||
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) {
|
||||
|
|
@ -405,14 +466,31 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
" versionid = " + versionId + " and companyvirtualid = " + dimension;
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
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')";
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -468,6 +546,19 @@ 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"));
|
||||
|
|
@ -479,11 +570,9 @@ 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(!rs.getString("id").startsWith("d")).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(false).value(rs.getString("value")).title(rs.getString("title")).isLeaf(judgeTreeLeaf(versionId, dimension, rs.getString("id"))).build());
|
||||
}
|
||||
result.put("departmentTree", departmentTree);
|
||||
result.put("api_status", true);
|
||||
return result;
|
||||
return departmentTree;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -625,6 +714,52 @@ 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
|
||||
|
|
@ -657,10 +792,17 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
" and b.plan_year = ?");
|
||||
}
|
||||
|
||||
if ("false".equals(new BaseBean().getPropValue("hrmOrganization","accountType"))) {
|
||||
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")));
|
||||
|
|
@ -865,7 +1007,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,a.bmfzr as fleader,e.on_job_num,e.staff_num " +
|
||||
"a.canceled,a.departmentcode,a.coadjutant,a.tlevel,d.bmlx as isvirtual,d.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 " +
|
||||
|
|
@ -898,12 +1040,13 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
" a.departmentcode,\n" +
|
||||
" a.coadjutant,\n" +
|
||||
" a.tlevel,\n" +
|
||||
" a.bmfzr as fleader,\n" +
|
||||
" e.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 ";
|
||||
}
|
||||
|
||||
|
|
@ -1215,22 +1358,6 @@ 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);
|
||||
}
|
||||
|
||||
|
|
@ -1272,15 +1399,28 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
return "select id,companyname as name,'0' as type from " + COMPANY_TABLE + " where id = '" + dimension + "'";
|
||||
}
|
||||
} 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";
|
||||
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 + "'";
|
||||
}
|
||||
} 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.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";
|
||||
|
||||
}
|
||||
} 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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1358,17 +1498,21 @@ 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,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;
|
||||
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;
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
if (!isRealDimension) {
|
||||
sql += " and companyid = " + fObjId;
|
||||
|
|
@ -1377,26 +1521,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,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;
|
||||
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;
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
break;
|
||||
case "2":
|
||||
if (hasVirtualFields) {
|
||||
if (showVirtual) {
|
||||
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;
|
||||
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;
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
@ -1442,7 +1586,6 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
// 小于、等于所选层级元素展开
|
||||
chartPO.setExpand(inDepth(selectDepth, chartPO.getDepartmentDepth()) ? "1" : "0");
|
||||
filterAndAddData(currentList, chartPO, hideDepartment);
|
||||
//currentList.add(chartPO);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1519,35 +1662,6 @@ 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;
|
||||
}
|
||||
|
||||
|
|
@ -1558,9 +1672,6 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
* @return 人员名称
|
||||
*/
|
||||
private String getDepartmentLeader(String ids) {
|
||||
if (!isRealTime) {
|
||||
return ids;
|
||||
}
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return "";
|
||||
}
|
||||
|
|
@ -1613,10 +1724,10 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
* @param subCompany 上级Id
|
||||
* @return SQL
|
||||
*/
|
||||
private String getDepartmentTreeSql(String versionId, String dimension, String subCompany) {
|
||||
private static String getDepartmentTreeSql(String versionId, String dimension, String subCompany) {
|
||||
// 是否展示当前数据
|
||||
boolean isSearchCurrent = StringUtils.isBlank(versionId) || "0".equals(versionId);
|
||||
boolean isCurrentDimension = StringUtils.isNotBlank(dimension) && !"0".equals(dimension);
|
||||
boolean isNotCurrentDimension = StringUtils.isNotBlank(dimension) && !"0".equals(dimension);
|
||||
boolean isDepartment = subCompany.startsWith("d");
|
||||
String sql;
|
||||
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||
|
|
@ -1624,36 +1735,37 @@ 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;
|
||||
if (isCurrentDimension) {
|
||||
sql += " order by showorder,id ";
|
||||
if (isNotCurrentDimension) {
|
||||
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 (isCurrentDimension) {
|
||||
if (isNotCurrentDimension) {
|
||||
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;
|
||||
if (isCurrentDimension) {
|
||||
sql += " order by showorder,id ";
|
||||
if (isNotCurrentDimension) {
|
||||
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 +
|
||||
" 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 = "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 += " and versionid = " + versionId;
|
||||
//// 添加时间轴条件
|
||||
//sql += " and versionid = " + versionId;
|
||||
}
|
||||
}
|
||||
return sql;
|
||||
|
|
@ -1675,7 +1787,7 @@ public class ChartServiceImpl extends Service implements ChartService {
|
|||
* @param subCompany 上级元素ID
|
||||
* @return
|
||||
*/
|
||||
private boolean judgeTreeLeaf(String versionId, String dimension, String subCompany) {
|
||||
private static boolean judgeTreeLeaf(String versionId, String dimension, String subCompany) {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
String sql = getDepartmentTreeSql(versionId, dimension, subCompany);
|
||||
recordSet.executeQuery(sql);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class CodeSettingServiceImpl extends Service implements CodeSettingServic
|
|||
break;
|
||||
}
|
||||
retmap.put("hasRight", hasRight);
|
||||
return ReturnResult.successed(retmap);
|
||||
return ReturnResult.successed(user,retmap);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -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.comparing(CompListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(CompListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
|
||||
} else {
|
||||
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(CompListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
}
|
||||
List<CompListDTO> subList = PageUtil.subList(params.getCurrent(), params.getPageSize(), compListDTOS);
|
||||
pageInfos = new PageInfo<>(subList, CompListDTO.class);
|
||||
pageInfos = new PageInfo<>(user, 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<>(subList, CompListDTO.class);
|
||||
pageInfos = new PageInfo<>(user, 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)), "上级分部不能选择分部本身及其下级分部");
|
||||
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supSubComId)), SystemEnv.getHtmlLabelName(547257,user.getLanguage()));
|
||||
}
|
||||
|
||||
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, "编号", "subCompanyCode");
|
||||
SearchConditionItem subCompanyCodeItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547118, "subCompanyCode");
|
||||
// 名称
|
||||
SearchConditionItem subCompanyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "subCompanyDesc");
|
||||
SearchConditionItem subCompanyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "subCompanyDesc");
|
||||
// 简称
|
||||
SearchConditionItem subCompanyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "简称", "subCompanyName");
|
||||
SearchConditionItem subCompanyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547181, "subCompanyName");
|
||||
// 上级公司
|
||||
SearchConditionItem supSubComIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "supSubComId", "");
|
||||
SearchConditionItem supSubComIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "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();
|
||||
return MenuBtn.getDatasNoBtnColum(user.getLanguage());
|
||||
}
|
||||
|
||||
@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("分部信息").viewCondition("4").build());
|
||||
topTabs.add(TopTab.builder().color("#000000").groupId("4").showcount(false).title(SystemEnv.getHtmlLabelName(547180,user.getLanguage())).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, "转移到", "164", "company", "compBrowser");
|
||||
compBrowserItem.setHelpfulTip("在不选择分部情况下,默认转移到集团下一级分部!!!");
|
||||
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547275, "164", "company", "compBrowser");
|
||||
compBrowserItem.setHelpfulTip(SystemEnv.getHtmlLabelName(547258,user.getLanguage()));
|
||||
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), "请勿选择当前分部本身及其子分部");
|
||||
OrganizationAssert.isFalse(disableIds.contains(targetCompanyId), SystemEnv.getHtmlLabelName(547259,user.getLanguage()));
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", companyId.toString());
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ 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;
|
||||
|
|
@ -47,7 +48,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("qtx_sso_login", "enable");
|
||||
String enable = bb.getPropValue("hrmOrganization", "enable");
|
||||
String userAgent = qtx.getUserAgent();
|
||||
boolean termianal = MobileTerminalEnum.containsEnumValue(userAgent);
|
||||
if (VALUE_ONE.equals(enable)) {
|
||||
|
|
@ -71,18 +72,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("密钥").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.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.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("qtx_sso_login","enable"));
|
||||
map.put("isopenconfig",bb.getPropValue("hrmOrganization","enable"));
|
||||
map.put("columns",columns);
|
||||
map.put("datas", Collections.singletonList(datas));
|
||||
return map;
|
||||
|
|
@ -92,7 +93,7 @@ public class ConfigServiceImpl extends Service implements ConfigService {
|
|||
@Override
|
||||
public int saveConfigInfo(QTXConfigPO qtxConfigPO, String isopenconfig) {
|
||||
ConfigOperator ConfigOperator = new ConfigOperator();
|
||||
ConfigOperator.setProp("qtx_sso_login.properties", "enable", isopenconfig);
|
||||
ConfigOperator.setProp("hrmOrganization.properties", "enable", isopenconfig);
|
||||
qtxConfigPO.setCreator(user.getUID());
|
||||
qtxConfigPO.setCreateDate(OrganizationDateUtil.getFormatLocalDate(LocalDate.now()));
|
||||
getConfigMapper().deleteAll();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ 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;
|
||||
|
|
@ -21,15 +20,12 @@ 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;
|
||||
|
|
@ -75,10 +71,6 @@ 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);
|
||||
}
|
||||
|
|
@ -90,7 +82,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<>(singleDeptTreeVOS, SingleDeptTreeVO.class);
|
||||
PageInfo<SingleDeptTreeVO> pageInfos = new PageInfo<>(user, singleDeptTreeVOS, SingleDeptTreeVO.class);
|
||||
pageInfos.setTotal(pageInfo.getTotal());
|
||||
pageInfos.setPageNum(param.getCurrent());
|
||||
pageInfos.setPageSize(param.getPageSize());
|
||||
|
|
@ -100,11 +92,9 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
|
||||
@Override
|
||||
public PageInfo<SingleJobTreeVO> getJobListByPid(QuerySingleDeptListParam param) {
|
||||
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());
|
||||
List<SingleJobTreeVO> singleDeptTreeVOS = MapperProxyFactory.getProxy(JobMapper.class).jobSearchByDept(param.getParentDept());
|
||||
PageInfo<SingleJobTreeVO> pageInfos = new PageInfo<>(user, singleDeptTreeVOS, SingleJobTreeVO.class);
|
||||
pageInfos.setTotal(singleDeptTreeVOS.size());
|
||||
pageInfos.setPageNum(param.getCurrent());
|
||||
pageInfos.setPageSize(param.getPageSize());
|
||||
return pageInfos;
|
||||
|
|
@ -139,24 +129,24 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
// 通过子级遍历父级元素
|
||||
if (filter) {
|
||||
// 根据条件获取元素
|
||||
List<DepartmentPO> filterDeptPOs = getDepartmentMapper().listByFilter(departmentPO, orderSql);
|
||||
List<DepartmentPO> filterDeptPOs = getDepartmentMapper().listByFilterAll(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.comparing(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
|
||||
} else {
|
||||
compListDTOS = compListDTOS.stream().sorted(Comparator.comparing(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
compListDTOS = compListDTOS.stream().sorted(Comparator.comparingDouble(DepartmentListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
}
|
||||
List<DepartmentListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), compListDTOS);
|
||||
pageInfos = new PageInfo<>(DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
|
||||
pageInfos = new PageInfo<>(user, 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<>(DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
|
||||
pageInfos = new PageInfo<>(user, DepartmentBO.buildDeptDTOShowNames(subList), DepartmentListDTO.class);
|
||||
pageInfos.setTotal(compListDTOS.size());
|
||||
}
|
||||
|
||||
|
|
@ -212,7 +202,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
||||
addDisableIds(disableIds, deptListByPId);
|
||||
}
|
||||
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supDepId)), "上级部门不能选择部门本身及其下级部门");
|
||||
OrganizationAssert.isFalse(disableIds.contains(Integer.parseInt(supDepId)), SystemEnv.getHtmlLabelName(547411,user.getLanguage()));
|
||||
}
|
||||
|
||||
new OrganizationSyncEc(user, LogModuleNameEnum.DEPARTMENT, OperateTypeEnum.UPDATE, params).sync();
|
||||
|
|
@ -231,13 +221,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, "编号", "departmentCode");
|
||||
SearchConditionItem departmentCodeItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547118, "departmentCode");
|
||||
// 名称
|
||||
SearchConditionItem departmentNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "departmentName");
|
||||
SearchConditionItem departmentNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "departmentName");
|
||||
// 所属分部
|
||||
SearchConditionItem subCompanyId1Item = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "subCompanyId1", "");
|
||||
SearchConditionItem subCompanyId1Item = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "subCompanyId1", "");
|
||||
// 上级部门
|
||||
SearchConditionItem supDepIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级部门", "4", "supDepId", "");
|
||||
SearchConditionItem supDepIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547189, "4", "supDepId", "");
|
||||
|
||||
conditionItems.add(departmentCodeItem);
|
||||
conditionItems.add(departmentNameItem);
|
||||
|
|
@ -251,16 +241,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("新增").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());
|
||||
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());
|
||||
return datasNoBtnColum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getDeptBaseForm(Map<String, Object> params) {
|
||||
OrganizationAssert.notNull(params.get("viewAttr"), "请标识操作类型");
|
||||
OrganizationAssert.notNull(params.get("viewAttr"), SystemEnv.getHtmlLabelName(547260,user.getLanguage()));
|
||||
// 2编辑 1查看
|
||||
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
|
||||
|
||||
|
|
@ -405,7 +395,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("部门信息").viewCondition("4").build());
|
||||
topTabs.add(TopTab.builder().color("#000000").groupId("4").showcount(false).title(SystemEnv.getHtmlLabelName(547412,user.getLanguage())).viewCondition("4").build());
|
||||
resultMap.put("tabInfo", topTabs);
|
||||
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
|
|
@ -430,9 +420,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, "复制到", "164", "company", "");
|
||||
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, 547261, "164", "company", "");
|
||||
compBrowserItem.setRules("required|string");
|
||||
SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, "复制子部门信息", "copySubDept");
|
||||
SearchConditionItem copySubDeptItem = OrganizationFormItemUtil.selectItem(user, Lists.newArrayList(new SearchConditionOption("1", "")), 2, 5, 10, false, SystemEnv.getHtmlLabelName(547262,user.getLanguage()), "copySubDept");
|
||||
copySubDeptItem.setDetailtype(2);
|
||||
condition.add(compBrowserItem);
|
||||
condition.add(copySubDeptItem);
|
||||
|
|
@ -450,7 +440,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
public int copyDepartment(DeptCopyParam copyParam) {
|
||||
// 批量复制,后续优化
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
OrganizationAssert.notBlank(copyParam.getCompany(), "请指定需要复制的公司/分部");
|
||||
OrganizationAssert.notBlank(copyParam.getCompany(), SystemEnv.getHtmlLabelName(547263,user.getLanguage()));
|
||||
int insertCount = 0;
|
||||
// 需复制的部门
|
||||
List<Integer> idList = Arrays.stream(copyParam.getIds().split(",")).map(Integer::parseInt).collect(Collectors.toList());
|
||||
|
|
@ -466,7 +456,6 @@ 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);
|
||||
// 设置上级分部
|
||||
|
|
@ -480,19 +469,6 @@ 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)) {
|
||||
|
|
@ -509,9 +485,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, "合并到部门", "4", "department", "");
|
||||
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, 547264, "4", "department", "");
|
||||
deptBrowserItem.setRules("required|string");
|
||||
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "合并后名称", "mergeName");
|
||||
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, 547265, "mergeName");
|
||||
mergeNameItem.setRules("required|string");
|
||||
|
||||
condition.add(deptBrowserItem);
|
||||
|
|
@ -529,10 +505,10 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
|
||||
|
||||
// 断言判断
|
||||
OrganizationAssert.isFalse(null == targetDepartment, "被合并部门数据有误,暂时无法合并");
|
||||
OrganizationAssert.isFalse(mergeParam.getId().equals(targetDepartment.getId()), "所选部门与待合并部门一致,无需操作");
|
||||
OrganizationAssert.notNull(mergeParam.getDepartment(), "请选择需要合并的部门");
|
||||
OrganizationAssert.notBlank(mergeParam.getMergeName(), "请输入合并后的名称");
|
||||
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()));
|
||||
|
||||
// 不可选择合并的数据,本身及子部门
|
||||
Set<Integer> disableIds = new HashSet<>();
|
||||
|
|
@ -542,7 +518,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
if (CollectionUtils.isNotEmpty(deptListByPId)) {
|
||||
addDisableIds(disableIds, deptListByPId);
|
||||
}
|
||||
OrganizationAssert.isFalse(disableIds.contains(targetDepartment.getId()), "请勿选择当前部门本身及其子部门");
|
||||
OrganizationAssert.isFalse(disableIds.contains(targetDepartment.getId()), SystemEnv.getHtmlLabelName(547271,user.getLanguage()));
|
||||
|
||||
// 查询该部门下一级部门
|
||||
List<DepartmentPO> firstChildDeptList = getDepartmentMapper().getDeptListByPId(mergeParam.getId());
|
||||
|
|
@ -551,41 +527,24 @@ 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() + "_被合并");
|
||||
sourceDepartmentPO.setDepartmentMark(sourceDepartmentPO.getDepartmentMark() + "_被合并");
|
||||
sourceDepartmentPO.setDepartmentName(sourceDepartmentPO.getDepartmentName() + SystemEnv.getHtmlLabelName(547272,user.getLanguage()));
|
||||
sourceDepartmentPO.setDepartmentMark(sourceDepartmentPO.getDepartmentMark() + SystemEnv.getHtmlLabelName(547272,user.getLanguage()));
|
||||
updateEcDepartment(sourceDepartmentPO);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", Util.null2String(mergeParam.getId()));
|
||||
|
|
@ -593,14 +552,12 @@ 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;
|
||||
}
|
||||
|
||||
|
|
@ -608,16 +565,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, "选择分部", "164", "company", "");
|
||||
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "选择部门", "4", "department", "");
|
||||
SearchConditionItem compBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547273, "164", "company", "");
|
||||
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547274, "4", "department", "");
|
||||
|
||||
|
||||
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
||||
SearchConditionOption compOption = new SearchConditionOption("0", "分部");
|
||||
SearchConditionOption deptOption = new SearchConditionOption("1", "部门");
|
||||
SearchConditionOption compOption = new SearchConditionOption("0", SystemEnv.getHtmlLabelName(547332,user.getLanguage()));
|
||||
SearchConditionOption deptOption = new SearchConditionOption("1", SystemEnv.getHtmlLabelName(547331,user.getLanguage()));
|
||||
selectOptions.add(compOption);
|
||||
selectOptions.add(deptOption);
|
||||
SearchConditionItem moveTypeItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "转移到", "moveType");
|
||||
SearchConditionItem moveTypeItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, 547275, "moveType");
|
||||
moveTypeItem.setDetailtype(3);
|
||||
moveTypeItem.setValue("0");
|
||||
|
||||
|
|
@ -631,47 +588,34 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
@Override
|
||||
public int moveDepartment(DepartmentMoveParam moveParam) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
OrganizationAssert.notBlank(moveParam.getMoveType(), "请选择转移类型");
|
||||
OrganizationAssert.notBlank(moveParam.getMoveType(), SystemEnv.getHtmlLabelName(547276,user.getLanguage()));
|
||||
DepartmentPO deptById = getDepartmentMapper().getDeptById(moveParam.getId());
|
||||
// 0:公司/分部 1:部门
|
||||
if ("0".equals(moveParam.getMoveType())) {
|
||||
Integer company = moveParam.getCompany();
|
||||
OrganizationAssert.notNull(company, "请选择要转移到的分部");
|
||||
OrganizationAssert.notNull(company, SystemEnv.getHtmlLabelName(547277,user.getLanguage()));
|
||||
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, "请选择要转移到的部门");
|
||||
OrganizationAssert.notNull(departmentId, SystemEnv.getHtmlLabelName(547278,user.getLanguage()));
|
||||
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), "请勿选择当前部门本身及其子部门");
|
||||
OrganizationAssert.isFalse(disableIds.contains(departmentId), SystemEnv.getHtmlLabelName(547271,user.getLanguage()));
|
||||
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;
|
||||
|
|
@ -695,8 +639,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
String supId = "";
|
||||
String ftype = "";
|
||||
String querySupIdSql;
|
||||
// OrganizationAssert.isFalse("s".equals(sourceType) && "d".equals(targetType), "分部不能转移到部门下");
|
||||
OrganizationAssert.isFalse("-1".equals(dragPostion), "分部、部门不能转移至与集团平级");
|
||||
OrganizationAssert.isFalse("-1".equals(dragPostion), SystemEnv.getHtmlLabelName(547279,user.getLanguage()));
|
||||
if ("s".equals(targetType)) {// 分部
|
||||
querySupIdSql = "select companyId as supComId,supsubcomid as supId,'s' as ftype from hrmsubcompany where id = ?";
|
||||
} else {
|
||||
|
|
@ -713,7 +656,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), "分部不能拖拽至部门下");
|
||||
OrganizationAssert.isFalse("d".equals(targetType), SystemEnv.getHtmlLabelName(547280,user.getLanguage()));
|
||||
if ("c".equals(targetType)) {// 集团下(上级分部为0)
|
||||
params.put("supsubcomid", "0");
|
||||
} else if ("s".equals(targetType)) {
|
||||
|
|
@ -723,7 +666,7 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
|
|||
if ("s".equals(targetType)) {// 分部外(平级)
|
||||
params.put("supsubcomid", supId);
|
||||
} else {// 部门外(找上级)
|
||||
OrganizationAssert.isFalse("d".equals(ftype), "分部不能拖拽至部门下");
|
||||
OrganizationAssert.isFalse("d".equals(ftype), SystemEnv.getHtmlLabelName(547280,user.getLanguage()));
|
||||
params.put("supsubcomid", supId);
|
||||
}
|
||||
}
|
||||
|
|
@ -732,7 +675,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), "部门不能拖拽至集团下");
|
||||
OrganizationAssert.isFalse("c".equals(targetType), SystemEnv.getHtmlLabelName(547281,user.getLanguage()));
|
||||
if ("s".equals(targetType)) {
|
||||
deptById.setSubCompanyId1(Util.getIntValue(targetId));
|
||||
deptById.setSupDepId(null);
|
||||
|
|
@ -742,14 +685,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)), "请勿选择当前部门本身及其子部门");
|
||||
OrganizationAssert.isFalse("d".equals(targetType) && disableIds.contains(Util.getIntValue(targetId)), SystemEnv.getHtmlLabelName(547271,user.getLanguage()));
|
||||
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), "部门不能拖拽至集团下");
|
||||
OrganizationAssert.isFalse("0".equals(supId), SystemEnv.getHtmlLabelName(547281,user.getLanguage()));
|
||||
deptById.setSubCompanyId1(Util.getIntValue(supId));
|
||||
deptById.setSupDepId(null);
|
||||
} else {
|
||||
|
|
@ -785,19 +728,6 @@ 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);
|
||||
}
|
||||
|
|
@ -859,23 +789,6 @@ 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动编号处理
|
||||
|
|
@ -935,19 +848,7 @@ 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<>();
|
||||
|
|
|
|||
|
|
@ -8,18 +8,26 @@ 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.SearchTemplatePO;
|
||||
import com.engine.organization.entity.hrmresource.po.JclOrgCustomTemplatePO;
|
||||
import com.engine.organization.entity.hrmresource.vo.HrmResourceVO;
|
||||
import com.engine.organization.mapper.comp.CompMapper;
|
||||
import com.engine.organization.entity.staff.po.StaffPO;
|
||||
import com.engine.organization.entity.staff.vo.StaffTableVO;
|
||||
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;
|
||||
|
|
@ -27,12 +35,15 @@ 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;
|
||||
|
||||
|
|
@ -49,6 +60,15 @@ 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) {
|
||||
|
|
@ -104,7 +124,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.status < 4 and (t.accounttype is null or t.accounttype != 1)";
|
||||
String sqlWhere = " where 1 = 1 and (t.accounttype is null or t.accounttype != 1)";
|
||||
// 分权查询
|
||||
DetachUtil detachUtil = new DetachUtil(user);
|
||||
String parentCompanyIds = detachUtil.getJclRoleLevels();
|
||||
|
|
@ -119,21 +139,35 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|||
table.setSqlwhere(sqlWhere);
|
||||
List<WeaTableColumn> weaTableColumnList = new ArrayList<>();
|
||||
List<String> fields = new ArrayList<>();
|
||||
HrmResourceServiceImpl hrmResourceService = new HrmResourceServiceImpl();
|
||||
HrmResourceServiceImpl hrmResourceService = ServiceUtil.getService(HrmResourceServiceImpl.class,user);
|
||||
List<SearchConditionGroup> allConditions = hrmResourceService.getAllConditions();
|
||||
|
||||
List<String> columnList;
|
||||
JclOrgCustomTemplatePO jclOrgCustomTemplatePO = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).queryIsusedTemp("1", String.valueOf(user.getUID()));
|
||||
|
||||
// 查询当前台账定制列
|
||||
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 {
|
||||
columnList = hrmResourceService.getSelectKeys(usedCustomTemplate);
|
||||
//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();
|
||||
}
|
||||
} 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";
|
||||
}
|
||||
|
||||
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());
|
||||
|
|
@ -141,24 +175,40 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|||
List<SearchConditionItem> items = allCondition.getItems();
|
||||
for (SearchConditionItem item : items) {
|
||||
String columnName = item.getDomkey()[0];
|
||||
fields.add(hrmResourceService.buildTableSql(columnName) + " as " + hrmResourceService.buildTableSql(columnName).replace(".", "_"));
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
String scopeId = columnName.split("_")[0];
|
||||
String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1);
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
weaTableColumn.setText(MapperProxyFactory.getProxy(HrmResourceMapper.class).queryLabelName(fieldName, scopeId));
|
||||
weaTableColumn.setText(MapperProxyFactory.getProxy(HrmResourceMapper.class).queryLabelName(fieldName, scopeId, user.getLanguage()));
|
||||
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() + "%");
|
||||
if (weaTableColumn.getDisplay().getBoolVal()) {
|
||||
weaTableColumnList.add(weaTableColumn);
|
||||
headerList.add(weaTableColumn.getColumn());
|
||||
headerNameList.add(weaTableColumn.getText());
|
||||
}
|
||||
//weaTableColumn.setWidth(decimal.setScale(2, RoundingMode.HALF_UP).doubleValue() + "%");
|
||||
columnMap.put(columnName, weaTableColumn);
|
||||
}
|
||||
}
|
||||
|
||||
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");
|
||||
|
|
@ -215,10 +265,11 @@ 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()
|
||||
|
|
@ -226,25 +277,29 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|||
.departmentMark(e.getDepartmentMark())
|
||||
.departmentName(e.getDepartmentName())
|
||||
.departmentCode(e.getDepartmentCode())
|
||||
.subCompanyName(0 == e.getSubCompanyId1() ? "" : MapperProxyFactory.getProxy(CompMapper.class).listById(e.getSubCompanyId1()).getSubCompanyName())
|
||||
.supDepName(null == poMaps.get(e.getSupDepId()) ? "" : poMaps.get(e.getSupDepId()).getDepartmentName())
|
||||
.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())))
|
||||
.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, "部门档案数据");
|
||||
String sheetName = HrmI18nUtil.getI18nLabel(85368, language, "部门档案数据");
|
||||
// 2.表头(后面动态获取)
|
||||
List<List<Object>> excelSheetData = new ArrayList<>();
|
||||
|
||||
String[] header = {
|
||||
HrmI18nUtil.getI18nLabel( -93270, "部门名称"),
|
||||
HrmI18nUtil.getI18nLabel( -93272, "编号"),
|
||||
HrmI18nUtil.getI18nLabel( -93274, "部门简称"),
|
||||
HrmI18nUtil.getI18nLabel( -93275, "所属分部"),
|
||||
HrmI18nUtil.getI18nLabel( -93278, "上级部门"),
|
||||
HrmI18nUtil.getI18nLabel( -93279, "部门负责人"),
|
||||
HrmI18nUtil.getI18nLabel( -93280, "启用状态")
|
||||
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, "启用状态")
|
||||
};
|
||||
excelSheetData.add(Arrays.asList(header));
|
||||
|
||||
|
|
@ -252,13 +307,78 @@ public class ExportCommonServiceImpl extends Service implements ExportCommonServ
|
|||
List<List<Object>> rows = new LinkedList<>();
|
||||
for (DepartmentListDTO vo : dtoList) {
|
||||
List<Object> row = new LinkedList<>();
|
||||
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 ? "启用" : "未启用");
|
||||
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());
|
||||
rows.add(row);
|
||||
}
|
||||
excelSheetData.addAll(rows);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ 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;
|
||||
|
|
@ -19,7 +20,6 @@ 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,9 +85,15 @@ 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, null == compExtMap ? null : compExtMap.get(DBType.isOracle() ? extendInfoPO.getFieldName().toUpperCase() : extendInfoPO.getFieldName()));
|
||||
SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, ignoreCaseMap.get(extendInfoPO.getFieldName()));
|
||||
item.setFieldcol(16);
|
||||
if (2 == viewAttr) {
|
||||
if (CollectionUtils.isNotEmpty(readOnlyFieldList) && readOnlyFieldList.contains(extendInfoPO.getFieldName())) {
|
||||
|
|
|
|||
|
|
@ -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", extendTitle.getTitle());
|
||||
tab.put("title", Util.formatMultiLang(extendTitle.getTitle()));
|
||||
tab.put("isShow", extendTitle.getIsShow());
|
||||
tab.put("groupid", String.valueOf(extendTitle.getId()));
|
||||
tab.put("viewAttr", extendTitle.getIsSystemDefault() == 0 ? 1 : 2);
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
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;
|
||||
|
|
@ -33,13 +36,16 @@ public class FunctionOutStaffServiceImpl {
|
|||
return MapperProxyFactory.getProxy(StaffMapper.class);
|
||||
}
|
||||
|
||||
FunctionOutStaffServiceImpl(){
|
||||
private User user;
|
||||
|
||||
FunctionOutStaffServiceImpl(User user){
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -62,7 +68,7 @@ public class FunctionOutStaffServiceImpl {
|
|||
.orElse(0);
|
||||
Integer sums = staffPO.getPermanentNum() + staffPO.getFreezeNum();
|
||||
if (staffPO.getControlPolicy().equals(HARDCONTROLLER)) {
|
||||
OrganizationAssert.isFalse(difference.compareTo(sums) < 0,"存在编制超编风险,请先修改控制策略");
|
||||
OrganizationAssert.isFalse(difference.compareTo(sums) < 0, SystemEnv.getHtmlLabelName(547453,user.getLanguage()));
|
||||
}
|
||||
staffPO.setStaffNum(difference < 0 ? 0 :difference);
|
||||
buildStaffPO(staffPO);
|
||||
|
|
@ -71,13 +77,18 @@ 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.增加冻结数
|
||||
//1.增加冻结数 (num为负数时为减少冻结数)
|
||||
Integer sum = numberF.stream()
|
||||
.mapToInt(Integer::intValue)
|
||||
.sum();
|
||||
Integer sums = sum + staffPO.getPermanentNum();
|
||||
if (staffPO.getControlPolicy().equals(HARDCONTROLLER)) {
|
||||
OrganizationAssert.isFalse(sum.compareTo(staffPO.getStaffNum()) > 0, "冻结数不能大于剩余编制数!");
|
||||
OrganizationAssert.isFalse(sums.compareTo(staffPO.getStaffNum()) > 0, SystemEnv.getHtmlLabelName(547469,user.getLanguage()));
|
||||
}
|
||||
staffPO.setFreezeNum(sum);
|
||||
buildStaffPO(staffPO);
|
||||
|
|
@ -94,27 +105,30 @@ public class FunctionOutStaffServiceImpl {
|
|||
.sum();
|
||||
staffPO.setPermanentNum(sum);
|
||||
Integer sums = staffPO.getPermanentNum() + staffPO.getFreezeNum();
|
||||
|
||||
//强控策略下不容许超编
|
||||
if (staffPO.getControlPolicy().equals(HARDCONTROLLER)) {
|
||||
OrganizationAssert.isFalse(sums.compareTo(staffPO.getStaffNum()) > 0,"强控策略下不容许超编");
|
||||
//冻结数释放
|
||||
OrganizationAssert.isFalse((sums > staffPO.getStaffNum() && staffPO.getFreezeNum() > 0),SystemEnv.getHtmlLabelName(547470,user.getLanguage()));
|
||||
OrganizationAssert.isFalse( sums > staffPO.getStaffNum(),SystemEnv.getHtmlLabelName(547471,user.getLanguage()));
|
||||
}
|
||||
//向上部门 分部在编数调整
|
||||
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,"调整数量不可大于在编数");
|
||||
OrganizationAssert.isFalse(param.getNum().compareTo(staffPO.getPermanentNum()) > 0,SystemEnv.getHtmlLabelName(547472,user.getLanguage()));
|
||||
List<Integer> numbers = Arrays.asList(staffPO.getPermanentNum(),param.getNum());
|
||||
Integer difference = numbers.stream()
|
||||
.reduce((a, b) -> a - b)
|
||||
|
|
@ -123,13 +137,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);
|
||||
}
|
||||
|
|
@ -216,7 +230,11 @@ public class FunctionOutStaffServiceImpl {
|
|||
|
||||
private StaffPO select(StaffOutParam param) {
|
||||
List<StaffPO> staffPO = staffMapper().customSelect(param.getPlanId(), param.getCompany(), param.getDepartment(), param.getJob());
|
||||
OrganizationAssert.notEmpty(staffPO,"未查询到对应编制方案下的组织编制信息!");
|
||||
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()));
|
||||
return staffPO.get(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ 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.*;
|
||||
|
||||
|
|
@ -74,7 +75,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), "同一等级方案下编号不能重复");
|
||||
OrganizationAssert.isTrue(checkRepeatNo(param.getSchemeId(), param.getGradeNo(), null), SystemEnv.getHtmlLabelName(547177, user.getLanguage()));
|
||||
GradePO gradePO = GradeDTO.convertParamToPO(param, (long) user.getUID());
|
||||
return getGradeMapper().insertIgnoreNull(gradePO);
|
||||
}
|
||||
|
|
@ -83,7 +84,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()), "同一等级方案下编号不能重复");
|
||||
OrganizationAssert.isTrue(checkRepeatNo(gradePO.getSchemeId(), gradePO.getGradeNo(), gradePO.getId()), SystemEnv.getHtmlLabelName(547177, user.getLanguage()));
|
||||
return getGradeMapper().updateGrade(gradePO);
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +98,7 @@ public class GradeServiceImpl extends Service implements GradeService {
|
|||
@Override
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
||||
OrganizationAssert.notEmpty(ids, SystemEnv.getHtmlLabelName(547138,user.getLanguage()));
|
||||
return getGradeMapper().deleteByIds(ids);
|
||||
}
|
||||
|
||||
|
|
@ -107,8 +108,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, "等级方案", "161", "schemeId", "schemeBrowser");
|
||||
SearchConditionItem gradeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "gradeName");
|
||||
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547124, "161", "schemeId", "schemeBrowser");
|
||||
SearchConditionItem gradeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "gradeName");
|
||||
conditionItems.add(browserItem);
|
||||
conditionItems.add(gradeNameCondition);
|
||||
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||
|
|
@ -125,12 +126,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, "名称", "gradeName");
|
||||
SearchConditionItem gradeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, 547141, "gradeName");
|
||||
gradeNameCondition.setRules("required|string");
|
||||
SearchConditionItem gradeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "gradeNo");
|
||||
SearchConditionItem gradeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, 547118, "gradeNo");
|
||||
gradeNoCondition.setRules("required|string");
|
||||
SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 200, "描述说明", "description");
|
||||
SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "等级方案", "161", "schemeId", "schemeBrowser");
|
||||
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");
|
||||
schemeBrowserItem.setRules("required|string");
|
||||
BrowserBean schemeBrowserBean = schemeBrowserItem.getBrowserConditionParam();
|
||||
if (StringUtils.isNotBlank(schemeId) && !"-1".equals(schemeId) && StringUtil.isEmpty(id)) {
|
||||
|
|
@ -139,13 +140,13 @@ public class GradeServiceImpl extends Service implements GradeService {
|
|||
schemeBrowserBean.setReplaceDatas(maps);
|
||||
schemeBrowserItem.setBrowserConditionParam(schemeBrowserBean);
|
||||
}
|
||||
SearchConditionItem levelBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "职等", "162", "levelId", "LevelBrowser");
|
||||
SearchConditionItem levelBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, 547139, "162", "levelId", "LevelBrowser");
|
||||
levelBrowserItem.setRules("required|string");
|
||||
|
||||
// 编辑状态下赋值操作
|
||||
if (!StringUtil.isEmpty(id)) {
|
||||
GradePO gradePO = getGradeMapper().getGradeByID(Integer.parseInt(id));
|
||||
OrganizationAssert.notNull(gradePO, "选择的数据不存在,或数据已删除");
|
||||
OrganizationAssert.notNull(gradePO, SystemEnv.getHtmlLabelName(547154,user.getLanguage()));
|
||||
|
||||
gradeNameCondition.setValue(gradePO.getGradeName());
|
||||
gradeNoCondition.setValue(gradePO.getGradeNo());
|
||||
|
|
@ -198,16 +199,16 @@ public class GradeServiceImpl extends Service implements GradeService {
|
|||
|
||||
@Override
|
||||
public Map<String, List<MenuBtn>> getHasRight() {
|
||||
return MenuBtn.getCommonBtnDatas();
|
||||
return MenuBtn.getCommonBtnDatas(user.getLanguage());
|
||||
}
|
||||
|
||||
@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("全部").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());
|
||||
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());
|
||||
apiDatas.put("topTabs", topTabs);
|
||||
|
||||
HashMap<String, Integer> countMap = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ 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;
|
||||
|
|
@ -32,10 +33,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, "总部名称", "companyname");
|
||||
SearchConditionItem companyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, 547172, "companyname");
|
||||
companyNameItem.setRules("required|string");
|
||||
SearchConditionItem companyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "总部全称", "companydesc");
|
||||
SearchConditionItem companyWebItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, "公司网站", "companyweb");
|
||||
SearchConditionItem companyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547173, "companydesc");
|
||||
SearchConditionItem companyWebItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, 547174, "companyweb");
|
||||
|
||||
// 赋值
|
||||
String id = Util.null2String(params.get("id"));
|
||||
|
|
@ -76,13 +77,12 @@ 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, "数据有误");
|
||||
OrganizationAssert.notNull(id, SystemEnv.getHtmlLabelName(547440,user.getLanguage()));
|
||||
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("编辑").type("BTN_EDIT").build());
|
||||
topMenuList.add(MenuBtn.builder().isTop("1").menuFun("doEdit").menuIcon("icon-coms-edit").menuName(SystemEnv.getHtmlLabelName(547132,user.getLanguage())).type("BTN_EDIT").build());
|
||||
btnDatas.put("topMenu", topMenuList);
|
||||
// 编辑
|
||||
rightMenuList.add(MenuBtn.builder().isTop("1").menuFun("doEdit").menuIcon("icon-coms-edit").menuName("编辑").type("BTN_EDIT").build());
|
||||
rightMenuList.add(MenuBtn.builder().isTop("1").menuFun("doEdit").menuIcon("icon-coms-edit").menuName(SystemEnv.getHtmlLabelName(547132,user.getLanguage())).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("总部信息").viewCondition("1").build());
|
||||
topTabs.add(TopTab.builder().title(SystemEnv.getHtmlLabelName(547171 ,user.getLanguage())).viewCondition("1").build());
|
||||
apiDatas.put("topTabs", topTabs);
|
||||
return apiDatas;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
|
|||
userInfo = getPersonnelCardMapper().getUserById(uId);
|
||||
userInfo.setEcId(uId.toString());
|
||||
|
||||
OrganizationAssert.notNull(uId, "未找到对应数据");
|
||||
OrganizationAssert.notNull(uId, SystemEnv.getHtmlLabelName(547440, user.getLanguage()));
|
||||
// 人员基本信息
|
||||
|
||||
// 统计报表
|
||||
|
|
@ -186,6 +186,11 @@ 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;
|
||||
|
|
@ -292,7 +297,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(cardButton.getName()).url(cardButton.getUrl()).sysDefault(cardButton.getSysDefault()).build());
|
||||
buttonList.add(CardButtonPO.builder().name(Util.formatMultiLang(cardButton.getName())).url(cardButton.getUrl()).sysDefault(cardButton.getSysDefault()).build());
|
||||
}
|
||||
}
|
||||
return buttonList;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ 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;
|
||||
|
|
@ -58,10 +59,15 @@ 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;
|
||||
|
|
@ -69,7 +75,6 @@ import java.time.LocalDate;
|
|||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import static weaver.general.Util.getIntValue;
|
||||
|
||||
|
|
@ -149,10 +154,18 @@ 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();
|
||||
|
|
@ -176,19 +189,41 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
|
||||
}
|
||||
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];
|
||||
fields.add(buildTableSql(columnName) + " as " + buildTableSql(columnName).replace(".", "_"));
|
||||
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)) {
|
||||
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(".", "_"));
|
||||
weaTableColumn.setTransmethod("com.engine.organization.transmethod.HrmResourceTransMethod.getFieldTrueValue");
|
||||
}
|
||||
String scopeId = columnName.split("_")[0];
|
||||
String fieldName = columnName.substring(columnName.lastIndexOf("_") + 1);
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn();
|
||||
weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId));
|
||||
|
||||
weaTableColumn.setText(getHrmResourceMapper().queryLabelName(fieldName, scopeId, user.getLanguage()));
|
||||
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);
|
||||
}
|
||||
|
|
@ -198,6 +233,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
weaTableColumn.setColumn("id");
|
||||
weaTableColumn.setDisplay(WeaBoolAttr.FALSE);
|
||||
|
||||
|
||||
weaTableColumnList.add(weaTableColumn);
|
||||
fields.add("t.id");
|
||||
table.setBackfields(StringUtils.join(fields, ","));
|
||||
|
|
@ -257,7 +293,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, "该模板名称已存在");
|
||||
OrganizationAssert.isFalse("默认模板".equals(params.getShowname()) || null != searchTemplateByName, SystemEnv.getHtmlLabelName(547439, user.getLanguage()));
|
||||
SearchTemplatePO templatePO = buildSearchTemplateByFields(params.getFields());
|
||||
if (null == templatePO) {
|
||||
return -1;
|
||||
|
|
@ -266,6 +302,9 @@ 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();
|
||||
}
|
||||
|
|
@ -280,13 +319,14 @@ 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), "数据有误,未找到对应数据");
|
||||
OrganizationAssert.isTrue(StringUtils.isNotBlank(templateId), SystemEnv.getHtmlLabelName(547440, user.getLanguage()));
|
||||
// 判断是否为搜索模板
|
||||
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_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(","));
|
||||
} else {
|
||||
searchTemplateById = getHrmResourceMapper().getCustomTemplateById(templateId);
|
||||
selectKeys = getSelectKeys(searchTemplateById);
|
||||
|
|
@ -307,48 +347,68 @@ 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 usedCustomTemplate = getHrmResourceMapper().getUsedCustomTemplateByUser(user.getUID());
|
||||
if (null != usedCustomTemplate) {
|
||||
returnMap.put("templateId", usedCustomTemplate.getId().toString());
|
||||
} else {
|
||||
returnMap.put("templateId", "-1");
|
||||
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;
|
||||
}
|
||||
returnMap.put("id", id);
|
||||
} else {
|
||||
templates = getHrmResourceMapper().getSearchTemplatesByUser(userUID);
|
||||
}
|
||||
templates.add(0, SearchTemplateParam.builder().key("-1").showname("默认模板").build());
|
||||
returnMap.put("templates", templates);
|
||||
if (addDefault) {
|
||||
templates.add(0, SearchTemplateParam.builder().key("-1").showname("默认模板").build());
|
||||
}
|
||||
|
||||
LinkedHashSet<Object> objects = new LinkedHashSet<>(templates);
|
||||
returnMap.put("templates", objects);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer saveCustomTemplate(SearchTemplateParam params) {
|
||||
public Map<String, Object> saveCustomTemplate(SearchTemplateParam params) {
|
||||
// 重复名称校验
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
SearchTemplatePO searchTemplateByName = getHrmResourceMapper().getCustomTemplateByName(user.getUID(), params.getShowname());
|
||||
OrganizationAssert.isFalse("默认模板".equals(params.getShowname()) || null != searchTemplateByName, "该模板名称已存在");
|
||||
OrganizationAssert.isFalse("默认模板".equals(params.getShowname()) || null != searchTemplateByName, SystemEnv.getHtmlLabelName(547439, user.getLanguage()));
|
||||
SearchTemplatePO templatePO = buildSearchTemplateByFields(params.getFields());
|
||||
if (null == templatePO) {
|
||||
return -1;
|
||||
}
|
||||
OrganizationAssert.notNull(templatePO,"模板存储失败");
|
||||
|
||||
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);
|
||||
return templatePO.getId();
|
||||
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put("type","custom");
|
||||
param.put("id",templatePO.getId());
|
||||
data.put("result",getSearchTemplate(param));
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer updateCustomTemplate(Map<String, Object> params) {
|
||||
int rowNum = getIntValue((String) params.get("rownum"));
|
||||
int count = 0;
|
||||
List<Long> allIds = getJclOrgCustomTemplateMapper().listAllId();
|
||||
// 只查询当前人员的模板数据
|
||||
List<Long> allIds = getJclOrgCustomTemplateMapper().listAllIdByCreator(user.getUID());
|
||||
String currentDate = OrganizationDateUtil.getFormatLocalDate(new java.util.Date());
|
||||
List<String> nameList = new ArrayList<>();
|
||||
for (int i = 0; i < rowNum; i++) {
|
||||
|
|
@ -375,7 +435,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
allIds.remove(jclId);
|
||||
} else {
|
||||
//插入
|
||||
OrganizationAssert.isFalse("".equals(name), "模板名称不能为空");
|
||||
OrganizationAssert.isFalse("".equals(name), SystemEnv.getHtmlLabelName(547442, user.getLanguage()));
|
||||
jclOrgCustomTemplatePO.setName(name);
|
||||
jclOrgCustomTemplatePO.setCreator(user.getUID());
|
||||
jclOrgCustomTemplatePO.setCreateTime(new java.sql.Date(OrganizationDateUtil.stringToDate(currentDate).getTime()));
|
||||
|
|
@ -411,20 +471,21 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
}
|
||||
transferOptions.add(SearchTemplateParam.builder().key(Integer.toString(idx.getAndIncrement())).showname(allCondition.getTitle()).build());
|
||||
}
|
||||
|
||||
|
||||
// 查询当前使用的模板,没有使用的,则展示默认模板
|
||||
if ("-1".equals(templateId)) {
|
||||
// 查询当前使用的模板,没有使用的,则展示默认模板
|
||||
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();
|
||||
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);
|
||||
}
|
||||
} 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);
|
||||
|
|
@ -441,18 +502,22 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
SearchTemplatePO templatePO = buildSearchTemplateByFields(columns);
|
||||
JclOrgCustomTemplatePO jclOrgCustomTemplatePO = new JclOrgCustomTemplatePO();
|
||||
if (StringUtils.isNotBlank(templateId)) {
|
||||
if (templateId.equals("-1")) {
|
||||
getJclOrgCustomTemplateMapper().updateUsed("0", null, String.valueOf(user.getUID()));
|
||||
if ("-1".equals(templateId)) {
|
||||
getJclOrgCustomTemplateMapper().updateUsed(0,"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);
|
||||
}
|
||||
|
|
@ -462,7 +527,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> chartResourceList(Integer departmentId, String versionId, String dimension) {
|
||||
public Map<String, Object> chartResourceList(Integer departmentId, String versionId, String dimension, String statusValue) {
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
List<ResourceListColumns> resourceListColumns = getTableColumns();
|
||||
List<ResourceChartPO> resourceChartPOS = new ArrayList<>();
|
||||
|
|
@ -471,10 +536,13 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
if ("0".equals(dimension)) {
|
||||
if ("0".equals(versionId)) {
|
||||
//当前数据
|
||||
resourceChartPOS = getHrmResourceMapper().selectByDepartmentId(departmentId);
|
||||
List<String> statusList = Arrays.stream(statusValue.split(","))
|
||||
.map(String::trim)
|
||||
.collect(Collectors.toList());
|
||||
resourceChartPOS = getHrmResourceMapper().selectByIdAndStatus(statusList, departmentId);
|
||||
resourceChartVOS = ResourceChartBO.convertToVO(resourceChartPOS);
|
||||
} else {
|
||||
rs.executeQuery("select resourceid,workcode,lastname,sex,department,subcompany,jobtitle,mobile from jcl_chart_resource where departmentid = ? and versionid = ?", departmentId, versionId);
|
||||
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);
|
||||
while (rs.next()) {
|
||||
ResourceChartVO build = ResourceChartVO.builder()
|
||||
.id((long) Util.getIntValue(rs.getString("resourceid")))
|
||||
|
|
@ -492,7 +560,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 v.virtualtype = ? and v.departmentid = ?", dimension, departmentId);
|
||||
" 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);
|
||||
while (rs.next()) {
|
||||
ResourceChartPO build = ResourceChartPO.builder()
|
||||
.id((long) Util.getIntValue(rs.getString("id")))
|
||||
|
|
@ -515,17 +583,31 @@ 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<>();
|
||||
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());
|
||||
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("status").key("status").build());
|
||||
list.add(ResourceListColumns.builder().title("手机号").dataIndex("mobile").key("mobile").build());
|
||||
list.add(ResourceListColumns.builder().title(SystemEnv.getHtmlLabelName(547334, language)).dataIndex("mobile").key("mobile").build());
|
||||
|
||||
return list;
|
||||
|
||||
|
|
@ -540,7 +622,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
}
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionGroup> allConditions = getAllConditions();
|
||||
List<SearchConditionGroup> allConditions = getAllConditions(true);
|
||||
// 穿梭框ID,展示所选字段信息
|
||||
HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo = new HrmFieldSearchConditionComInfo();
|
||||
if ("-1".equals(templateId)) {
|
||||
|
|
@ -571,81 +653,64 @@ 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("新建人员").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("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("customization").menuIcon("icon-coms-task-list").menuName("列定制").type("BTN_COLUMN").build());
|
||||
rightMenuList.add(MenuBtn.rightMenu_btnLog());
|
||||
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()));
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -682,16 +747,24 @@ 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("模板名称").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());
|
||||
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());
|
||||
Map<String, Object> tabInfoMap = new HashMap<>();
|
||||
tabInfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, infoPOList, false, true));
|
||||
List<JclOrgCustomTemplatePO> jclOrgCustomTemplatePOS = MapperProxyFactory.getProxy(JclOrgCustomTemplateMapper.class).listAll();
|
||||
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<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"));
|
||||
|
||||
|
|
@ -713,15 +786,6 @@ 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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -741,13 +805,25 @@ 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());
|
||||
|
|
@ -758,10 +834,18 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
sb.append(" and t.lastname ").append(dbType.like(value));
|
||||
}
|
||||
if ("companyId".equals(key)) {
|
||||
sb.append(" and t.subcompanyid1 ='").append(value).append("'");
|
||||
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(")");
|
||||
}
|
||||
if ("departmentId".equals(key)) {
|
||||
sb.append(" and t.departmentId ='").append(value).append("'");
|
||||
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(")");
|
||||
}
|
||||
if ("jobTitle".equals(key)) {
|
||||
JobPO jobById = getJobMapper().getJobById(Long.parseLong(value));
|
||||
|
|
@ -859,7 +943,9 @@ 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) {
|
||||
buildParentDepts(departmentPO, builderDeparts, departmentPOMap);
|
||||
if (departmentPO.getCanceled() == null || departmentPO.getCanceled() == 0) {
|
||||
buildParentDepts(departmentPO, builderDeparts, departmentPOMap);
|
||||
}
|
||||
}
|
||||
List<SearchTree> departmentList = DepartmentBO.buildSetToSearchTree(builderDeparts);
|
||||
List<SearchTree> deptTrees = SearchTreeUtil.builderTreeMode(departmentList);
|
||||
|
|
@ -909,7 +995,9 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
// 查询分部信息
|
||||
Set<DepartmentPO> builderDeparts = new HashSet<>();
|
||||
for (DepartmentPO departmentPO : filterDeparts) {
|
||||
buildParentDepts(departmentPO, builderDeparts, departmentPOMap);
|
||||
if (departmentPO.getCanceled() == null || departmentPO.getCanceled() == 0) {
|
||||
buildParentDepts(departmentPO, builderDeparts, departmentPOMap);
|
||||
}
|
||||
}
|
||||
return SearchTreeUtil.builderTreeMode(DepartmentBO.buildSetToSearchTree(builderDeparts), jobTrees);
|
||||
}
|
||||
|
|
@ -946,12 +1034,15 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
}
|
||||
|
||||
|
||||
public List<SearchConditionGroup> getAllConditions() {
|
||||
return getAllConditions(false);
|
||||
}
|
||||
/**
|
||||
* 获取所有搜索字段信息构建的高级搜索表单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<SearchConditionGroup> getAllConditions() {
|
||||
public List<SearchConditionGroup> getAllConditions(boolean isSearch) {
|
||||
HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo = new HrmFieldSearchConditionComInfo();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> basicConditionItems = new ArrayList<>();
|
||||
|
|
@ -962,25 +1053,55 @@ 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)) {
|
||||
addGroups.add(new SearchConditionGroup("基本信息", true, basicConditionItems));
|
||||
SearchConditionItem searchConditionItem = buildSubCompanyCondition(hrmFieldSearchConditionComInfo,isSearch);
|
||||
basicConditionItems.add(0,searchConditionItem);
|
||||
addGroups.add(new SearchConditionGroup(SystemEnv.getHtmlLabelName(547175, user.getLanguage()), true, basicConditionItems));
|
||||
}
|
||||
|
||||
// 个人信息:1
|
||||
hrmFieldsByScopeId = getSystemDataMapper().getHrmFieldsByScopeId(HrmGroupEnum.HRM_PERSONAL.getGroupType().toString());
|
||||
createConditionItems(hrmFieldSearchConditionComInfo, hrmFieldsByScopeId, personalConditionItems);
|
||||
if (CollectionUtils.isNotEmpty(personalConditionItems)) {
|
||||
addGroups.add(new SearchConditionGroup("个人信息", true, personalConditionItems));
|
||||
addGroups.add(new SearchConditionGroup(SystemEnv.getHtmlLabelName(547578, user.getLanguage()), true, personalConditionItems));
|
||||
}
|
||||
|
||||
// 工作信息:3
|
||||
hrmFieldsByScopeId = getSystemDataMapper().getHrmFieldsByScopeId(HrmGroupEnum.HRM_WORK.getGroupType().toString());
|
||||
createConditionItems(hrmFieldSearchConditionComInfo, hrmFieldsByScopeId, workConditionItems);
|
||||
if (CollectionUtils.isNotEmpty(workConditionItems)) {
|
||||
addGroups.add(new SearchConditionGroup("工作信息", true, workConditionItems));
|
||||
addGroups.add(new SearchConditionGroup(SystemEnv.getHtmlLabelName(547579, user.getLanguage()), 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
|
||||
*
|
||||
|
|
@ -1033,32 +1154,37 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
HrmFieldManager hfm = new HrmFieldManager("HrmCustomFieldByInfoType", scopeid);
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
for (String field : fieldNames) {
|
||||
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 ("-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);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(conditionItems)) {
|
||||
|
|
@ -1105,16 +1231,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, "基本信息", HrmGroupEnum.HRM_BASIC.getGroupType(), basicFields);
|
||||
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, SystemEnv.getHtmlLabelName(547175, user.getLanguage()), HrmGroupEnum.HRM_BASIC.getGroupType(), basicFields);
|
||||
}
|
||||
|
||||
String[] personalFields = Util.null2String(templatePO.getPersonalFields()).split(",");
|
||||
if (personalFields.length > 0) {
|
||||
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, "个人信息", HrmGroupEnum.HRM_PERSONAL.getGroupType(), personalFields);
|
||||
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, SystemEnv.getHtmlLabelName(547578, user.getLanguage()), HrmGroupEnum.HRM_PERSONAL.getGroupType(), personalFields);
|
||||
}
|
||||
String[] workFields = Util.null2String(templatePO.getWorkFields()).split(",");
|
||||
if (workFields.length > 0) {
|
||||
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, "工作信息", HrmGroupEnum.HRM_WORK.getGroupType(), workFields);
|
||||
getTemplateItems(hrmFieldSearchConditionComInfo, addGroups, SystemEnv.getHtmlLabelName(547579, user.getLanguage()), HrmGroupEnum.HRM_WORK.getGroupType(), workFields);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1187,7 +1313,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:// 数字
|
||||
|
|
@ -1315,7 +1441,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
|
|||
List<SearchConditionOption> options = searchConditionItem.getOptions();
|
||||
SearchConditionOption searchConditionOption = new SearchConditionOption();
|
||||
searchConditionOption.setKey("-1");
|
||||
searchConditionOption.setShowname("全部");
|
||||
searchConditionOption.setShowname(SystemEnv.getHtmlLabelName(547191, user.getLanguage()));
|
||||
options.add(0, searchConditionOption);
|
||||
options.forEach(item -> item.setSelected(false));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -334,11 +334,11 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
}
|
||||
Map<String, Object> item = new HashMap<String, Object>(2){{
|
||||
put("index", 3);
|
||||
put("value", "多个职等之间使用英文状态下逗号”,“隔开");
|
||||
put("value",SystemEnv.getHtmlLabelName(547585,user.getLanguage()));
|
||||
}};
|
||||
Map<String, Object> item1 = new HashMap<String, Object>(2){{
|
||||
put("index", 4);
|
||||
put("value", "《等级方案、职等、职级》名称存在重复情况下暂时不支持导入功能");
|
||||
put("value", SystemEnv.getHtmlLabelName(547586,user.getLanguage()));
|
||||
}};
|
||||
itemList.add(item);
|
||||
itemList.add(item1);
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ import org.apache.commons.lang.StringUtils;
|
|||
import weaver.general.StringUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.job.JobTitlesComInfo;
|
||||
import weaver.systeminfo.SystemEnv;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -162,19 +164,19 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
// 添加父级元素
|
||||
List<JobListDTO> jobListDTOS = JobBO.buildJobDTOList(allList, filterJobPOs);
|
||||
if ("asc".equalsIgnoreCase(orderType.toString())) {
|
||||
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparing(JobListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparingDouble(JobListDTO::getShowOrder)).collect(Collectors.toList());
|
||||
|
||||
} else {
|
||||
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparing(JobListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparingDouble(JobListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
}
|
||||
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
||||
pageInfos = new PageInfo<>(subList, JobListDTO.class);
|
||||
pageInfos = new PageInfo<>(user, subList, JobListDTO.class);
|
||||
pageInfos.setTotal(jobListDTOS.size());
|
||||
} else {
|
||||
// 组合list
|
||||
List<JobListDTO> jobListDTOS = JobBO.buildDTOList(allList);
|
||||
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
||||
pageInfos = new PageInfo<>(subList, JobListDTO.class);
|
||||
pageInfos = new PageInfo<>(user, subList, JobListDTO.class);
|
||||
pageInfos.setTotal(jobListDTOS.size());
|
||||
}
|
||||
|
||||
|
|
@ -201,15 +203,19 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
Map<String, List<MenuBtn>> btnDatas = new HashMap<>();
|
||||
ArrayList<MenuBtn> topMenuList = new ArrayList<>();
|
||||
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
|
||||
int userLanguage = user.getLanguage();
|
||||
// 批量删除
|
||||
topMenuList.add(MenuBtn.topMenu_batchDelete());
|
||||
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("refresh").menuIcon("icon-coms-Refresh").menuName("刷新").type("BTN_REFRESH").build());
|
||||
topMenuList.add(MenuBtn.topMenu_addNew());
|
||||
topMenuList.add(MenuBtn.topMenu_batchDelete(userLanguage));
|
||||
topMenuList.add(MenuBtn.builder().isBatch("0").isTop("1").menuFun("refresh").menuIcon("icon-coms-Refresh").menuName(SystemEnv.getHtmlLabelName(547432,userLanguage)).type("BTN_REFRESH").build());
|
||||
// 批量导入
|
||||
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("batchImport").menuIcon("icon-coms-leading-in").menuName(SystemEnv.getHtmlLabelName(547242,user.getLanguage())).type("BTN_BatchImport").build());
|
||||
|
||||
topMenuList.add(MenuBtn.topMenu_addNew(userLanguage));
|
||||
btnDatas.put("topMenu", topMenuList);
|
||||
// 日志
|
||||
rightMenuList.add(MenuBtn.rightMenu_btnLog());
|
||||
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("refresh").menuIcon("icon-coms-Refresh").menuName("刷新").type("BTN_REFRESH").build());
|
||||
rightMenuList.add(MenuBtn.rightMenu_addNew());
|
||||
rightMenuList.add(MenuBtn.rightMenu_btnLog(userLanguage));
|
||||
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("refresh").menuIcon("icon-coms-Refresh").menuName(SystemEnv.getHtmlLabelName(547432,userLanguage)).type("BTN_REFRESH").build());
|
||||
rightMenuList.add(MenuBtn.rightMenu_addNew(userLanguage));
|
||||
btnDatas.put("rightMenu", rightMenuList);
|
||||
return btnDatas;
|
||||
}
|
||||
|
|
@ -220,29 +226,22 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
// 编号
|
||||
SearchConditionItem jobNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "编号", "jobNo");
|
||||
SearchConditionItem jobNoItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547118, "jobNo");
|
||||
// 名称
|
||||
SearchConditionItem jobTitleNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "jobTitleName");
|
||||
SearchConditionItem jobTitleNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "jobTitleName");
|
||||
// 所属分部
|
||||
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属分部", "164", "subcompanyid1", "");
|
||||
SearchConditionItem parentCompBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547128, "164", "subcompanyid1", "");
|
||||
// 所属部门
|
||||
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "所属部门", "4", "departmentid", "");
|
||||
SearchConditionItem parentDeptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547431, "4", "departmentid", "");
|
||||
// 是否关键岗
|
||||
List<SearchConditionOption> isKeyOptions = new ArrayList<>();
|
||||
SearchConditionOption yesOption = new SearchConditionOption("0", "否");
|
||||
SearchConditionOption noOption = new SearchConditionOption("1", "是");
|
||||
SearchConditionOption yesOption = new SearchConditionOption("0", SystemEnv.getHtmlLabelName(547419,user.getLanguage()));
|
||||
SearchConditionOption noOption = new SearchConditionOption("1", SystemEnv.getHtmlLabelName(547420,user.getLanguage()));
|
||||
isKeyOptions.add(yesOption);
|
||||
isKeyOptions.add(noOption);
|
||||
SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "是否关键岗", "isKey");
|
||||
SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, 547417, "isKey");
|
||||
// 工作地点
|
||||
SearchConditionItem workplaceItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作地点", "workplace");
|
||||
// 禁用标记
|
||||
//List<SearchConditionOption> selectOptions = new ArrayList<>();
|
||||
//SearchConditionOption enableOption = new SearchConditionOption("true", "启用");
|
||||
//SearchConditionOption disableOption = new SearchConditionOption("false", "封存");
|
||||
//selectOptions.add(enableOption);
|
||||
//selectOptions.add(disableOption);
|
||||
//SearchConditionItem forbiddenTagItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "封存", "forbiddenTag");
|
||||
SearchConditionItem workplaceItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547418, "workplace");
|
||||
|
||||
conditionItems.add(jobNoItem);
|
||||
conditionItems.add(jobTitleNameItem);
|
||||
|
|
@ -250,7 +249,6 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
conditionItems.add(parentDeptBrowserItem);
|
||||
conditionItems.add(isKeyItem);
|
||||
conditionItems.add(workplaceItem);
|
||||
//conditionItems.add(forbiddenTagItem);
|
||||
|
||||
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||
apiDatas.put("conditions", addGroups);
|
||||
|
|
@ -295,7 +293,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
}
|
||||
|
||||
}
|
||||
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
|
||||
addGroups.add(new SearchConditionGroup(Util.formatMultiLang(extendTitle.getTitle()), true, items));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -305,7 +303,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
|
||||
@Override
|
||||
public Map<String, Object> getJobBaseForm(Map<String, Object> params) {
|
||||
OrganizationAssert.notNull(params.get("viewAttr"), "请标识操作类型");
|
||||
OrganizationAssert.notNull(params.get("viewAttr"), SystemEnv.getHtmlLabelName(547260,user.getLanguage()));
|
||||
|
||||
// 2编辑 1查看
|
||||
int viewAttr = Integer.parseInt((String) params.get("viewAttr"));
|
||||
|
|
@ -325,7 +323,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
for (ExtendTitlePO extendTitle : extendTitles) {
|
||||
List<SearchConditionItem> items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_JOB : JCL_ORG_JOBEXT, viewAttr, id, extendTitle.getId().toString(), "ec_jobTitle", "ec_department", "ec_company");
|
||||
if (CollectionUtils.isNotEmpty(items)) {
|
||||
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
|
||||
addGroups.add(new SearchConditionGroup(Util.formatMultiLang(extendTitle.getTitle()), true, items));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -359,10 +357,6 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
public Long saveBaseForm(Map<String, Object> params) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
JobSearchParam searchParam = JSONObject.parseObject(JSONObject.toJSONString(params), JobSearchParam.class);
|
||||
//String jobNo = (String) params.get("job_no");
|
||||
//// 判断是否开启自动编号
|
||||
//jobNo = repeatDetermine(jobNo);
|
||||
//params.put("job_no", jobNo);
|
||||
params.put("is_key", null == searchParam.getIsKey() ? 0 : searchParam.getIsKey());
|
||||
if (null != searchParam.getParentJob()) {
|
||||
JobPO parentJob = getJobMapper().getJobById(searchParam.getParentJob());
|
||||
|
|
@ -376,23 +370,21 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
}
|
||||
|
||||
if (StringUtils.isBlank(params.get("show_order").toString())) {
|
||||
Integer maxShowOrder = getJobMapper().getMaxShowOrder();
|
||||
Double maxShowOrder = getJobMapper().getMaxShowOrder();
|
||||
if (null == maxShowOrder) {
|
||||
maxShowOrder = 0;
|
||||
maxShowOrder = 0.00;
|
||||
}
|
||||
params.put("show_order", maxShowOrder + 1);
|
||||
}
|
||||
// 判断岗位是否重复
|
||||
ResourcePO build = ResourcePO.builder().subcompanyid1(Integer.parseInt(Util.null2String(params.get("ec_company")))).departmentid(Integer.parseInt(Util.null2String(params.get("ec_department")))).jobtitle(Integer.parseInt(Util.null2String(params.get("ec_jobTitle")))).build();
|
||||
int count = getJobMapper().selectByConditions(build);
|
||||
OrganizationAssert.isTrue(count <= 0, "已存在相同维度岗位,请勿重复添加");
|
||||
OrganizationAssert.isTrue(count <= 0, SystemEnv.getHtmlLabelName(547421,user.getLanguage()));
|
||||
|
||||
String jobNo = (String) params.get("job_no");
|
||||
// 判断是否开启自动编号
|
||||
jobNo = repeatDetermine(jobNo);
|
||||
jobNo = repeatDetermine(jobNo,searchParam.getEcJobTitle(),searchParam.getEcDepartment());
|
||||
params.put("job_no", jobNo);
|
||||
//params.put("jobactivityid", JOB_ACTIVITY_ID);
|
||||
//new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.ADD, params).sync();
|
||||
return getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOB, params, "", null);
|
||||
}
|
||||
|
||||
|
|
@ -405,14 +397,14 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
// 上级岗位不能选择本身
|
||||
String parent_job = Util.null2String(params.get("parent_job"));
|
||||
if (StringUtils.isNotBlank(parent_job)) {
|
||||
OrganizationAssert.isFalse(parent_job.equals(searchParam.getId().toString()), "上级岗位不能选择本身");
|
||||
OrganizationAssert.isFalse(parent_job.equals(searchParam.getId().toString()), SystemEnv.getHtmlLabelName(547422,user.getLanguage()));
|
||||
}
|
||||
if ("0".equals(groupId) || GROUP_ID.toString().equals(groupId)) {
|
||||
JobPO oldJobPO = getJobMapper().getJobById(searchParam.getId());
|
||||
String oldJobNo = oldJobPO.getJobNo();
|
||||
String jobNo = searchParam.getJobNo();
|
||||
if (!jobNo.equals(oldJobNo)) {
|
||||
jobNo = repeatDetermine(jobNo);
|
||||
jobNo = repeatDetermine(jobNo,searchParam.getEcJobTitle(),searchParam.getEcDepartment());
|
||||
params.put("job_no", jobNo);
|
||||
}
|
||||
|
||||
|
|
@ -441,11 +433,11 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
@Override
|
||||
public int copyJobItem(String ids, String department) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
OrganizationAssert.notBlank(department, "请指定需要复制的部门");
|
||||
OrganizationAssert.notBlank(department, SystemEnv.getHtmlLabelName(547423,user.getLanguage()));
|
||||
int insertCount = 0;
|
||||
List<Long> idList = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList());
|
||||
Integer orderNum = getJobMapper().getMaxShowOrder();
|
||||
orderNum = null == orderNum ? 0 : orderNum;
|
||||
Double orderNum = getJobMapper().getMaxShowOrder();
|
||||
orderNum = null == orderNum ? 0.00 : orderNum;
|
||||
for (Long id : idList) {
|
||||
orderNum++;
|
||||
JobPO jobById = getJobMapper().getJobById(id);
|
||||
|
|
@ -462,8 +454,6 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
jobById.setParentJob(null);
|
||||
jobById.setShowOrder(orderNum);
|
||||
insertCount += getJobMapper().insertIgnoreNull(jobById);
|
||||
// 更新组织架构图
|
||||
// new JobTriggerRunnable(jobById.getId()).run();
|
||||
}
|
||||
|
||||
return insertCount;
|
||||
|
|
@ -477,35 +467,29 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
if (params.getForbiddenTag()) {
|
||||
// 启用:判断上级部门是否启用,上级部门启用,岗位才可启用
|
||||
DepartmentPO parentDepartment = getDepartmentMapper().getDeptById(jobById.getEcDepartment());
|
||||
OrganizationAssert.isTrue(0 == parentDepartment.getCanceled(), "该岗位不能解封,请先解封上级部门");
|
||||
OrganizationAssert.isTrue(0 == parentDepartment.getCanceled(), SystemEnv.getHtmlLabelName(547424,user.getLanguage()));
|
||||
|
||||
// 启用:判断上级岗位是否启用,上级岗位启用,岗位才可启用
|
||||
if (null != jobById.getParentJob()) {
|
||||
JobPO parentJob = getJobMapper().getJobById(jobById.getParentJob());
|
||||
OrganizationAssert.isTrue(0 == parentJob.getForbiddenTag(), "该岗位不能解封,请先解封上级岗位");
|
||||
OrganizationAssert.isTrue(0 == parentJob.getForbiddenTag(), SystemEnv.getHtmlLabelName(547436,user.getLanguage()));
|
||||
}
|
||||
} else {
|
||||
//禁用:判断当前岗位下是否有人员,如有人员则不能禁用
|
||||
// int hasResource = getJobMapper().isHasResource(params.getId());
|
||||
// OrganizationAssert.isTrue(hasResource == 0, "该岗位存在人员,不能封存");
|
||||
throw new OrganizationRunTimeException("该岗位不能封存");
|
||||
throw new OrganizationRunTimeException(SystemEnv.getHtmlLabelName(547425,user.getLanguage()));
|
||||
}
|
||||
//new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobPO).sync();
|
||||
return getJobMapper().updateForbiddenTagById(jobPO.getId(), jobPO.getForbiddenTag());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
||||
OrganizationAssert.notEmpty(ids, SystemEnv.getHtmlLabelName(547138,user.getLanguage()));
|
||||
List<JobPO> jobsByIds = getJobMapper().getJobsByIds(ids);
|
||||
for (JobPO jobsById : jobsByIds) {
|
||||
// 判断是否可以删除
|
||||
List<String> allowDelete = getJobMapper().isAllowDelete(jobsById.getId());
|
||||
OrganizationAssert.isTrue(CollectionUtils.isEmpty(allowDelete), "该岗位存在引用,不允许删除");
|
||||
OrganizationAssert.isTrue(CollectionUtils.isEmpty(allowDelete), SystemEnv.getHtmlLabelName(547426,user.getLanguage()));
|
||||
|
||||
// jobsById.setForbiddenTag(1);
|
||||
//new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobsById).sync();
|
||||
// 删除拓展表、明细表
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).deleteByID("jcl_org_jobext", jobsById.getId());
|
||||
MapperProxyFactory.getProxy(ExtDTMapper.class).deleteByMainID("jcl_org_jobext_dt1", jobsById.getId(), null);
|
||||
|
|
@ -536,7 +520,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
public List<SearchConditionGroup> getMergeForm(Long id) {
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> condition = new ArrayList<>();
|
||||
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "合并到岗位", "666", "targetJob", "");
|
||||
SearchConditionItem deptBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, 547427, "666", "targetJob", "");
|
||||
deptBrowserItem.setRules("required");
|
||||
BrowserBean browserBean = deptBrowserItem.getBrowserConditionParam();
|
||||
String s = JSONObject.toJSONString(browserBean);
|
||||
|
|
@ -544,7 +528,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
customBrowserBean.setHasLeftTree(true);
|
||||
customBrowserBean.setLeftToSearchKey("treeKey");
|
||||
deptBrowserItem.setBrowserConditionParam(customBrowserBean);
|
||||
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "合并后名称", "mergeName");
|
||||
SearchConditionItem mergeNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, 547265, "mergeName");
|
||||
mergeNameItem.setRules("required|string");
|
||||
condition.add(deptBrowserItem);
|
||||
condition.add(mergeNameItem);
|
||||
|
|
@ -556,8 +540,8 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
public int mergeJob(JobMergeParam mergeParam) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
int updateCount = 0;
|
||||
OrganizationAssert.notNull(mergeParam.getTargetJob(), "请选择需要合并的岗位");
|
||||
OrganizationAssert.notBlank(mergeParam.getMergeName(), "请输入合并后的名称");
|
||||
OrganizationAssert.notNull(mergeParam.getTargetJob(), SystemEnv.getHtmlLabelName(547428,user.getLanguage()));
|
||||
OrganizationAssert.notBlank(mergeParam.getMergeName(), SystemEnv.getHtmlLabelName(547270,user.getLanguage()));
|
||||
|
||||
// 不可选择岗位本身、以及子岗位
|
||||
Set<Long> disableIds = new HashSet<>();
|
||||
|
|
@ -567,7 +551,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
if (CollectionUtils.isNotEmpty(jobs)) {
|
||||
addDisableIds(disableIds, jobs);
|
||||
}
|
||||
OrganizationAssert.isFalse(disableIds.contains(mergeParam.getTargetJob()), "请勿选择当前岗位本身及其子岗位");
|
||||
OrganizationAssert.isFalse(disableIds.contains(mergeParam.getTargetJob()), SystemEnv.getHtmlLabelName(547429,user.getLanguage()));
|
||||
|
||||
// 合并到的岗位
|
||||
JobPO targetJob = getJobMapper().getJobById(mergeParam.getTargetJob());
|
||||
|
|
@ -578,25 +562,14 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
// 递归处理子岗位所属分部、所部部门、上级岗位
|
||||
recursionMergeJob(jobs, targetJob.getEcCompany(), targetJob.getEcDepartment(), targetJob.getId());
|
||||
|
||||
// 人员信息变动,更新分部、部门、岗位
|
||||
// updateResourceJob(jobById, targetJob);
|
||||
|
||||
// 更新合并后的岗位,更新组织架构图
|
||||
// updateEcJob(targetJob, mergeParam.getMergeName());
|
||||
|
||||
// targetJob.setJobName(mergeParam.getMergeName());
|
||||
getJobMapper().updateBaseJob(targetJob);
|
||||
// new JobTriggerRunnable(jobById.getId(), targetJob.getId()).run();
|
||||
// 原岗位删除
|
||||
//new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.CANCELED, null, jobById).sync();
|
||||
getJobMapper().deleteByIds(Collections.singletonList(jobById.getId()));
|
||||
// 更新组织架构图
|
||||
// new JobTriggerRunnable(jobById).run();
|
||||
return updateCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
JobTitlesComInfo jb = new JobTitlesComInfo();
|
||||
// 解决并发情况下,岗位数据重复问题
|
||||
synchronized (JobServiceImpl.class) {
|
||||
//1.人员表查询
|
||||
|
|
@ -614,6 +587,10 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.build();
|
||||
String jobTitlescode = jb.getJobTitlescode(String.valueOf(resourcePO.getJobtitle()));
|
||||
if (!"".equals(jobTitlescode)) {
|
||||
jobPO.setJobNo(jobTitlescode+"-"+resourcePO.getDepartmentid());
|
||||
}
|
||||
getJobMapper().insertIgnoreNull(jobPO);
|
||||
}
|
||||
});
|
||||
|
|
@ -628,10 +605,6 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
job.setEcDepartment(ecDepartment);
|
||||
job.setParentJob(parentJob);
|
||||
getJobMapper().updateBaseJob(job);
|
||||
// 更新人员信息
|
||||
// updateResourceJob(job);
|
||||
// 更新组织架构图
|
||||
// new JobTriggerRunnable(job.getId()).run();
|
||||
|
||||
// 递归处理子级元素
|
||||
List<JobPO> jobsByPid = getJobMapper().getJobsByPid(job.getId());
|
||||
|
|
@ -769,15 +742,21 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
public static String repeatDetermine(String jobNo) {
|
||||
public String repeatDetermine(String jobNo,Integer jobTitle,Integer departmentId) {
|
||||
JobTitlesComInfo jb = new JobTitlesComInfo();
|
||||
CodeRulePO codeRuleByType = MapperProxyFactory.getProxy(CodeRuleMapper.class).getCodeRuleByType(RuleCodeType.JOBTITLES.getValue());
|
||||
if (StringUtils.isNotBlank(jobNo)) {
|
||||
jobNo = CodeRuleUtil.generateCode(RuleCodeType.JOBTITLES, jobNo);
|
||||
List<JobPO> list = getJobMapper().listByNo(Util.null2String(jobNo));
|
||||
OrganizationAssert.isEmpty(list, "编号不允许重复");
|
||||
|
||||
OrganizationAssert.isEmpty(list, SystemEnv.getHtmlLabelName(547137, user.getLanguage()));
|
||||
} else {
|
||||
OrganizationAssert.isTrue(null != codeRuleByType && "1".equals(codeRuleByType.getSerialEnable()), "编号不允许为空");
|
||||
jobNo = autoCreateCompanyNo();
|
||||
//OrganizationAssert.isTrue(null != codeRuleByType && "1".equals(codeRuleByType.getSerialEnable()), SystemEnv.getHtmlLabelName(547430,user.getLanguage()));
|
||||
//jobNo = autoCreateCompanyNo();
|
||||
String jobTitlescode = jb.getJobTitlescode(String.valueOf(jobTitle));
|
||||
if (!"".equals(jobTitlescode)) {
|
||||
jobNo = jobTitlescode+"-"+departmentId;
|
||||
}
|
||||
}
|
||||
return jobNo;
|
||||
}
|
||||
|
|
@ -810,19 +789,4 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
}
|
||||
}
|
||||
|
||||
///**
|
||||
// * 更新EC岗位
|
||||
// *
|
||||
// * @param jobPO
|
||||
// */
|
||||
//private void updateEcJob(JobPO jobPO, String newName) {
|
||||
// Map<String, Object> params = new HashMap<>();
|
||||
// params.put("job_name", newName);
|
||||
// params.put("jobactivityid", JOB_ACTIVITY_ID);
|
||||
// params.put("work_duty", jobPO.getWorkDuty());
|
||||
// params.put("work_authority", jobPO.getWorkAuthority());
|
||||
// params.put("description", jobPO.getDescription());
|
||||
// params.put("job_no", jobPO.getJobNo());
|
||||
// new OrganizationSyncEc(user, LogModuleNameEnum.JOB, OperateTypeEnum.UPDATE, params, jobPO).sync();
|
||||
//}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ 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.*;
|
||||
|
||||
|
|
@ -71,7 +72,7 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|||
public int saveLevel(LevelSearchParam param) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
List<LevelPO> list = getLevelMapper().listByNo(Util.null2String(param.getLevelNo()));
|
||||
OrganizationAssert.isTrue(checkRepeatNo(param.getSchemeId(), param.getLevelNo(), null), "同一等级方案下编号不能重复");
|
||||
OrganizationAssert.isTrue(checkRepeatNo(param.getSchemeId(), param.getLevelNo(), null), SystemEnv.getHtmlLabelName(547177, user.getLanguage()));
|
||||
LevelPO levelPO = LevelDTO.convertParamToPO(param, (long) user.getUID());
|
||||
return getLevelMapper().insertIgnoreNull(levelPO);
|
||||
}
|
||||
|
|
@ -80,7 +81,7 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|||
public int updateLevel(LevelSearchParam param) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
LevelPO levelPO = LevelDTO.convertParamToPO(param, (long) user.getUID());
|
||||
OrganizationAssert.isTrue(checkRepeatNo(levelPO.getSchemeId(), levelPO.getLevelNo(), levelPO.getId()), "同一等级方案下编号不能重复");
|
||||
OrganizationAssert.isTrue(checkRepeatNo(levelPO.getSchemeId(), levelPO.getLevelNo(), levelPO.getId()), SystemEnv.getHtmlLabelName(547177, user.getLanguage()));
|
||||
return getLevelMapper().updateLevel(levelPO);
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +95,7 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|||
@Override
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
HasRightUtil.hasRight(user, RIGHT_NAME, false);
|
||||
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
||||
OrganizationAssert.notEmpty(ids, SystemEnv.getHtmlLabelName(547138,user.getLanguage()));
|
||||
return getLevelMapper().deleteByIds(ids);
|
||||
}
|
||||
|
||||
|
|
@ -104,8 +105,8 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|||
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, "等级方案", "161", "schemeId", "schemeBrowser");
|
||||
SearchConditionItem levelNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "levelName");
|
||||
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547124, "161", "schemeId", "schemeBrowser");
|
||||
SearchConditionItem levelNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, 547141, "levelName");
|
||||
conditionItems.add(browserItem);
|
||||
conditionItems.add(levelNameCondition);
|
||||
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||
|
|
@ -122,12 +123,12 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
String id = Util.null2String(params.get("id"));
|
||||
String schemeId = Util.null2String(params.get("schemeId"));
|
||||
SearchConditionItem levelNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "levelName");
|
||||
SearchConditionItem levelNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, 547141, "levelName");
|
||||
levelNameCondition.setRules("required|string");
|
||||
SearchConditionItem levelNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "levelNo");
|
||||
SearchConditionItem levelNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, 547118, "levelNo");
|
||||
levelNoCondition.setRules("required|string");
|
||||
SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 200, "描述说明", "description");
|
||||
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "等级方案", "161", "schemeId", "schemeBrowser");
|
||||
SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 200, 547142, "description");
|
||||
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, 547124, "161", "schemeId", "schemeBrowser");
|
||||
BrowserBean browserBean = browserItem.getBrowserConditionParam();
|
||||
if (StringUtils.isNotBlank(schemeId) && !"-1".equals(schemeId) && StringUtil.isEmpty(id)) {
|
||||
browserItem.setValue(schemeId);
|
||||
|
|
@ -139,7 +140,7 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|||
// 编辑状态下赋值操作
|
||||
if (!StringUtil.isEmpty(id)) {
|
||||
LevelPO levelPO = getLevelMapper().getLevelByID(Integer.parseInt(id));
|
||||
OrganizationAssert.notNull(levelPO, "选择的数据不存在,或数据已删除");
|
||||
OrganizationAssert.notNull(levelPO, SystemEnv.getHtmlLabelName(547154,user.getLanguage()));
|
||||
|
||||
levelNameCondition.setValue(levelPO.getLevelName());
|
||||
levelNoCondition.setValue(levelPO.getLevelNo());
|
||||
|
|
@ -165,16 +166,16 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|||
|
||||
@Override
|
||||
public Map<String, List<MenuBtn>> getTableBtn() {
|
||||
return MenuBtn.getCommonBtnDatas();
|
||||
return MenuBtn.getCommonBtnDatas(user.getLanguage());
|
||||
}
|
||||
|
||||
@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("全部").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());
|
||||
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());
|
||||
apiDatas.put("topTabs", topTabs);
|
||||
|
||||
HashMap<String, Integer> countMap = new HashMap<>();
|
||||
|
|
@ -189,7 +190,7 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|||
@Override
|
||||
public TreeData getTreeData() {
|
||||
ArrayList<TreeData> treeDataList = getLevelMapper().getTreeData();
|
||||
return TreeData.builder().children(treeDataList).title("职等").key("-1").build();
|
||||
return TreeData.builder().children(treeDataList).title(SystemEnv.getHtmlLabelName(547139, user.getLanguage())).key("-1").build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ public class LogViewServiceImpl extends Service implements LogViewService {
|
|||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
|
||||
// 操作者
|
||||
SearchConditionItem operatorId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者", "1", "operatorId", "");
|
||||
SearchConditionItem operatorId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547160, "1", "operatorId", "");
|
||||
//操作时间
|
||||
SearchConditionItem dateItem = OrganizationFormItemUtil.dateItem(user,2,16,true,2,"操作时间","operateDate");
|
||||
SearchConditionItem dateItem = OrganizationFormItemUtil.dateItem(user,2,16,true,2,547159,"operateDate");
|
||||
|
||||
// 操作者部门
|
||||
SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者部门", "4", "departmentId", "");
|
||||
SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547167, "4", "departmentId", "");
|
||||
// 操作者分部
|
||||
SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者分部", "164", "companyId", "");
|
||||
SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, 547168, "164", "companyId", "");
|
||||
|
||||
conditionItems.add(operatorId);
|
||||
conditionItems.add(dateItem);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue