diff --git a/src/main/java/com/zhgd/xmgl/modules/ocr/controller/OcrBuildLogController.java b/src/main/java/com/zhgd/xmgl/modules/ocr/controller/OcrBuildLogController.java index ae3bf21d8..035129613 100644 --- a/src/main/java/com/zhgd/xmgl/modules/ocr/controller/OcrBuildLogController.java +++ b/src/main/java/com/zhgd/xmgl/modules/ocr/controller/OcrBuildLogController.java @@ -160,7 +160,7 @@ public class OcrBuildLogController { .eq(OcrBuildLog::getProjectSn, projectSn) .eq(Objects.equals(type, 2), OcrBuildLog::getUploaderId, SecurityUtils.getUser().getUserId()) .ge(OcrBuildLog::getDate, yearMonth + "-01") - .le(OcrBuildLog::getDate, yearMonth + "-31") + .le(OcrBuildLog::getDate, DateUtil.endOfMonth(DateUtil.parseDate(yearMonth + "-01"))) ).stream().collect(Collectors.groupingBy(OcrBuildLog::getDate)); List dateTimes = DateUtil.rangeToList(DateUtil.parseDate(yearMonth + "-01"), DateUtil.endOfMonth(DateUtil.parseDate(yearMonth + "-01")), DateField.DAY_OF_YEAR); for (DateTime dateTime : dateTimes) { diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/ProjectEnterpriseWorkerStatisticsMapper.xml b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/ProjectEnterpriseWorkerStatisticsMapper.xml index ba4017923..342e8fa3b 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/ProjectEnterpriseWorkerStatisticsMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/ProjectEnterpriseWorkerStatisticsMapper.xml @@ -30,7 +30,7 @@ AND query_time >= CONCAT(#{month_begin}, '-01 00:00:00') - AND query_time <= CONCAT(#{month_end}, '-31 23:59:59') + AND query_time <= CONCAT(LAST_DAY(CONCAT(#{month_end}, '-01')), ' 23:59:59') group by month diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerAttendanceMapper.xml b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerAttendanceMapper.xml index 880168d8e..f23080afb 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerAttendanceMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerAttendanceMapper.xml @@ -1032,7 +1032,7 @@ AND create_time >= CONCAT(#{month_begin}, '-01 00:00:00') - AND create_time <= CONCAT(#{month_end}, '-31 23:59:59') + AND create_time <= CONCAT(LAST_DAY(CONCAT(#{month_end}, '-01')), ' 23:59:59') and person_sn = #{personSn} @@ -1051,7 +1051,7 @@ AND create_time >= CONCAT(#{month_begin}, '-01 00:00:00') - AND create_time <= CONCAT(#{month_end}, '-31 23:59:59') + AND create_time <= CONCAT(LAST_DAY(CONCAT(#{month_end}, '-01')), ' 23:59:59') and person_sn = #{personSn} diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerDailyAttendanceStatisticsV2Mapper.xml b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerDailyAttendanceStatisticsV2Mapper.xml index 38e76b688..876674080 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerDailyAttendanceStatisticsV2Mapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/worker/mapper/xml/WorkerDailyAttendanceStatisticsV2Mapper.xml @@ -110,7 +110,7 @@ and t.attendance_date =]]> concat(#{startMonth},'-01 00:00:00') - and t.attendance_date concat(#{endMonth},'-31 23:59:59') + and t.attendance_date CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59') and t.attendance_date >= #{startDate} @@ -160,7 +160,7 @@ and t.attendance_date =]]> concat(#{startMonth},'-01 00:00:00') - and t.attendance_date concat(#{endMonth},'-31 23:59:59') + and t.attendance_date CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59') and t.attendance_date >= #{startDate} diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/mapper/xml/XzTaskProgressContentMapper.xml b/src/main/java/com/zhgd/xmgl/modules/xz/mapper/xml/XzTaskProgressContentMapper.xml index 41dda001f..4cbb21f5d 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/mapper/xml/XzTaskProgressContentMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/xz/mapper/xml/XzTaskProgressContentMapper.xml @@ -26,7 +26,7 @@ and c.upload_date >= #{month} - and c.upload_date <= concat(#{month},'-31 23:59:59') + and c.upload_date <= CONCAT(LAST_DAY(CONCAT(#{month}, '-01')), ' 23:59:59') and c.audit_type=2 and c.has_delay_event=1 @@ -43,7 +43,7 @@ and c.upload_date >= #{month} - and c.upload_date <= concat(#{month},'-31 23:59:59') + and c.upload_date <= CONCAT(LAST_DAY(CONCAT(#{month}, '-01')), ' 23:59:59') and c.audit_type=2 and c.has_delay_event=1 diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml index f44fa2fc9..f561d937f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml @@ -292,7 +292,7 @@ and t.danger_item_id = #{param.dangerInfoId} - and t.inspect_time <= concat(#{param.endMonth},'-31 23:59:59') + and t.inspect_time <= CONCAT(LAST_DAY(CONCAT(#{param.endMonth}, '-01')), ' 23:59:59') and t.status != 6 @@ -1096,7 +1096,7 @@ and create_time =]]> concat(#{startMonth},'-01 00:00:00') - and create_time concat(#{endMonth},'-31 23:59:59') + and create_time CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59') group by priority_name_dic, x_name @@ -1170,7 +1170,7 @@ and r.create_time =]]> concat(#{startMonth},'-01 00:00:00') - and r.create_time concat(#{endMonth},'-31 23:59:59') + and r.create_time CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59') and r.duty_major = #{dutyMajor}