forked from integrated_whb/integrated_whb
手机首页统计增加隐患排查数据情况
parent
d086ad5dcc
commit
0f1b009c24
|
@ -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'))
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -1578,13 +1578,13 @@
|
|||
|
||||
<select id="getDeptIndexData" parameterType="pd" resultType="pd" >
|
||||
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
|
||||
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,
|
||||
(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,
|
||||
(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
|
||||
FROM
|
||||
OA_DEPARTMENT d
|
||||
|
@ -1594,17 +1594,17 @@
|
|||
|
||||
<select id="getSuperviseDeptIndexData" parameterType="pd" resultType="pd" >
|
||||
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 id="getUserIndexData" parameterType="pd" resultType="pd" >
|
||||
SELECT
|
||||
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,
|
||||
(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,
|
||||
(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
|
||||
FROM
|
||||
SYS_USER u
|
||||
|
|
|
@ -176,7 +176,7 @@
|
|||
<!-- 获取统计分母 -->
|
||||
<select id="getCountList" parameterType="pd" resultType="pd">
|
||||
select
|
||||
f.HIDDEN_RISKSTANDARD,
|
||||
f.LIST_TYPE,
|
||||
<include refid="Field"></include>
|
||||
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'
|
||||
|
|
Loading…
Reference in New Issue