|
|
@@ -1,5 +1,6 @@
|
|
|
package com.ruoyi.project.service.impl;
|
|
|
|
|
|
+import com.mchange.v2.lang.SystemUtils;
|
|
|
import com.ruoyi.common.config.RuoYiConfig;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
@@ -269,6 +270,20 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public AjaxResult checkRecordTime(AjaxResult ajaxResult, ProjectStaffRecord in) {
|
|
|
+ if (!ajaxResult.isError()){
|
|
|
+ ProjectTask projectTask = projectTaskMapper.selectByPrimaryKey(in.getPid());
|
|
|
+ long endTime = DateUtils.getNowDate().getTime();
|
|
|
+ long startTime = projectTask.getStartTime().getTime();
|
|
|
+ if (endTime>projectTask.getEndTime().getTime())endTime=projectTask.getEndTime().getTime();
|
|
|
+ if (in.getRecordTime().getTime()>endTime||in.getRecordTime().getTime()<startTime){
|
|
|
+ ajaxResult=AjaxResult.error("打卡时间必须大于开始时间或者小于等于当前时间");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ajaxResult;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
*
|