|
|
@@ -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);
|
|
|
}
|