修复mysql不支持09-31
This commit is contained in:
parent
b2e08bb3fe
commit
1af66415d6
@ -160,7 +160,7 @@ public class OcrBuildLogController {
|
|||||||
.eq(OcrBuildLog::getProjectSn, projectSn)
|
.eq(OcrBuildLog::getProjectSn, projectSn)
|
||||||
.eq(Objects.equals(type, 2), OcrBuildLog::getUploaderId, SecurityUtils.getUser().getUserId())
|
.eq(Objects.equals(type, 2), OcrBuildLog::getUploaderId, SecurityUtils.getUser().getUserId())
|
||||||
.ge(OcrBuildLog::getDate, yearMonth + "-01")
|
.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));
|
).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);
|
List<DateTime> dateTimes = DateUtil.rangeToList(DateUtil.parseDate(yearMonth + "-01"), DateUtil.endOfMonth(DateUtil.parseDate(yearMonth + "-01")), DateField.DAY_OF_YEAR);
|
||||||
for (DateTime dateTime : dateTimes) {
|
for (DateTime dateTime : dateTimes) {
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
AND query_time >= CONCAT(#{month_begin}, '-01 00:00:00')
|
AND query_time >= CONCAT(#{month_begin}, '-01 00:00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="month_end != null and month_end != ''">
|
<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>
|
</if>
|
||||||
group by month
|
group by month
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -1032,7 +1032,7 @@
|
|||||||
AND create_time >= CONCAT(#{month_begin}, '-01 00:00:00')
|
AND create_time >= CONCAT(#{month_begin}, '-01 00:00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="month_end != null and month_end != ''">
|
<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>
|
||||||
<if test="personSn != null and personSn != ''">
|
<if test="personSn != null and personSn != ''">
|
||||||
and person_sn = #{personSn}
|
and person_sn = #{personSn}
|
||||||
@ -1051,7 +1051,7 @@
|
|||||||
AND create_time >= CONCAT(#{month_begin}, '-01 00:00:00')
|
AND create_time >= CONCAT(#{month_begin}, '-01 00:00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="month_end != null and month_end != ''">
|
<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>
|
||||||
<if test="personSn != null and personSn != ''">
|
<if test="personSn != null and personSn != ''">
|
||||||
and person_sn = #{personSn}
|
and person_sn = #{personSn}
|
||||||
|
|||||||
@ -110,7 +110,7 @@
|
|||||||
and t.attendance_date <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
|
and t.attendance_date <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="endMonth != null and endMonth != ''">
|
<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>
|
||||||
<if test="startDate != null and startDate != ''">
|
<if test="startDate != null and startDate != ''">
|
||||||
and t.attendance_date >= #{startDate}
|
and t.attendance_date >= #{startDate}
|
||||||
@ -160,7 +160,7 @@
|
|||||||
and t.attendance_date <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
|
and t.attendance_date <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="endMonth != null and endMonth != ''">
|
<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>
|
||||||
<if test="startDate != null and startDate != ''">
|
<if test="startDate != null and startDate != ''">
|
||||||
and t.attendance_date >= #{startDate}
|
and t.attendance_date >= #{startDate}
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="month != null and month != ''">
|
<if test="month != null and month != ''">
|
||||||
and c.upload_date >= #{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>
|
</if>
|
||||||
and c.audit_type=2
|
and c.audit_type=2
|
||||||
and c.has_delay_event=1
|
and c.has_delay_event=1
|
||||||
@ -43,7 +43,7 @@
|
|||||||
</if>
|
</if>
|
||||||
<if test="month != null and month != ''">
|
<if test="month != null and month != ''">
|
||||||
and c.upload_date >= #{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>
|
</if>
|
||||||
and c.audit_type=2
|
and c.audit_type=2
|
||||||
and c.has_delay_event=1
|
and c.has_delay_event=1
|
||||||
|
|||||||
@ -292,7 +292,7 @@
|
|||||||
and t.danger_item_id = #{param.dangerInfoId}
|
and t.danger_item_id = #{param.dangerInfoId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.endMonth != null and param.endMonth != ''">
|
<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>
|
||||||
<if test="param.recordStatus == '8'.toString() ">
|
<if test="param.recordStatus == '8'.toString() ">
|
||||||
and t.status != 6
|
and t.status != 6
|
||||||
@ -1096,7 +1096,7 @@
|
|||||||
and create_time <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
|
and create_time <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="endMonth != null and endMonth != ''">
|
<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>
|
</if>
|
||||||
group by priority_name_dic, x_name
|
group by priority_name_dic, x_name
|
||||||
</select>
|
</select>
|
||||||
@ -1170,7 +1170,7 @@
|
|||||||
and r.create_time <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
|
and r.create_time <![CDATA[>=]]> concat(#{startMonth},'-01 00:00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="endMonth != null and endMonth != ''">
|
<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>
|
||||||
<if test="dutyMajor != null and dutyMajor != ''">
|
<if test="dutyMajor != null and dutyMajor != ''">
|
||||||
and r.duty_major = #{dutyMajor}
|
and r.duty_major = #{dutyMajor}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user