From 6976053b849516a184fc39b4c1ee59cf676211f9 Mon Sep 17 00:00:00 2001
From: jiaosong <jiaosong6760@dingtalk.com>
Date: 星期四, 17 八月 2023 10:32:42 +0800
Subject: [PATCH] #时间判断
---
server/src/main/java/doumeemes/dao/ext/dto/QuerySalaryStatisticDTO.java | 4 ++--
server/src/main/resources/mappers/WorkorderRecordExtMapper.xml | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/src/main/java/doumeemes/dao/ext/dto/QuerySalaryStatisticDTO.java b/server/src/main/java/doumeemes/dao/ext/dto/QuerySalaryStatisticDTO.java
index 63e0adb..85ddd38 100644
--- a/server/src/main/java/doumeemes/dao/ext/dto/QuerySalaryStatisticDTO.java
+++ b/server/src/main/java/doumeemes/dao/ext/dto/QuerySalaryStatisticDTO.java
@@ -22,10 +22,10 @@
private Integer rootDepartId;
@ApiModelProperty(value = "寮�濮嬫椂闂�")
@JsonFormat(pattern = "yyyy-MM-dd")
- private Date startDate;
+ private String startDate;
@ApiModelProperty(value = "缁撴潫鏃堕棿")
@JsonFormat(pattern = "yyyy-MM-dd")
- private Date endDate;
+ private String endDate;
@ApiModelProperty(value = "鏁版嵁鏉冮檺閮ㄩ棬缂栫爜闆嗗悎" ,hidden = true)
private List<Integer> departIds;
diff --git a/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml b/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml
index edb56c3..7317e66 100644
--- a/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml
+++ b/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml
@@ -478,11 +478,11 @@
<if test="userId != null">
AND `CREATE_USER` = #{userId}
</if>
- <if test="startDate != null">
- AND `CREATE_TIME` >= #{startDate}
+ <if test="startDate != null and startDate != ''">
+ AND `CREATE_TIME` >= concat(#{startDate},' 00:00:00')
</if>
<if test="endDate != null">
- AND #{endDate} >= `CREATE_TIME`
+ AND concat(#{endDate},' 23:59:59') >= `CREATE_TIME`
</if>
group by `CREATE_USER`
<!-- order by `CREATE_TIME` desc-->
--
Gitblit v1.9.3