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'