模块数据隔离,bug修改

Signed-off-by: lSun <15893999301@qq.com>
This commit is contained in:
lSun 2025-01-11 18:39:59 +08:00
parent c119c328b4
commit 9457ff7b21
2 changed files with 7 additions and 13 deletions

View File

@ -226,11 +226,11 @@ public class AttExceptionHandleServiceImpl implements AttExceptionHandleService{
{ {
List<AttDetailLeaveBean> list = new ArrayList<>(); List<AttDetailLeaveBean> list = new ArrayList<>();
try { try {
LocalDate date = LocalDate.parse(data.getAttCurrentMonth() + "-01"); // LocalDate date = LocalDate.parse(data.getAttCurrentMonth() + "-01");
LocalDate nextMonth =date.plusMonths(1).withDayOfMonth(1); // LocalDate nextMonth =date.plusMonths(1).withDayOfMonth(1);
LocalDate nowMonth =date.withDayOfMonth(1); // LocalDate nowMonth =date.withDayOfMonth(1);
data.setAttNextMonthFirst(nextMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) ; // data.setAttNextMonthFirst(nextMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) ;
data.setAttCurrentMonthFirst(nowMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); // data.setAttCurrentMonthFirst(nowMonth.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
list = attExceptionHandleDao.getDetailExceptionAll(data); list = attExceptionHandleDao.getDetailExceptionAll(data);
} catch (Exception e) { } catch (Exception e) {

View File

@ -188,14 +188,8 @@
leave_duration as leaveDuration leave_duration as leaveDuration
from leave_apply as la from leave_apply as la
where la.is_active = 1 where la.is_active = 1
and (leave_start_date &lt; #{attNextMonthFirst} and leave_start_date &gt;= #{attCurrentMonthFirst}) and (la.leave_type like '%外出%' or la.leave_type like '%轮休%') and #{attCurrentMonth} BETWEEN DATE_FORMAT(leave_start_date, '%Y-%m') and DATE_FORMAT(leave_end_date, '%Y-%m')
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> and (la.leave_type like '%外出%' or la.leave_type like '%轮休%')
and date_format(la.leave_start_date,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and date_format(la.leave_end_date,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<if test="name != null and name != '' "> <if test="name != null and name != '' ">
and INSTR(la.user_name,#{name}) > 0 and INSTR(la.user_name,#{name}) > 0
</if> </if>