手机首页统计增加隐患排查数据情况

pull/4/head
wangpeng 2024-02-21 21:11:35 +08:00
parent d086ad5dcc
commit 0f1b009c24
5 changed files with 27 additions and 27 deletions

View File

@ -1145,7 +1145,7 @@
DATE_FORMAT( f.CHECK_TIME, '%Y-%m-%d' ) CHECK_TIME DATE_FORMAT( f.CHECK_TIME, '%Y-%m-%d' ) CHECK_TIME
FROM FROM
vi_list_checkrecord_all f 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 WHERE
f.FINISHED = '1' f.FINISHED = '1'
AND f.ISSTATISTICS = '1' AND f.ISSTATISTICS = '1'
@ -1177,7 +1177,7 @@
YEARWEEK(DATE_FORMAT(f.CHECK_TIME,'%Y-%m-%d'),1) WEEKNUM YEARWEEK(DATE_FORMAT(f.CHECK_TIME,'%Y-%m-%d'),1) WEEKNUM
FROM FROM
vi_list_checkrecord_all f 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 WHERE
f.FINISHED = '1' f.FINISHED = '1'
AND f.ISDELETE = '0' AND f.ISDELETE = '0'
@ -1210,7 +1210,7 @@
l.PERIOD l.PERIOD
FROM FROM
vi_list_checkrecord_all f 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 WHERE
f.FINISHED = '1' f.FINISHED = '1'
AND f.ISSTATISTICS = '1' AND f.ISSTATISTICS = '1'
@ -1241,7 +1241,7 @@
DATE_FORMAT( f.CHECK_TIME, '%Y-%m' ) CHECK_TIME DATE_FORMAT( f.CHECK_TIME, '%Y-%m' ) CHECK_TIME
FROM FROM
vi_list_checkrecord_all f 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 WHERE
f.FINISHED = '1' f.FINISHED = '1'
AND f.ISDELETE = '0' AND f.ISDELETE = '0'
@ -1278,7 +1278,7 @@
QUARTER ( f.CHECK_TIME )) CHECK_TIME_quarter QUARTER ( f.CHECK_TIME )) CHECK_TIME_quarter
FROM FROM
vi_list_checkrecord_all f 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 WHERE
f.FINISHED = '1' f.FINISHED = '1'
AND f.ISDELETE = '0' AND f.ISDELETE = '0'
@ -1320,7 +1320,7 @@
concat(DATE_FORMAT(f.CHECK_TIME, '%Y'), INTERVAL(CONVERT(MONTH(f.CHECK_TIME),SIGNED),7,13) ) concat(DATE_FORMAT(f.CHECK_TIME, '%Y'), INTERVAL(CONVERT(MONTH(f.CHECK_TIME),SIGNED),7,13) )
FROM FROM
vi_list_checkrecord_all f 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 WHERE
f.FINISHED = '1' f.FINISHED = '1'
AND f.ISSTATISTICS = '1' AND f.ISSTATISTICS = '1'
@ -1360,7 +1360,7 @@
DATE_FORMAT( f.CHECK_TIME, '%Y' ) CHECK_TIME DATE_FORMAT( f.CHECK_TIME, '%Y' ) CHECK_TIME
FROM FROM
vi_list_checkrecord_all f 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 WHERE
f.FINISHED = '1' f.FINISHED = '1'
AND f.ISSTATISTICS = '1' AND f.ISSTATISTICS = '1'
@ -1399,7 +1399,7 @@
count( 1 )) num count( 1 )) num
FROM FROM
vi_list_checkrecord_all f 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 WHERE
f.FINISHED = '1' f.FINISHED = '1'
AND f.ISSTATISTICS = '1' AND f.ISSTATISTICS = '1'
@ -1572,7 +1572,7 @@
FROM FROM
sys_user s sys_user s
LEFT JOIN vi_list_checkuser_all cu ON s.USER_ID = cu.USER_ID 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 WHERE
s.ISDELETE = 0 and s.ISDELETE = 0 and
s.CORPINFO_ID = #{CORPINFO_ID} s.CORPINFO_ID = #{CORPINFO_ID}
@ -1595,7 +1595,7 @@
FROM FROM
oa_department s oa_department s
LEFT JOIN vi_list_checkuser_all cu ON s.DEPARTMENT_ID = cu.DEPARTMENT_ID 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 WHERE
s.CORPINFO_ID = #{CORPINFO_ID} s.CORPINFO_ID = #{CORPINFO_ID}
AND s.ISDELETE = 0 AND s.ISDELETE = 0
@ -1670,7 +1670,7 @@
COUNT(h.HIDDEN_ID) HIDDEN_COUNT COUNT(h.HIDDEN_ID) HIDDEN_COUNT
FROM FROM
vi_list_checkrecord_all c 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 WHERE
c.FINISHED = 1 c.FINISHED = 1
and (#{MONTH} >= DATE_FORMAT(c.PERIODSTART,'%Y-%m') and #{MONTH} <=DATE_FORMAT(c.PERIODEND,'%Y-%m')) and (#{MONTH} >= DATE_FORMAT(c.PERIODSTART,'%Y-%m') and #{MONTH} <=DATE_FORMAT(c.PERIODEND,'%Y-%m'))

View File

@ -132,7 +132,7 @@
count( c.CHECKUSER_ID ) NUM count( c.CHECKUSER_ID ) NUM
FROM FROM
vi_list_checkuser_all c 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 WHERE
cr.isdelete = '0' cr.isdelete = '0'
AND cr.FINISHED = '1' AND cr.FINISHED = '1'

View File

@ -2151,7 +2151,7 @@
count( s.LISTMANAGER_ID ) count( s.LISTMANAGER_ID )
FROM FROM
vi_list_all s 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 WHERE
s.CORPINFO_ID = #{CORPINFO_ID} s.CORPINFO_ID = #{CORPINFO_ID}
AND f.FINISHED = '1' AND f.FINISHED = '1'

View File

@ -1578,13 +1578,13 @@
<select id="getDeptIndexData" parameterType="pd" resultType="pd" > <select id="getDeptIndexData" parameterType="pd" resultType="pd" >
SELECT 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 SYS_USER u on h.CREATOR=u.NAME and u.CORPINFO_ID = #{CORPINFO_ID} and u.ISDELETE=0
where h.ISDELETE=0 and h.CORPINFO_ID = #{CORPINFO_ID} and u.DEPARTMENT_ID=d.DEPARTMENT_ID where h.ISDELETE=0 and h.CORPINFO_ID = #{CORPINFO_ID} and u.DEPARTMENT_ID=d.DEPARTMENT_ID
and YEAR(h.CREATTIME)=YEAR(NOW())) as check_count, and YEAR(h.CREATTIME)=YEAR(NOW())) as check_count,
(select count( 1 ) from BUS_HIDDEN h where h.ISDELETE=0 and h.HIDDENFINDDEPT=d.DEPARTMENT_ID (select count( 1 ) from vi_hidden_all h where h.ISDELETE=0 and h.HIDDENFINDDEPT=d.DEPARTMENT_ID
and YEAR(h.CREATTIME)=YEAR(NOW())) as hidden_count, and YEAR(h.CREATTIME)=YEAR(NOW())) as hidden_count,
(select count( 1 ) from BUS_HIDDENCHECK h where h.DEPARTMENT_ID=d.DEPARTMENT_ID and h.STATUS = '1' (select count( 1 ) from vi_hiddencheck_all h where h.DEPARTMENT_ID=d.DEPARTMENT_ID and h.STATUS = '1'
and YEAR(h.CHECK_TIME)=YEAR(NOW())) as rectify_count and YEAR(h.CHECK_TIME)=YEAR(NOW())) as rectify_count
FROM FROM
OA_DEPARTMENT d OA_DEPARTMENT d
@ -1594,17 +1594,17 @@
<select id="getSuperviseDeptIndexData" parameterType="pd" resultType="pd" > <select id="getSuperviseDeptIndexData" parameterType="pd" resultType="pd" >
SELECT 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 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 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, and YEAR(h.CREATTIME)=YEAR(NOW())) as check_count,
(select count( 1 ) from BUS_HIDDEN h (select count( 1 ) from vi_hidden_all h
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.STATE>0 and h.HIDDENFINDDEPT=d.DEPARTMENT_ID and h.HIDDENFINDDEPT!=l.DEPARTMENT_ID 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, and YEAR(h.CREATTIME)=YEAR(NOW())) as hidden_count,
(select count( 1 ) from BUS_HIDDEN h (select count( 1 ) from vi_hidden_all h
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.STATE=4 and h.HIDDENFINDDEPT=d.DEPARTMENT_ID and h.HIDDENFINDDEPT!=l.DEPARTMENT_ID 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 and YEAR(h.CREATTIME)=YEAR(NOW())) as rectify_count
FROM FROM
@ -1616,11 +1616,11 @@
<select id="getUserIndexData" parameterType="pd" resultType="pd" > <select id="getUserIndexData" parameterType="pd" resultType="pd" >
SELECT SELECT
u.USER_ID, u.USER_ID,
(select count( 1 ) from BUS_CHECKRECORD h where h.ISDELETE=0 and h.CREATOR=u.NAME and h.CORPINFO_ID = #{CORPINFO_ID} (select count( 1 ) from vi_list_checkrecord_all h where h.ISDELETE=0 and h.CREATOR=u.NAME and h.CORPINFO_ID = #{CORPINFO_ID}
and YEAR(h.CREATTIME)=YEAR(NOW())) as check_count, and YEAR(h.CREATTIME)=YEAR(NOW())) as check_count,
(select count( 1 ) from BUS_HIDDEN h where h.ISDELETE=0 and h.CREATOR=u.USER_ID (select count( 1 ) from vi_hidden_all h where h.ISDELETE=0 and h.CREATOR=u.USER_ID
and YEAR(h.CREATTIME)=YEAR(NOW())) as hidden_count, and YEAR(h.CREATTIME)=YEAR(NOW())) as hidden_count,
(select count( 1 ) from BUS_HIDDENCHECK h where h.USER_ID=u.USER_ID and h.STATUS = '1' (select count( 1 ) from vi_hiddencheck_all h where h.USER_ID=u.USER_ID and h.STATUS = '1'
and YEAR(h.CHECK_TIME)=YEAR(NOW())) as rectify_count and YEAR(h.CHECK_TIME)=YEAR(NOW())) as rectify_count
FROM FROM
SYS_USER u SYS_USER u

View File

@ -176,7 +176,7 @@
<!-- 获取统计分母 --> <!-- 获取统计分母 -->
<select id="getCountList" parameterType="pd" resultType="pd"> <select id="getCountList" parameterType="pd" resultType="pd">
select select
f.HIDDEN_RISKSTANDARD, f.LIST_TYPE,
<include refid="Field"></include> <include refid="Field"></include>
from from
vi_list_statistics_all f vi_list_statistics_all f
@ -261,7 +261,7 @@
COUNT( distinct bcr.LISTMANAGER_ID ) COUNT( distinct bcr.LISTMANAGER_ID )
FROM FROM
vi_list_checkrecord_all bcr 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 WHERE
bcu.USER_ID = u.USER_ID bcu.USER_ID = u.USER_ID
AND bcr.FINISHED = '1' AND bcr.FINISHED = '1'