wang_xy 9 meses atrás
pai
commit
52efbc308b

+ 5 - 5
ruoyi-admin/src/main/resources/application-dev.yml

@@ -54,12 +54,12 @@ spring:
 #          url: jdbc:mysql://localhost:3306/zdsz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
 #          username: root
 #          password: 123456
-#          url: jdbc:mysql://123.249.30.140:3307/gas?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
-#          username: root
-#          password: szrqwx123456
-          url: jdbc:mysql://124.221.101.24:13306/sj-zdsz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          url: jdbc:mysql://123.249.30.140:3307/gas?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
           username: root
-          password: Lanyuxinxi@88.com
+          password: szrqwx123456
+#          url: jdbc:mysql://124.221.101.24:13306/sj-zdsz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+#          username: root
+#          password: Lanyuxinxi@88.com
 #          szrqwx123456
         # 从库数据源
         slave:

+ 13 - 7
ruoyi-gas/src/main/resources/mapper/GAreaMapper.xml

@@ -199,12 +199,17 @@
     <select id="getAllHouse" resultType="com.ruoyi.gas.domain.vo.GAreaExportVo">
         select b.id as id,
                 CONCAT(e.name,'-',d.name,'-',c.name,'-',b.name) as houseName
-        from g_house b
-        left join g_unit c on (b.unit_id = c.id and c.del_flag = '0')
-            left join g_building d on (c.building_id = d.id and d.del_flag = '0')
-            left join g_area e on (d.area_id = e.id and e.id = #{areaId} and e.del_flag = '0')
-        where
-           b.del_flag = '0'
+        FROM
+            g_house b
+                LEFT JOIN g_unit c ON  b.unit_id = c.id
+                LEFT JOIN g_building d ON  c.building_id = d.id
+                LEFT JOIN g_area e ON  d.area_id = e.id
+        WHERE
+            b.del_flag = '0'
+          AND c.del_flag = '0'
+          AND d.del_flag = '0'
+          AND e.del_flag = '0'
+          AND e.id = #{areaId}
     </select>
     <select id="getOrderHouse" resultType="com.ruoyi.gas.domain.vo.GAreaExportVo">
         select a.house_id as id,
@@ -213,11 +218,12 @@
                      left join g_house b on (a.house_id = b.id and b.del_flag = '0')
                      left join g_unit c on (b.unit_id = c.id and c.del_flag = '0')
                      left join g_building d on (c.building_id = d.id and d.del_flag = '0')
-                     left join g_area e on (d.area_id = e.id and e.id = #{areaId} and e.del_flag = '0')
+                     left join g_area e on (d.area_id = e.id  and e.del_flag = '0')
         where
          a.del_flag = '0'
         and a.service_type = '002'
         and a.examine_status = '001'
+        and e.id = #{areaId}
     </select>
 
     <select id="checkDataList" resultType="java.lang.Long">