From 0f1b009c24a53bf781027e879e07f544ce8e09d6 Mon Sep 17 00:00:00 2001 From: wangpeng Date: Wed, 21 Feb 2024 21:11:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E9=A6=96=E9=A1=B5=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=A2=9E=E5=8A=A0=E9=9A=90=E6=82=A3=E6=8E=92=E6=9F=A5?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datasource/check/CheckRecordMapper.xml | 22 ++++++++--------- .../datasource/check/CheckUserMapper.xml | 2 +- .../datasource/check/ListManagerMapper.xml | 2 +- .../datasource/hidden/HiddenMapper.xml | 24 +++++++++---------- .../statistics/ListStatisticsMapper.xml | 4 ++-- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/main/resources/mybatis/datasource/check/CheckRecordMapper.xml b/src/main/resources/mybatis/datasource/check/CheckRecordMapper.xml index 37cfa5e..7a0f7b1 100644 --- a/src/main/resources/mybatis/datasource/check/CheckRecordMapper.xml +++ b/src/main/resources/mybatis/datasource/check/CheckRecordMapper.xml @@ -1145,7 +1145,7 @@ DATE_FORMAT( f.CHECK_TIME, '%Y-%m-%d' ) CHECK_TIME FROM vi_list_checkrecord_all f - LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.LIST_TYPE WHERE f.FINISHED = '1' AND f.ISSTATISTICS = '1' @@ -1177,7 +1177,7 @@ YEARWEEK(DATE_FORMAT(f.CHECK_TIME,'%Y-%m-%d'),1) WEEKNUM FROM vi_list_checkrecord_all f - LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.LIST_TYPE WHERE f.FINISHED = '1' AND f.ISDELETE = '0' @@ -1210,7 +1210,7 @@ l.PERIOD FROM vi_list_checkrecord_all f - LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.LIST_TYPE WHERE f.FINISHED = '1' AND f.ISSTATISTICS = '1' @@ -1241,7 +1241,7 @@ DATE_FORMAT( f.CHECK_TIME, '%Y-%m' ) CHECK_TIME FROM vi_list_checkrecord_all f - LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.LIST_TYPE WHERE f.FINISHED = '1' AND f.ISDELETE = '0' @@ -1278,7 +1278,7 @@ QUARTER ( f.CHECK_TIME )) CHECK_TIME_quarter FROM vi_list_checkrecord_all f - LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.LIST_TYPE WHERE f.FINISHED = '1' AND f.ISDELETE = '0' @@ -1320,7 +1320,7 @@ concat(DATE_FORMAT(f.CHECK_TIME, '%Y'), INTERVAL(CONVERT(MONTH(f.CHECK_TIME),SIGNED),7,13) ) FROM vi_list_checkrecord_all f - LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.LIST_TYPE WHERE f.FINISHED = '1' AND f.ISSTATISTICS = '1' @@ -1360,7 +1360,7 @@ DATE_FORMAT( f.CHECK_TIME, '%Y' ) CHECK_TIME FROM vi_list_checkrecord_all f - LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.LIST_TYPE WHERE f.FINISHED = '1' AND f.ISSTATISTICS = '1' @@ -1399,7 +1399,7 @@ count( 1 )) num FROM vi_list_checkrecord_all f - LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_all l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID and l.LIST_TYPE = f.LIST_TYPE WHERE f.FINISHED = '1' AND f.ISSTATISTICS = '1' @@ -1572,7 +1572,7 @@ FROM sys_user s LEFT JOIN vi_list_checkuser_all cu ON s.USER_ID = cu.USER_ID - LEFT JOIN vi_list_checkrecord_all f ON f.CHECKRECORD_ID = cu.CHECKRECORD_ID and f.HIDDEN_RISKSTANDARD = cu.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_checkrecord_all f ON f.CHECKRECORD_ID = cu.CHECKRECORD_ID and f.LIST_TYPE = cu.LIST_TYPE WHERE s.ISDELETE = 0 and s.CORPINFO_ID = #{CORPINFO_ID} @@ -1595,7 +1595,7 @@ FROM oa_department s LEFT JOIN vi_list_checkuser_all cu ON s.DEPARTMENT_ID = cu.DEPARTMENT_ID - LEFT JOIN vi_list_checkrecord_all f ON f.CHECKRECORD_ID = cu.CHECKRECORD_ID and f.HIDDEN_RISKSTANDARD = cu.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_checkrecord_all f ON f.CHECKRECORD_ID = cu.CHECKRECORD_ID and f.LIST_TYPE = cu.LIST_TYPE WHERE s.CORPINFO_ID = #{CORPINFO_ID} AND s.ISDELETE = 0 @@ -1670,7 +1670,7 @@ COUNT(h.HIDDEN_ID) HIDDEN_COUNT FROM vi_list_checkrecord_all c - left join vi_hidden_all h on h.CHECKRECORD_ID = c.CHECKRECORD_ID and h.LIST_TYPE = c.HIDDEN_RISKSTANDARD and h.ISDELETE = '0' + left join vi_hidden_all h on h.CHECKRECORD_ID = c.CHECKRECORD_ID and h.LIST_TYPE = c.LIST_TYPE and h.ISDELETE = '0' WHERE c.FINISHED = 1 and (#{MONTH} >= DATE_FORMAT(c.PERIODSTART,'%Y-%m') and #{MONTH} <=DATE_FORMAT(c.PERIODEND,'%Y-%m')) diff --git a/src/main/resources/mybatis/datasource/check/CheckUserMapper.xml b/src/main/resources/mybatis/datasource/check/CheckUserMapper.xml index f55da33..a1ccee8 100644 --- a/src/main/resources/mybatis/datasource/check/CheckUserMapper.xml +++ b/src/main/resources/mybatis/datasource/check/CheckUserMapper.xml @@ -132,7 +132,7 @@ count( c.CHECKUSER_ID ) NUM FROM vi_list_checkuser_all c - LEFT JOIN vi_list_checkrecord_all cr ON cr.CHECKRECORD_ID = c.CHECKRECORD_ID and cr.HIDDEN_RISKSTANDARD = c.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_checkrecord_all cr ON cr.CHECKRECORD_ID = c.CHECKRECORD_ID and cr.LIST_TYPE = c.LIST_TYPE WHERE cr.isdelete = '0' AND cr.FINISHED = '1' diff --git a/src/main/resources/mybatis/datasource/check/ListManagerMapper.xml b/src/main/resources/mybatis/datasource/check/ListManagerMapper.xml index 5cc5b2b..3ce3f9e 100644 --- a/src/main/resources/mybatis/datasource/check/ListManagerMapper.xml +++ b/src/main/resources/mybatis/datasource/check/ListManagerMapper.xml @@ -2151,7 +2151,7 @@ count( s.LISTMANAGER_ID ) FROM vi_list_all s - LEFT JOIN vi_list_checkrecord_all f ON f.LISTMANAGER_ID = s.LISTMANAGER_ID and f.HIDDEN_RISKSTANDARD = s.LIST_TYPE + LEFT JOIN vi_list_checkrecord_all f ON f.LISTMANAGER_ID = s.LISTMANAGER_ID and f.LIST_TYPE = s.LIST_TYPE WHERE s.CORPINFO_ID = #{CORPINFO_ID} AND f.FINISHED = '1' diff --git a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml index dc264a0..f3e36dd 100644 --- a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml +++ b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml @@ -1578,13 +1578,13 @@ SELECT - (select count( 1 ) from BUS_CHECKRECORD h + (select count( 1 ) from vi_list_checkrecord_all h left join SYS_USER u on h.CREATOR=u.NAME and u.CORPINFO_ID = #{CORPINFO_ID} and u.ISDELETE=0 - left join BUS_LISTMANAGER l on l.LISTMANAGER_ID=h.LISTMANAGER_ID + left join vi_list_all l on l.LISTMANAGER_ID=h.LISTMANAGER_ID and l.LIST_TYPE = h.LIST_TYPE where h.ISDELETE=0 and h.CORPINFO_ID = #{CORPINFO_ID} and u.DEPARTMENT_ID=d.DEPARTMENT_ID and u.DEPARTMENT_ID!=l.DEPARTMENT_ID and YEAR(h.CREATTIME)=YEAR(NOW())) as check_count, - (select count( 1 ) from BUS_HIDDEN h - left join BUS_LISTMANAGER l on l.LISTMANAGER_ID=h.LISTMANAGER_ID + (select count( 1 ) from vi_hidden_all h + left join vi_list_all l on l.LISTMANAGER_ID=h.LISTMANAGER_ID and l.LIST_TYPE = h.LIST_TYPE where h.ISDELETE=0 and h.STATE>0 and h.HIDDENFINDDEPT=d.DEPARTMENT_ID and h.HIDDENFINDDEPT!=l.DEPARTMENT_ID and YEAR(h.CREATTIME)=YEAR(NOW())) as hidden_count, - (select count( 1 ) from BUS_HIDDEN h - left join BUS_LISTMANAGER l on l.LISTMANAGER_ID=h.LISTMANAGER_ID + (select count( 1 ) from vi_hidden_all h + left join vi_list_all l on l.LISTMANAGER_ID=h.LISTMANAGER_ID and l.LIST_TYPE = h.LIST_TYPE where h.ISDELETE=0 and h.STATE=4 and h.HIDDENFINDDEPT=d.DEPARTMENT_ID and h.HIDDENFINDDEPT!=l.DEPARTMENT_ID and YEAR(h.CREATTIME)=YEAR(NOW())) as rectify_count FROM @@ -1616,11 +1616,11 @@ select - f.HIDDEN_RISKSTANDARD, + f.LIST_TYPE, from vi_list_statistics_all f @@ -261,7 +261,7 @@ COUNT( distinct bcr.LISTMANAGER_ID ) FROM vi_list_checkrecord_all bcr - LEFT JOIN vi_list_checkuser_all bcu ON bcu.CHECKRECORD_ID = bcr.CHECKRECORD_ID and bcu.HIDDEN_RISKSTANDARD = bcr.HIDDEN_RISKSTANDARD + LEFT JOIN vi_list_checkuser_all bcu ON bcu.CHECKRECORD_ID = bcr.CHECKRECORD_ID and bcu.LIST_TYPE = bcr.LIST_TYPE WHERE bcu.USER_ID = u.USER_ID AND bcr.FINISHED = '1'