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");