Quellcode durchsuchen

优化撤回 删除逻辑 去除脏数据

tags/24080901
PoffyZhang vor 1 Jahr
Ursprung
Commit
65966f6c15
4 geänderte Dateien mit 26 neuen und 12 gelöschten Zeilen
  1. +0
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java
  2. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java
  3. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/constant/TodoCenterContant.java
  4. +17
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java

+ 0
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java Datei anzeigen

@@ -234,10 +234,7 @@ public class Project implements Serializable {
@ApiModelProperty("一地创新全省共享项目-是否开启 false:关闭 true:开启")
private Boolean isInnovateWholeProvinceShare;

@TableField(fill = FieldFill.INSERT)
private LocalDateTime createOn;

@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateOn;

@ApiModelProperty("流程实例编号")


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java Datei anzeigen

@@ -303,6 +303,9 @@ public class ProjectDetailVO {
@ApiModelProperty("21位项目编号")
private String projectCode;

private LocalDateTime createOn;
private LocalDateTime updateOn;

public String getProjectTypeName() {
if (Objects.nonNull(this.projectType)) {
Optional.ofNullable(ProjectTypeEnum.getDesc(this.projectType))


+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/constant/TodoCenterContant.java Datei anzeigen

@@ -12,4 +12,10 @@ public interface TodoCenterContant {
public static final String OR_SIGN_FLAG = "MI_END";

}

public class Declared {

public static final String NULL_INST_CODE = "EMPTY";

}
}

+ 17
- 9
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java Datei anzeigen

@@ -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);
}

/**


Laden…
Abbrechen
Speichern