|
|
|
@ -48,6 +48,9 @@ public class SpecialDeviceInspectionServiceImpl extends ServiceImpl<SpecialDevic
|
|
|
|
|
specialDeviceInspectionEntity.setNextInspectionTime(nextInspectDate); |
|
|
|
|
specialDeviceEntity.setInspectionNextTime(nextInspectDate); |
|
|
|
|
// 获取上一次检验时间
|
|
|
|
|
if (specialDeviceInspectionEntity.getLastInspectionTime() != null) { |
|
|
|
|
specialDeviceEntity.setInspectionLastTime(specialDeviceInspectionEntity.getLastInspectionTime()); |
|
|
|
|
} else { |
|
|
|
|
QueryWrapper<SpecialDeviceInspectionEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.lambda().eq(SpecialDeviceInspectionEntity::getDeviceId, deviceId) |
|
|
|
|
.orderByDesc(SpecialDeviceInspectionEntity::getInspectionTime); |
|
|
|
@ -58,6 +61,7 @@ public class SpecialDeviceInspectionServiceImpl extends ServiceImpl<SpecialDevic
|
|
|
|
|
specialDeviceInspectionEntity.setLastInspectionTime(lastInspectionTime); |
|
|
|
|
specialDeviceEntity.setInspectionLastTime(lastInspectionTime); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 本次检验时间
|
|
|
|
|
specialDeviceEntity.setInspectionCurrentTime(specialDeviceInspectionEntity.getInspectionTime()); |
|
|
|
|
boolean save = this.save(specialDeviceInspectionEntity); |
|
|
|
|