|
@@ -140,7 +140,7 @@ public class AnnualInspectionController {
|
|
|
Verify.nogt0(count, "年检计划已存在");
|
|
|
|
|
|
AnnualInspection current = annualInspectionService.findCurrentConfirm(entity.getLiftId(), entity.getMtCompanyId());
|
|
|
- if(null != current){
|
|
|
+ if(null != current && null != current.getPlanDate()){
|
|
|
LocalDate deadline = current.getPlanDate().plusDays(inspection_interval);
|
|
|
Verify.notTrue(deadline.isBefore(entity.getPlanDate()), "上次年检" + current.getPlanDate() + ",计划年检设置" + deadline + "之前有效");
|
|
|
}
|
|
@@ -264,9 +264,10 @@ public class AnnualInspectionController {
|
|
|
Verify.isTrue(oldStepName == 2 || oldStepName == 3, "请先完成第二阶段再进行第三阶段");
|
|
|
Verify.isTrue(oldStepStatus >= 3 && oldStepStatus <= 7, "请进行第三阶段操作");
|
|
|
Verify.isTrue(stepStatus >= 4 && stepStatus <= 7, "请进行第三阶段操作");
|
|
|
-
|
|
|
- LocalDate deadline = old.getPlanDate().plusDays(inspection_interval);
|
|
|
- Verify.notTrue(deadline.isBefore(entity.getNextInspectionTime()), "上次年检" + old.getPlanDate() + ",下次年检设置" + deadline + "之前有效");
|
|
|
+ if(null != old.getPlanDate()){
|
|
|
+ LocalDate deadline = old.getPlanDate().plusDays(inspection_interval);
|
|
|
+ Verify.notTrue(deadline.isBefore(entity.getNextInspectionTime()), "上次年检" + old.getPlanDate() + ",下次年检设置" + deadline + "之前有效");
|
|
|
+ }
|
|
|
|
|
|
old.setStepStatus(entity.getStepStatus());
|
|
|
old.setCheckResultImg(entity.getCheckResultImg());
|