Pārlūkot izejas kodu

工业工程、市政工程、顶管工程、碰口工程导出excel表格
工业工程序号、派发时间、进场时间

wangzhe 10 mēneši atpakaļ
vecāks
revīzija
16df428c1e

+ 35 - 24
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZEngineeringGYVo.java

@@ -27,92 +27,103 @@ public class ZEngineeringGYVo extends BaseEntity {
     /**
      *
      */
-    @ExcelProperty(value = "")
+//    @ExcelProperty(value = "")
     private String id;
     /**
      * 施工内容
      */
     private String remark;
+
+    @ExcelProperty(value = "序号")
+    private int rowNumber;
+
+    /**
+     * 工程名称
+     */
+    @ExcelProperty(value = "工程名称")
+    private String enginName;
+
+    /**
+     * 工程分类
+     */
+//    @ExcelProperty(value = "工程分类")
+    private String enginClassification;
+
     /**
      * 工程类型
      */
-    @ExcelProperty(value = "工程类型")
+//    @ExcelProperty(value = "工程类型")
     private String enginType;
 
     /**
      * 建筑单位
      */
-    @ExcelProperty(value = "建筑单位")
+    @ExcelProperty(value = "施工单位")
     private String constructUnit;
 
     /**
      * 项目负责人
      */
-    @ExcelProperty(value = "项目负责人")
+//    @ExcelProperty(value = "项目负责人")
     private String projectHead;
 
     /**
      * 现场负责人
      */
-    @ExcelProperty(value = "现场负责人")
+//    @ExcelProperty(value = "现场负责人")
     private String sceneHead;
 
     /**
      * 设计单位
      */
-    @ExcelProperty(value = "设计单位")
+//    @ExcelProperty(value = "设计单位")
     private String designUnit;
 
     /**
      * 设计负责人
      */
-    @ExcelProperty(value = "设计负责人")
+//    @ExcelProperty(value = "设计负责人")
     private String designHead;
 
     /**
      * 设计联系电话
      */
-    @ExcelProperty(value = "设计联系电话")
+//    @ExcelProperty(value = "设计联系电话")
     private String designPhone;
 
     /**
      * 监理单位
      */
-    @ExcelProperty(value = "监理单位")
+//    @ExcelProperty(value = "监理单位")
     private String supervisionUnit;
 
     /**
      * 监理负责人
      */
-    @ExcelProperty(value = "监理负责人")
+//    @ExcelProperty(value = "监理负责人")
     private String supervisionHead;
 
     /**
      * 监理联系电话
      */
-    @ExcelProperty(value = "监理联系电话")
+//    @ExcelProperty(value = "监理联系电话")
     private String supervisionPhone;
 
-    /**
-     * 工程名称
-     */
-    @ExcelProperty(value = "工程名称")
-    private String enginName;
-
-    /**
-     * 工程分类
-     */
-    @ExcelProperty(value = "工程分类")
-    private String enginClassification;
-
     private Double pePreset;
     private Double gcPreset;
     private Double pesj=0.0;
     private Double gsj=0.0;
+    @ExcelProperty(value = "派发时间")
+    private String createTimeStr; // 创建时间 派发时间
     @ExcelProperty(value = "开工时间")
+    private String startTimeStr; // 开工时间 进场时间
     private Date startTime;
     @ExcelProperty(value = "竣工时间")
-    private Date beCompletedTime;
+    private Date beCompletedTime; // 竣工时间
+    @ExcelProperty(value = "通气时间")
+    private Date airTime; // 通气时间
+    @ExcelProperty(value = "完工百分比")
+    private String donePercent; // 完工百分比
 
     /**
      * 字典项

+ 15 - 14
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZEngineeringIndustryVo.java

@@ -30,12 +30,25 @@ public class ZEngineeringIndustryVo extends BaseEntity {
     /**
      *
      */
-    @ExcelProperty(value = "")
+//    @ExcelProperty(value = "")
     private String id;
     /**
      * 施工内容
      */
     private String remark;
+
+    /**
+     * 工程名称
+     */
+    @ExcelProperty(value = "工程名称")
+    private String enginName;
+
+    /**
+     * 工程分类
+     */
+    @ExcelProperty(value = "工程分类")
+    private String enginClassification;
+
     /**
      * 工程类型
      */
@@ -99,22 +112,10 @@ public class ZEngineeringIndustryVo extends BaseEntity {
     /**
      * 类型(工业工程|市政工程)
      */
-    @ExcelProperty(value = "类型(工业工程|市政工程)")
+//    @ExcelProperty(value = "类型(工业工程|市政工程)")
     private String type;
 
     /**
-     * 工程名称
-     */
-    @ExcelProperty(value = "工程名称")
-    private String enginName;
-
-    /**
-     * 工程分类
-     */
-    @ExcelProperty(value = "工程分类")
-    private String enginClassification;
-
-    /**
      * 字典项
      * municipal_engineering_node
      * 市政工程节点类型(沟上施工|沟下施工)

+ 10 - 9
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZEngineeringPipeJackingVo.java

@@ -28,24 +28,19 @@ public class ZEngineeringPipeJackingVo extends BaseEntity implements Serializabl
     /**
      *
      */
-    @ExcelProperty(value = "")
+//    @ExcelProperty(value = "")
     private String id;
 
     /**
      * 工程id
      */
-    @ExcelProperty(value = "工程id")
+//    @ExcelProperty(value = "工程id")
     private String enginId;
 
+    @ExcelProperty(value = "工程名称")
     private String enginName;
 
     /**
-     * 工程地址
-     */
-    @ExcelProperty(value = "工程地址")
-    private String enginAddre;
-
-    /**
      * 工程编码
      */
     @ExcelProperty(value = "工程编码")
@@ -58,6 +53,12 @@ public class ZEngineeringPipeJackingVo extends BaseEntity implements Serializabl
     private String constructUnit;
 
     /**
+     * 工程地址
+     */
+    @ExcelProperty(value = "工程地址")
+    private String enginAddre;
+
+    /**
      * 工程规模
      */
     @ExcelProperty(value = "工程规模")
@@ -78,7 +79,7 @@ public class ZEngineeringPipeJackingVo extends BaseEntity implements Serializabl
     /**
      * 备注
      */
-    @ExcelProperty(value = "备注")
+//    @ExcelProperty(value = "备注")
     private String remark;
 
     private Double pePreset;

+ 10 - 10
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZTouchOperationEngineeringVo.java

@@ -29,17 +29,10 @@ public class ZTouchOperationEngineeringVo extends BaseEntity implements Serializ
     /**
      *
      */
-    @ExcelProperty(value = "")
+//    @ExcelProperty(value = "")
     private Long id;
 
     /**
-     * 作业方式
-     */
-    @ExcelProperty(value = "作业方式", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(dictType = "tapping_operation")
-    private String modeOperation;
-
-    /**
      * 工程名称
      */
     @ExcelProperty(value = "工程名称")
@@ -48,13 +41,20 @@ public class ZTouchOperationEngineeringVo extends BaseEntity implements Serializ
     /**
      * 地点
      */
-    @ExcelProperty(value = "地点")
+    @ExcelProperty(value = "工程地点")
     private String locations;
 
     /**
+     * 作业方式
+     */
+    @ExcelProperty(value = "作业方式", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "tapping_operation")
+    private String modeOperation;
+
+    /**
      * 备注
      */
-    @ExcelProperty(value = "备注")
+//    @ExcelProperty(value = "备注")
     private String remark;
 
     private List<ZEngineeringNodeBo> zEngineeringNodeBoList;

+ 41 - 1
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringGYServiceImpl.java

@@ -132,8 +132,48 @@ public class ZEngineeringGYServiceImpl implements IZEngineeringGYService {
     @Override
     public List<ZEngineeringGYVo> queryList(ZEngineeringIndustryGYBo bo) {
         LambdaQueryWrapper<ZEngineeringGY> lqw = buildQueryWrapper(bo);
-        return baseMapper.selectVoList(lqw);
+        return doList(baseMapper.selectVoList(lqw));
     }
+    public List<ZEngineeringGYVo> doList(List<ZEngineeringGYVo> list) {
+        for (int i = 0; i < list.size(); i++) {
+            ZEngineeringGYVo vo = list.get(i);
+            vo.setRowNumber(i+1); // 序号 rowNumber
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-MM-dd");
+            vo.setCreateTimeStr(simpleDateFormat.format(vo.getCreateTime())); // 派发时间 createtime
+            String state = "";
+            String end = "";
+            if("室内管线".equals(vo.getEnginClassification())){
+                state = "进场";
+                end = "通气";
+            } else if ("室外管线".equals(vo.getEnginClassification())) {
+                state = "进场";
+                end = "通气";
+            } else if ("架空管线".equals(vo.getEnginClassification())) {
+                state = "除锈刷油";
+                end = "全貌照片";
+//            } else if ("".equals(item.getEnginClassification())) {
+//                state = "";
+//                end = "";
+            }
+            ZEngineeringNodeBo zEngineeringNodeBo = new ZEngineeringNodeBo();
+            zEngineeringNodeBo.setCreateTime(vo.getCreateTime());
+            zEngineeringNodeBo.setCivliId(vo.getId());
+            zEngineeringNodeBo.setType(state);
+            System.out.println(i+" vo.getCreateTime()="+vo.getCreateTime());
+            List<ZEngineeringNodeBo> zEngineeringNodeBos = nodeService.queryListDetails(zEngineeringNodeBo);
+            vo.setStartTime(zEngineeringNodeBos!=null && zEngineeringNodeBos.size()>0 ? zEngineeringNodeBos.get(0).getUpdateTime():null);
+            System.out.println(i+" vo.getStartTime()="+vo.getStartTime());
+            vo.setStartTimeStr(vo.getStartTime() == null ? null : simpleDateFormat.format(vo.getStartTime())); // 进场时间 startTime
+//            vo.getZEngineeringNodeBoList().get()
+            // 竣工时间 beCompletedTime
+            // 通气时间 airTime
+            // 完工百分比 donePercent
+
+        }
+        return list;
+    }
+
+
 
     private LambdaQueryWrapper<ZEngineeringGY> buildQueryWrapper(ZEngineeringIndustryGYBo bo) {
         LambdaQueryWrapper<ZEngineeringGY> lqw = Wrappers.lambdaQuery();