From 8e387202629cac05ee488e3cd637e9dab5b311db Mon Sep 17 00:00:00 2001 From: water_xu Date: Tue, 25 Jun 2024 17:18:16 +0800 Subject: [PATCH] =?UTF-8?q?bug-15522=20=E9=9A=90=E6=82=A3=E5=A4=84?= =?UTF-8?q?=E7=BD=9A=E7=AE=A1=E7=90=86=20=E4=B8=8D=E6=98=BE=E7=A4=BAai?= =?UTF-8?q?=E6=8A=A5=E8=AD=A6=E7=9A=84=E9=9A=90=E6=82=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dsno2/keyProjects/OutSourcedMapper.xml | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml index 5e2d3e6d..7a9f668a 100644 --- a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml +++ b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml @@ -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 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} - 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' and