gaodd 2 anos atrás
pai
commit
4a29f66428

+ 16 - 2
src/main/java/com/chinaitop/depot/supervise/mapper/DepotStyleMapper.xml

@@ -559,7 +559,7 @@
559 559
         where crk_status='4' and org_id=#{orgId}
560 560
     </select>
561 561
     <select id="selectHouseState" parameterType="java.util.Map" resultType="java.util.HashMap">
562
-        select * from (
562
+        <!-- select * from (
563 563
         SELECT
564 564
             row_number() over(partition by w_update_time) rn,
565 565
             styleS.*, thre.w_module AS wModule,
@@ -572,6 +572,20 @@
572 572
             styleS.type = '3.2'
573 573
         AND thre.w_module = '6972'
574 574
         and styleS.org_id = #{orgId}
575
-        )a where rn = 1
575
+        )a where rn = 1 -->
576
+        
577
+        
578
+        SELECT
579
+            styleS.*, thre.w_module AS wModule,
580
+            thre.w_name AS wName,
581
+            thre.w_update_time
582
+        FROM depot_style styleS
583
+        LEFT JOIN basic_storehouse house ON house.storehouse_id = styleS.indexid
584
+        LEFT JOIN t_warning_threshold_history thre ON thre.v_cf_code = house.storehouse_code
585
+        WHERE
586
+            styleS.type = '3.2'
587
+        AND thre.w_module = '6972'
588
+        and styleS.org_id = #{orgId}
589
+       GROUP BY w_update_time
576 590
     </select>
577 591
 </mapper>