ソースを参照

重大项目

tags/24080901
PoffyZhang 1年前
コミット
de54cfec41
11個のファイルの変更133行の追加18行の削除
  1. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/common/constant/CommonConst.java
  2. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java
  3. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java
  4. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java
  5. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java
  6. +12
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java
  7. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java
  8. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java
  9. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java
  10. +103
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProvinceUnitedReviewHandle.java
  11. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java

+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/common/constant/CommonConst.java ファイルの表示

@@ -21,7 +21,9 @@ public interface CommonConst {
String PROJECT_DECLARE = "项目申报";
String UNIT_INNER_AUDIT = "单位内部审核";
String PRELIMINARY_PREVIEW = "项目预审";

String DEPT_UNITED_REVIEW = "部门联审";
String PROVINCE_UNITED_REVIEW = "省级部门联审";
String ANNUAL_PLAN = "年度计划";
String CONSTRUCTION_PLAN_REVIEW = "建设方案评审";
String PROJECT_APPROVAL = "立项批复";


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/AnnualPlanHandle.java ファイルの表示

@@ -28,13 +28,13 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*;
* @author CMM
* @since 2023/02/24 14:35
*/
@Order(5)
@Order(6)
@Component
public class AnnualPlanHandle extends AbstractProcessBusinessHandle {
private final INdProjectStatusChangeService projectStatusChangeService;
private final IProjectService projectService;

private Integer order = 5;
private Integer order = 6;

/**
* 项目状态为:年度计划中之前的状态


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ArchivedHandle.java ファイルの表示

@@ -24,13 +24,13 @@ import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService;
* @author CMM
* @since 2023/02/24 14:35
*/
@Order(11)
@Order(12)
@Component
public class ArchivedHandle extends AbstractProcessBusinessHandle {
private final IProjectService projectService;
private final INdProjectStatusChangeService projectStatusChangeService;

private Integer order = 11;
private Integer order = 12;

public ArchivedHandle( IProjectService projectService, INdProjectStatusChangeService projectStatusChangeService){
this.projectService = projectService;


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ConstructionPlanReviewHandle.java ファイルの表示

@@ -34,7 +34,7 @@ import com.wflow.workflow.service.ProcessInstanceService;
* @author CMM
* @since 2023/02/24 14:35
*/
@Order(6)
@Order(7)
@Component
public class ConstructionPlanReviewHandle extends AbstractProcessBusinessHandle {

@@ -44,7 +44,7 @@ public class ConstructionPlanReviewHandle extends AbstractProcessBusinessHandle
private final ProjectVersionUtil projectVersionUtil;
private final IProjectService projectService;

private Integer order = 6;
private Integer order = 7;

public ConstructionPlanReviewHandle(IProjectInstService projectInstService, ProcessInstanceService processInstanceService, BuildUserUtils buildUserUtils, ProjectVersionUtil projectVersionUtil, IProjectService projectService){
this.projectInstService = projectInstService;


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/DeptUnitedReviewHandle.java ファイルの表示

@@ -32,7 +32,7 @@ import com.wflow.workflow.service.ProcessInstanceService;
* @author CMM
* @since 2023/02/24 14:35
*/
@Order(4)
@Order(5)
@Component
public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle {

@@ -43,7 +43,7 @@ public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle {
private final BuildUserUtils buildUserUtils;
private final ProjectVersionUtil projectVersionUtil;

private Integer order = 4;
private Integer order = 5;

public DeptUnitedReviewHandle(IProjectInstService projectInstService,IProjectService projectService
, ProcessInstanceService processInstanceService, BuildUserUtils buildUserUtils,


+ 12
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProcessExecuteChainHandle.java ファイルの表示

@@ -3,8 +3,10 @@ package com.ningdatech.pmapi.projectlib.handle;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.collect.Lists;
import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.common.constant.ProjectDeclareConst;
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
import com.ningdatech.pmapi.common.statemachine.contants.RegionContant;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.wflow.bean.entity.WflowModels;
@@ -67,6 +69,8 @@ public class ProcessExecuteChainHandle {
processBusinessHandle.setOrder(6);
}
}

//建设方案
if(processBusinessHandle instanceof ConstructionPlanReviewHandle){
WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class)
.eq(WflowModels::getRegionCode, project.getAreaCode())
@@ -77,9 +81,15 @@ public class ProcessExecuteChainHandle {
handles.add(processBusinessHandle);
}
}
continue;
}else if(processBusinessHandle instanceof ProvinceUnitedReviewHandle){
//省级联审
if (StateMachineUtils.isCityProject(project) && StateMachineUtils.judgeDeclareAmount(project,
ProjectDeclareConst.Number.DECLARE_AMOUNT_JUDGEMENT)){
handles.add(processBusinessHandle);
}
}else{
handles.add(processBusinessHandle);
}
handles.add(processBusinessHandle);
}

handles = handles.stream()


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectApprovalHandle.java ファイルの表示

@@ -26,14 +26,14 @@ import static com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum.*;
* @author CMM
* @since 2023/02/24 14:35
*/
@Order(7)
@Order(8)
@Component
public class ProjectApprovalHandle extends AbstractProcessBusinessHandle {
private final INdProjectStatusChangeService projectStatusChangeService;
private final IProjectService projectService;
private final AnnualPlanLibManage annualPlanLibManage;

private Integer order = 7;
private Integer order = 8;

/**
* 项目状态为:待立项批复之前的状态


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectFinalInspectionHandle.java ファイルの表示

@@ -31,7 +31,7 @@ import com.ningdatech.pmapi.common.constant.CommonConst;
* @author CMM
* @since 2023/02/24 14:35
*/
@Order(10)
@Order(11)
@Component
public class ProjectFinalInspectionHandle extends AbstractProcessBusinessHandle {
private final IProjectInstService projectInstService;
@@ -40,7 +40,7 @@ public class ProjectFinalInspectionHandle extends AbstractProcessBusinessHandle

private final IProjectService projectService;

private Integer order = 10;
private Integer order = 11;
public ProjectFinalInspectionHandle(IProjectInstService projectInstService, ProcessInstanceService processInstanceService,
BuildUserUtils buildUserUtils,IProjectService projectService){
this.projectInstService = projectInstService;


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProjectPreliminaryInspectionHandle.java ファイルの表示

@@ -29,13 +29,13 @@ import com.ningdatech.pmapi.projectlib.service.IProjectService;
* @author CMM
* @since 2023/02/24 14:35
*/
@Order(9)
@Order(10)
@Component
public class ProjectPreliminaryInspectionHandle extends AbstractProcessBusinessHandle {
private final INdProjectStatusChangeService projectStatusChangeService;
private final IProjectService projectService;

private Integer order = 9;
private Integer order = 10;

/**
* 项目状态为:建设中及之后的状态


+ 103
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/ProvinceUnitedReviewHandle.java ファイルの表示

@@ -0,0 +1,103 @@
package com.ningdatech.pmapi.projectlib.handle;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.pmapi.common.constant.CommonConst;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectStatusChange;
import com.ningdatech.pmapi.projectlib.service.INdProjectStatusChangeService;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.wflow.workflow.bean.vo.ProcessDetailVO;
import com.wflow.workflow.enums.StepStatusEnum;
import org.apache.commons.lang3.StringUtils;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Objects;

/**
* 省级联审审核处理
*
* @author CMM
* @since 2023/02/24 14:35
*/
@Order(4)
@Component
public class ProvinceUnitedReviewHandle extends AbstractProcessBusinessHandle {
private final IProjectService projectService;
private final INdProjectStatusChangeService projectStatusChangeService;

private Integer order = 4;

public ProvinceUnitedReviewHandle(IProjectService projectService,
INdProjectStatusChangeService projectStatusChangeService){
this.projectService = projectService;
this.projectStatusChangeService = projectStatusChangeService;
}

@Override
void businessHandle(Long projectId, List<ProcessDetailVO> processSchedule) {
ProcessDetailVO processDetailVO = new ProcessDetailVO();

//查询项目
Project project = projectService.getNewProject(projectId);
List<Long> allVersionProjectId = projectService.getAllVersionProjectId(projectId);

// 根据项目ID查询出部门联审流程的流程状态
if (Objects.isNull(project) || StringUtils.isBlank(project.getSjlsResult())){
processDetailVO.setStepStatus(StepStatusEnum.NOT_START);
processDetailVO.setProcessName(CommonConst.PROVINCE_UNITED_REVIEW);
processSchedule.add(processDetailVO);
return;
}

Integer status = project.getStatus();
if (ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode().equals(status)){
processDetailVO.setStepStatus(StepStatusEnum.ON_GOING);
ProjectStatusChange startChange = projectStatusChangeService.getOne(Wrappers.lambdaQuery(ProjectStatusChange.class)
.in(ProjectStatusChange::getProjectId, allVersionProjectId)
.eq(ProjectStatusChange::getBeforeStatus, ProjectStatusEnum.PENDING_PREQUALIFICATION.getDesc())
.eq(ProjectStatusChange::getAfterStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS));
if(Objects.nonNull(startChange)){
processDetailVO.setFinishTime(startChange.getCreateOn());
}
} else if(status.compareTo(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getCode()) > 0){
processDetailVO.setStepStatus(StepStatusEnum.COMPLETED);
ProjectStatusChange passChange = projectStatusChangeService.getOne(Wrappers.lambdaQuery(ProjectStatusChange.class)
.in(ProjectStatusChange::getProjectId, allVersionProjectId)
.eq(ProjectStatusChange::getBeforeStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getDesc())
.eq(ProjectStatusChange::getAfterStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS_SUCCESS));
if(Objects.nonNull(passChange)){
processDetailVO.setFinishTime(passChange.getCreateOn());
}
}else if(status.compareTo(ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED.getCode()) > 0){
processDetailVO.setStepStatus(StepStatusEnum.REJECTED);
ProjectStatusChange rejectChange = projectStatusChangeService.getOne(Wrappers.lambdaQuery(ProjectStatusChange.class)
.in(ProjectStatusChange::getProjectId, allVersionProjectId)
.eq(ProjectStatusChange::getBeforeStatus, ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS.getDesc())
.eq(ProjectStatusChange::getAfterStatus, ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED));
if(Objects.nonNull(rejectChange)){
processDetailVO.setFinishTime(rejectChange.getCreateOn());
}
}else{
processDetailVO.setStepStatus(StepStatusEnum.NOT_START);
processDetailVO.setProcessName(CommonConst.PROVINCE_UNITED_REVIEW);
processSchedule.add(processDetailVO);
return;
}
// processDetailVO.setProcessProgressVo(project.getSjlsResult());
processDetailVO.setContent(project.getSjlsResult());
processDetailVO.setProcessName(CommonConst.PROVINCE_UNITED_REVIEW);
processSchedule.add(processDetailVO);
}

@Override
Integer getOrder() {
return order;
}

@Override
void setOrder(Integer order) {
this.order = order;
}
}

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/handle/TenderPurchaseHandle.java ファイルの表示

@@ -27,13 +27,13 @@ import com.ningdatech.pmapi.projectlib.service.IProjectService;
* @author CMM
* @since 2023/02/24 14:35
*/
@Order(8)
@Order(9)
@Component
public class TenderPurchaseHandle extends AbstractProcessBusinessHandle {
private final INdProjectStatusChangeService projectStatusChangeService;
private final IProjectService projectService;

private Integer order = 8;
private Integer order = 9;

/**
* 项目状态为:建设中及之后的状态


読み込み中…
キャンセル
保存