From 5ab5ad9e4f7608b0b8c5052d514435a5ad27a5a0 Mon Sep 17 00:00:00 2001 From: kami <605128600@qq.com> Date: Mon, 18 Nov 2024 00:00:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=AA=E6=96=B0=E8=B6=85=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flow/action/ApplyCompletionAction.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java index e97914d..71085a1 100644 --- a/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java +++ b/src/main/java/com/biutag/supervision/flow/action/ApplyCompletionAction.java @@ -85,9 +85,15 @@ public class ApplyCompletionAction 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); + if(verifyData != null && verifyData.getBlameLeaders() != null) { + List blameLeaders = verifyData.getBlameLeaders().stream() + .filter(leader -> leader.getBlameIdCodes().contains(item.getBlameIdCode())) + .toList(); + if(!blameLeaders.isEmpty()) { + BeanUtil.copyProperties(blameLeaders.getFirst(), negativeBlame); + } + } + negativeBlame .setBlameId(IdUtil.fastSimpleUUID()) .setNegativeId(negativeId)