BI页面统计增加隐患排查数据情况

pull/4/head
wangpeng 2024-02-21 17:20:55 +08:00
parent 5514125492
commit d086ad5dcc
3 changed files with 26 additions and 25 deletions

View File

@ -1144,8 +1144,8 @@
l.PERIOD,
DATE_FORMAT( f.CHECK_TIME, '%Y-%m-%d' ) CHECK_TIME
FROM
BUS_CHECKRECORD f
LEFT JOIN BUS_LISTMANAGER l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
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
WHERE
f.FINISHED = '1'
AND f.ISSTATISTICS = '1'
@ -1176,8 +1176,8 @@
l.PERIOD,
YEARWEEK(DATE_FORMAT(f.CHECK_TIME,'%Y-%m-%d'),1) WEEKNUM
FROM
BUS_CHECKRECORD f
LEFT JOIN BUS_LISTMANAGER l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
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
WHERE
f.FINISHED = '1'
AND f.ISDELETE = '0'
@ -1209,8 +1209,8 @@
l.TYPE,
l.PERIOD
FROM
BUS_CHECKRECORD f
LEFT JOIN BUS_LISTMANAGER l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
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
WHERE
f.FINISHED = '1'
AND f.ISSTATISTICS = '1'
@ -1240,8 +1240,8 @@
l.PERIOD,
DATE_FORMAT( f.CHECK_TIME, '%Y-%m' ) CHECK_TIME
FROM
BUS_CHECKRECORD f
LEFT JOIN BUS_LISTMANAGER l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
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
WHERE
f.FINISHED = '1'
AND f.ISDELETE = '0'
@ -1277,8 +1277,8 @@
DATE_FORMAT( f.CHECK_TIME, '%Y' ),
QUARTER ( f.CHECK_TIME )) CHECK_TIME_quarter
FROM
BUS_CHECKRECORD f
LEFT JOIN bus_listmanager l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
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
WHERE
f.FINISHED = '1'
AND f.ISDELETE = '0'
@ -1319,8 +1319,8 @@
l.PERIOD,
concat(DATE_FORMAT(f.CHECK_TIME, '%Y'), INTERVAL(CONVERT(MONTH(f.CHECK_TIME),SIGNED),7,13) )
FROM
BUS_CHECKRECORD f
LEFT JOIN bus_listmanager l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
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
WHERE
f.FINISHED = '1'
AND f.ISSTATISTICS = '1'
@ -1359,8 +1359,8 @@
l.PERIOD,
DATE_FORMAT( f.CHECK_TIME, '%Y' ) CHECK_TIME
FROM
BUS_CHECKRECORD f
LEFT JOIN BUS_LISTMANAGER l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
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
WHERE
f.FINISHED = '1'
AND f.ISSTATISTICS = '1'
@ -1398,8 +1398,8 @@
1,
count( 1 )) num
FROM
BUS_CHECKRECORD f
LEFT JOIN BUS_LISTMANAGER l ON l.LISTMANAGER_ID = f.LISTMANAGER_ID
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
WHERE
f.FINISHED = '1'
AND f.ISSTATISTICS = '1'
@ -1571,8 +1571,8 @@
count( s.USER_ID )
FROM
sys_user s
LEFT JOIN bus_checkuser cu ON s.USER_ID = cu.USER_ID
LEFT JOIN bus_checkrecord f ON f.CHECKRECORD_ID = cu.CHECKRECORD_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
WHERE
s.ISDELETE = 0 and
s.CORPINFO_ID = #{CORPINFO_ID}
@ -1594,8 +1594,8 @@
count( s.DEPARTMENT_ID )
FROM
oa_department s
LEFT JOIN bus_checkuser cu ON s.DEPARTMENT_ID = cu.DEPARTMENT_ID
LEFT JOIN bus_checkrecord f ON f.CHECKRECORD_ID = cu.CHECKRECORD_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
WHERE
s.CORPINFO_ID = #{CORPINFO_ID}
AND s.ISDELETE = 0

View File

@ -2135,7 +2135,7 @@
SELECT
count( 1 )
FROM
bus_listmanager
vi_list_all
WHERE
CORPINFO_ID = #{CORPINFO_ID}
and ISDELETE = '0'
@ -2150,8 +2150,8 @@
SELECT
count( s.LISTMANAGER_ID )
FROM
bus_listmanager s
LEFT JOIN bus_checkrecord f ON f.LISTMANAGER_ID = s.LISTMANAGER_ID
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
WHERE
s.CORPINFO_ID = #{CORPINFO_ID}
AND f.FINISHED = '1'
@ -2451,7 +2451,7 @@
<select id="getCountNumBi" parameterType="pd" resultType="pd">
select count(1) count,d.NAME
from BUS_LISTMANAGER f
from vi_list_all f
left join sys_dictionaries d on d.BIANMA = f.SCREENTYPE
where f.ISDELETE = '0'
<if test="CORPINFO_ID != null and CORPINFO_ID != ''"><!-- 关键词检索 -->

View File

@ -176,9 +176,10 @@
<!-- 获取统计分母 -->
<select id="getCountList" parameterType="pd" resultType="pd">
select
f.HIDDEN_RISKSTANDARD,
<include refid="Field"></include>
from
<include refid="tableName"></include> f
vi_list_statistics_all f
where
f.CORPINFO_ID = #{CORPINFO_ID} and f.TYPE != 'listType0006'
and