wangzhe 6 mesi fa
parent
commit
0984177d1b

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

@@ -157,6 +157,13 @@ public class ZEngineeringGasOpening extends BaseEntity {
      */
     private String enginName;
 
+    /**
+     * 工程类型、项目名称
+     * 小程序民用工程室内开栓部分新增“项目名称”选择项
+     * 1.老旧改造开栓,2.报警器、切断阀安装开栓两项选择
+     */
+    private String engineType;
+
 //    /**
 //     * 工程分类
 //     */

+ 25 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/bo/ZEngineeringGasOpeningBo.java

@@ -160,6 +160,31 @@ public class ZEngineeringGasOpeningBo extends BaseEntity {
      */
     private List<String> receiptFormPic;
 
+
+    /**
+     * 项目名称 开栓类型
+     */
+    @ExcelProperty(value = "项目名称")
+    private String engineType;
+    // 选择报警器、切断阀安装开栓 开始🔛
+    /**
+     * 表前阀前口检测
+     */
+    private List<String> frontPipePic;
+    /**
+     * 切断阀上口检测
+     */
+    private List<String> cutOverPipePic;
+    /**
+     * 切断阀下口检测
+     */
+    private List<String> cutUnderPipePic;
+    /**
+     * 报警器安装位置
+     */
+    private List<String> alarmPositionPic;
+    // 选择报警器、切断阀安装开栓 结束🔚
+
     private ZEngineeringNodeBo zEngineeringNodeBo;
 
     /**

+ 24 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZEngineeringGasOpeningVo.java

@@ -163,6 +163,30 @@ public class ZEngineeringGasOpeningVo extends BaseEntity {
      */
     private List<String> receiptFormPic;
 
+    /**
+     * 项目名称 开栓类型
+     */
+    @ExcelProperty(value = "项目名称")
+    private String engineType;
+    // 选择报警器、切断阀安装开栓 开始🔛
+    /**
+     * 表前阀前口检测
+     */
+    private List<String> frontPipePic;
+    /**
+     * 切断阀上口检测
+     */
+    private List<String> cutOverPipePic;
+    /**
+     * 切断阀下口检测
+     */
+    private List<String> cutUnderPipePic;
+    /**
+     * 报警器安装位置
+     */
+    private List<String> alarmPositionPic;
+    // 选择报警器、切断阀安装开栓 结束🔚
+
 
 //
 //    /**

+ 1 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/IZEngiineeringPhotoService.java

@@ -75,6 +75,7 @@ public interface IZEngiineeringPhotoService {
     /**
      * 校验并批量删除照片信息
      */
+    Boolean deleteGas(ZEngineeringInfoBo bo);
     Boolean delete(ZEngineeringInfoBo bo);
     //删除记录但不释放资源
     Boolean deleteNodelFiles(ZEngineeringInfoBo bo);

+ 24 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngiineeringPhotoServiceImpl.java

@@ -246,6 +246,30 @@ public class ZEngiineeringPhotoServiceImpl implements IZEngiineeringPhotoService
         ;
         return flag > 0;
     }
+
+    @Override
+    @DynamicName(spel = "#bo.createTime")
+    @Transactional(rollbackFor = Exception.class)
+//    @Async("threadPoolTaskExecutor")
+    public Boolean deleteGas(ZEngineeringInfoBo bo) {
+        LambdaQueryWrapper<ZEngiineeringPhoto> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StringUtils.isNotBlank(bo.getId()), ZEngiineeringPhoto::getParentId, bo.getId());
+        List<ZEngiineeringPhoto> zEngiineeringPhoto = baseMapper.selectList(lqw);
+        List IdList = new ArrayList();
+        List UrlList = new ArrayList();
+        zEngiineeringPhoto.stream().forEach(item -> {
+            IdList.add(item.getId());
+            UrlList.add(item.getPicUrl());
+
+        });
+        int flag = 0;
+        if (IdList.size() > 0) {
+//            obsService.deleteFiles(UrlList);
+            flag = baseMapper.deleteBatchIds(IdList);
+        }
+        ;
+        return flag > 0;
+    }
     @Override
     @DynamicName(spel = "#bo.createTime")
     @Transactional(rollbackFor = Exception.class)

+ 18 - 1
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringGasOpeningServiceImpl.java

@@ -74,6 +74,10 @@ public class ZEngineeringGasOpeningServiceImpl implements IZEngineeringGasOpenin
         zEngineeringGasOpeningVo.setWindproofCirclePic(photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("windproofCirclePic")==null?new ArrayList<>():photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("windproofCirclePic").stream().map(s -> s.getPicUrl()).collect(Collectors.toList()));
         zEngineeringGasOpeningVo.setGasEnvironmentPic(photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("gasEnvironmentPic")==null?new ArrayList<>():photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("gasEnvironmentPic").stream().map(s -> s.getPicUrl()).collect(Collectors.toList()));
         zEngineeringGasOpeningVo.setReceiptFormPic(photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("receiptFormPic")==null?new ArrayList<>():photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("receiptFormPic").stream().map(s -> s.getPicUrl()).collect(Collectors.toList()));
+        zEngineeringGasOpeningVo.setFrontPipePic(photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("frontPipePic")==null?new ArrayList<>():photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("frontPipePic").stream().map(s -> s.getPicUrl()).collect(Collectors.toList()));
+        zEngineeringGasOpeningVo.setCutOverPipePic(photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("cutOverPipePic")==null?new ArrayList<>():photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("cutOverPipePic").stream().map(s -> s.getPicUrl()).collect(Collectors.toList()));
+        zEngineeringGasOpeningVo.setCutUnderPipePic(photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("cutUnderPipePic")==null?new ArrayList<>():photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("cutUnderPipePic").stream().map(s -> s.getPicUrl()).collect(Collectors.toList()));
+        zEngineeringGasOpeningVo.setAlarmPositionPic(photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("alarmPositionPic")==null?new ArrayList<>():photoVoList.stream().collect(Collectors.groupingBy(ZEngiineeringPhotoVo::getType)).get("alarmPositionPic").stream().map(s -> s.getPicUrl()).collect(Collectors.toList()));
         return zEngineeringGasOpeningVo;
     }
 
@@ -118,6 +122,7 @@ public class ZEngineeringGasOpeningServiceImpl implements IZEngineeringGasOpenin
         lqw.eq(StringUtils.isNotBlank(bo.getBuildingId()), ZEngineeringGasOpening::getBuildingId, bo.getBuildingId());
         lqw.eq(StringUtils.isNotBlank(bo.getUnitId()), ZEngineeringGasOpening::getUnitId, bo.getUnitId());
         lqw.eq(StringUtils.isNotBlank(bo.getHouseId()), ZEngineeringGasOpening::getHouseId, bo.getHouseId());
+        lqw.eq(StringUtils.isNotBlank(bo.getEngineType()), ZEngineeringGasOpening::getEngineType, bo.getEngineType());
         return lqw;
     }
 
@@ -187,6 +192,14 @@ public class ZEngineeringGasOpeningServiceImpl implements IZEngineeringGasOpenin
             batchInsertPic(bo.getWindproofCirclePic(), bo.getId(), "windproofCirclePic");
             batchInsertPic(bo.getGasEnvironmentPic(), bo.getId(), "gasEnvironmentPic");
             batchInsertPic(bo.getReceiptFormPic(), bo.getId(), "receiptFormPic");
+
+            // 选择老旧改造开栓:原表单信息不动。
+            // 选择报警器、切断阀安装开栓:表单项有
+            // 灶前阀门、气密测试、表前阀前口检测、切断阀上口检测、切断阀下口检测、报警器安装位置
+            batchInsertPic(bo.getFrontPipePic(), bo.getId(), "frontPipePic"); // 表前阀前口检测
+            batchInsertPic(bo.getCutOverPipePic(), bo.getId(), "cutOverPipePic"); // 切断阀上口检测
+            batchInsertPic(bo.getCutUnderPipePic(), bo.getId(), "cutUnderPipePic"); // 切断阀下口检测
+            batchInsertPic(bo.getAlarmPositionPic(), bo.getId(), "alarmPositionPic"); // 报警器安装位置
         }
 //        if (!ObjectUtils.isEmpty(bo.getzEngineeringNodeBo())) {
 //            bo.getzEngineeringNodeBo().setCivliId(add.getId());
@@ -208,7 +221,7 @@ public class ZEngineeringGasOpeningServiceImpl implements IZEngineeringGasOpenin
         ZEngineeringInfoBo photoBo = new ZEngineeringInfoBo();
         photoBo.setCreateTime(bo.getCreateTime());
         photoBo.setId(bo.getId());
-        photoService.delete(photoBo);
+        photoService.deleteGas(photoBo);
         batchInsertPic(bo.getGasCylinderPic(), bo.getId(), "gasCylinderPic");
         batchInsertPic(bo.getPressureTestPic(), bo.getId(), "pressureTestPic");
         batchInsertPic(bo.getGasMeterPic(), bo.getId(), "gasMeterPic");
@@ -218,6 +231,10 @@ public class ZEngineeringGasOpeningServiceImpl implements IZEngineeringGasOpenin
         batchInsertPic(bo.getWindproofCirclePic(), bo.getId(), "windproofCirclePic");
         batchInsertPic(bo.getGasEnvironmentPic(), bo.getId(), "gasEnvironmentPic");
         batchInsertPic(bo.getReceiptFormPic(), bo.getId(), "receiptFormPic");
+        batchInsertPic(bo.getFrontPipePic(), bo.getId(), "frontPipePic");
+        batchInsertPic(bo.getCutOverPipePic(), bo.getId(), "cutOverPipePic");
+        batchInsertPic(bo.getCutUnderPipePic(), bo.getId(), "cutUnderPipePic");
+        batchInsertPic(bo.getAlarmPositionPic(), bo.getId(), "alarmPositionPic");
         return flag;
     }
 

+ 5 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZEngineeringGasOpeningMapper.xml

@@ -15,6 +15,7 @@
             e.dict_label AS districtName,
             z.state,
             z.create_time as createTime,
+            if(z.engine_type = 'new', '报警器、切断阀安装开栓' , '老旧改造开栓') AS engineType,
             if(a.name is null , '未知' ,a.NAME) AS areaName,
             if(b.name is null , '未知' ,b.NAME) AS buildingName,
             if(c.name is null , '未知' ,c.NAME) AS unitName,
@@ -43,6 +44,9 @@
         <if test="p.houseId != null and p.houseId != ''">
             and z.house_id = #{p.houseId}
         </if>
+        <if test="p.engineType != null and p.engineType != ''">
+            and z.engine_type = #{p.engineType}
+        </if>
         <if test="p.createBy != null and p.createBy != ''">
             and z.create_by = #{p.createBy}
         </if>
@@ -77,6 +81,7 @@
             e2.dict_label AS gasChangeTypeName,
             z.is_windproof_circle AS isWindproofCircle,
             z.engin_name AS enginName,
+            z.engine_type AS enginetype,
             z.version,
             z.remark,
             z.del_flag AS delFlag,