Merge pull request 'master' (#1) from integrated_whb/integrated_whb_scheduled:master into master

Reviewed-on: #1
master
wangpeng 2024-03-12 15:32:58 +08:00
commit 9a170e4a4e
6 changed files with 29 additions and 15 deletions

View File

@ -746,6 +746,20 @@ public class DateUtil {
/*System.out.println(quarterStart()+" 00:00:00"); /*System.out.println(quarterStart()+" 00:00:00");
System.out.println(getCurrYearLast()+" 23:59:59");*/ 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");
} }
} }

View File

@ -15,7 +15,7 @@
sum(f.NOTEXAMINEDNUM) NUM, sum(f.NOTEXAMINEDNUM) NUM,
u.DEPARTMENT_ID u.DEPARTMENT_ID
FROM FROM
bus_list_statistics f vi_list_statistics_all f
LEFT JOIN SYS_USER u ON u.USER_ID = f.USER_ID LEFT JOIN SYS_USER u ON u.USER_ID = f.USER_ID
WHERE WHERE
( (
@ -33,8 +33,8 @@
count( distinct cr.LISTMANAGER_ID ) NUM, count( distinct cr.LISTMANAGER_ID ) NUM,
c.DEPARTMENT_ID c.DEPARTMENT_ID
FROM FROM
bus_checkuser c vi_list_checkuser_all c
LEFT JOIN bus_checkrecord cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID LEFT JOIN vi_list_checkrecord_all cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID and c.LIST_TYPE=cr.LIST_TYPE
WHERE WHERE
cr.isdelete = '0' cr.isdelete = '0'
AND cr.FINISHED = '1' AND cr.FINISHED = '1'
@ -58,7 +58,7 @@
sum(f.NOTEXAMINEDNUM) NUM, sum(f.NOTEXAMINEDNUM) NUM,
f.USER_ID f.USER_ID
FROM FROM
bus_list_statistics f vi_list_statistics_all f
WHERE WHERE
( (
f.STARTTIME BETWEEN #{STARTTIME} and #{ENDTIME} f.STARTTIME BETWEEN #{STARTTIME} and #{ENDTIME}
@ -75,8 +75,8 @@
count( distinct cr.LISTMANAGER_ID ) NUM, count( distinct cr.LISTMANAGER_ID ) NUM,
c.USER_ID c.USER_ID
FROM FROM
bus_checkuser c vi_list_checkuser_all c
LEFT JOIN bus_checkrecord cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID LEFT JOIN vi_list_checkrecord_all cr ON c.CHECKRECORD_ID = cr.CHECKRECORD_ID and c.LIST_TYPE=cr.LIST_TYPE
WHERE WHERE
cr.isdelete = '0' cr.isdelete = '0'
AND cr.FINISHED = '1' AND cr.FINISHED = '1'

View File

@ -1506,7 +1506,7 @@
) h ON h.LISTMANAGER_ID = f.LISTMANAGER_ID ) h ON h.LISTMANAGER_ID = f.LISTMANAGER_ID
WHERE WHERE
f.isdelete = '0' f.isdelete = '0'
AND now() > f.END_TIME AND now() > f.END_DATE
AND f.TYPE = 'listType0005' AND f.TYPE = 'listType0005'
AND ( h.NUM < 1 OR h.NUM IS NULL ) AND ( h.NUM < 1 OR h.NUM IS NULL )
AND o.OFFDUTY_ID IS NULL AND o.OFFDUTY_ID IS NULL

View File

@ -36,8 +36,8 @@
SELECT SELECT
d.DEPARTMENT_ID, d.DEPARTMENT_ID,
ifnull(un.user_count,0) as user_count, 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 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 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.RECTIFICATIONDEPT=d.DEPARTMENT_ID and h.RECTIFICATIONTIME LIKE CONCAT(CONCAT('%', #{MONTH}),'%') ) as rectify_count
FROM FROM
OA_DEPARTMENT d OA_DEPARTMENT d
LEFT JOIN LEFT JOIN
@ -59,7 +59,7 @@
count( 1 ) count, count( 1 ) count,
h.CREATOR h.CREATOR
FROM FROM
BUS_HIDDEN h vi_hidden_all h
WHERE WHERE
h.ISDELETE = 0 h.ISDELETE = 0
AND h.CREATTIME LIKE CONCAT( CONCAT( '%', #{MONTH}), '%' ) AND h.CREATTIME LIKE CONCAT( CONCAT( '%', #{MONTH}), '%' )
@ -70,7 +70,7 @@
count( 1 ) count, count( 1 ) count,
h.RECTIFICATIONOR h.RECTIFICATIONOR
FROM FROM
BUS_HIDDEN h vi_hidden_all h
WHERE WHERE
h.ISDELETE = 0 h.ISDELETE = 0
AND h.RECTIFICATIONTIME LIKE CONCAT( CONCAT( '%', #{MONTH} ), '%' ) AND h.RECTIFICATIONTIME LIKE CONCAT( CONCAT( '%', #{MONTH} ), '%' )

View File

@ -4,7 +4,7 @@
<!--表名 --> <!--表名 -->
<sql id="tableName"> <sql id="tableName">
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOMDISABLETIME bus_hiddendangercheckstandard_disabletime
</sql> </sql>
<!--数据字典表名 --> <!--数据字典表名 -->

View File

@ -204,7 +204,7 @@
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM f BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM f
LEFT JOIN bus_offduty o ON o.USER_ID = f.USER_ID LEFT JOIN bus_offduty o ON o.USER_ID = f.USER_ID
AND concat( o.STARTTIME, ' 00:00:00' ) &lt;= #{STARTTIME} AND concat( o.ENDTIME, ' 23:59:59' ) &gt;= #{ENDTIME} AND concat( o.STARTTIME, ' 00:00:00' ) &lt;= #{STARTTIME} AND concat( o.ENDTIME, ' 23:59:59' ) &gt;= #{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 &lt;= #{STARTTIME} and ld.ENDTIME &gt;= #{ENDTIME} and ld.STARTTIME &lt;= #{STARTTIME} and ld.ENDTIME &gt;= #{ENDTIME}
LEFT JOIN SYS_USER u on u.USER_ID = f.USER_ID LEFT JOIN SYS_USER u on u.USER_ID = f.USER_ID
LEFT JOIN BUS_SHIFTWORKRULES swr ON u.SHIFTDUTYTWO = swr.SHIFTWORKRULES_ID LEFT JOIN BUS_SHIFTWORKRULES swr ON u.SHIFTDUTYTWO = swr.SHIFTWORKRULES_ID
@ -256,7 +256,7 @@
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM f BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM f
LEFT JOIN bus_offduty o ON o.USER_ID = f.USER_ID LEFT JOIN bus_offduty o ON o.USER_ID = f.USER_ID
AND concat( o.STARTTIME, ' 00:00:00' ) &lt;= #{STARTTIME} AND concat( o.ENDTIME, ' 23:59:59' ) &gt;= #{ENDTIME} AND concat( o.STARTTIME, ' 00:00:00' ) &lt;= #{STARTTIME} AND concat( o.ENDTIME, ' 23:59:59' ) &gt;= #{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 &lt;= #{STARTTIME} and ld.ENDTIME &gt;= #{ENDTIME} and ld.STARTTIME &lt;= #{STARTTIME} and ld.ENDTIME &gt;= #{ENDTIME}
WHERE WHERE
f.CUSTOM_ID NOT IN ( f.CUSTOM_ID NOT IN (
@ -299,7 +299,7 @@
BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM f BUS_HIDDENDANGERCHECKSTANDARD_CUSTOM f
LEFT JOIN bus_offduty o ON o.USER_ID = f.USER_ID LEFT JOIN bus_offduty o ON o.USER_ID = f.USER_ID
AND concat( o.STARTTIME, ' 00:00:00' ) &lt;= concat( f.START_DATE, ' 00:00:00' ) AND concat( o.ENDTIME, ' 23:59:59' ) &gt;= concat( f.End_DATE, ' 23:59:59' ) AND concat( o.STARTTIME, ' 00:00:00' ) &lt;= concat( f.START_DATE, ' 00:00:00' ) AND concat( o.ENDTIME, ' 23:59:59' ) &gt;= 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.ENDTIME IS NOT NULL
AND ld.STARTTIME &lt;= concat( f.START_DATE, ' 00:00:00' ) AND ld.ENDTIME &gt;= concat( f.End_DATE, ' 23:59:59' ) AND ld.STARTTIME &lt;= concat( f.START_DATE, ' 00:00:00' ) AND ld.ENDTIME &gt;= concat( f.End_DATE, ' 23:59:59' )
LEFT JOIN ( LEFT JOIN (