修改排查统计增加隐患清单排查的数据情况
parent
5f97188114
commit
b05808b812
|
@ -746,6 +746,20 @@ public class DateUtil {
|
|||
/*System.out.println(quarterStart()+" 00:00:00");
|
||||
System.out.println(getCurrYearLast()+" 23:59:59");*/
|
||||
|
||||
|
||||
Calendar cal1 = Calendar.getInstance();
|
||||
Calendar cal2 = Calendar.getInstance();
|
||||
Date date = new Date();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||
cal1.setTime(date);
|
||||
cal2.setTime(date);
|
||||
cal1.set(Calendar.DAY_OF_MONTH,1);
|
||||
cal1.add(Calendar.MONTH, -1);
|
||||
cal2.add(Calendar.MONTH, -1);
|
||||
cal2.set(Calendar.DAY_OF_MONTH, cal2.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||
System.out.println(sdf.format(cal1.getTime()) + "-01 00:00:00");
|
||||
System.out.println(sdf.format(cal2.getTime()) + "-31 00:00:00");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
sum(f.NOTEXAMINEDNUM) NUM,
|
||||
u.DEPARTMENT_ID
|
||||
FROM
|
||||
bus_list_statistics f
|
||||
vi_list_statistics_all f
|
||||
LEFT JOIN SYS_USER u ON u.USER_ID = f.USER_ID
|
||||
WHERE
|
||||
(
|
||||
|
@ -33,8 +33,8 @@
|
|||
count( distinct cr.LISTMANAGER_ID ) NUM,
|
||||
c.DEPARTMENT_ID
|
||||
FROM
|
||||
bus_checkuser c
|
||||
LEFT JOIN bus_checkrecord cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID
|
||||
vi_list_checkuser_all c
|
||||
LEFT JOIN vi_list_checkrecord_all cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID and c.HIDDEN_RISKSTANDARD=cr.HIDDEN_RISKSTANDARD
|
||||
WHERE
|
||||
cr.isdelete = '0'
|
||||
AND cr.FINISHED = '1'
|
||||
|
@ -58,7 +58,7 @@
|
|||
sum(f.NOTEXAMINEDNUM) NUM,
|
||||
f.USER_ID
|
||||
FROM
|
||||
bus_list_statistics f
|
||||
vi_list_statistics_all f
|
||||
WHERE
|
||||
(
|
||||
f.STARTTIME BETWEEN #{STARTTIME} and #{ENDTIME}
|
||||
|
@ -75,8 +75,8 @@
|
|||
count( distinct cr.LISTMANAGER_ID ) NUM,
|
||||
c.USER_ID
|
||||
FROM
|
||||
bus_checkuser c
|
||||
LEFT JOIN bus_checkrecord cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID
|
||||
vi_list_checkuser_all c
|
||||
LEFT JOIN vi_list_checkrecord_all cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID and c.HIDDEN_RISKSTANDARD=cr.HIDDEN_RISKSTANDARD
|
||||
WHERE
|
||||
cr.isdelete = '0'
|
||||
AND cr.FINISHED = '1'
|
||||
|
|
|
@ -1506,7 +1506,7 @@
|
|||
) h ON h.LISTMANAGER_ID = f.LISTMANAGER_ID
|
||||
WHERE
|
||||
f.isdelete = '0'
|
||||
AND now() > f.END_TIME
|
||||
AND now() > f.END_DATE
|
||||
AND f.TYPE = 'listType0005'
|
||||
AND ( h.NUM < 1 OR h.NUM IS NULL )
|
||||
AND o.OFFDUTY_ID IS NULL
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
SELECT
|
||||
d.DEPARTMENT_ID,
|
||||
ifnull(un.user_count,0) as user_count,
|
||||
(select count( 1 ) from BUS_HIDDEN h where h.ISDELETE=0 and h.HIDDENFINDDEPT=d.DEPARTMENT_ID and h.CREATTIME LIKE CONCAT(CONCAT('%', #{MONTH}),'%') ) as hidden_count,
|
||||
(select count( 1 ) from BUS_HIDDEN h where h.ISDELETE=0 and h.RECTIFICATIONDEPT=d.DEPARTMENT_ID and h.RECTIFICATIONTIME LIKE CONCAT(CONCAT('%', #{MONTH}),'%') ) as rectify_count
|
||||
(select count( 1 ) from VI_HIDDEN_ALL h where h.ISDELETE=0 and h.HIDDENFINDDEPT=d.DEPARTMENT_ID and h.CREATTIME LIKE CONCAT(CONCAT('%', #{MONTH}),'%') ) as hidden_count,
|
||||
(select count( 1 ) from VI_HIDDEN_ALL h where h.ISDELETE=0 and h.RECTIFICATIONDEPT=d.DEPARTMENT_ID and h.RECTIFICATIONTIME LIKE CONCAT(CONCAT('%', #{MONTH}),'%') ) as rectify_count
|
||||
FROM
|
||||
OA_DEPARTMENT d
|
||||
LEFT JOIN
|
||||
|
@ -59,7 +59,7 @@
|
|||
count( 1 ) count,
|
||||
h.CREATOR
|
||||
FROM
|
||||
BUS_HIDDEN h
|
||||
vi_hidden_all h
|
||||
WHERE
|
||||
h.ISDELETE = 0
|
||||
AND h.CREATTIME LIKE CONCAT( CONCAT( '%', #{MONTH}), '%' )
|
||||
|
@ -70,7 +70,7 @@
|
|||
count( 1 ) count,
|
||||
h.RECTIFICATIONOR
|
||||
FROM
|
||||
BUS_HIDDEN h
|
||||
vi_hidden_all h
|
||||
WHERE
|
||||
h.ISDELETE = 0
|
||||
AND h.RECTIFICATIONTIME LIKE CONCAT( CONCAT( '%', #{MONTH} ), '%' )
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOMDISABLETIME
|
||||
bus_hiddendangercheckstandard_disabletime
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
|
|
|
@ -204,7 +204,7 @@
|
|||
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM f
|
||||
LEFT JOIN bus_offduty o ON o.USER_ID = f.USER_ID
|
||||
AND concat( o.STARTTIME, ' 00:00:00' ) <= #{STARTTIME} AND concat( o.ENDTIME, ' 23:59:59' ) >= #{ENDTIME}
|
||||
left join BUS_HIDDENDANGERCHECKSTANDARD_CUSTOMDISABLETIME ld on ld.CUSTOM_ID = f.CUSTOM_ID and ld.ENDTIME is not null
|
||||
left join bus_hiddendangercheckstandard_disabletime ld on ld.CUSTOM_ID = f.CUSTOM_ID and ld.ENDTIME is not null
|
||||
and ld.STARTTIME <= #{STARTTIME} and ld.ENDTIME >= #{ENDTIME}
|
||||
LEFT JOIN SYS_USER u on u.USER_ID = f.USER_ID
|
||||
LEFT JOIN BUS_SHIFTWORKRULES swr ON u.SHIFTDUTYTWO = swr.SHIFTWORKRULES_ID
|
||||
|
@ -256,7 +256,7 @@
|
|||
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM f
|
||||
LEFT JOIN bus_offduty o ON o.USER_ID = f.USER_ID
|
||||
AND concat( o.STARTTIME, ' 00:00:00' ) <= #{STARTTIME} AND concat( o.ENDTIME, ' 23:59:59' ) >= #{ENDTIME}
|
||||
left join BUS_HIDDENDANGERCHECKSTANDARD_CUSTOMDISABLETIME ld on ld.CUSTOM_ID = f.CUSTOM_ID and ld.ENDTIME is not null
|
||||
left join bus_hiddendangercheckstandard_disabletime ld on ld.CUSTOM_ID = f.CUSTOM_ID and ld.ENDTIME is not null
|
||||
and ld.STARTTIME <= #{STARTTIME} and ld.ENDTIME >= #{ENDTIME}
|
||||
WHERE
|
||||
f.CUSTOM_ID NOT IN (
|
||||
|
@ -299,7 +299,7 @@
|
|||
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM f
|
||||
LEFT JOIN bus_offduty o ON o.USER_ID = f.USER_ID
|
||||
AND concat( o.STARTTIME, ' 00:00:00' ) <= concat( f.START_DATE, ' 00:00:00' ) AND concat( o.ENDTIME, ' 23:59:59' ) >= concat( f.End_DATE, ' 23:59:59' )
|
||||
LEFT JOIN BUS_HIDDENDANGERCHECKSTANDARD_CUSTOMDISABLETIME ld ON ld.CUSTOM_ID = f.CUSTOM_ID
|
||||
LEFT JOIN bus_hiddendangercheckstandard_disabletime ld ON ld.CUSTOM_ID = f.CUSTOM_ID
|
||||
AND ld.ENDTIME IS NOT NULL
|
||||
AND ld.STARTTIME <= concat( f.START_DATE, ' 00:00:00' ) AND ld.ENDTIME >= concat( f.End_DATE, ' 23:59:59' )
|
||||
LEFT JOIN (
|
||||
|
|
Loading…
Reference in New Issue