Browse Source

项目库导入修改

tags/24080901
CMM 1 year ago
parent
commit
32d85d167c
3 changed files with 26 additions and 20 deletions
  1. +23
    -20
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java
  2. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  3. BIN
      template/丽水市2023年数字化项目年度计划编辑表.xls

+ 23
- 20
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java View File

@@ -1,6 +1,25 @@
package com.ningdatech.pmapi.todocenter.manage; package com.ningdatech.pmapi.todocenter.manage;


import cn.hutool.core.collection.CollUtil;
import static com.ningdatech.pmapi.todocenter.constant.WorkNoticeContant.*;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;

import org.apache.commons.lang3.StringUtils;
import org.flowable.engine.HistoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.task.Comment;
import org.flowable.variable.api.history.HistoricVariableInstance;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.exception.BizException;
@@ -20,7 +39,6 @@ import com.ningdatech.pmapi.staging.enums.MsgTypeEnum;
import com.ningdatech.pmapi.staging.service.IProjectStagingService; import com.ningdatech.pmapi.staging.service.IProjectStagingService;
import com.ningdatech.pmapi.sys.manage.NoticeManage; import com.ningdatech.pmapi.sys.manage.NoticeManage;
import com.ningdatech.pmapi.todocenter.constant.TodoCenterContant; import com.ningdatech.pmapi.todocenter.constant.TodoCenterContant;
import com.ningdatech.pmapi.user.service.IUserInfoService;
import com.ningdatech.pmapi.user.util.LoginUserUtil; import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.wflow.contants.HisProInsEndActId; import com.wflow.contants.HisProInsEndActId;
import com.wflow.workflow.bean.process.ProgressNode; import com.wflow.workflow.bean.process.ProgressNode;
@@ -28,24 +46,10 @@ import com.wflow.workflow.bean.process.enums.NodeTypeEnum;
import com.wflow.workflow.bean.vo.ProcessProgressVo; import com.wflow.workflow.bean.vo.ProcessProgressVo;
import com.wflow.workflow.enums.ProcessHandlerEnum; import com.wflow.workflow.enums.ProcessHandlerEnum;
import com.wflow.workflow.service.ProcessInstanceService; import com.wflow.workflow.service.ProcessInstanceService;

import cn.hutool.core.collection.CollUtil;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.flowable.engine.HistoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.history.HistoricProcessInstance;
import org.flowable.engine.task.Comment;
import org.flowable.variable.api.history.HistoricVariableInstance;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;

import static com.ningdatech.pmapi.todocenter.constant.WorkNoticeContant.*;


/** /**
* @Classname HandlerManage * @Classname HandlerManage
@@ -62,7 +66,6 @@ public class HandlerManage {


private final TaskService taskService; private final TaskService taskService;
private final HistoryService historyService; private final HistoryService historyService;
private final IUserInfoService userInfoService;
private final IProjectService projectService; private final IProjectService projectService;
private final StateMachineUtils stateMachineUtils; private final StateMachineUtils stateMachineUtils;
private final ProcessInstanceService processInstanceService; private final ProcessInstanceService processInstanceService;
@@ -125,7 +128,7 @@ public class HandlerManage {
throw new IllegalStateException("Unexpected value: " + declaredProject.getStatus()); throw new IllegalStateException("Unexpected value: " + declaredProject.getStatus());
} }
//发送消息 //发送消息
noticeManage.sendNotice(currentEmployeeCode,userId,declaredProject,instance.getProcessDefinitionName(),
noticeManage.sendNotice(instance.getStartUserId(),userId,declaredProject,instance.getProcessDefinitionName(),
PASS_MSG_TEMPLATE2,MsgTypeEnum.PROJECT_REVIEW_PASS); PASS_MSG_TEMPLATE2,MsgTypeEnum.PROJECT_REVIEW_PASS);
} else { } else {
// 若有下一个审核人(当前节点的用户), // 若有下一个审核人(当前节点的用户),


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -209,6 +209,7 @@ public class TodoCenterManage {
Project projectInfo = projectInfoMap.get(d.getInstanceId()); Project projectInfo = projectInfoMap.get(d.getInstanceId());
ResToBeProcessedVO res = new ResToBeProcessedVO(); ResToBeProcessedVO res = new ResToBeProcessedVO();
BeanUtils.copyProperties(projectInfo, res); BeanUtils.copyProperties(projectInfo, res);
res.setInstCode(d.getInstanceId());
res.setProjectId(projectInfo.getId()); res.setProjectId(projectInfo.getId());
res.setBuildOrg(projectInfo.getBuildOrgName()); res.setBuildOrg(projectInfo.getBuildOrgName());
res.setDeclaredAmount(projectInfo.getDeclareAmount()); res.setDeclaredAmount(projectInfo.getDeclareAmount());
@@ -524,6 +525,7 @@ public class TodoCenterManage {
ResToBeProcessedVO res = new ResToBeProcessedVO(); ResToBeProcessedVO res = new ResToBeProcessedVO();
Project projectInfo = projectInfoMap.get(d.getInstanceId()); Project projectInfo = projectInfoMap.get(d.getInstanceId());
BeanUtils.copyProperties(projectInfo, res); BeanUtils.copyProperties(projectInfo, res);
res.setInstCode(d.getInstanceId());
res.setBuildOrg(projectInfo.getBuildOrgName()); res.setBuildOrg(projectInfo.getBuildOrgName());
res.setDeclaredAmount(projectInfo.getDeclareAmount()); res.setDeclaredAmount(projectInfo.getDeclareAmount());
res.setProjectId(projectInfo.getId()); res.setProjectId(projectInfo.getId());
@@ -802,6 +804,7 @@ public class TodoCenterManage {
ResToBeProcessedVO res = new ResToBeProcessedVO(); ResToBeProcessedVO res = new ResToBeProcessedVO();
Project project = projectInfoMap.get(d.getInstanceId()); Project project = projectInfoMap.get(d.getInstanceId());
BeanUtils.copyProperties(project, res); BeanUtils.copyProperties(project, res);
res.setInstCode(d.getInstanceId());
res.setNodeId(d.getNodeId()); res.setNodeId(d.getNodeId());
res.setProjectId(project.getId()); res.setProjectId(project.getId());
res.setBuildOrg(project.getBuildOrgName()); res.setBuildOrg(project.getBuildOrgName());


BIN
template/丽水市2023年数字化项目年度计划编辑表.xls View File


Loading…
Cancel
Save