wang_xy 1 yıl önce
ebeveyn
işleme
83bd6e1f24

+ 1 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/ZEnginNotInstalled.java

@@ -35,6 +35,7 @@ public class ZEnginNotInstalled extends BaseEntity {
     private String unitName;
     private String houseName;
     private String type;
+    private String enginType;
     /**
      * 备注
      */

+ 1 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/bo/ZEnginNotInstalledBo.java

@@ -36,6 +36,7 @@ public class ZEnginNotInstalledBo extends BaseEntity {
     private String unitName;
     private String houseName;
     private String type;
+    private String enginType;
     private String remark;
     private String delFlag;
 

+ 2 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/BulidingStatusVo.java

@@ -35,4 +35,6 @@ public class BulidingStatusVo {
      */
     @ExcelProperty(value = "竣工(户)")
     private   String done;
+    @ExcelProperty(value = "未安装(户)")
+    private   String notInstall;
 }

+ 11 - 19
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZComprehensiveVo.java

@@ -28,47 +28,51 @@ public class ZComprehensiveVo extends BaseEntity implements Serializable {
     /**
      *
      */
-    @ExcelProperty(value = "")
     private String id;
 
     /**
      * 小区id
      */
-    @ExcelProperty(value = "小区id")
     private String areaId;
 
     /**
      * 楼栋id
      */
-    @ExcelProperty(value = "楼栋id")
     private String buildingId;
 
     /**
      * 单元id
      */
-    @ExcelProperty(value = "单元id")
     private String unitId;
 
     @ExcelProperty(value = "行政区", converter = ExcelDictConvert.class)
     @ExcelDictFormat(dictType = "district")
     private String district;
+    @ExcelProperty(value = "小区")
+    private String areaName;
+
+    @ExcelProperty(value = "楼栋")
+    private String buildingName;
 
+    @ExcelProperty(value = "单元")
+    private String unitName;
+
+    @ExcelProperty(value = "房间号")
+    private String houseName;
     /**
      * 房间id
      */
-    @ExcelProperty(value = "房间id")
     private String houseId;
 
     /**
      * 类型
      */
-    @ExcelProperty(value = "类型")
     private String type;
 
     /**
      * 安检是否合格
      */
-    @ExcelProperty(value = "安检是否合格")
+    @ExcelProperty(value = "是否开栓")
     private String isQualified;
 
     /**
@@ -77,18 +81,6 @@ public class ZComprehensiveVo extends BaseEntity implements Serializable {
     @ExcelProperty(value = "备注")
     private String remark;
 
-    @ExcelProperty(value = "小区")
-    private String areaName;
-
-    @ExcelProperty(value = "楼栋")
-    private String buildingName;
-
-    @ExcelProperty(value = "单元")
-    private String unitName;
-
-    @ExcelProperty(value = "房间号")
-    private String houseName;
-
     /**
      * 入参
      */

+ 2 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZEnginNotInstalledVo.java

@@ -52,6 +52,8 @@ public class ZEnginNotInstalledVo implements Serializable {
      */
     @ExcelProperty(value = "备注")
     private String remark;
+    private String enginType;
+
 
 
 }

+ 3 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/areaStatusVo.java

@@ -38,5 +38,8 @@ public class areaStatusVo {
     @ExcelProperty(value = "竣工(户)")
     private   String done;
 
+    @ExcelProperty(value = "未安装(户)")
+    private   String notInstall;
+
 
 }

+ 3 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/mapper/ZComprehensiveMapper.java

@@ -11,6 +11,8 @@ import com.ruoyi.zdsz.domain.vo.ZEngineeringCivilVo;
 import com.ruoyi.zdsz.domain.vo.ZHouseVo;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * 开栓|安检|维修Mapper接口
  *
@@ -21,6 +23,7 @@ public interface ZComprehensiveMapper extends BaseMapperPlus<ZComprehensiveMappe
 
 //    Page<ZComprehensiveVo> getPageList(@Param("p") ZComprehensiveBo bo, Page<?> page);
     Page<ZComprehensiveVo> queryPageList(@Param("p") ZComprehensiveBo bo, @Param("pa")Page<?> page, @Param("page") Integer pages, @Param("size") Integer size);
+    List<ZComprehensiveVo> queryPageListAll(@Param("p") ZComprehensiveBo bo);
     String getIsQualifiedString(String houseId);
 
 }

+ 2 - 2
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/mapper/ZEngineeringCivilMapper.java

@@ -24,8 +24,8 @@ public interface ZEngineeringCivilMapper extends BaseMapperPlus<ZEngineeringCivi
     Page<ZEngineeringCivilVo> queryPageIdList(@Param("idList") List idList, @Param("total") Long total, @Param("pa")Page<?> page,@Param("page") Integer pages,@Param("size") Integer size);
 
     List<roomStatusVo> getObtainRoomcCompletionInformationList(ZEngineeringCivilBo bo);
-    List<areaWillDoneVo> getAreaCompletionInformationList(@Param("idList") List idList,@Param("enginCycle")String enginCycle);
-    List<areaWillDoneVo> getAreaCompletionInformationList2(@Param("enginCycle")String enginCycle);
+    List<areaWillDoneVo> getAreaCompletionInformationList(@Param("idList") List idList,@Param("enginCycle")String enginCycle,@Param("enginType")String enginType);
+    List<areaWillDoneVo> getAreaCompletionInformationList2(@Param("enginCycle")String enginCycle,@Param("enginType")String enginType);
     Map<String,Number> getsumStatus(String district);
 
     areaMessageVo getHouseMessage(String Id);

+ 3 - 2
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZComprehensiveServiceImpl.java

@@ -82,8 +82,9 @@ public class ZComprehensiveServiceImpl implements IZComprehensiveService {
      */
     @Override
     public List<ZComprehensiveVo> queryList(ZComprehensiveBo bo) {
-        LambdaQueryWrapper<ZComprehensive> lqw = buildQueryWrapper(bo);
-        return baseMapper.selectVoList(lqw);
+//        LambdaQueryWrapper<ZComprehensive> lqw = buildQueryWrapper(bo);
+//        return baseMapper.selectVoList(lqw);
+        return baseMapper.queryPageListAll(bo);
     }
 
     private LambdaQueryWrapper<ZComprehensive> buildQueryWrapper(ZComprehensiveBo bo) {

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

@@ -80,6 +80,7 @@ public class ZEnginNotInstalledServiceImpl implements IZEnginNotInstalledService
         lqw.eq(StringUtils.isNotBlank(bo.getUnitId()), ZEnginNotInstalled::getUnitId, bo.getUnitId());
         lqw.eq(StringUtils.isNotBlank(bo.getHouseId()), ZEnginNotInstalled::getHouseId, bo.getHouseId());
         lqw.eq(StringUtils.isNotBlank(bo.getType()), ZEnginNotInstalled::getType, bo.getType());
+        lqw.eq(StringUtils.isNotBlank(bo.getEnginType()), ZEnginNotInstalled::getEnginType, bo.getEnginType());
         lqw.like(StringUtils.isNotBlank(bo.getRemark()), ZEnginNotInstalled::getRemark, bo.getRemark());
         return lqw;
     }

+ 8 - 2
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEngineeringCivilServiceImpl.java

@@ -817,12 +817,14 @@ public class ZEngineeringCivilServiceImpl implements IZEngineeringCivilService {
             List willDone = value.stream().filter(item -> item.getRoomStatus().equals("未施工")).collect(Collectors.toList());
             List notstart = value.stream().filter(item -> item.getRoomStatus().equals("施工中")).collect(Collectors.toList());
             List done = value.stream().filter(item -> item.getRoomStatus().equals("竣工")).collect(Collectors.toList());
+            List notInstall = value.stream().filter(item -> item.getRoomStatus().equals("未安装")).collect(Collectors.toList());
             List<List<roomStatusVo>> roomStatusVoList = new ArrayList<>();
             Map<String, List<roomStatusVo>> sortMap = roomMap.entrySet().stream().sorted(Comparator.comparingInt(entry -> Integer.parseInt(entry.getKey()))).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldVal, newVal) -> oldVal, LinkedHashMap::new));
             sortMap.forEach((key1, value1) -> {
                 roomStatusVoList.add(value1);
             });
             bulidingStatusVo.setRoomStatusVoList(roomStatusVoList);
+            bulidingStatusVo.setDone(String.valueOf(notInstall.size()));
             bulidingStatusVo.setDone(String.valueOf(done.size()));
             bulidingStatusVo.setWillDone(String.valueOf(willDone.size()));
             bulidingStatusVo.setNotstart(String.valueOf(notstart.size()));
@@ -843,7 +845,7 @@ public class ZEngineeringCivilServiceImpl implements IZEngineeringCivilService {
         IdList.stream().forEach(item -> {
             Id.add(item.getId());
         });
-        List<areaWillDoneVo> hourseList = baseMapper.getAreaCompletionInformationList(Id, bo.getEnginCycle());
+        List<areaWillDoneVo> hourseList = baseMapper.getAreaCompletionInformationList(Id, bo.getEnginCycle(),bo.getEnginType());
         Map<String, List<areaWillDoneVo>> stringListMap = hourseList.stream().collect(Collectors.groupingBy(item -> item.getAreaId()));
         List<areaStatusVo> areaList = new ArrayList<>();
         stringListMap.forEach((key, value) -> {
@@ -851,11 +853,13 @@ public class ZEngineeringCivilServiceImpl implements IZEngineeringCivilService {
             List notstart = value.stream().filter(item -> item.getRoomStatus().equals("未施工")).collect(Collectors.toList());
             List willDone = value.stream().filter(item -> item.getRoomStatus().equals("施工中")).collect(Collectors.toList());
             List done = value.stream().filter(item -> item.getRoomStatus().equals("竣工")).collect(Collectors.toList());
+            List notInstall = value.stream().filter(item -> item.getRoomStatus().equals("未安装")).collect(Collectors.toList());
             areaStatusVo.setAreaId(key);
             areaStatusVo.setAreaName(value.get(0).getName());
             areaStatusVo.setWillDone(String.valueOf(willDone.size()));
             areaStatusVo.setNotstart(String.valueOf(notstart.size()));
             areaStatusVo.setDone(String.valueOf(done.size()));
+            areaStatusVo.setNotInstall(String.valueOf(notInstall.size()));
             areaStatusVo.setScale(value.get(0).getScale().toString());
             areaList.add(areaStatusVo);
         });
@@ -867,7 +871,7 @@ public class ZEngineeringCivilServiceImpl implements IZEngineeringCivilService {
 
     @Override
     public List<areaStatusVo> getAreaCompletionInformationList2(ZEngineeringCivilBo bo) {
-        List<areaWillDoneVo> hourseList = baseMapper.getAreaCompletionInformationList2(bo.getEnginCycle());
+        List<areaWillDoneVo> hourseList = baseMapper.getAreaCompletionInformationList2( bo.getEnginCycle(),bo.getEnginType());
         Map<String, List<areaWillDoneVo>> stringListMap = hourseList.stream().collect(Collectors.groupingBy(item -> item.getAreaId()));
         List<areaStatusVo> areaList = new ArrayList<>();
         stringListMap.forEach((key, value) -> {
@@ -875,11 +879,13 @@ public class ZEngineeringCivilServiceImpl implements IZEngineeringCivilService {
             List notstart = value.stream().filter(item -> item.getRoomStatus().equals("未施工")).collect(Collectors.toList());
             List willDone = value.stream().filter(item -> item.getRoomStatus().equals("施工中")).collect(Collectors.toList());
             List done = value.stream().filter(item -> item.getRoomStatus().equals("竣工")).collect(Collectors.toList());
+            List notInstall = value.stream().filter(item -> item.getRoomStatus().equals("未安装")).collect(Collectors.toList());
             areaStatusVo.setAreaId(key);
             areaStatusVo.setAreaName(value.get(0).getName());
             areaStatusVo.setWillDone(String.valueOf(willDone.size()));
             areaStatusVo.setNotstart(String.valueOf(notstart.size()));
             areaStatusVo.setDone(String.valueOf(done.size()));
+            areaStatusVo.setNotInstall(String.valueOf(notInstall.size()));
             areaStatusVo.setScale(value.get(0).getScale().toString());
             areaList.add(areaStatusVo);
         });

+ 42 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZComprehensiveMapper.xml

@@ -89,6 +89,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         )
         order by zc.create_time desc
     </select>
+    <select id="queryPageListAll" resultType="com.ruoyi.zdsz.domain.vo.ZComprehensiveVo">
+        SELECT
+        zc.district,
+        dd.dict_label as is_qualified,
+        if(zh.NAME is null , '未知' ,zh.NAME) AS houseName,
+        if(zt.NAME is null , '未知' ,zt.NAME) AS unitName,
+        if(zb.NAME is null , '未知' ,zb.NAME) AS buildingName,
+        if(za.NAME is null , '未知' ,za.NAME) AS areaName,
+        zc.remark
+        FROM
+        z_comprehensive AS zc
+        LEFT JOIN z_house AS zh ON zh.id = zc.house_id
+        LEFT JOIN z_unit AS zt ON zh.unit_id = zt.id
+        LEFT JOIN z_building AS zb ON zt.building_id = zb.id
+        LEFT JOIN z_area AS za ON zb.area_id = za.id
+        left join sys_dict_data dd on dd.dict_type='sys_yes_no' and zc.is_qualified=dd.dict_value
+        WHERE
+        1 = 1
+        AND zc.del_flag = '0'
+        <if test="p.areaId != null and p.areaId != ''">
+            AND zc.area_id = #{p.areaId}
+        </if>
+        <if test="p.buildingId != null and p.buildingId != ''">
+            AND zc.building_id = #{p.buildingId}
+        </if>
+        <if test="p.personBy != null and p.personBy != ''">
+            AND zc.create_by = #{p.personBy}
+        </if>
+        <if test="p.unitId != null and p.unitId != ''">
+            AND zc.unit_id = #{p.unitId}
+        </if>
+        <if test="p.constructTime != null and p.constructTime != '' and p.constructEndTime != null and p.constructEndTime != ''">
+            AND zc.create_time BETWEEN #{p.constructTime} AND #{p.constructEndTime}
+        </if>
+        <if test="p.district != null and p.district != ''">
+            AND zc.district = #{p.district}
+        </if>
+        <if test="p.houseId != null and p.houseId != ''">
+            AND zc.house_id = #{p.houseId}
+        </if>
+        order by zc.create_time desc
+    </select>
     <select id="getIsQualifiedString" resultType="java.lang.String" parameterType="java.lang.String">
         SELECT
             CASE is_qualified WHEN 'N' THEN 0 ELSE 1 END as isQualified

+ 27 - 4
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZEngineeringCivilMapper.xml

@@ -141,7 +141,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     a.NAME AS roomName,
     a.id AS roomId,
     b.engin_type AS enginCycle,
-    IFNULL( b.completion_status, '未施工' ) AS roomStatus,
+    IFNULL( b.completion_status,
+    IFNULL((select '未安装' from z_engin_not_installed ni
+    where ni.house_id = a.id
+    <if test="enginType != null and enginType != ''">
+        and ni.engin_type=#{enginType}
+    </if>
+    LIMIT 1),'未施工')) AS roomStatus,
     b.create_time,
     CAST(CONCAT( REPLACE ( bd.NAME, '栋', '' ),REPLACE ( c.NAME, '单元', '' )) AS SIGNED) AS unitOrder
     FROM
@@ -172,11 +178,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         za.id as areaId,
         za.NAME,
         IFNULL( za.scale, 0 ) AS scale,
-        IFNULL( ze.completion_status, '未施工' ) AS roomStatus
+        IFNULL( ze.completion_status,
+        IFNULL((select '未安装' from z_engin_not_installed ni
+        where ni.house_id = zh.id
+        <if test="enginType != null and enginType != ''">
+            and ni.engin_type=#{enginType}
+        </if>
+        LIMIT 1),'未施工')) AS roomStatus
         FROM
         z_house zh
         LEFT JOIN z_area za ON za.id = zh.area_id
         LEFT JOIN z_engineering_civil ze ON zh.id = ze.house_id AND ze.del_flag = '0' AND ze.engin_cycle=#{enginCycle}
+        <if test="enginType != null and enginType != ''">
+            and ze.engin_type=#{enginType}
+        </if>
         WHERE
         zh.del_flag = 0
           AND zh.area_id in
@@ -190,11 +205,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         za.id as areaId,
         za.NAME,
         IFNULL( za.scale, 0 ) AS scale,
-        IFNULL( ze.completion_status, '未施工' ) AS roomStatus
+        IFNULL( ze.completion_status,
+        IFNULL((select '未安装' from z_engin_not_installed ni
+        where ni.house_id = zh.id
+        <if test="enginType != null and enginType != ''">
+            and ni.engin_type=#{enginType}
+        </if>
+        LIMIT 1),'未施工')) AS roomStatus
         FROM
         z_house zh
         LEFT JOIN z_area za ON za.id = zh.area_id
         LEFT JOIN z_engineering_civil ze ON zh.id = ze.house_id AND ze.del_flag = '0' AND ze.engin_cycle=#{enginCycle}
+        <if test="enginType != null and enginType != ''">
+            and ze.engin_type=#{enginType}
+        </if>
         WHERE
         zh.del_flag = 0
         ORDER BY za.id ASC
@@ -270,7 +294,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         z_engineering_info
         WHERE
             1=1
-
         <if test="createTime != null and createTime != ''">
             and update_info_time between #{createTime[0]} and #{createTime[1]}
         </if>