wang_xy 10 hónapja
szülő
commit
68ba8bb4fe

+ 7 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZEngineeringGYVo.java

@@ -2,11 +2,14 @@ package com.ruoyi.zdsz.domain.vo;
 
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.ruoyi.common.core.domain.BaseEntity;
 import com.ruoyi.zdsz.domain.bo.ZEngineeringNodeBo;
 import lombok.Data;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -106,6 +109,10 @@ public class ZEngineeringGYVo extends BaseEntity {
     private Double gcPreset;
     private Double pesj=0.0;
     private Double gsj=0.0;
+    @ExcelProperty(value = "开工时间")
+    private Date startTime;
+    @ExcelProperty(value = "竣工时间")
+    private Date beCompletedTime;
 
     /**
      * 字典项

+ 28 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringGYServiceImpl.java

@@ -14,6 +14,7 @@ import com.ruoyi.framework.handler.MonthTableNameHandler;
 import com.ruoyi.zdsz.domain.ZEngiineeringPhoto;
 import com.ruoyi.zdsz.domain.ZEngineeringGY;
 import com.ruoyi.zdsz.domain.ZEngineeringIndustry;
+import com.ruoyi.zdsz.domain.ZEngineeringNode;
 import com.ruoyi.zdsz.domain.bo.*;
 import com.ruoyi.zdsz.domain.vo.ZEngiineeringPhotoVo;
 import com.ruoyi.zdsz.domain.vo.ZEngineeringGYVo;
@@ -94,6 +95,33 @@ public class ZEngineeringGYServiceImpl implements IZEngineeringGYService {
         ReviewList = nodeService.ReViewGYList(result.getRecords());
         result.getRecords().forEach(item -> {
             item.setNodeReViewStateList(ReviewList.get(item.getId()));
+            String state = "";
+            String end = "";
+            if("室内管线".equals(item.getEnginClassification())){
+                state = "进场";
+                end = "通气";
+            } else if ("室外管线".equals(item.getEnginClassification())) {
+                state = "进场";
+                end = "通气";
+            } else if ("架空管线".equals(item.getEnginClassification())) {
+                state = "除锈刷油";
+                end = "全貌照片";
+//            } else if ("".equals(item.getEnginClassification())) {
+//                state = "";
+//                end = "";
+            }
+            ZEngineeringNodeBo zEngineeringNodeBo = new ZEngineeringNodeBo();
+            zEngineeringNodeBo.setCreateTime(item.getCreateTime());
+            zEngineeringNodeBo.setCivliId(item.getId());
+            zEngineeringNodeBo.setType(state);
+            List<ZEngineeringNodeBo> zEngineeringNodeBos = nodeService.queryListDetails(zEngineeringNodeBo);
+            item.setStartTime(zEngineeringNodeBos!=null && zEngineeringNodeBos.size()>0 ? zEngineeringNodeBos.get(0).getUpdateTime():null);
+            ZEngineeringNodeBo zEngineeringNodeBoEnd = new ZEngineeringNodeBo();
+            zEngineeringNodeBoEnd.setCreateTime(item.getCreateTime());
+            zEngineeringNodeBoEnd.setCivliId(item.getId());
+            zEngineeringNodeBoEnd.setType(end);
+            List<ZEngineeringNodeBo> zEngineeringNodeBosEnd = nodeService.queryListDetails(zEngineeringNodeBoEnd);
+            item.setBeCompletedTime(zEngineeringNodeBosEnd!=null && zEngineeringNodeBosEnd.size()>0 ? zEngineeringNodeBosEnd.get(0).getUpdateTime():null);
         });
         return TableDataInfo.build(result);
     }

+ 87 - 26
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringNodeServiceImpl.java

@@ -234,6 +234,7 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
         LambdaQueryWrapper<ZEngineeringNode> lqw = Wrappers.lambdaQuery();
         lqw.eq(StringUtils.isNotBlank(bo.getCivliId()), ZEngineeringNode::getCivliId, bo.getCivliId());
         lqw.eq(StringUtils.isNotBlank(bo.getType()), ZEngineeringNode::getType, bo.getType());
+        lqw.orderByAsc(ZEngineeringNode::getUpdateTime);
         return lqw;
     }
 
@@ -525,10 +526,20 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
                     map.put("Type", item3);
                     map.put("state", nodeTypeList.stream().anyMatch(y -> y.getEngInfoId().equals(nodeList.stream().filter(x -> x.getType().equals(item3)).collect(Collectors.toList()).get(0).getId())) ? nodeTypeList.stream().filter(y -> y.getEngInfoId().equals(nodeList.stream().filter(x -> x.getType().equals(item3)).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)).collect(Collectors.toList()).get(0).getId())) ? nodeTypeList.stream().filter(y -> y.getEngInfoId().equals(nodeList.stream().filter(x -> x.getType().equals(item3)).collect(Collectors.toList()).get(0).getId())).collect(Collectors.toList()).get(0).getReviewContent() : "暂未审核");
-                } else {
-                    map.put("Type", item3);
-                    map.put("state", "0");
-                    map.put("content", "暂未审核");
+                    if(!ObjectUtils.isEmpty(nodeTypeList)){
+                        LambdaQueryWrapper<ZEngineeringInfo> lqw3 = Wrappers.lambdaQuery();
+                        lqw3.eq(StringUtils.isNotBlank(nodeTypeList.get(0).getId()), ZEngineeringInfo::getEngInfoId, nodeTypeList.get(0).getId());
+                        List<ZEngineeringInfo> info= zEngineeringInfoMapper.selectList(lqw3);
+                        if(!ObjectUtils.isEmpty(info)){
+                            map.put("Type",item3);
+                            map.put("state","0");
+                            map.put("content","暂未审核");
+                        }
+                    }
+                }else {
+                    map.put("Type",item3);
+                    map.put("state","-1");
+                    map.put("content","无数据");
                 }
                 stateList.add(map);
                 ReViewStateMap.set(stateList);
@@ -762,10 +773,20 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
                     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", "暂未审核");
+                    if(!ObjectUtils.isEmpty(nodeTypeList)){
+                        LambdaQueryWrapper<ZEngineeringInfo> lqw3 = Wrappers.lambdaQuery();
+                        lqw3.eq(StringUtils.isNotBlank(nodeTypeList.get(0).getId()), ZEngineeringInfo::getEngInfoId, nodeTypeList.get(0).getId());
+                        List<ZEngineeringInfo> info= zEngineeringInfoMapper.selectList(lqw3);
+                        if(!ObjectUtils.isEmpty(info)){
+                            map.put("Type",item3.getDictValue());
+                            map.put("state","0");
+                            map.put("content","暂未审核");
+                        }
+                    }
+                }else {
+                    map.put("Type",item3.getDictValue());
+                    map.put("state","-1");
+                    map.put("content","无数据");
                 }
                 stateList.add(map);
                 ReViewStateMap.set(stateList);
@@ -826,10 +847,20 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
                     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", "暂未审核");
+                    if(!ObjectUtils.isEmpty(nodeTypeList)){
+                        LambdaQueryWrapper<ZEngineeringInfo> lqw3 = Wrappers.lambdaQuery();
+                        lqw3.eq(StringUtils.isNotBlank(nodeTypeList.get(0).getId()), ZEngineeringInfo::getEngInfoId, nodeTypeList.get(0).getId());
+                        List<ZEngineeringInfo> info= zEngineeringInfoMapper.selectList(lqw3);
+                        if(!ObjectUtils.isEmpty(info)){
+                            map.put("Type",item3.getDictValue());
+                            map.put("state","0");
+                            map.put("content","暂未审核");
+                        }
+                    }
+                }else {
+                    map.put("Type",item3.getDictValue());
+                    map.put("state","-1");
+                    map.put("content","无数据");
                 }
                 stateList.add(map);
                 ReViewStateMap.set(stateList);
@@ -887,10 +918,20 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
                     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", "暂未审核");
+                    if(!ObjectUtils.isEmpty(nodeTypeList)){
+                        LambdaQueryWrapper<ZEngineeringInfo> lqw3 = Wrappers.lambdaQuery();
+                        lqw3.eq(StringUtils.isNotBlank(nodeTypeList.get(0).getId()), ZEngineeringInfo::getEngInfoId, nodeTypeList.get(0).getId());
+                        List<ZEngineeringInfo> info= zEngineeringInfoMapper.selectList(lqw3);
+                        if(!ObjectUtils.isEmpty(info)){
+                            map.put("Type",item3.getDictValue());
+                            map.put("state","0");
+                            map.put("content","暂未审核");
+                        }
+                    }
+                }else {
+                    map.put("Type",item3.getDictValue());
+                    map.put("state","-1");
+                    map.put("content","无数据");
                 }
                 stateList.add(map);
                 ReViewStateMap.set(stateList);
@@ -974,10 +1015,20 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
                     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():"暂未审核");
+                    if(!ObjectUtils.isEmpty(nodeTypeList)){
+                        LambdaQueryWrapper<ZEngineeringInfo> lqw3 = Wrappers.lambdaQuery();
+                        lqw3.eq(StringUtils.isNotBlank(nodeTypeList.get(0).getId()), ZEngineeringInfo::getEngInfoId, nodeTypeList.get(0).getId());
+                        List<ZEngineeringInfo> info= zEngineeringInfoMapper.selectList(lqw3);
+                        if(!ObjectUtils.isEmpty(info)){
+                            map.put("Type",item3.getDictValue());
+                            map.put("state","0");
+                            map.put("content","暂未审核");
+                        }
+                    }
                 }else {
                     map.put("Type",item3.getDictValue());
-                    map.put("state","0");
-                    map.put("content","暂未审核");
+                    map.put("state","-1");
+                    map.put("content","无数据");
                 }
                 stateList.add(map);
                 ReViewStateMap.set(stateList);;
@@ -1029,10 +1080,20 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
                     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", "暂未审核");
+                    if(!ObjectUtils.isEmpty(nodeTypeList)){
+                        LambdaQueryWrapper<ZEngineeringInfo> lqw3 = Wrappers.lambdaQuery();
+                        lqw3.eq(StringUtils.isNotBlank(nodeTypeList.get(0).getId()), ZEngineeringInfo::getEngInfoId, nodeTypeList.get(0).getId());
+                        List<ZEngineeringInfo> info= zEngineeringInfoMapper.selectList(lqw3);
+                        if(!ObjectUtils.isEmpty(info)){
+                            map.put("Type",item3.getDictValue());
+                            map.put("state","0");
+                            map.put("content","暂未审核");
+                        }
+                    }
+                }else {
+                    map.put("Type",item3.getDictValue());
+                    map.put("state","-1");
+                    map.put("content","无数据");
                 }
                 stateList.add(map);
                 ReViewStateMap.set(stateList);
@@ -1092,10 +1153,10 @@ public class ZEngineeringNodeServiceImpl implements IZEngineeringNodeService {
                         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", "暂未审核");
+                    }else {
+                        map.put("Type",item3.getDictValue());
+                        map.put("state","0");
+                        map.put("content","暂未审核");
                     }
                     stateList.add(map);
                     ReViewStateMap.set(stateList);