| | |
| | | if (snapshot == null) { |
| | | throw new ErrorException("未找到当前模板的原始记录快照"); |
| | | } |
| | | boolean hasSnapshotField = dto.isTemperaturePresent() || dto.isHumidityPresent() |
| | | || dto.isDetectionTimePresent() || dto.isDetectionPlacePresent() |
| | | boolean hasSnapshotField = dto.isTemperaturePresent() || dto.isDetectionTimePresent() |
| | | || dto.isDetectionPlacePresent() |
| | | || dto.isInsResultPresent(); |
| | | if (hasSnapshotField) { |
| | | insOrderStandardTemplateMapper.update(null, |
| | |
| | | .eq(InsOrderStandardTemplate::getId, snapshot.getId()) |
| | | .set(dto.isTemperaturePresent(), |
| | | InsOrderStandardTemplate::getTemperature, dto.getTemperature()) |
| | | .set(dto.isHumidityPresent(), |
| | | InsOrderStandardTemplate::getHumidity, dto.getHumidity()) |
| | | .set(dto.isDetectionTimePresent(), |
| | | InsOrderStandardTemplate::getDetectionTime, dto.getDetectionTime()) |
| | | .set(dto.isDetectionPlacePresent(), |