Browse Source

延期列表修改

master
CMM 1 year ago
parent
commit
208a4da610
2 changed files with 20 additions and 0 deletions
  1. +17
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java
  2. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java

+ 17
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DelayedApplyManage.java View File

@@ -45,6 +45,7 @@ import com.ningdatech.pmapi.todocenter.constant.WorkNoticeContant;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.wflow.bean.entity.WflowModels;
import com.wflow.contants.HisProInsEndActId;
import com.wflow.exception.BusinessException;
import com.wflow.workflow.bean.dto.OrgInfoDTO;
import com.wflow.workflow.bean.vo.ProcessStartParamsVo;
@@ -53,6 +54,8 @@ import com.wflow.workflow.service.ProcessModelService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
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;
@@ -88,6 +91,7 @@ public class DelayedApplyManage {
private final ProjectLibManage projectLibManage;
private final NoticeManage noticeManage;
private final IProjectInstService projectInstService;
private final HistoryService historyService;

/**
* 延期的-项目列表
@@ -132,6 +136,19 @@ public class DelayedApplyManage {
item.setBuildCycle(StringUtils.isNotBlank(w.getBuildCycle()) ?
Integer.valueOf(w.getBuildCycle()) : null);
item.setPlanAcceptanceTime(w.getPlanAcceptanceTime());
// 判断当前项目是否已经开启了延期申请并且没有审批完成
String instCode = w.getInstCode();
// 获取流程通过后的流程实例
HistoricProcessInstance newInstance = historyService.createHistoricProcessInstanceQuery()
.processInstanceId(instCode)
.singleResult();
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class)
.eq(ProjectInst::getInstCode, instCode));
Integer instType = projectInst.getInstType();
if (InstTypeEnum.APPLY_DELAY.getCode().equals(instType) &&
!HisProInsEndActId.END.equals(newInstance.getEndActivityId())){
item.setCanDelayApply(Boolean.FALSE);
}
return item;
});
return PageVo.of(records, total);


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectLibListItemVO.java View File

@@ -133,6 +133,9 @@ public class ProjectLibListItemVO {
@ApiModelProperty("是否有上级条线主管部门 0没有 1有")
private Integer isHigherSuperOrg;

@ApiModelProperty("是否可以申请延期")
private Boolean canDelayApply = Boolean.TRUE;

//预审申报时候 需不需要上传上级条线意见文件
private Boolean needUploadSuperLineFile;
public Boolean getNeedUploadSuperLineFile() {


Loading…
Cancel
Save