From 723e10199dc5af2ef64d025af97495d8cc9b6b18 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Wed, 8 Mar 2023 17:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E4=B8=8D=E5=88=B0=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=20=E6=8A=9B=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectdeclared/controller/DeclaredProjectController.java | 2 -- .../com/ningdatech/pmapi/scheduler/task/InitProcessTask.java | 10 ++++------ .../ningdatech/pmapi/todocenter/manage/TodoCenterManage.java | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java index 3881b56..bf99653 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java @@ -1,13 +1,11 @@ package com.ningdatech.pmapi.projectdeclared.controller; import com.ningdatech.basic.model.PageVo; -import com.ningdatech.pmapi.projectdeclared.manage.DefaultDeclaredProjectManage; import com.ningdatech.pmapi.projectdeclared.model.dto.DeclaredProjectListParamDTO; import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO; import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectDraftSaveDTO; import com.ningdatech.pmapi.projectdeclared.model.vo.ProjectDraftVO; import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage; -import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; import io.swagger.annotations.Api; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java index 0218dda..c1cfbe1 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java @@ -12,12 +12,10 @@ import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.common.helper.RegionCacheHelper; import com.ningdatech.pmapi.scheduler.contants.TaskContant; import com.ningdatech.pmapi.sys.model.dto.RegionDTO; -import com.ningdatech.pmapi.sys.model.entity.Region; import com.ningdatech.pmapi.sys.service.IRegionService; -import com.wflow.bean.dto.WflowModelHistorysDto; +import com.wflow.bean.dto.WflowModelHistorysInsertDto; import com.wflow.bean.entity.WflowForms; import com.wflow.bean.entity.WflowModels; -import com.wflow.workflow.bean.dto.OrgInfoDTO; import com.wflow.workflow.bean.process.ProcessNode; import com.wflow.workflow.service.ProcessModelService; import com.wflow.workflow.service.WflowFormsService; @@ -111,9 +109,9 @@ public class InitProcessTask { Integer[] processTypeList = TaskContant.Wflow.DEFAULT_PROCESS_TYPE_LIST; for(Integer processType : processTypeList){ String formName = ProjectProcessStageEnum.getDesc(processType); - WflowModelHistorysDto models = new WflowModelHistorysDto(); + WflowModelHistorysInsertDto models = new WflowModelHistorysInsertDto(); // models.setFormId("wf" + IdUtil.objectId()); - models.setVersion(1); +// models.setVersion(1); models.setGroupId(1); models.setProcessDefId("pd" + IdUtil.objectId()); models.setFormName(formName); @@ -125,7 +123,7 @@ public class InitProcessTask { models.setSettings("{\"sign\":false,\"admin\":[],\"notify\":{},\"commiter\":[]}"); models.setFormItems("[]"); - String formId = processModelService.saveProcess(models); + String formId = processModelService.insertProcess(models); if(StringUtils.isNotBlank(formId)){ //初始的流程在部署表也存一份,用来查询 if(StringUtils.isNotBlank(processModelService.deployProcess(formId,null))){ diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 488232c..d11230d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -215,7 +215,7 @@ public class TodoCenterManage { Project declaredProject = projectService.getOne(Wrappers.lambdaQuery(Project.class) .eq(Project::getInstCode, processInstanceId) .eq(Project::getId, projectId)); - VUtils.isTrue(Objects.isNull(projectId)).throwMessage("获取项目ID失败!"); + VUtils.isTrue(Objects.isNull(declaredProject)).throwMessage("获取项目失败!"); // 获取当前项目名称 String projectName = declaredProject.getProjectName(); // 获取当前项目状态