修复mysql不支持09-31
This commit is contained in:
parent
bc25c79962
commit
9656de38e7
@ -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) {
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
AND query_time >= CONCAT(#{month_begin}, '-01 00:00:00')
|
||||
</if>
|
||||
<if test="month_end != null and month_end != ''">
|
||||
AND query_time <= CONCAT(#{month_end}, '-31 23:59:59')
|
||||
AND query_time <= CONCAT(LAST_DAY(CONCAT(#{month_end}, '-01')), ' 23:59:59')
|
||||
</if>
|
||||
group by month
|
||||
</select>
|
||||
|
||||
@ -1032,7 +1032,7 @@
|
||||
AND create_time >= CONCAT(#{month_begin}, '-01 00:00:00')
|
||||
</if>
|
||||
<if test="month_end != null and month_end != ''">
|
||||
AND create_time <= CONCAT(#{month_end}, '-31 23:59:59')
|
||||
AND create_time <= 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 >= CONCAT(#{month_begin}, '-01 00:00:00')
|
||||
</if>
|
||||
<if test="month_end != null and month_end != ''">
|
||||
AND create_time <= CONCAT(#{month_end}, '-31 23:59:59')
|
||||
AND create_time <= CONCAT(LAST_DAY(CONCAT(#{month_end}, '-01')), ' 23:59:59')
|
||||
</if>
|
||||
<if test="personSn != null and personSn != ''">
|
||||
and person_sn = #{personSn}
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
</if>
|
||||
<if test="month != null and month != ''">
|
||||
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')
|
||||
</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 <= concat(#{month},'-31 23:59:59')
|
||||
and c.upload_date <= CONCAT(LAST_DAY(CONCAT(#{month}, '-01')), ' 23:59:59')
|
||||
</if>
|
||||
and c.audit_type=2
|
||||
and c.has_delay_event=1
|
||||
|
||||
@ -292,7 +292,7 @@
|
||||
and t.danger_item_id = #{param.dangerInfoId}
|
||||
</if>
|
||||
<if test="param.endMonth != null and param.endMonth != ''">
|
||||
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')
|
||||
</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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user