| | |
| | | @DeleteMapping(value = "/open/t-sampling-record/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | // 删除取样操作记录 |
| | | samplingRecordOperationService.removeById(id); |
| | | TSamplingRecord samplingRecord = samplingRecordService.getById(id); |
| | | if (Objects.nonNull(samplingRecord)) { |
| | | samplingRecordOperationService.remove(Wrappers.lambdaQuery(TSamplingRecordOperation.class) |
| | | .eq(TSamplingRecordOperation::getSamplingId, id)); |
| | | samplingRecordService.removeById(id); |
| | | } else { |
| | | samplingRecordOperationService.removeById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |