diff --git a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml index 963cb222..b282d600 100644 --- a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml +++ b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml @@ -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 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' and