|
|
@@ -63,6 +63,7 @@ public class TrialDetectionController extends BladeController {
|
|
|
private final ITrialDetectionDataService iTrialDetectionDataService;
|
|
|
private final ITrialSampleInfoService iTrialSampleInfoService;
|
|
|
private final ITrialSelfInspectionRecordService iTrialSelfInspectionRecordService;
|
|
|
+ private final IEntrustInfoService entrustInfoService;
|
|
|
private final WbsTreePrivateClient wbsTreePrivateClient;
|
|
|
private final JdbcTemplate jdbcTemplate;
|
|
|
private final NewIOSSClient newIOSSClient;
|
|
|
@@ -171,6 +172,13 @@ public class TrialDetectionController extends BladeController {
|
|
|
if (recordList.size() > 0) {
|
|
|
return R.fail("只能删除未上报或已废除的试验记录信息,操作失败");
|
|
|
}
|
|
|
+ List<TrialSelfInspectionRecord> trialSelfInspectionRecords = iTrialSelfInspectionRecordService.getBaseMapper().selectList(Wrappers.<TrialSelfInspectionRecord>lambdaQuery()
|
|
|
+ .isNotNull(TrialSelfInspectionRecord::getEntrustId)
|
|
|
+ .in(TrialSelfInspectionRecord::getId, Func.toLongList(ids)));
|
|
|
+ trialSelfInspectionRecords.forEach(f->{
|
|
|
+ entrustInfoService.update(Wrappers.<EntrustInfo>lambdaUpdate().eq(EntrustInfo::getId, f.getEntrustId()).set(EntrustInfo::getExpCount, 0));
|
|
|
+ });
|
|
|
+
|
|
|
String sql1 = "delete from u_trial_self_data_record where record_id in(" + ids + ")";
|
|
|
jdbcTemplate.execute(sql1);
|
|
|
String sql2 = "delete from u_trial_self_sample where self_id in(" + ids + ")";
|