增加隐患数量

2024年1月19日V01.00.51
zhaoyu 2024-01-11 18:02:12 +08:00
parent 147d92c329
commit 1539163515
1 changed files with 5 additions and 1 deletions

View File

@ -301,7 +301,8 @@
(SELECT count( 1 ) FROM `qa-gwj-prevention`.BUS_KEYPROJECTPUNISH k left join `qa-gwj-prevention`.bus_keyprojectcheck kjc on kjc.KEYPROJECTCHECK_ID = k.KEYPROJECTCHECK_ID WHERE kjc.OUTSOURCED_ID =f.OUTSOURCED_ID AND k.ISDELETE = '0' ) as KEY_COUNT,
vua.NAME OUTSOURCED_CREATOR_NAME,
ifnull(vac.CORP_NAME,'秦港股份有限公司') CORP_NAME,
p.`NAME` as UNITS_PIC_NAME
p.`NAME` as UNITS_PIC_NAME,
ifnull(h.HIDDEN_COUNT,0) HIDDEN_COUNT
from
<include refid="tableName"></include> f
left join bus_units b using (UNITS_ID)
@ -313,6 +314,9 @@
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID
left join ( SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT
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 ) t GROUP BY t.OUTSOURCED_ID ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID
where f.ISDELETE = '0'
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''"><!-- 关键词检索 -->
and