wang_xy 5 miesięcy temu
rodzic
commit
909d8d48a0

+ 6 - 5
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZEngineeringCivilMapper.xml

@@ -67,7 +67,9 @@
     <select id="exportObtainQualifiedRoom" resultType="com.ruoyi.zdsz.domain.vo.ZEngineeringCivilObtainQualifiedRoom">
     <select id="exportObtainQualifiedRoom" resultType="com.ruoyi.zdsz.domain.vo.ZEngineeringCivilObtainQualifiedRoom">
         SELECT
         SELECT
         concat( IFNULL( area, '' ), IFNULL( building, '' ), IFNULL( unit, '' ), IFNULL( house, '' ) ) ardds,
         concat( IFNULL( area, '' ), IFNULL( building, '' ), IFNULL( unit, '' ), IFNULL( house, '' ) ) ardds,
-        GROUP_CONCAT( type ) type
+        GROUP_CONCAT( type ) type,
+        GROUP_CONCAT( `time` ) `time`,
+        GROUP_CONCAT( isTime ) isTime
         FROM
         FROM
         (
         (
         <foreach collection="tableNames" item="name" separator=" union all ">
         <foreach collection="tableNames" item="name" separator=" union all ">
@@ -80,7 +82,8 @@
             ( SELECT IF(NAME='无',null,NAME) FROM z_unit WHERE id = a.unit_id ) unit,
             ( SELECT IF(NAME='无',null,NAME) FROM z_unit WHERE id = a.unit_id ) unit,
             ( SELECT NAME FROM z_house WHERE id = a.house_id ) house,
             ( SELECT NAME FROM z_house WHERE id = a.house_id ) house,
             concat(b.type,'合格') type,
             concat(b.type,'合格') type,
-            c.update_info_time time
+            c.update_info_time time,
+            IF(c.update_info_time BETWEEN concat( #{p.beginTime[0]}, ' 00:00:00' ) AND concat( #{p.beginTime[1]}, ' 23:59:59' ),0,1) as isTime
             FROM
             FROM
             z_engineering_civil a
             z_engineering_civil a
             LEFT JOIN z_engineering_node_${name} b ON a.id = b.civli_id  AND b.del_flag = 0
             LEFT JOIN z_engineering_node_${name} b ON a.id = b.civli_id  AND b.del_flag = 0
@@ -92,9 +95,6 @@
             AND engin_classification = 'indoor_engin'
             AND engin_classification = 'indoor_engin'
             AND a.del_flag = 0
             AND a.del_flag = 0
             AND c.state = '1'
             AND c.state = '1'
-            <if test="p.beginTime != null and p.beginTime != ''">
-                AND c.update_info_time BETWEEN concat( #{p.beginTime[0]}, ' 00:00:00' ) AND concat( #{p.beginTime[1]}, ' 23:59:59' )
-            </if>
         </foreach>
         </foreach>
         ) z
         ) z
         where 1=1
         where 1=1
@@ -115,6 +115,7 @@
         AND type LIKE '%表后管%'
         AND type LIKE '%表后管%'
         AND type LIKE '%挂表%'
         AND type LIKE '%挂表%'
         AND type LIKE '%阀管%'
         AND type LIKE '%阀管%'
+        AND isTime LIKE '%0%'
         ORDER BY
         ORDER BY
         z.area,
         z.area,
         z.building,
         z.building,