From 5b2e87c444a441f3280fdd056f03e7daea467af8 Mon Sep 17 00:00:00 2001 From: water_xu Date: Fri, 10 May 2024 17:34:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=86=E9=87=8D=E7=82=B9?= =?UTF-8?q?=E5=B7=A5=E7=A8=8BAI=E6=8A=A5=E8=AD=A6=E7=9A=84=E5=90=8E?= =?UTF-8?q?=E7=BB=AD=E6=B5=81=E7=A8=8B:=E5=A4=9AAI=E6=8A=A5=E8=AD=A6?= =?UTF-8?q?=E5=A4=84=E7=BD=AE=E4=BA=BA=E6=97=B6=E7=9A=84=E9=9A=90=E6=82=A3?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E5=A4=84=E7=BD=9A=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/dsno2/keyProjects/OutSourcedMapper.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml index 18f4e3fe..d85535fb 100644 --- a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml +++ b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml @@ -316,7 +316,7 @@ 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, 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 ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID + ( 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 where f.ISDELETE = '0' and @@ -376,9 +376,10 @@ or f.JURISDICTION_UNIT LIKE CONCAT(CONCAT('%', #{pd.DeptId}),'%') or f.PUNISH_THE_PERSON LIKE CONCAT(CONCAT('%', #{pd.UserId}),'%') or f.CREATOR = #{pd.UserId} - or (h.CREATOR = #{pd.UserId} and h.SOURCE = '1') + or (h.CREATOR LIKE CONCAT('%', #{pd.UserId}, '%') and h.SOURCE = '1') ) + GROUP BY f.OUTSOURCED_ID ORDER BY cc.co DESC, f.OPERATTIME DESC @@ -514,7 +515,7 @@ AND f.SOURCE IN ( '4', '5', '1' ) AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL and f.ISPUNISH is null - ) PUN GROUP BY PUN.OUTSOURCED_ID ) cfsl on cfsl.OUTSOURCED_ID = f.OUTSOURCED_ID + ) PUN GROUP BY PUN.OUTSOURCED_ID,PUN.CREATOR ) cfsl on cfsl.OUTSOURCED_ID = f.OUTSOURCED_ID where f.ISDELETE = '0' and @@ -529,8 +530,9 @@ pcij.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%') ) - and (f.PUNISH_THE_PERSON LIKE CONCAT( CONCAT( '%', #{pd.PUNISHUser} ), '%' ) or (cfsl.SOURCE='1' and cfsl.CREATOR = #{pd.PUNISHUser})) + and (f.PUNISH_THE_PERSON LIKE CONCAT( CONCAT( '%', #{pd.PUNISHUser} ), '%' ) or (cfsl.SOURCE='1' and cfsl.CREATOR LIKE CONCAT('%',#{pd.PUNISHUser},'%') )) AND f.STATE = '1' + GROUP BY cfsl.OUTSOURCED_ID ORDER BY cfsl.co DESC, f.OPERATTIME DESC