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

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

View File

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