fix(dorm): 点名请假仅认审批完成,并修正点名时间时区
宿舍点名/卫生检查只展示 finish 请假;点名提交改用服务端本地时间,避免 toISOString 少 8 小时。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
a6a5b88f47
commit
64f805cca4
5 files changed
+17
-6
No files matched your search
+2
-1
@@ -69,7 +69,8 @@ public interface IXgStudentLeaveService {
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 根据学生ID列表和检查日期查询学生请假信息
|
||||
* 根据学生ID列表和检查日期查询已审批结束的请假信息。
|
||||
* 审批中(waiting)、草稿、退回、撤销不返回,宿舍点名和卫生检查因此不显示请假。
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param checkDate 检查日期
|
||||
|
||||
+3
@@ -252,6 +252,9 @@ public class XgDormRollCallServiceImpl implements IXgDormRollCallService {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
// 点名时间以服务端本地时间为准。前端 toISOString() 会提交 UTC,北京时间会少 8 小时。
|
||||
bo.setCheckDate(new Date());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-3
@@ -613,7 +613,8 @@ public class XgStudentLeaveServiceImpl implements IXgStudentLeaveService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据学生ID列表和检查日期查询学生请假信息
|
||||
* 根据学生ID列表和检查日期查询已审批结束的请假信息。
|
||||
* 仅 approval_status = finish 且检查时间落在请假区间内的记录会返回。
|
||||
*
|
||||
* @param studentIds 学生ID列表
|
||||
* @param checkDate 检查日期
|
||||
@@ -627,8 +628,8 @@ public class XgStudentLeaveServiceImpl implements IXgStudentLeaveService {
|
||||
|
||||
LambdaQueryWrapper<XgStudentLeave> lqw = Wrappers.lambdaQuery();
|
||||
lqw.in(XgStudentLeave::getStudentId, studentIds);
|
||||
// 查询审核状态为"waiting"(待审核)或"finish"(已完成)的请假记录
|
||||
lqw.in(XgStudentLeave::getApprovalStatus, "waiting", "finish");
|
||||
// 宿舍点名、卫生检查等状态展示:审批未结束不视为请假,仅 finish(审批全部结束)
|
||||
lqw.eq(XgStudentLeave::getApprovalStatus, BusinessStatusEnum.FINISH.getStatus());
|
||||
// 检查日期在请假时间段内
|
||||
lqw.le(XgStudentLeave::getStartTime, checkDate);
|
||||
lqw.ge(XgStudentLeave::getEndTime, checkDate);
|
||||
|
||||
Reference in new issue
Block a user