|
@@ -228,6 +228,7 @@ public class SbMeasureLogServiceImpl extends BaseServiceImpl<SbMeasureLogMapper,
|
|
|
sbInfo.setParentId(sbInfo.getParentId());
|
|
|
sbInfo.setPositionId(sbInfo.getPositionId());
|
|
|
sbInfo.setCheckDate(model.getLastDate());
|
|
|
+ sbInfo.setNextCheckDate(model.getYouXiaoDate());
|
|
|
//sbInfo.setPositionNo(model.getSbPositionNo());
|
|
|
// Integer checkPeriod = 12;// 默认12个月
|
|
|
// if (model.getCheckPeriod() != null) {
|
|
@@ -411,14 +412,14 @@ public class SbMeasureLogServiceImpl extends BaseServiceImpl<SbMeasureLogMapper,
|
|
|
model.setId(sbMeasureLog.getId());
|
|
|
sbInfo.setParentId(sbInfo.getParentId());
|
|
|
sbInfo.setPositionId(sbInfo.getPositionId());
|
|
|
- sbInfo.setCheckDate(model.getLastDate());
|
|
|
+ sbInfo.setCheckDate(model.getLastDate()==null?LocalDate.now():model.getLastDate());
|
|
|
//sbInfo.setPositionNo(model.getSbPositionNo());
|
|
|
Integer checkPeriod = 12;// 默认12个月
|
|
|
- if (model.getCheckPeriod() != null) {
|
|
|
- checkPeriod = model.getCheckPeriod();
|
|
|
- } else {
|
|
|
- throw new BusinessException("检定设备的检定周期未设置,无法计算下次检定日期,请先设置");
|
|
|
- }
|
|
|
+// if (model.getCheckPeriod() != null) {
|
|
|
+// checkPeriod = model.getCheckPeriod();
|
|
|
+// } else {
|
|
|
+// throw new BusinessException("检定设备的检定周期未设置,无法计算下次检定日期,请先设置");
|
|
|
+// }
|
|
|
|
|
|
// 判断位号是否已经存在,且是否是被设备,如果不是则弹出提示
|
|
|
/*if(StringUtils.isNotBlank(model.getSbPositionNo())){
|
|
@@ -433,7 +434,7 @@ public class SbMeasureLogServiceImpl extends BaseServiceImpl<SbMeasureLogMapper,
|
|
|
}
|
|
|
|
|
|
}*/
|
|
|
- sbInfo.setNextCheckDate(model.getLastDate().minusMonths(-checkPeriod).minusDays(1));
|
|
|
+ sbInfo.setNextCheckDate(model.getYouXiaoDate());
|
|
|
sbInfo.setZaiz(model.getName());// 检定单位
|
|
|
sbInfo.setSbdh(model.getNo());// 检定编号
|
|
|
sbInfo.setRemark(model.getRemark());// 备注
|