|
|
@@ -31,6 +31,7 @@ import com.ningdatech.pmapi.staging.service.IProjectStagingService; |
|
|
|
import com.ningdatech.pmapi.sys.model.entity.Notify; |
|
|
|
import com.ningdatech.pmapi.sys.service.INotifyService; |
|
|
|
import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; |
|
|
|
import com.ningdatech.pmapi.todocenter.constant.TodoCenterContant; |
|
|
|
import com.ningdatech.pmapi.todocenter.service.StatisticsService; |
|
|
|
import com.ningdatech.pmapi.todocenter.utils.BuildUserUtils; |
|
|
|
import com.ningdatech.pmapi.todocenter.utils.PdfUtils; |
|
|
@@ -38,6 +39,7 @@ import com.ningdatech.pmapi.user.entity.UserInfo; |
|
|
|
import com.ningdatech.pmapi.user.service.IUserInfoService; |
|
|
|
import com.ningdatech.pmapi.user.util.LoginUserUtil; |
|
|
|
import com.wflow.contants.HisProInsEndActId; |
|
|
|
import com.wflow.contants.WflowContant; |
|
|
|
import com.wflow.workflow.bean.process.ProgressNode; |
|
|
|
import com.wflow.workflow.bean.process.enums.NodeTypeEnum; |
|
|
|
import com.wflow.workflow.bean.vo.ProcessProgressVo; |
|
|
@@ -49,6 +51,7 @@ import org.flowable.engine.HistoryService; |
|
|
|
import org.flowable.engine.history.HistoricProcessInstance; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.util.HashMap; |
|
|
@@ -325,15 +328,20 @@ public class HandlerManage { |
|
|
|
* @author CMM |
|
|
|
* @since 2023/02/08 |
|
|
|
*/ |
|
|
|
private void updateWithdrawProjectStatus(Long userId, Project declaredProject) { |
|
|
|
try { |
|
|
|
stateMachineUtils.withDraw(declaredProject); |
|
|
|
declaredProject.setUpdateOn(LocalDateTime.now()); |
|
|
|
declaredProject.setUpdateBy(userId); |
|
|
|
projectService.updateById(declaredProject); |
|
|
|
} catch (Exception e) { |
|
|
|
throw new BizException("状态机执行失败!"); |
|
|
|
} |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void updateWithdrawProjectStatus(Long userId, Project declaredProject) { |
|
|
|
// 删除关联表信息 |
|
|
|
projectInstService.remove(Wrappers.lambdaQuery(ProjectInst.class) |
|
|
|
.eq(ProjectInst::getProjectId,declaredProject.getId()) |
|
|
|
.eq(ProjectInst::getInstCode,declaredProject.getInstCode())); |
|
|
|
//删除项目的实例信息 |
|
|
|
historyService.deleteHistoricProcessInstance(declaredProject.getInstCode()); |
|
|
|
|
|
|
|
stateMachineUtils.withDraw(declaredProject); |
|
|
|
declaredProject.setUpdateOn(LocalDateTime.now()); |
|
|
|
declaredProject.setUpdateBy(userId); |
|
|
|
declaredProject.setInstCode(TodoCenterContant.Declared.NULL_INST_CODE); |
|
|
|
projectService.updateById(declaredProject); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|