hfxc226 2 년 전
부모
커밋
1fec4c0b78
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      platform-rest/src/main/java/com/platform/rest/controller/sb/SbInfoMeasureController.java

+ 4 - 1
platform-rest/src/main/java/com/platform/rest/controller/sb/SbInfoMeasureController.java

@@ -222,7 +222,10 @@ public class SbInfoMeasureController {
             if(vo.getCheckPeriod() != null){
                 checkPeriod = vo.getCheckPeriod();
             }else{
-                throw new BusinessException("检定设备的检定周期未设置,无法计算下次检定日期,请先设置");
+                throw new BusinessException("检定设备的检定周期未设置,无法计算下次检定日期,请先设置,设备名称:" + vo.getName() + ", 测量设备编号: " + vo.getCardNo());
+            }
+            if(vo.getCheckDate() == null){
+                throw new BusinessException("检定设备的检定日期未设置,无法计算下次检定日期,请先设置,设备名称:" + vo.getName() + ", 测量设备编号: " + vo.getCardNo());
             }
             vo.setNextCheckDate(vo.getCheckDate().minusMonths(-checkPeriod).minusDays(1));
         }