|
@@ -921,6 +921,59 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
|
|
|
});
|
|
|
return statemap;
|
|
|
}
|
|
|
+ @Override
|
|
|
+ public Map<String,Object> ReViewGList(List<ZEngineeringGYVo> list){
|
|
|
+ Map<String, List<SysDictData>> sysDictMap = RedisUtils.getCacheMap("sys_dict");
|
|
|
+ List<ZEngineeringReview> nodeTypeList=new ArrayList<>();
|
|
|
+ Map<String,Object> statemap=new HashMap<>();
|
|
|
+ AtomicReference<List<Map<String, Object>>> ReViewStateMap= new AtomicReference<>(new ArrayList<>());
|
|
|
+ list.stream().forEach(item->{
|
|
|
+ String date= new SimpleDateFormat("yyyy_MM").format(item.getCreateTime());
|
|
|
+ MonthTableNameHandler.setData(date);
|
|
|
+ LambdaQueryWrapper<ZEngineeringNode> lqw = Wrappers.lambdaQuery();
|
|
|
+ lqw.eq(StringUtils.isNotBlank(item.getId()), ZEngineeringNode::getCivliId, item.getId());
|
|
|
+ List <ZEngineeringNode> nodeList=baseMapper.selectList(lqw);
|
|
|
+ nodeList.stream().forEach(item2->{
|
|
|
+ LambdaQueryWrapper<ZEngineeringReview> lqw2 = Wrappers.lambdaQuery();
|
|
|
+ lqw2.eq(StringUtils.isNotBlank(item2.getId()), ZEngineeringReview::getEngInfoId, item2.getId()).orderByDesc(ZEngineeringReview::getReviewTime);
|
|
|
+ List<ZEngineeringReview> ReviewList= zEngineeringReviewMapper.selectList(lqw2);
|
|
|
+ if (ReviewList.size()>0)
|
|
|
+ {
|
|
|
+ nodeTypeList.add(ReviewList.get(0));
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ String flag = null;
|
|
|
+ if (item.getEnginClassification().equals("室内管线")){
|
|
|
+ flag = "gy_inner";
|
|
|
+ }
|
|
|
+ if (item.getEnginClassification().equals("室外管线")){
|
|
|
+ flag = "gy_out";
|
|
|
+ }
|
|
|
+ if (item.getEnginClassification().equals("调压柜")){
|
|
|
+ flag = "gy_tyg";
|
|
|
+ }
|
|
|
+ List stateList=new ArrayList();
|
|
|
+ sysDictMap.get(flag).stream().forEach(item3 -> {
|
|
|
+ Map<String,Object> map=new HashMap<>();
|
|
|
+ if (nodeList.size()>0&&nodeList.stream().anyMatch(x->x.getType().equals(item3.getDictValue()))){
|
|
|
+ map.put("Type",item3.getDictValue());
|
|
|
+ map.put("state",nodeTypeList.stream().anyMatch(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId()))?nodeTypeList.stream().filter(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId())).collect(Collectors.toList()).get(0).getReviewStatus():"0");
|
|
|
+ map.put("content",nodeTypeList.stream().anyMatch(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId()))?nodeTypeList.stream().filter(y->y.getEngInfoId().equals(nodeList.stream().filter(x->x.getType().equals(item3.getDictValue())).collect(Collectors.toList()).get(0).getId())).collect(Collectors.toList()).get(0).getReviewContent():"暂未审核");
|
|
|
+ }else {
|
|
|
+ map.put("Type",item3.getDictValue());
|
|
|
+ map.put("state","0");
|
|
|
+ map.put("content","暂未审核");
|
|
|
+ }
|
|
|
+ stateList.add(map);
|
|
|
+ ReViewStateMap.set(stateList);;
|
|
|
+ });
|
|
|
+ statemap.put(item.getId(),ReViewStateMap.get());
|
|
|
+
|
|
|
+ MonthTableNameHandler.removeData();
|
|
|
+ });
|
|
|
+ return statemap;
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
|
public Map<String,Object> ReViewList(List<ZEngineeringCivilVo> zEngineeringCivilList) {
|