请假同一天的半天有问题修改

This commit is contained in:
fl 2025-03-17 10:29:03 +08:00
parent 9cc90a50b8
commit e3065f59f4
2 changed files with 26 additions and 13 deletions

View File

@ -836,9 +836,9 @@ public class AttCalServiceImpl implements AttCalService {
*/ */
private void threadLeaveData(LeaveBean c) { private void threadLeaveData(LeaveBean c) {
//1.将请假区间变成日期集合 //1.将请假区间变成日期集合
// if(c.getUserId() == 263){ if(c.getUserId() == 1){
// System.out.println("米娜"); System.out.println("米娜");
// } }
List<String> dateLists = AttTimeUtil.getStrDateListBetween(c.getLeaveStartDate(), c.getLeaveEndDate()); List<String> dateLists = AttTimeUtil.getStrDateListBetween(c.getLeaveStartDate(), c.getLeaveEndDate());
if (!dateLists.isEmpty()) { if (!dateLists.isEmpty()) {
// //根据开始时间结束时间获取节假日的日期集合 // //根据开始时间结束时间获取节假日的日期集合
@ -848,6 +848,18 @@ public class AttCalServiceImpl implements AttCalService {
c.getUserId()); c.getUserId());
AttDataBean offWorkBean = new AttDataBean(v, c.getAttStatus(), "2", AttDataBean offWorkBean = new AttDataBean(v, c.getAttStatus(), "2",
c.getUserId()); c.getUserId());
//开始和结束的那天是否只请假了一天
if (dateLists.size() == 1 ) {
if (c.getLeaveStartInterval().equals(c.getLeaveEndInterval())) {
if ("2".equals(c.getLeaveStartInterval())) {
attSourceDataDao.updateLeaveData(offWorkBean);
}else if ("1".equals(c.getLeaveEndInterval())) {
attSourceDataDao.updateLeaveData(toWorkBean);
}
} else {
tf = true;
}
}else{
//开始和结束的那天是否只请了半天 //开始和结束的那天是否只请了半天
if (c.getLeaveStartDate().equals(v)) { if (c.getLeaveStartDate().equals(v)) {
if ("2".equals(c.getLeaveStartInterval())) { if ("2".equals(c.getLeaveStartInterval())) {
@ -864,6 +876,7 @@ public class AttCalServiceImpl implements AttCalService {
} else { } else {
tf = true; tf = true;
} }
}
if (tf) { if (tf) {
attSourceDataDao.updateLeaveData(toWorkBean); attSourceDataDao.updateLeaveData(toWorkBean);
attSourceDataDao.updateLeaveData(offWorkBean); attSourceDataDao.updateLeaveData(offWorkBean);

View File

@ -363,7 +363,7 @@
AND la.examine_status = 1 AND la.examine_status = 1
AND sdd.dict_value IS NOT NULL AND sdd.dict_value IS NOT NULL
AND AND
(leave_start_date BETWEEN #{pushDate} - INTERVAL 1 DAY (leave_start_date BETWEEN #{pushDate} - INTERVAL 5 DAY
and #{pushDate} and #{pushDate}
or #{pushDate} between leave_start_date and leave_end_date or #{pushDate} between leave_start_date and leave_end_date
) )