From 3f2d255b666e6fc11bf560d90e4d2d4c4f935b5b Mon Sep 17 00:00:00 2001 From: wxc <191104855@qq.com> Date: Mon, 11 Nov 2024 10:22:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/1109.sql | 4 +++- .../com/biutag/supervision/flow/action/SaveAction.java | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sql/1109.sql b/sql/1109.sql index 95ba330..8cc80e1 100644 --- a/sql/1109.sql +++ b/sql/1109.sql @@ -16,4 +16,6 @@ update sup_depart set statistics_group_id = 14 where short_name = '禁毒大队' update sup_depart set statistics_group_id = 15 where short_name = '治安大队' and `level` = 3; update sup_depart set statistics_group_id = 16 where short_name = '人境大队' and `level` = 3; -- 其他 -update sup_depart set statistics_group_id = 12 where statistics_group_id is null and `level` = 3; \ No newline at end of file +update sup_depart set statistics_group_id = 12 where statistics_group_id is null and `level` = 3; + +update sup_dict_problem_type set score = 1 where level = 3; \ No newline at end of file diff --git a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java index 7a14eb8..684e29b 100644 --- a/src/main/java/com/biutag/supervision/flow/action/SaveAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/SaveAction.java @@ -19,6 +19,7 @@ import org.springframework.stereotype.Component; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** * 核查办理-保存 @@ -74,8 +75,11 @@ public class SaveAction implements Action { List negativeBlames = verifyData.getBlames().stream().map(item -> { NegativeBlame negativeBlame = new NegativeBlame(); BeanUtil.copyProperties(item, negativeBlame); - VerifyData.BlameLeader blameLeader = verifyData.getBlameLeaders().stream().filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())).findFirst().get(); - BeanUtil.copyProperties(blameLeader, negativeBlame); + VerifyData.BlameLeader blameLeader = verifyData.getBlameLeaders().stream() + .filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())).findFirst().orElse(null); + if (Objects.nonNull(blameLeader)) { + BeanUtil.copyProperties(blameLeader, negativeBlame); + } negativeBlame.setNegativeId(negativeId) .setBlameId(IdUtil.fastSimpleUUID()) .setCrtTime(LocalDateTime.now())