yusm 6 dní pred
rodič
commit
0850469502

+ 5 - 4
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/AttendanceServiceImpl.java

@@ -3,11 +3,8 @@ package com.management.platform.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.management.platform.entity.*;
 import com.management.platform.mapper.AttendanceMapper;
-import com.management.platform.service.AttendanceService;
+import com.management.platform.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.management.platform.service.CustomerInfoService;
-import com.management.platform.service.SpecialDateSetService;
-import com.management.platform.service.UserService;
 import com.management.platform.util.ExcelUtil;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
@@ -55,6 +52,9 @@ public class AttendanceServiceImpl extends ServiceImpl<AttendanceMapper, Attenda
     @Resource
     private SpecialDateSetService specialDateSetService;
 
+    @Resource
+    private AttendanceStaffService attendanceStaffService;
+
     @Override
     public HttpRespMsg importAttendanceData(String month, MultipartFile file, HttpServletRequest request) {
         HttpRespMsg msg=new HttpRespMsg();
@@ -156,6 +156,7 @@ public class AttendanceServiceImpl extends ServiceImpl<AttendanceMapper, Attenda
                 }
             }
             attendanceService.saveBatch(list);
+            attendanceStaffService.refreshData(month);
             msg.data=dataCount;
             return msg;
         } catch (IOException e){

+ 1 - 1
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/AttendanceStaffServiceImpl.java

@@ -506,7 +506,7 @@ public class AttendanceStaffServiceImpl extends ServiceImpl<AttendanceStaffMappe
         map.put("total", iPage.getTotal());
         List<AttendanceStaff> records = iPage.getRecords();
         for (AttendanceStaff record : records) {
-            boolean isHotDay = dateSetList.stream().anyMatch(d -> d != null && !d.getStartDate().isBefore(record.getClockDate())&&!d.getEndDate().isAfter(record.getClockDate()));
+            boolean isHotDay = dateSetList.stream().anyMatch(d -> d != null && !d.getStartDate().isAfter(record.getClockDate())&&!d.getEndDate().isBefore(record.getClockDate()));
             // 获取当天的打卡时间(转换为当天的时间)
             LocalDateTime clockStart = record.getClockStartTime();
             LocalDateTime clockEnd = record.getClockEndTime();