From 9457ff7b21b4e7bada535b4a92365468ae78cada Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Sat, 11 Jan 2025 18:39:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=95=B0=E6=8D=AE=E9=9A=94?= =?UTF-8?q?=E7=A6=BB=EF=BC=8Cbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lSun <15893999301@qq.com> --- .../att/service/AttExceptionHandleServiceImpl.java | 10 +++++----- .../resources/mapper/att/AttExceptionHandleMapper.xml | 10 ++-------- 2 files changed, 7 insertions(+), 13 deletions(-) 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