|
|
|
@ -33,12 +33,12 @@ public class PostionMatrixServiceImpl extends Service implements PostionMatrixSe
|
|
|
|
|
|
|
|
|
|
//2.报表岗位层级数据
|
|
|
|
|
LinkedList<Postion> tops = new LinkedList<>();
|
|
|
|
|
rs.executeQuery("select id,ywzwxl,ywzwcj from uf_ywzwcj");
|
|
|
|
|
rs.executeQuery("select a.id,a.ywzwxl,a.ywzwcj,b.ywzwcjywzd from uf_ywzwcj a left join uf_ywjsglgx b on a.id = b.ywzwcj where a.ywzwxl = 2");
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
tops.add(Postion.builder()
|
|
|
|
|
.id(Util.null2String(rs.getString("id")))
|
|
|
|
|
.id(Util.null2String(rs.getString("id"))+","+Util.null2String(rs.getString("ywzwcjywzd")))
|
|
|
|
|
.postionType(Util.getIntValue(rs.getString("ywzwxl")))
|
|
|
|
|
.postionName(Util.null2String(rs.getString("ywzwcj")))
|
|
|
|
|
.postionName(Util.null2String(rs.getString("ywzwcj")).replaceAll("(技术)", "$1(业务)"))
|
|
|
|
|
.build());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -61,8 +61,9 @@ public class PostionMatrixServiceImpl extends Service implements PostionMatrixSe
|
|
|
|
|
if (fDatasAll.size() > 0) {
|
|
|
|
|
for (int i = 0; i < tops.size(); i++) {
|
|
|
|
|
Postion postion = tops.get(i);
|
|
|
|
|
String[] parts = postion.getId().trim().split("\\s*,\\s*");
|
|
|
|
|
List<ResourcesPo> collect = fDatasAll.stream()
|
|
|
|
|
.filter(po -> postion.getId().equals(po.getPostion()))
|
|
|
|
|
.filter(po -> parts[1].equals(po.getPostion()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
String names = collect.stream()
|
|
|
|
|
.map(ResourcesPo::getResource)
|
|
|
|
@ -83,8 +84,9 @@ public class PostionMatrixServiceImpl extends Service implements PostionMatrixSe
|
|
|
|
|
if (sDatasAll.size() > 0) {
|
|
|
|
|
for (int i = 0; i < tops.size(); i++) {
|
|
|
|
|
Postion postion = tops.get(i);
|
|
|
|
|
String[] parts = postion.getId().trim().split("\\s*,\\s*");
|
|
|
|
|
List<ResourcesPo> collect = sDatasAll.stream()
|
|
|
|
|
.filter(po -> postion.getId().equals(po.getPostion()))
|
|
|
|
|
.filter(po -> parts[0].equals(po.getPostion()))
|
|
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
String names = collect.stream()
|
|
|
|
|
.map(ResourcesPo::getResource)
|
|
|
|
@ -119,17 +121,15 @@ public class PostionMatrixServiceImpl extends Service implements PostionMatrixSe
|
|
|
|
|
LinkedList<Integer> zndatas = new LinkedList<>();
|
|
|
|
|
for (int i = 0; i < tops.size(); i++) {
|
|
|
|
|
Postion postion = tops.get(i);
|
|
|
|
|
rs.executeQuery("select xm,rbywzwcjqssj from uf_ywzwxx where ywzwxl = 1 " +
|
|
|
|
|
" and ywzwcj = ? and rbywzwcjqssj is not null",postion.getId());
|
|
|
|
|
List<ResourcesPo> resourcesPos = new ArrayList<>();
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
resourcesPos.add(ResourcesPo.builder()
|
|
|
|
|
.resourceId(Util.null2String(rs.getString("xm")))
|
|
|
|
|
.workDate(Util.null2String(rs.getString("rbywzwcjqssj"))).build());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<ResourcesPo> filterAll = filterClosestWorkDate(resourcesPos);
|
|
|
|
|
zndatas.add(filterAll.size());
|
|
|
|
|
String[] parts = postion.getId().trim().split("\\s*,\\s*");
|
|
|
|
|
int size = (int) resourcesPoList.stream()
|
|
|
|
|
.filter(res ->
|
|
|
|
|
Objects.equals(res.getPostion(), parts[1]) &&
|
|
|
|
|
Objects.equals(res.getPostionType(), "1")
|
|
|
|
|
)
|
|
|
|
|
.count();
|
|
|
|
|
|
|
|
|
|
zndatas.add(size);
|
|
|
|
|
//名单列 增加null代替不展示
|
|
|
|
|
zndatas.add(null);
|
|
|
|
|
if (i == tops.size() - 1) {
|
|
|
|
@ -140,7 +140,7 @@ public class PostionMatrixServiceImpl extends Service implements PostionMatrixSe
|
|
|
|
|
zndatas.add(znSums);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
footers.add(PeopleSums.builder().type("职能管理序列").datas(zndatas).build());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -150,17 +150,14 @@ public class PostionMatrixServiceImpl extends Service implements PostionMatrixSe
|
|
|
|
|
int zjSums = 0;
|
|
|
|
|
for (int i = 0; i < tops.size(); i++) {
|
|
|
|
|
Postion postion = tops.get(i);
|
|
|
|
|
|
|
|
|
|
rs.executeQuery("select xm,rbywzwcjqssj from uf_ywzwxx where ywzwcj = ? and rbywzwcjqssj is not null",postion.getId());
|
|
|
|
|
List<ResourcesPo> resourcesPos = new ArrayList<>();
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
resourcesPos.add(ResourcesPo.builder()
|
|
|
|
|
.resourceId(Util.null2String(rs.getString("xm")))
|
|
|
|
|
.workDate(Util.null2String(rs.getString("rbywzwcjqssj"))).build());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<ResourcesPo> filterAll = filterClosestWorkDate(resourcesPos);
|
|
|
|
|
zjdatas.add(filterAll.size());
|
|
|
|
|
String[] parts = postion.getId().trim().split("\\s*,\\s*");
|
|
|
|
|
int size = (int) resourcesPoList.stream()
|
|
|
|
|
.filter(res ->
|
|
|
|
|
Objects.equals(res.getPostion(), parts[0]) ||
|
|
|
|
|
Objects.equals(res.getPostion(), parts[1])
|
|
|
|
|
)
|
|
|
|
|
.count();
|
|
|
|
|
zjdatas.add(size);
|
|
|
|
|
//名单列 增加null代替不展示
|
|
|
|
|
zjdatas.add(null);
|
|
|
|
|
|
|
|
|
@ -174,21 +171,19 @@ public class PostionMatrixServiceImpl extends Service implements PostionMatrixSe
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//2.专业管理序列
|
|
|
|
|
//2.专业技术序列
|
|
|
|
|
LinkedList<Integer> zydatas = new LinkedList<>();
|
|
|
|
|
for (int i = 0; i < tops.size(); i++) {
|
|
|
|
|
Postion postion = tops.get(i);
|
|
|
|
|
rs.executeQuery("select xm,rbywzwcjqssj from uf_ywzwxx where ywzwxl = 2 " +
|
|
|
|
|
" and ywzwcj = ? and rbywzwcjqssj is not null",postion.getId());
|
|
|
|
|
List<ResourcesPo> resourcesPos = new ArrayList<>();
|
|
|
|
|
while (rs.next()) {
|
|
|
|
|
resourcesPos.add(ResourcesPo.builder()
|
|
|
|
|
.resourceId(Util.null2String(rs.getString("xm")))
|
|
|
|
|
.workDate(Util.null2String(rs.getString("rbywzwcjqssj"))).build());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<ResourcesPo> filterAll = filterClosestWorkDate(resourcesPos);
|
|
|
|
|
zydatas.add(filterAll.size());
|
|
|
|
|
String[] parts = postion.getId().trim().split("\\s*,\\s*");
|
|
|
|
|
int size = (int) resourcesPoList.stream()
|
|
|
|
|
// 空安全比较(支持字段值为null的情况)
|
|
|
|
|
.filter(res ->
|
|
|
|
|
Objects.equals(res.getPostion(), parts[0]) &&
|
|
|
|
|
Objects.equals(res.getPostionType(), "2")
|
|
|
|
|
)
|
|
|
|
|
.count();
|
|
|
|
|
zydatas.add(size);
|
|
|
|
|
//名单列 增加null代替不展示
|
|
|
|
|
zydatas.add(null);
|
|
|
|
|
if (i == tops.size() - 1) {
|
|
|
|
|