diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/AttExceptionHandleServiceImpl.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/AttExceptionHandleServiceImpl.java index 0e50275..69f19bc 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/AttExceptionHandleServiceImpl.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/AttExceptionHandleServiceImpl.java @@ -226,11 +226,11 @@ public class AttExceptionHandleServiceImpl implements AttExceptionHandleService{ { List list = new ArrayList<>(); try { - LocalDate date = LocalDate.parse(data.getAttCurrentMonth() + "-01"); - LocalDate nextMonth =date.plusMonths(1).withDayOfMonth(1); - LocalDate nowMonth =date.withDayOfMonth(1); - data.setAttNextMonthFirst(nextMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) ; - data.setAttCurrentMonthFirst(nowMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); +// LocalDate date = LocalDate.parse(data.getAttCurrentMonth() + "-01"); +// LocalDate nextMonth =date.plusMonths(1).withDayOfMonth(1); +// LocalDate nowMonth =date.withDayOfMonth(1); +// data.setAttNextMonthFirst(nextMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) ; +// data.setAttCurrentMonthFirst(nowMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); list = attExceptionHandleDao.getDetailExceptionAll(data); } catch (Exception e) { diff --git a/bonus-modules/bonus-system/src/main/resources/mapper/att/AttExceptionHandleMapper.xml b/bonus-modules/bonus-system/src/main/resources/mapper/att/AttExceptionHandleMapper.xml index a24748b..6f2c6fd 100644 --- a/bonus-modules/bonus-system/src/main/resources/mapper/att/AttExceptionHandleMapper.xml +++ b/bonus-modules/bonus-system/src/main/resources/mapper/att/AttExceptionHandleMapper.xml @@ -188,14 +188,8 @@ leave_duration as leaveDuration from leave_apply as la where la.is_active = 1 - and (leave_start_date < #{attNextMonthFirst} and leave_start_date >= #{attCurrentMonthFirst}) and (la.leave_type like '%外出%' or la.leave_type like '%轮休%') - - and date_format(la.leave_start_date,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') - - - - and date_format(la.leave_end_date,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') - + and #{attCurrentMonth} BETWEEN DATE_FORMAT(leave_start_date, '%Y-%m') and DATE_FORMAT(leave_end_date, '%Y-%m') + and (la.leave_type like '%外出%' or la.leave_type like '%轮休%') and INSTR(la.user_name,#{name}) > 0