|
@@ -8,6 +8,7 @@ import java.util.*; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DatePattern; |
|
|
import cn.hutool.core.date.DatePattern; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
import com.google.common.collect.Lists; |
|
|
import com.google.common.collect.Lists; |
|
|
import com.ningdatech.basic.util.NdDateUtils; |
|
|
import com.ningdatech.basic.util.NdDateUtils; |
|
|
import com.ningdatech.file.service.FileService; |
|
|
import com.ningdatech.file.service.FileService; |
|
@@ -340,6 +341,19 @@ public class HandlerManage { |
|
|
*/ |
|
|
*/ |
|
|
public void afterBackTodo(Project declaredProject, HistoricProcessInstance instance) { |
|
|
public void afterBackTodo(Project declaredProject, HistoricProcessInstance instance) { |
|
|
Long userId = LoginUserUtil.getUserId(); |
|
|
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(), |
|
|
noticeManage.sendNotice(instance.getStartUserId(),userId,declaredProject,instance.getProcessDefinitionName(), |
|
@@ -380,14 +394,17 @@ public class HandlerManage { |
|
|
*/ |
|
|
*/ |
|
|
private void updateRejectProjectStatus(Long userId, Project declaredProject, Integer instType) { |
|
|
private void updateRejectProjectStatus(Long userId, Project declaredProject, Integer instType) { |
|
|
stateMachineUtils.reject(declaredProject); |
|
|
stateMachineUtils.reject(declaredProject); |
|
|
|
|
|
LambdaUpdateWrapper<Project> updateWrapper = Wrappers.lambdaUpdate(); |
|
|
declaredProject.setUpdateOn(LocalDateTime.now()); |
|
|
declaredProject.setUpdateOn(LocalDateTime.now()); |
|
|
declaredProject.setUpdateBy(userId); |
|
|
declaredProject.setUpdateBy(userId); |
|
|
|
|
|
projectService.updateById(declaredProject); |
|
|
// 如果是预审审批驳回,需要重新盖章,原来盖过章的文件要清空 |
|
|
// 如果是预审审批驳回,需要重新盖章,原来盖过章的文件要清空 |
|
|
if (InstTypeEnum.PRELIMINARY_PREVIEW.getCode().equals(instType)){ |
|
|
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); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|