Browse Source

修改审批处理

tags/24080901
WendyYang 8 months ago
parent
commit
70fbba7565
16 changed files with 87 additions and 67 deletions
  1. +9
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/common/enumeration/ProjectProcessStageEnum.java
  2. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/performance/manage/PerformanceAppraisalPlanManage.java
  3. +1
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java
  4. +3
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionPlanManage.java
  5. +9
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java
  6. +0
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PrequalificationDeclaredProjectManage.java
  7. +10
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/PurchaseInst.java
  8. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/ConstructionPlanReviewHandle.java
  9. +14
    -15
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/DeptUnitedReviewHandle.java
  10. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/PreliminaryPreviewHandle.java
  11. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/ProjectFinalInspectionHandle.java
  12. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/UnitInnerAuditHandle.java
  13. +4
    -20
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java
  14. +22
    -5
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/ProjectInst.java
  15. +8
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java
  16. +2
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java

+ 9
- 3
hz-pm-api/src/main/java/com/hz/pm/api/common/enumeration/ProjectProcessStageEnum.java View File

@@ -4,7 +4,9 @@ import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;


import java.util.Arrays;
import java.util.Objects; import java.util.Objects;
import java.util.Optional;


/** /**
* <p> * <p>
@@ -25,11 +27,11 @@ public enum ProjectProcessStageEnum {
PROJECT_PREQUALIFICATION_APPROVAL_PROCESS(2, "项目预审审批流程"), PROJECT_PREQUALIFICATION_APPROVAL_PROCESS(2, "项目预审审批流程"),
DEPARTMENT_JOINT_APPROVAL_PROCESS(3, "部门联合审批流程"), DEPARTMENT_JOINT_APPROVAL_PROCESS(3, "部门联合审批流程"),
CONSTRUCTION_PROJECT_APPROVAL_PROCESS(4, "建设方案审批流程"), CONSTRUCTION_PROJECT_APPROVAL_PROCESS(4, "建设方案审批流程"),
PROJECT_RECORD_APPROVAL_PROCESS(8, "立项备案审批流程"),
XC_APPROVAL_PROCESS(9, "信创审批流程"),
ACCEPTANCE_DECLARATION_APPROVAL_PROCESS(5, "验收申报审批流程"), ACCEPTANCE_DECLARATION_APPROVAL_PROCESS(5, "验收申报审批流程"),
APPLY_DELAY(6, "申请延期审批流程"), APPLY_DELAY(6, "申请延期审批流程"),
APPLY_BORROW(7, "申请借阅审批流程");
APPLY_BORROW(7, "申请借阅审批流程"),
PROJECT_RECORD_APPROVAL_PROCESS(8, "立项备案审批流程"),
XC_APPROVAL_PROCESS(9, "信创审批流程");


private final Integer code; private final Integer code;
private final String desc; private final String desc;
@@ -46,4 +48,8 @@ public enum ProjectProcessStageEnum {
return StringUtils.EMPTY; return StringUtils.EMPTY;
} }


public static Optional<ProjectProcessStageEnum> get(Integer code) {
return Arrays.stream(values()).filter(w -> w.getCode().equals(code)).findFirst();
}

} }

+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/performance/manage/PerformanceAppraisalPlanManage.java View File

@@ -398,7 +398,7 @@ public class PerformanceAppraisalPlanManage {
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class)
.in(ProjectInst::getProjectId, allVersionProjectIds) .in(ProjectInst::getProjectId, allVersionProjectIds)
.eq(ProjectInst::getInstType, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()) .eq(ProjectInst::getInstType, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode())
.orderByDesc(ProjectInst::getCreatOn)
.orderByDesc(ProjectInst::getCreateOn)
.last(BizConst.LIMIT_1)); .last(BizConst.LIMIT_1));


if (Objects.isNull(projectInst)) { if (Objects.isNull(projectInst)) {


+ 1
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java View File

@@ -657,10 +657,8 @@ public class ConstructionManage {


ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setInstType(ProjectProcessStageEnum.XC_APPROVAL_PROCESS.getCode());
projectInst.setInstType(ProjectProcessStageEnum.XC_APPROVAL_PROCESS);
projectInst.setProjectId(req.getProjectId()); projectInst.setProjectId(req.getProjectId());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setCreatOn(projectInst.getUpdateOn());
projectInstService.save(projectInst); projectInstService.save(projectInst);
log.info("信创审查提交成功 【{}】", instanceId); log.info("信创审查提交成功 【{}】", instanceId);




+ 3
- 5
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionPlanManage.java View File

@@ -184,9 +184,9 @@ public class ConstructionPlanManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setCreateOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now()); projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode());
projectInst.setInstType(ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS);
projectInstService.save(projectInst); projectInstService.save(projectInst);


return project; return project;
@@ -233,9 +233,7 @@ public class ConstructionPlanManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setInstType(InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode());
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(InstTypeEnum.CONSTRUCTION_PLAN_REVIEW);
projectInstService.save(projectInst); projectInstService.save(projectInst);
} catch (Exception e) { } catch (Exception e) {
log.error("提交建设方案 项目信息修改 错误 ", e); log.error("提交建设方案 项目信息修改 错误 ", e);


+ 9
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java View File

@@ -30,6 +30,7 @@ import com.hz.pm.api.projectlib.manage.ProjectLibManage;
import com.hz.pm.api.projectlib.model.dto.ProjectDTO; import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
import com.hz.pm.api.projectlib.model.entity.Project; import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.entity.ProjectAnnualPaymentPlan; import com.hz.pm.api.projectlib.model.entity.ProjectAnnualPaymentPlan;
import com.hz.pm.api.projectlib.model.entity.ProjectInst;
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum;
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum;
import com.hz.pm.api.projectlib.model.enumeration.ProjectTypeNewEnum; import com.hz.pm.api.projectlib.model.enumeration.ProjectTypeNewEnum;
@@ -38,6 +39,7 @@ import com.hz.pm.api.projectlib.model.req.ProjectListReq;
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO;
import com.hz.pm.api.projectlib.model.vo.TenderListInfoVO; import com.hz.pm.api.projectlib.model.vo.TenderListInfoVO;
import com.hz.pm.api.projectlib.service.IProjectAnnualPaymentPlanService; import com.hz.pm.api.projectlib.service.IProjectAnnualPaymentPlanService;
import com.hz.pm.api.projectlib.service.IProjectInstService;
import com.hz.pm.api.projectlib.service.IProjectService; import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.sys.manage.NoticeManage; import com.hz.pm.api.sys.manage.NoticeManage;
import com.hz.pm.api.user.security.model.UserFullInfoDTO; import com.hz.pm.api.user.security.model.UserFullInfoDTO;
@@ -93,6 +95,7 @@ public class FinalAcceptanceManage {
private final IProjectAnnualPaymentPlanService projectAnnualPaymentPlanService; private final IProjectAnnualPaymentPlanService projectAnnualPaymentPlanService;
private final StateMachineUtil stateMachineUtil; private final StateMachineUtil stateMachineUtil;
private final TenderStateMachineUtil tenderStateMachineUtil; private final TenderStateMachineUtil tenderStateMachineUtil;
private final IProjectInstService projectInstService;


/** /**
* 待采购的-项目列表 * 待采购的-项目列表
@@ -259,6 +262,7 @@ public class FinalAcceptanceManage {
ProcessStartParamsVo params = new ProcessStartParamsVo(); ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(declaredProjectManage.buildUser(user.getUserId())); params.setUser(declaredProjectManage.buildUser(user.getUserId()));
params.setProcessUsers(Collections.emptyMap()); params.setProcessUsers(Collections.emptyMap());
params.setFormData(Collections.emptyMap());
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 // 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息
Map<String, OrgInfoDTO> orgMap = declaredProjectManage.buildOrgModelMap(user.getUserId(), project); Map<String, OrgInfoDTO> orgMap = declaredProjectManage.buildOrgModelMap(user.getUserId(), project);
String instanceId = processInstanceService.startProcessLs(model, params, orgMap); String instanceId = processInstanceService.startProcessLs(model, params, orgMap);
@@ -274,6 +278,11 @@ public class FinalAcceptanceManage {
purchaseInst.setInstType(ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS.getCode()); purchaseInst.setInstType(ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS.getCode());
purchaseInstService.save(purchaseInst); purchaseInstService.save(purchaseInst);
boolean allFinalInspected = purchases.stream().noneMatch(w -> StrUtils.isBlank(w.getFinalInspectionMaterials())); boolean allFinalInspected = purchases.stream().noneMatch(w -> StrUtils.isBlank(w.getFinalInspectionMaterials()));
ProjectInst projectInst = new ProjectInst();
projectInst.setInstType(ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS.getCode());
projectInst.setInstCode(instanceId);
projectInst.setProjectId(req.getProjectId());
projectInstService.save(projectInst);
if (allFinalInspected) { if (allFinalInspected) {
stateMachineUtil.pass(project); stateMachineUtil.pass(project);
projectService.updateById(project); projectService.updateById(project);


+ 0
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PrequalificationDeclaredProjectManage.java View File

@@ -226,8 +226,6 @@ public class PrequalificationDeclaredProjectManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(ProjectProcessStageEnum.PROJECT_PREQUALIFICATION_APPROVAL_PROCESS.getCode()); projectInst.setInstType(ProjectProcessStageEnum.PROJECT_PREQUALIFICATION_APPROVAL_PROCESS.getCode());
projectInstService.save(projectInst); projectInstService.save(projectInst);
} catch (Exception e) { } catch (Exception e) {


+ 10
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/PurchaseInst.java View File

@@ -1,6 +1,7 @@
package com.hz.pm.api.projectdeclared.model.entity; package com.hz.pm.api.projectdeclared.model.entity;


import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.hz.pm.api.common.enumeration.ProjectProcessStageEnum;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;


@@ -36,10 +37,18 @@ public class PurchaseInst {


@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
private LocalDateTime creatOn;
private LocalDateTime createOn;


@ApiModelProperty("创建人") @ApiModelProperty("创建人")
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
private Long createBy; private Long createBy;


public void setInstType(ProjectProcessStageEnum processStage) {
this.instType = processStage.getCode();
}

public void setInstType(Integer instType) {
this.instType = instType;
}

} }

+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/ConstructionPlanReviewHandle.java View File

@@ -64,7 +64,7 @@ public class ConstructionPlanReviewHandle extends AbstractProcessBusinessHandle
.in(ProjectInst::getProjectId, allVersionProjectIds) .in(ProjectInst::getProjectId, allVersionProjectIds)
.eq(ProjectInst::getInstType, InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode()) .eq(ProjectInst::getInstType, InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode())
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) .ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE)
.orderByDesc(ProjectInst::getCreatOn)
.orderByDesc(ProjectInst::getCreateOn)
.last(BizConst.LIMIT_1)); .last(BizConst.LIMIT_1));
ProcessProgressVo instanceDetail = null; ProcessProgressVo instanceDetail = null;
// 未找到当前版本项目的建设方案审核流程且当前项目版本号大于1(是被驳回重新申报的项目) // 未找到当前版本项目的建设方案审核流程且当前项目版本号大于1(是被驳回重新申报的项目)


+ 14
- 15
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/DeptUnitedReviewHandle.java View File

@@ -55,8 +55,7 @@ public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle {


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

ProcessDetailVO retProcessDetail = new ProcessDetailVO();
//查出历史版本的 所有项目ID //查出历史版本的 所有项目ID
List<Long> allVersionProjectIds = projectService.allVersionProjectIds(projectId); List<Long> allVersionProjectIds = projectService.allVersionProjectIds(projectId);


@@ -65,43 +64,43 @@ public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle {
.in(ProjectInst::getProjectId, allVersionProjectIds) .in(ProjectInst::getProjectId, allVersionProjectIds)
.eq(ProjectInst::getInstType, InstTypeEnum.DEPT_UNITED_REVIEW.getCode()) .eq(ProjectInst::getInstType, InstTypeEnum.DEPT_UNITED_REVIEW.getCode())
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) .ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE)
.orderByDesc(ProjectInst::getCreatOn)
.orderByDesc(ProjectInst::getCreateOn)
.last(BizConst.LIMIT_1)); .last(BizConst.LIMIT_1));
if (Objects.isNull(projectInst)) { if (Objects.isNull(projectInst)) {
processDetailVO.setStepStatus(StepStatusEnum.NOT_START);
processDetailVO.setProcessName(CommonConst.DEPT_UNITED_REVIEW);
processSchedule.add(processDetailVO);
retProcessDetail.setStepStatus(StepStatusEnum.NOT_START);
retProcessDetail.setProcessName(CommonConst.DEPT_UNITED_REVIEW);
processSchedule.add(retProcessDetail);
return; return;
} }
String instCode = projectInst.getInstCode(); String instCode = projectInst.getInstCode();
ProcessProgressVo instanceDetail = processInstanceService.getProgressInstanceDetail(null, instCode); ProcessProgressVo instanceDetail = processInstanceService.getProgressInstanceDetail(null, instCode);
String status = instanceDetail.getStatus(); String status = instanceDetail.getStatus();
if (ProcessStatusEnum.UNDER_REVIEW.getDesc().equals(status)) { if (ProcessStatusEnum.UNDER_REVIEW.getDesc().equals(status)) {
processDetailVO.setStepStatus(StepStatusEnum.ON_GOING);
retProcessDetail.setStepStatus(StepStatusEnum.ON_GOING);
} else if (ProcessStatusEnum.BE_REJECTED.getDesc().equals(status)) { } else if (ProcessStatusEnum.BE_REJECTED.getDesc().equals(status)) {
processDetailVO.setStepStatus(StepStatusEnum.REJECTED);
retProcessDetail.setStepStatus(StepStatusEnum.REJECTED);
} else if (ProcessStatusEnum.APPROVED.getDesc().equals(status)) { } else if (ProcessStatusEnum.APPROVED.getDesc().equals(status)) {
processDetailVO.setStepStatus(StepStatusEnum.COMPLETED);
retProcessDetail.setStepStatus(StepStatusEnum.COMPLETED);
} }
// 装配节点审核人员信息 // 装配节点审核人员信息
List<ProgressNode> progressInfo = instanceDetail.getProgressInfo(); List<ProgressNode> progressInfo = instanceDetail.getProgressInfo();
if (CollUtil.isNotEmpty(progressInfo)) { if (CollUtil.isNotEmpty(progressInfo)) {
buildUserUtils.buildUserByProcessInfo(progressInfo); buildUserUtils.buildUserByProcessInfo(progressInfo);
// 根据流程处理详情获取流程完成时间 // 根据流程处理详情获取流程完成时间
if (StepStatusEnum.contains(processDetailVO.getStepStatus(),
if (StepStatusEnum.contains(retProcessDetail.getStepStatus(),
Lists.newArrayList(StepStatusEnum.REJECTED, Lists.newArrayList(StepStatusEnum.REJECTED,
StepStatusEnum.COMPLETED))) { StepStatusEnum.COMPLETED))) {
ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1);
LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime());
processDetailVO.setFinishTime(finishTime);
retProcessDetail.setFinishTime(finishTime);
} }
} else { } else {
LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(instanceDetail.getStartTime()); LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(instanceDetail.getStartTime());
processDetailVO.setFinishTime(finishTime);
retProcessDetail.setFinishTime(finishTime);
} }
processDetailVO.setProcessProgressVo(instanceDetail);
processDetailVO.setProcessName(CommonConst.DEPT_UNITED_REVIEW);
processSchedule.add(processDetailVO);
retProcessDetail.setProcessProgressVo(instanceDetail);
retProcessDetail.setProcessName(CommonConst.DEPT_UNITED_REVIEW);
processSchedule.add(retProcessDetail);
} }


@Override @Override


+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/PreliminaryPreviewHandle.java View File

@@ -68,7 +68,7 @@ public class PreliminaryPreviewHandle extends AbstractProcessBusinessHandle {
.in(ProjectInst::getProjectId, allVersionProjectIds) .in(ProjectInst::getProjectId, allVersionProjectIds)
.eq(ProjectInst::getInstType, InstTypeEnum.PRELIMINARY_PREVIEW.getCode()) .eq(ProjectInst::getInstType, InstTypeEnum.PRELIMINARY_PREVIEW.getCode())
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) .ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE)
.orderByDesc(ProjectInst::getCreatOn)
.orderByDesc(ProjectInst::getCreateOn)
.last("limit 1")); .last("limit 1"));
ProcessProgressVo instanceDetail = null; ProcessProgressVo instanceDetail = null;
// 未找到当前版本项目的预审审核流程且当前项目版本号大于1(是被驳回重新申报的项目或者建设方案申报的项目) // 未找到当前版本项目的预审审核流程且当前项目版本号大于1(是被驳回重新申报的项目或者建设方案申报的项目)


+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/ProjectFinalInspectionHandle.java View File

@@ -62,7 +62,7 @@ public class ProjectFinalInspectionHandle extends AbstractProcessBusinessHandle
.in(ProjectInst::getProjectId, allVersionProjectIds) .in(ProjectInst::getProjectId, allVersionProjectIds)
.eq(ProjectInst::getInstType, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()) .eq(ProjectInst::getInstType, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode())
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) .ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE)
.orderByDesc(ProjectInst::getCreatOn)
.orderByDesc(ProjectInst::getCreateOn)
.last(BizConst.LIMIT_1)); .last(BizConst.LIMIT_1));


if (Objects.isNull(projectInst)){ if (Objects.isNull(projectInst)){


+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/UnitInnerAuditHandle.java View File

@@ -67,7 +67,7 @@ public class UnitInnerAuditHandle extends AbstractProcessBusinessHandle {
.in(ProjectInst::getProjectId, allVersionProjectIds) .in(ProjectInst::getProjectId, allVersionProjectIds)
.eq(ProjectInst::getInstType, InstTypeEnum.UNIT_INNER_AUDIT.getCode()) .eq(ProjectInst::getInstType, InstTypeEnum.UNIT_INNER_AUDIT.getCode())
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) .ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE)
.orderByDesc(ProjectInst::getCreatOn)
.orderByDesc(ProjectInst::getCreateOn)
.last(BizConst.LIMIT_1)); .last(BizConst.LIMIT_1));
ProcessProgressVo instanceDetail = null; ProcessProgressVo instanceDetail = null;




+ 4
- 20
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java View File

@@ -763,7 +763,7 @@ public class ProjectLibManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setCreateOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now()); projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(ProjectProcessStageEnum.ORG_INTERNAL_APPROVAL_PROCESS.getCode()); projectInst.setInstType(ProjectProcessStageEnum.ORG_INTERNAL_APPROVAL_PROCESS.getCode());
projectInstService.save(projectInst); projectInstService.save(projectInst);
@@ -785,8 +785,6 @@ public class ProjectLibManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(processStage.getCode()); projectInst.setInstType(processStage.getCode());
projectInstService.save(projectInst); projectInstService.save(projectInst);
return project; return project;
@@ -816,9 +814,7 @@ public class ProjectLibManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode());
projectInst.setInstType(ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS);
projectInstService.save(projectInst); projectInstService.save(projectInst);
return project; return project;
} }
@@ -1046,8 +1042,6 @@ public class ProjectLibManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(instType); projectInst.setInstType(instType);
projectInstService.save(projectInst); projectInstService.save(projectInst);


@@ -1076,8 +1070,6 @@ public class ProjectLibManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(instType); projectInst.setInstType(instType);
projectInstService.save(projectInst); projectInstService.save(projectInst);


@@ -1115,8 +1107,6 @@ public class ProjectLibManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(instType); projectInst.setInstType(instType);
projectInstService.save(projectInst); projectInstService.save(projectInst);


@@ -1152,8 +1142,6 @@ public class ProjectLibManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(instType); projectInst.setInstType(instType);
projectInstService.save(projectInst); projectInstService.save(projectInst);


@@ -1337,9 +1325,7 @@ public class ProjectLibManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setInstType(InstTypeEnum.APPLY_DELAY.getCode());
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(InstTypeEnum.APPLY_DELAY);
projectInstService.save(projectInst); projectInstService.save(projectInst);
} }


@@ -1367,9 +1353,7 @@ public class ProjectLibManage {
ProjectInst projectInst = new ProjectInst(); ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId()); projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId); projectInst.setInstCode(instanceId);
projectInst.setInstType(InstTypeEnum.APPLY_BORROW.getCode());
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInst.setInstType(InstTypeEnum.APPLY_BORROW);
projectInstService.save(projectInst); projectInstService.save(projectInst);
} }




+ 22
- 5
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/ProjectInst.java View File

@@ -1,17 +1,19 @@
package com.hz.pm.api.projectlib.model.entity; package com.hz.pm.api.projectlib.model.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;

import com.hz.pm.api.common.enumeration.ProjectProcessStageEnum;
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;


/** /**
* <p> * <p>
*
*
* </p> * </p>
* *
* @author Poffy * @author Poffy
@@ -38,8 +40,23 @@ public class ProjectInst implements Serializable {
private Integer instType; private Integer instType;


@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
private LocalDateTime creatOn;
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createOn;


@ApiModelProperty("修改时间") @ApiModelProperty("修改时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateOn; private LocalDateTime updateOn;

public void setInstType(InstTypeEnum instType) {
this.instType = instType.getCode();
}

public void setInstType(ProjectProcessStageEnum processStage) {
this.instType = processStage.getCode();
}

public void setInstType(Integer instType) {
this.instType = instType;
}

} }

+ 8
- 4
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java View File

@@ -190,11 +190,14 @@ public class HandlerManage {
// 判断是否 保存建设建议信息 // 判断是否 保存建设建议信息
saveConstructionSuggestInfo(instance.getId(), project); saveConstructionSuggestInfo(instance.getId(), project);
break; break;
case ON_PURCHASING:
case TO_BE_FIRST_INSPECTED:
case ON_FIRST_INSPECTED: case ON_FIRST_INSPECTED:
purchasePassedCallback(project, instanceId, ProjectProcessStageEnum.XC_APPROVAL_PROCESS);
break;
case TO_BE_FINALLY_INSPECTED:
case ON_FINALLY_INSPECTED: case ON_FINALLY_INSPECTED:
purchasePassedCallback(project, instanceId, ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS);
ProjectProcessStageEnum processStage = ProjectProcessStageEnum.get(instTypeEnum.getCode())
.orElseThrow(() -> BizException.wrap("不支持的流程类型"));
purchasePassedCallback(project, instanceId, processStage);
break; break;
default: default:
throw new BizException("传入项目状态错误: " + project.getStatus()); throw new BizException("传入项目状态错误: " + project.getStatus());
@@ -237,7 +240,8 @@ public class HandlerManage {
tenderStateMachineUtil.pass(currPurchase); tenderStateMachineUtil.pass(currPurchase);
purchaseService.updateById(currPurchase); purchaseService.updateById(currPurchase);


Collection<PurchaseInst> lastInstList = BizUtils.groupFirst(instList, PurchaseInst::getBidId, Comparator.comparing(PurchaseInst::getCreatOn).reversed());
Collection<PurchaseInst> lastInstList = BizUtils.groupFirst(instList, PurchaseInst::getBidId,
Comparator.comparing(PurchaseInst::getCreateOn).reversed());
Set<String> instCodes = CollUtils.fieldSet(lastInstList, PurchaseInst::getInstCode); Set<String> instCodes = CollUtils.fieldSet(lastInstList, PurchaseInst::getInstCode);
if (instCodes.size() != purchases.size()) { if (instCodes.size() != purchases.size()) {
return; return;


+ 2
- 4
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java View File

@@ -1136,8 +1136,6 @@ public class TodoCenterManage {
newPi.setProjectId(project.getId()); newPi.setProjectId(project.getId());
newPi.setInstType(oldInst.getInstType()); newPi.setInstType(oldInst.getInstType());
newPi.setInstCode(instCode); newPi.setInstCode(instCode);
newPi.setCreatOn(LocalDateTime.now());
newPi.setUpdateOn(LocalDateTime.now());
projectInstService.save(newPi); projectInstService.save(newPi);


projectService.reverseNewest(project.getProjectCode(), project.getId()); projectService.reverseNewest(project.getProjectCode(), project.getId());
@@ -1364,11 +1362,11 @@ public class TodoCenterManage {
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class)
.eq(ProjectInst::getProjectId, projectId) .eq(ProjectInst::getProjectId, projectId)
.eq(ProjectInst::getInstType, InstTypeEnum.PRELIMINARY_PREVIEW.getCode()) .eq(ProjectInst::getInstType, InstTypeEnum.PRELIMINARY_PREVIEW.getCode())
.orderByDesc(ProjectInst::getCreatOn)
.orderByDesc(ProjectInst::getCreateOn)
.last("limit 1")); .last("limit 1"));
LocalDateTime time; LocalDateTime time;
if (Objects.nonNull(projectInst)) { if (Objects.nonNull(projectInst)) {
time = projectInst.getCreatOn();
time = projectInst.getCreateOn();
paramsMap.put("time", NdDateUtils.format(time, "yyyy-MM-dd HH:mm")); paramsMap.put("time", NdDateUtils.format(time, "yyyy-MM-dd HH:mm"));
} else { } else {
paramsMap.put("time", null); paramsMap.put("time", null);


Loading…
Cancel
Save