瀏覽代碼

重大项目联审

master
PoffyZhang 1 年之前
父節點
當前提交
1556c225f0
共有 3 個文件被更改,包括 23 次插入6 次删除
  1. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProcessCommentRes.java
  2. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/contants/TaskContant.java
  3. +14
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java

+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/res/ProcessCommentRes.java 查看文件

@@ -29,6 +29,9 @@ public class ProcessCommentRes {
@ApiModelProperty("流程步骤")
private String stepName;

@ApiModelProperty("节点ID")
private String nodeId;

@ApiModelProperty("审批状态")
private String status;



+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/contants/TaskContant.java 查看文件

@@ -9,6 +9,7 @@ import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
* @Date 2023/1/18 11:00
*/
public interface TaskContant {

class Host {
public static final String HOST_ZPF = "LAPTOP-NQGEQP03";
public static final String HOST_CMM2 = "DESKTOP-KN1L6HL";
@@ -37,4 +38,9 @@ public interface TaskContant {
ProjectProcessStageEnum.APPLY_BORROW.getCode()
};
}

class ProvinceReview{

public static final String END_NODE_ID = "结束";
}
}

+ 14
- 6
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java 查看文件

@@ -11,9 +11,11 @@ import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.provincial.model.res.ProcessCommentRes;
import com.ningdatech.pmapi.provincial.model.res.ProvincialProjectRes;
import com.ningdatech.pmapi.provincial.model.res.SjApiResponse;
import com.ningdatech.pmapi.provincial.service.IJoinReviewProvincialBureauService;
import com.ningdatech.pmapi.scheduler.contants.TaskContant;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -52,8 +54,7 @@ public class CheckProvincialReviewResultTask {
//1. 定时取 省级部门联审中的项目 去取项目
List<Project> projectList = projectService.list(Wrappers.lambdaQuery(Project.class)
.eq(Project::getStage, ProjectStatusEnum.NOT_APPROVED.getCode())
.in(Project::getStatus, Lists.newArrayList(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode(),
ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode(),ProjectStatusEnum.PRE_APPLYING.getCode()))
.eq(Project::getStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode())
.ge(Project::getDeclareAmount, ProjectDeclareConst.Number.DECLARE_AMOUNT_JUDGEMENT)
.eq(Project::getAreaCode, RegionConst.RC_LS)
.orderByAsc(Project::getCreateOn));
@@ -77,11 +78,18 @@ public class CheckProvincialReviewResultTask {
ProvincialProjectRes.class);

if(CollUtil.isNotEmpty(projectRes.getProcessComment())){
List<ProcessCommentRes> processComments = projectRes.getProcessComment();
log.info("此项目 【{}】 返回了审批信息",projectRes.getProjectId());
//在省级联审 才调状态机 否则 只改变 联审结果
if(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode().equals(
project.getStatus())){
stateMachineUtils.pass(project);
//取到最后一个审批元素
ProcessCommentRes lastProcessComment = processComments.get(processComments.size() - 1);
//最后一个 节点 nodeId 是结束 说明已经批完
if(StringUtils.isNotBlank(lastProcessComment.getNodeId()) &&
TaskContant.ProvinceReview.END_NODE_ID.equals(lastProcessComment.getNodeId())){
//在省级联审 才调状态机 否则 只改变 联审结果
if(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode().equals(
project.getStatus())){
stateMachineUtils.pass(project);
}
}
project.setUpdateOn(LocalDateTime.now());
//保存审核结果


Loading…
取消
儲存