|
@@ -66,29 +66,33 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
private ZEngineeringCivilMapper zEngineeringCivilMapper;
|
|
|
|
|
|
@Override
|
|
|
- public TableDataInfo<Map<String, Object>> getByUserList(String type,String enginName,String enginType,String enginProcedure,String enginStatus,PageQuery pageQuery) {
|
|
|
+ public TableDataInfo<Map<String, Object>> getByUserList(String type,String enginName,String enginType,String enginProcedure,String enginStatus,PageQuery pageQuery,String nodeType,String createBy) {
|
|
|
Page<T> page = new Page<>(pageQuery.getPageNum(), pageQuery.getPageSize());
|
|
|
String leftJoin = null;
|
|
|
String szAndGy = null;
|
|
|
+
|
|
|
if ("1".equals(type)){
|
|
|
leftJoin = "z_engineering_pipe_jacking"; // 顶管
|
|
|
+ enginType = "";
|
|
|
}
|
|
|
else if ("2".equals(type)){
|
|
|
leftJoin = "z_engineering_infrastructure"; // 基建
|
|
|
+ enginType = "";
|
|
|
}
|
|
|
else if ("3".equals(type)){
|
|
|
leftJoin = "z_engineering_dangerous"; // 危险工程
|
|
|
}
|
|
|
else if ("4".equals(type)){
|
|
|
leftJoin = "z_engineering_industry"; // 市政工程
|
|
|
- szAndGy = "gy";
|
|
|
+ szAndGy = "sz";
|
|
|
+ enginType = "";
|
|
|
}
|
|
|
else if ("5".equals(type)){
|
|
|
leftJoin = "z_engineering_industry"; // 工业工程
|
|
|
- szAndGy = "sz";
|
|
|
+ szAndGy = "gy";
|
|
|
}
|
|
|
else if ("6".equals(type)){
|
|
|
- leftJoin = "z_engineering_air_wall"; // 工业工程
|
|
|
+ leftJoin = "z_engineering_air_wall"; // 带气工程
|
|
|
}
|
|
|
LinkedList<String> list = zEngineeringCivilMapper.getTableNames("z_engineering_info");
|
|
|
List DateList = new ArrayList();
|
|
@@ -96,12 +100,12 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
list.stream().forEach(item -> {
|
|
|
DateList.add(item.substring(item.indexOf("2")));
|
|
|
});
|
|
|
- String username = LoginHelper.getUsername();
|
|
|
+ String username = createBy;
|
|
|
Page<Map<String, Object>> listPage = null;
|
|
|
if (type.equals("6")) {
|
|
|
- listPage = baseMapper.getByUserList1(DateList, username, leftJoin, szAndGy, page);
|
|
|
+ listPage = baseMapper.getByUserList1(DateList, username, leftJoin, szAndGy, page,enginName,enginType);
|
|
|
} else {
|
|
|
- listPage = baseMapper.getByUserList(DateList, username, leftJoin, szAndGy, page);
|
|
|
+ listPage = baseMapper.getByUserList(DateList, username, leftJoin, szAndGy, page,enginName,enginType);
|
|
|
}
|
|
|
|
|
|
if ("1".equals(type)){ // 顶管
|
|
@@ -119,16 +123,25 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
ite.put("type",municipalEngineeringNode.stream().filter(ie-> ie.getDictValue() .equals(ite.get("type"))).collect(Collectors.toList()).get(0).getDictLabel());
|
|
|
ite.put("reviewStatus", str);
|
|
|
});
|
|
|
+ List<Map<String, String>> finalMapList = mapList;
|
|
|
municipalEngineeringNode.forEach(ite -> {
|
|
|
String dictLabel = ite.getDictLabel();
|
|
|
- List<Map<String, String>> type1 = mapList.stream().filter(it -> it.get("type").equals(dictLabel)).collect(Collectors.toList());
|
|
|
+ List<Map<String, String>> type1 = finalMapList.stream().filter(it -> it.get("type").equals(dictLabel)).collect(Collectors.toList());
|
|
|
if (type1.size() == 0) {
|
|
|
HashMap<String, String> objectObjectHashMap = new HashMap<>();
|
|
|
objectObjectHashMap.put("reviewStatus","未审核");
|
|
|
objectObjectHashMap.put("type",dictLabel);
|
|
|
- mapList.add(objectObjectHashMap);
|
|
|
+ finalMapList.add(objectObjectHashMap);
|
|
|
}
|
|
|
});
|
|
|
+ mapList = finalMapList;
|
|
|
+ if (!ObjectUtils.isEmpty(enginStatus)){
|
|
|
+ String s = "2".equals(enginStatus)?"未审核":"1".equals(enginStatus)?"通过":"未通过";
|
|
|
+ mapList = mapList.stream().filter(obj->obj.get("reviewStatus").equals(s)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.isEmpty(nodeType)){
|
|
|
+ mapList = mapList.stream().filter(obj->obj.get("type").equals(nodeType)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
item.put("status",mapList);
|
|
|
MonthTableNameHandler.removeData();
|
|
|
});
|
|
@@ -146,16 +159,25 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
ite.put("type",municipalEngineeringNode.stream().filter(ie-> ie.getDictValue() .equals(ite.get("type"))).collect(Collectors.toList()).get(0).getDictLabel());
|
|
|
ite.put("reviewStatus", str);
|
|
|
});
|
|
|
+ List<Map<String, String>> finalMapList = mapList;
|
|
|
municipalEngineeringNode.forEach(ite -> {
|
|
|
String dictLabel = ite.getDictLabel();
|
|
|
- List<Map<String, String>> type1 = mapList.stream().filter(it -> it.get("type").equals(dictLabel)).collect(Collectors.toList());
|
|
|
+ List<Map<String, String>> type1 = finalMapList.stream().filter(it -> it.get("type").equals(dictLabel)).collect(Collectors.toList());
|
|
|
if (type1.size() == 0) {
|
|
|
HashMap<String, String> objectObjectHashMap = new HashMap<>();
|
|
|
objectObjectHashMap.put("reviewStatus","未审核");
|
|
|
objectObjectHashMap.put("type",dictLabel);
|
|
|
- mapList.add(objectObjectHashMap);
|
|
|
+ finalMapList.add(objectObjectHashMap);
|
|
|
}
|
|
|
});
|
|
|
+ mapList = finalMapList;
|
|
|
+ if (!ObjectUtils.isEmpty(enginStatus)){
|
|
|
+ String s = "2".equals(enginStatus)?"未审核":"1".equals(enginStatus)?"通过":"未通过";
|
|
|
+ mapList = mapList.stream().filter(obj->obj.get("reviewStatus").equals(s)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.isEmpty(nodeType)){
|
|
|
+ mapList = mapList.stream().filter(obj->obj.get("type").equals(nodeType)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
item.put("status",mapList);
|
|
|
MonthTableNameHandler.removeData();
|
|
|
});
|
|
@@ -170,6 +192,10 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
String str = "2".equals(ite.get("reviewStatus"))?"未审核":"1".equals(ite.get("reviewStatus"))?"通过":"未通过";
|
|
|
ite.put("reviewStatus", str);
|
|
|
});
|
|
|
+ if (!ObjectUtils.isEmpty(enginStatus)){
|
|
|
+ String s = "2".equals(enginStatus)?"未审核":"1".equals(enginStatus)?"通过":"未通过";
|
|
|
+ mapList = mapList.stream().filter(obj->obj.get("reviewStatus").equals(s)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
item.put("status",mapList);
|
|
|
MonthTableNameHandler.removeData();
|
|
|
});
|
|
@@ -192,16 +218,25 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
}
|
|
|
ite.put("reviewStatus", str);
|
|
|
});
|
|
|
+ List<Map<String, String>> finalMapList = mapList;
|
|
|
municipalEngineeringNode.forEach(ite -> {
|
|
|
String dictLabel = ite.getDictLabel();
|
|
|
- List<Map<String, String>> type1 = mapList.stream().filter(it -> it.get("type").equals(dictLabel)).collect(Collectors.toList());
|
|
|
+ List<Map<String, String>> type1 = finalMapList.stream().filter(it -> it.get("type").equals(dictLabel)).collect(Collectors.toList());
|
|
|
if (type1.size() == 0) {
|
|
|
HashMap<String, String> objectObjectHashMap = new HashMap<>();
|
|
|
objectObjectHashMap.put("reviewStatus","未审核");
|
|
|
objectObjectHashMap.put("type",dictLabel);
|
|
|
- mapList.add(objectObjectHashMap);
|
|
|
+ finalMapList.add(objectObjectHashMap);
|
|
|
}
|
|
|
});
|
|
|
+ mapList = finalMapList;
|
|
|
+ if (!ObjectUtils.isEmpty(enginStatus)){
|
|
|
+ String s = "2".equals(enginStatus)?"未审核":"1".equals(enginStatus)?"通过":"未通过";
|
|
|
+ mapList = mapList.stream().filter(obj->obj.get("reviewStatus").equals(s)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if (!ObjectUtils.isEmpty(nodeType)){
|
|
|
+ mapList = mapList.stream().filter(obj->obj.get("type").equals(nodeType)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
item.put("status",mapList);
|
|
|
MonthTableNameHandler.removeData();
|
|
|
});
|
|
@@ -216,6 +251,10 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
String str = "2".equals(ite.get("reviewStatus"))?"未审核":"1".equals(ite.get("reviewStatus"))?"通过":"未通过";
|
|
|
ite.put("reviewStatus", str);
|
|
|
});
|
|
|
+ if (!ObjectUtils.isEmpty(enginStatus)){
|
|
|
+ String s = "2".equals(enginStatus)?"未审核":"1".equals(enginStatus)?"通过":"未通过";
|
|
|
+ mapList = mapList.stream().filter(obj->obj.get("reviewStatus").equals(s)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
item.put("status",mapList);
|
|
|
});
|
|
|
MonthTableNameHandler.removeData();
|
|
@@ -233,10 +272,22 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
String str = "2".equals(ite.get("reviewStatus"))?"未审核":"1".equals(ite.get("reviewStatus"))?"通过":"未通过";
|
|
|
ite.put("reviewStatus", str);
|
|
|
});
|
|
|
+ if (!ObjectUtils.isEmpty(enginStatus)){
|
|
|
+ String s = "2".equals(enginStatus)?"未审核":"1".equals(enginStatus)?"通过":"未通过";
|
|
|
+ mapList = mapList.stream().filter(obj->obj.get("reviewStatus").equals(s)).collect(Collectors.toList());
|
|
|
+ }
|
|
|
item.put("status",mapList);
|
|
|
});
|
|
|
MonthTableNameHandler.removeData();
|
|
|
}
|
|
|
+ if (!ObjectUtils.isEmpty(listPage)){
|
|
|
+ for (int i = 0; i < listPage.getRecords().size(); i++) {
|
|
|
+ if (ObjectUtils.isEmpty(listPage.getRecords().get(i).get("status"))){
|
|
|
+ listPage.getRecords().remove(i);
|
|
|
+ i--;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return TableDataInfo.build(listPage);
|
|
|
}
|
|
|
|
|
@@ -655,6 +706,11 @@ public class ZEngineeringIndustryServiceImpl implements IZEngineeringIndustrySer
|
|
|
return zEngineeringIndustryTypeVos;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<Map<String,String>> getByUserListAndDicts(String dictType) {
|
|
|
+ return baseMapper.getDicts(dictType);
|
|
|
+ }
|
|
|
+
|
|
|
private LambdaQueryWrapper<ZEngineeringIndustry> buildListByType(ZEngineeringIndustryBo bo) {
|
|
|
|
|
|
LambdaQueryWrapper<ZEngineeringIndustry> queryWrapper = new LambdaQueryWrapper<ZEngineeringIndustry>();
|