Эх сурвалжийг харах

修改检修完成情况停电次数逻辑

zx 2 сар өмнө
parent
commit
ea11480938

+ 1 - 1
ruoyi-powerdistribution/src/main/resources/mapper/powerdistribution/PdmLineMapper.xml

@@ -191,7 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         t1.maint_team_id, t1.maint_team_nm, t1.org_no, t1.org_nm, t1.std_creator_no, t1.std_creator_nm,
         t1.std_updator_no, t1.std_updator_nm, t1.std_org_no, t1.std_org_nm, t1.std_city_org_no,
         SUBSTRING_INDEX(t1.std_city_org_nm, '国网湖南省电力有限公司', -1)std_city_org_nm, t1.std_county_org_no, SUBSTRING_INDEX(t1.std_county_org_nm, '国网湖南省电力有限公司', -1) std_county_org_nm, t1.data_dt, t1.etl_tm,t1.bouns as reward_amount,t1.fault_free_duration,
-        (SELECT count(1) from ads_cst_hywzqlc_pdmstoprecords_df where line_id=t1.rec_id)poweroff_num,
+        (SELECT count(1) from ads_cst_hywzqlc_pdmstoprecords_df where poweroff_start_tm > DATE_SUB(NOW(), INTERVAL 2 MONTH ) and line_id=t1.rec_id)poweroff_num,
         t1.fault_poweroff_tm,t1.poweroff_tm
         from pdm_line t1
         <where>