|
@@ -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 { |
|
|
// 若有下一个审核人(当前节点的用户), |
|
|
// 若有下一个审核人(当前节点的用户), |
|
|