修复mysql不支持09-31

This commit is contained in:
guoshengxiong 2025-09-04 11:10:37 +08:00
parent b2e08bb3fe
commit 1af66415d6
6 changed files with 11 additions and 11 deletions

View File

@ -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<DateTime> dateTimes = DateUtil.rangeToList(DateUtil.parseDate(yearMonth + "-01"), DateUtil.endOfMonth(DateUtil.parseDate(yearMonth + "-01")), DateField.DAY_OF_YEAR);
for (DateTime dateTime : dateTimes) {

View File

@ -30,7 +30,7 @@
AND query_time &gt;= CONCAT(#{month_begin}, '-01 00:00:00')
</if>
<if test="month_end != null and month_end != ''">
AND query_time &lt;= CONCAT(#{month_end}, '-31 23:59:59')
AND query_time &lt;= CONCAT(LAST_DAY(CONCAT(#{month_end}, '-01')), ' 23:59:59')
</if>
group by month
</select>

View File

@ -1032,7 +1032,7 @@
AND create_time &gt;= CONCAT(#{month_begin}, '-01 00:00:00')
</if>
<if test="month_end != null and month_end != ''">
AND create_time &lt;= CONCAT(#{month_end}, '-31 23:59:59')
AND create_time &lt;= CONCAT(LAST_DAY(CONCAT(#{month_end}, '-01')), ' 23:59:59')
</if>
<if test="personSn != null and personSn != ''">
and person_sn = #{personSn}
@ -1051,7 +1051,7 @@
AND create_time &gt;= CONCAT(#{month_begin}, '-01 00:00:00')
</if>
<if test="month_end != null and month_end != ''">
AND create_time &lt;= CONCAT(#{month_end}, '-31 23:59:59')
AND create_time &lt;= CONCAT(LAST_DAY(CONCAT(#{month_end}, '-01')), ' 23:59:59')
</if>
<if test="personSn != null and personSn != ''">
and person_sn = #{personSn}

View File

@ -110,7 +110,7 @@
and t.attendance_date <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
</if>
<if test="endMonth != null and endMonth != ''">
and t.attendance_date <![CDATA[<=]]> concat(#{endMonth},'-31 23:59:59')
and t.attendance_date <![CDATA[<=]]> CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59')
</if>
<if test="startDate != null and startDate != ''">
and t.attendance_date >= #{startDate}
@ -160,7 +160,7 @@
and t.attendance_date <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
</if>
<if test="endMonth != null and endMonth != ''">
and t.attendance_date <![CDATA[<=]]> concat(#{endMonth},'-31 23:59:59')
and t.attendance_date <![CDATA[<=]]> CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59')
</if>
<if test="startDate != null and startDate != ''">
and t.attendance_date >= #{startDate}

View File

@ -26,7 +26,7 @@
</if>
<if test="month != null and month != ''">
and c.upload_date >= #{month}
and c.upload_date &lt;= concat(#{month},'-31 23:59:59')
and c.upload_date &lt;= CONCAT(LAST_DAY(CONCAT(#{month}, '-01')), ' 23:59:59')
</if>
and c.audit_type=2
and c.has_delay_event=1
@ -43,7 +43,7 @@
</if>
<if test="month != null and month != ''">
and c.upload_date >= #{month}
and c.upload_date &lt;= concat(#{month},'-31 23:59:59')
and c.upload_date &lt;= CONCAT(LAST_DAY(CONCAT(#{month}, '-01')), ' 23:59:59')
</if>
and c.audit_type=2
and c.has_delay_event=1

View File

@ -292,7 +292,7 @@
and t.danger_item_id = #{param.dangerInfoId}
</if>
<if test="param.endMonth != null and param.endMonth != ''">
and t.inspect_time &lt;= concat(#{param.endMonth},'-31 23:59:59')
and t.inspect_time &lt;= CONCAT(LAST_DAY(CONCAT(#{param.endMonth}, '-01')), ' 23:59:59')
</if>
<if test="param.recordStatus == '8'.toString() ">
and t.status != 6
@ -1096,7 +1096,7 @@
and create_time <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
</if>
<if test="endMonth != null and endMonth != ''">
and create_time <![CDATA[<=]]> concat(#{endMonth},'-31 23:59:59')
and create_time <![CDATA[<=]]> CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59')
</if>
group by priority_name_dic, x_name
</select>
@ -1170,7 +1170,7 @@
and r.create_time <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
</if>
<if test="endMonth != null and endMonth != ''">
and r.create_time <![CDATA[<=]]> concat(#{endMonth},'-31 23:59:59')
and r.create_time <![CDATA[<=]]> CONCAT(LAST_DAY(CONCAT(#{endMonth}, '-01')), ' 23:59:59')
</if>
<if test="dutyMajor != null and dutyMajor != ''">
and r.duty_major = #{dutyMajor}