Explorar el Código

取不到项目 抛异常

tags/24080901
PoffyZhang hace 1 año
padre
commit
723e10199d
Se han modificado 3 ficheros con 5 adiciones y 9 borrados
  1. +0
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java
  2. +4
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java
  3. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 0
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java Ver fichero

@@ -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;


+ 4
- 6
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java Ver fichero

@@ -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))){


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Ver fichero

@@ -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();
// 获取当前项目状态


Cargando…
Cancelar
Guardar