Ver código fonte

fix(equippipescheduling): 修正设备有效性筛选条件

- 将 IS_EFFECTIVE 字段的筛选条件从 != '否' 改为 = '是'
- 在所有查询中统一添加设备有效性检查条件
- 确保只有有效的设备才会被包含在查询结果中
xuzhancheng 1 dia atrás
pai
commit
f29dd24e05

+ 4 - 4
tz-module-pressure2/tz-module-pressure2-biz/src/main/resources/mapper/equippipescheduling/EquipPipeSchedulingMapper.xml

@@ -343,7 +343,7 @@
         GROUP BY b.equip_id
         ) scheduling_info ON eb.ID = scheduling_info.equip_id
         <where>
-            eb.deleted = 0 and eb.IS_EFFECTIVE != '否'
+            eb.deleted = 0 and eb.IS_EFFECTIVE = '是'
             --and (select count(*) num_pipe from (
             --select ped.ID
             --from PRESSURE2_EQUIP_PIPE_DETAIL ped
@@ -450,7 +450,7 @@
         GROUP BY b.equip_id
         ) scheduling_info ON eb.ID = scheduling_info.equip_id
         <where>
-            eb.deleted = 0
+            eb.deleted = 0 and eb.IS_EFFECTIVE = '是'
             <if test="unitName != null and unitName != ''">
                 AND eb.UNIT_NAME LIKE CONCAT('%',#{unitName},'%')
             </if>
@@ -629,7 +629,7 @@
         where b.equip_id = eb.id and a.DELETED = 0 and b.DELETED = 0 and a.type = 200 order by a.CREATE_TIME DESC limit 1) plan_year_check_date
         from PRESSURE2_EQUIP_PIPE eb
         <where>
-            eb.deleted = 0
+            eb.deleted = 0 and eb.IS_EFFECTIVE = '是'
             <if test="unitName != null and unitName != ''">
                 AND eb.unit_name LIKE CONCAT('%',#{unitName},'%')
             </if>
@@ -710,7 +710,7 @@
         where b.equip_id = eb.id and a.DELETED = 0 and b.DELETED = 0 and a.type = 200 order by a.CREATE_TIME limit 1) plan_year_check_date
         from PRESSURE2_EQUIP_PIPE eb
         <where>
-            eb.deleted = 0
+            eb.deleted = 0 and eb.IS_EFFECTIVE = '是'
             <if test="unitName != null and unitName != ''">
                 AND eb.unit_name LIKE CONCAT('%',#{unitName},'%')
             </if>