diff --git a/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java b/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java index bea57f2..f529e24 100644 --- a/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java +++ b/src/main/java/com/biutag/supervision/service/complaintCollection/ComplaintCollectionServiceImpl.java @@ -108,6 +108,7 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic private final DataCaseVerifResourceService dataCaseVerifResourceService; private final NegativeProblemRelationService negativeProblemRelationService; private final MailResourceService mailResourceService; + private final DataCaseVerifService dataCaseVerifService; private static final DateTimeFormatter INITIAL_REVIEW_FMT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); private static final int CHECK_LIMIT_DAYS = 4; @@ -473,6 +474,21 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic } complaintCollectionCheckFileResourceService.delByComplaintCollectionId(request.getComplaintId()); complaintCollectionCheckFileResourceService.createComplaintCollectionCheckFile(complaintCollectionFiles); + // 如果是案件核查,需要更新下发状态 + if (ComplaintCollectionSourceTableEnum.COMPLAINT_12389.getCode().equals(request.getSourceTable())) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(DataCaseVerif::getOriginId, request.getOriginId()); + long count = dataCaseVerifService.count(queryWrapper); + if (count == 0) { + throw new RuntimeException("未找到对应案件核查数据"); + } + if (count > 1) { + throw new RuntimeException("匹配到多条案件核查数据,禁止更新"); + } + DataCaseVerif one = dataCaseVerifService.getOne(queryWrapper, false); + one.setDistributionState("1"); + dataCaseVerifService.updateById(one); + } return Result.success(true); }