From 287a9c3488c98af2e5c0121385a4b4353e4ded6a Mon Sep 17 00:00:00 2001 From: caihaohan Date: Wed, 22 Nov 2023 16:35:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AB=8B=E9=A1=B9=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E8=8A=82=E7=82=B96=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ProcessEsInitChangeServiceImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/activiti/process/esInitChange/service/impl/ProcessEsInitChangeServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/activiti/process/esInitChange/service/impl/ProcessEsInitChangeServiceImpl.java index b96cdef5..e12a85b7 100644 --- a/laws-modules/src/main/java/com/jero/modules/activiti/process/esInitChange/service/impl/ProcessEsInitChangeServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/activiti/process/esInitChange/service/impl/ProcessEsInitChangeServiceImpl.java @@ -106,10 +106,13 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl setVariables(InitChangeDataVO initChangeData) { Map flowUserInfoVO = initChangeData.getFlowUserInfoVO(); HashMap map = new HashMap<>(flowUserInfoVO); - ProcessEsInitChange initChange = initChangeData.getDataList().get(0); - // 添加非列表类型的变量 - actFlowCommonService.putIfNotNull(map, "applicationCategory", initChange.getApplicationCategory()); - actFlowCommonService.putIfNotNull(map, "projectType", initChange.getProjectType()); + List initChangeList = initChangeData.getDataList(); + if (!initChangeList.isEmpty()) { + ProcessEsInitChange initChange = initChangeList.get(0); + // 添加非列表类型的变量 + actFlowCommonService.putIfNotNull(map, "applicationCategory", initChange.getApplicationCategory()); + actFlowCommonService.putIfNotNull(map, "projectType", initChange.getProjectType()); + } // 添加列表类型的变量 actFlowCommonService.convertAndPutList(map, flowUserInfoVO, "standardExpertList"); actFlowCommonService.convertAndPutList(map, flowUserInfoVO, "relatedUserList");