Bläddra i källkod

预审驳回退回修改

master
CMM 1 år sedan
förälder
incheckning
05f777e58c
2 ändrade filer med 21 tillägg och 3 borttagningar
  1. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java
  2. +20
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java

+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java Visa fil

@@ -311,6 +311,7 @@ public class Project implements Serializable {
private Long updateBy;

@ApiModelProperty("项目预审申请单文件ID")

private Long pretrialFileId;

@ApiModelProperty("项目预审申请单文件名")


+ 20
- 3
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java Visa fil

@@ -8,6 +8,7 @@ import java.util.*;
import java.util.stream.Collectors;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.google.common.collect.Lists;
import com.ningdatech.basic.util.NdDateUtils;
import com.ningdatech.file.service.FileService;
@@ -340,6 +341,19 @@ public class HandlerManage {
*/
public void afterBackTodo(Project declaredProject, HistoricProcessInstance instance) {
Long userId = LoginUserUtil.getUserId();
// 获取当前流程实例类型
String instanceId = declaredProject.getInstCode();
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class)
.eq(ProjectInst::getInstCode, instanceId));
Integer instType = projectInst.getInstType();
LambdaUpdateWrapper<Project> updateWrapper = Wrappers.lambdaUpdate();
// 如果是预审审批退回,需要重新盖章,原来盖过章的文件要清空
if (InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType)){
updateWrapper.set(Project::getPretrialFileId,null)
.set(Project::getPretrialFileName,null)
.eq(Project::getId,declaredProject.getId());
}
projectService.update(updateWrapper);
// 给项目创建人、流程发起人发送浙政钉工作通知:【项目名称】的【流程名称】被退回,请及时处理。
//发送消息
noticeManage.sendNotice(instance.getStartUserId(),userId,declaredProject,instance.getProcessDefinitionName(),
@@ -380,14 +394,17 @@ public class HandlerManage {
*/
private void updateRejectProjectStatus(Long userId, Project declaredProject, Integer instType) {
stateMachineUtils.reject(declaredProject);
LambdaUpdateWrapper<Project> updateWrapper = Wrappers.lambdaUpdate();
declaredProject.setUpdateOn(LocalDateTime.now());
declaredProject.setUpdateBy(userId);
projectService.updateById(declaredProject);
// 如果是预审审批驳回,需要重新盖章,原来盖过章的文件要清空
if (InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType)){
declaredProject.setPretrialFileId(null);
declaredProject.setPretrialFileName(null);
updateWrapper.set(Project::getPretrialFileId,null)
.set(Project::getPretrialFileName,null)
.eq(Project::getId,declaredProject.getId());
}
projectService.updateById(declaredProject);
projectService.update(updateWrapper);
}

/**


Laddar…
Avbryt
Spara