bug-15522 隐患处罚管理 不显示ai报警的隐患
parent
a6f36e8b43
commit
8e38720262
|
@ -304,7 +304,7 @@
|
|||
vua.NAME OUTSOURCED_CREATOR_NAME,
|
||||
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
|
||||
p.`NAME` as UNITS_PIC_NAME,
|
||||
ifnull(h.HIDDEN_COUNT,0) HIDDEN_COUNT
|
||||
ifnull(h.HIDDEN_COUNT,0) + ifnull(hai.AI_COUNT ,0) HIDDEN_COUNT
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_units b using (UNITS_ID)
|
||||
|
@ -335,9 +335,24 @@
|
|||
) t group by t.OUTSOURCED_ID,t.CREATOR
|
||||
) uncheck on uncheck.OUTSOURCED_ID = f.OUTSOURCED_ID and uncheck.CREATOR = #{pd.UserId}
|
||||
</if>
|
||||
left join ( SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT, t.SOURCE SOURCE, t.CREATOR CREATOR
|
||||
FROM
|
||||
( SELECT IFNULL( k.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID, h.* FROM `qa-gwj-prevention`.bus_keyproject_hidden h LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON h.FOREIGN_ID = k.KEYPROJECTCHECK_ID and h.ISDELETE = '0') t GROUP BY t.OUTSOURCED_ID,t.CREATOR ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||
left join (
|
||||
SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT, t.SOURCE SOURCE, t.CREATOR CREATOR
|
||||
FROM
|
||||
(
|
||||
SELECT IFNULL( k.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID, h.*
|
||||
FROM `qa-gwj-prevention`.bus_keyproject_hidden h
|
||||
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON h.FOREIGN_ID = k.KEYPROJECTCHECK_ID and h.ISDELETE = '0'
|
||||
) t
|
||||
GROUP BY t.OUTSOURCED_ID,t.CREATOR
|
||||
) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||
left join (
|
||||
select vm.OUTSOURCED_ID ,COUNT(1) AI_COUNT
|
||||
from `qa-gwj-regulatory`.bus_videomanager vm
|
||||
left join `qa-gwj-regulatory`.bus_aiwarning ai on ai.VIDEOMANAGER_ID = vm.VIDEOMANAGER_ID and vm.ISDELETE = '0'
|
||||
left join `qa-gwj-regulatory`.bus_aiwarning_hiddens ah on ai.AIWARNING_ID = ah.AIWARNING_ID
|
||||
left join `qa-gwj-prevention`.bus_keyproject_hidden h on ah.HIDDEN_ID = h.HIDDEN_ID
|
||||
where h.ISDELETE = '0' and h.SOURCE = '1'
|
||||
) hai on hai.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
|
|
Loading…
Reference in New Issue