瀏覽代碼

项目月打卡数据新增年月筛选

anderx 2 年之前
父節點
當前提交
70fbd9e707

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/project/service/impl/ProjectStaffRecordServiceImpl.java

@@ -153,13 +153,20 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
     public AjaxResult myDurationMonth(Long id,Integer year,Integer month) {
         LoginUser loginUser = SecurityUtils.getLoginUser();
         ProjectTask projectTask = projectTaskMapper.selectByPrimaryKey(id);
+        //获取最大打卡时间
         BigDecimal maxDuration= new BigDecimal(loginUser.getUser().getDept().getMaxDuration());
+        //获取当前时间
         String  date=DateUtils.getDate();
+        //获取月第一天
         String firsDayOfMonth=DateUtils.firsDayOfMonth(year,month);
+        //获取月最后一天
         String lastDayOfMonth=DateUtils.lastDayOfMonth(year,month);
         Long aid=loginUser.getUserId();
+        //获取打卡数据
         List<MyMonthDays> myMonthDays = projectStaffRecordMapper.myDurationMonth(id, aid,firsDayOfMonth,lastDayOfMonth  + " 23:59:59");
+        //处理月数据、星期
         supplementMyMonthDays(myMonthDays,firsDayOfMonth,lastDayOfMonth);
+        //处理打卡时间与状态
         pushMyMonthDay(myMonthDays, projectTask, date, maxDuration);
         return AjaxResult.success(myMonthDays);
     }