Bläddra i källkod

查询联锁优化:排除一些已删除的联锁

sl 1 månad sedan
förälder
incheckning
c4223daf8b

+ 4 - 4
jeecg-module-interlock/src/main/java/org/jeecg/modules/detail/mapper/xml/InterlockDetailMapper.xml

@@ -118,8 +118,8 @@
         left join interlock_base_hy h2 on h2.bypass = d.bypass and h2.interlock_system_id = s.interlock_system_id
         left join interlock_base_hy h3 on h3.instrument_status = d.instrument_status and h3.interlock_system_id = s.interlock_system_id
         left join interlock_base_hy h4 on h4.control_system_status = d.control_system_status and h4.interlock_system_id = s.interlock_system_id
-        left join interlock_base h on h.id = s.interlock_system_id
-        left join interlock_base h5 on h5.id = s.interlock_apparatus_id
+        inner join interlock_base h on h.id = s.interlock_system_id
+        inner join interlock_base h5 on h5.id = s.interlock_apparatus_id
         left join (select l.* from interlock_system_limit l where l.interlock_user_id in
         (select u.id from interlock_user u where u.username=#{wiseUser})) qxnr on qxnr.interlock_system_id = s.interlock_system_id
         <where>
@@ -151,8 +151,8 @@
         left join interlock_base_hy h2 on h2.bypass = d.bypass and h2.interlock_system_id = s.interlock_system_id
         left join interlock_base_hy h3 on h3.instrument_status = d.instrument_status and h3.interlock_system_id = s.interlock_system_id
         left join interlock_base_hy h4 on h4.control_system_status = d.control_system_status and h4.interlock_system_id = s.interlock_system_id
-        left join interlock_base h on h.id = s.interlock_system_id
-        left join interlock_base h5 on h5.id = s.interlock_apparatus_id
+        inner join interlock_base h on h.id = s.interlock_system_id
+        inner join interlock_base h5 on h5.id = s.interlock_apparatus_id
         <where>
             <if test="interlockSummaryLimitVO.interlockApparatusId != null and interlockSummaryLimitVO.interlockApparatusId != ''"> and s.interlock_apparatus_id = #{interlockSummaryLimitVO.interlockApparatusId}</if>
             <if test="interlockSummaryLimitVO.interlockSystemId != null and interlockSummaryLimitVO.interlockSystemId != ''"> and s.interlock_system_id = #{interlockSummaryLimitVO.interlockSystemId}</if>