|
|
@@ -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()); |
|
|
|
//保存审核结果 |
|
|
|