diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/TaskCreatedListener.java b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/TaskCreatedListener.java index de87d6d..3e89fce 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/TaskCreatedListener.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/TaskCreatedListener.java @@ -122,6 +122,9 @@ public class TaskCreatedListener implements FlowableEventListener { projectName = xinchuang.getProjectName(); } else { ProjectInst projectInst = projectInstService.getByInstCode(procInstId); + if (projectInst == null) { + return; + } Project project = projectService.getById(projectInst.getProjectId()); projectName = project.getProjectName(); paramObj.setProjectId(project.getId());