diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java index 72386fe..c4dbdd2 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java @@ -157,7 +157,7 @@ public class ProjectStateMachineBuilderImpl implements BaseStateMachineBuilder

待初验 .withExternal() .source(ProjectStatus.ON_PURCHASING) - .target(ProjectStatus.TO_BE_FIRST_INSPECTED) + .target(ProjectStatus.ACCEPTED) .event(ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD) .guard(projectPurchaseToAcceptGuard) .and() diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/TenderStateMachineBuilderImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/TenderStateMachineBuilderImpl.java index c1593a1..74ac273 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/TenderStateMachineBuilderImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/TenderStateMachineBuilderImpl.java @@ -90,7 +90,7 @@ public class TenderStateMachineBuilderImpl implements BaseStateMachineBuilder purchaseQuery = Wrappers.lambdaQuery(Purchase.class) .eq(Purchase::getProjectId, req.getProjectId()) + .eq(Purchase::getBidType, BidTypeEnum.BUILD_APP) .apply("LENGTH(NVL(preliminary_inspection_materials,'')) = 0") .last(BizConst.LIMIT_1); if (purchaseService.count(purchaseQuery) == 0) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java index 678200c..2eafd59 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java @@ -20,6 +20,7 @@ import com.hz.pm.api.projectdeclared.model.dto.DeclaredProjectExportDTO; import com.hz.pm.api.projectdeclared.model.entity.Contract; import com.hz.pm.api.projectdeclared.model.entity.Purchase; import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst; +import com.hz.pm.api.projectdeclared.model.enumerization.BidTypeEnum; import com.hz.pm.api.projectdeclared.model.req.SubmitFinallyInspectedReq; import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptProgressStatisticsVO; import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptanceVO; @@ -319,6 +320,7 @@ public class FinalAcceptanceManage { log.info("终验方案项目申报成功 【{}】", instanceId); tenderStateMachineUtil.pass(purchase); + purchase.setFinalInspectionDate(req.getInspectionDate()); purchase.setFinalInspectionMaterials(req.getInspectionMaterials()); purchaseService.updateById(purchase); PurchaseInst purchaseInst = new PurchaseInst(); @@ -341,7 +343,8 @@ public class FinalAcceptanceManage { .in(PurchaseInst::getBidId, purchaseMap.keySet()); List currPurchaseInstList = purchaseInstService.list(purchaseInstQuery); Set finalInspectedBidIds = CollUtils.fieldSet(currPurchaseInstList, PurchaseInst::getBidId); - if (finalInspectedBidIds.size() == purchases.size()) { + int needFinalAcceptCount = CollUtil.count(purchases, w -> BidTypeEnum.BUILD_APP.eq(w.getBidType())); + if (finalInspectedBidIds.size() == needFinalAcceptCount) { projectStateMachineUtil.pass(project); projectService.updateById(project); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/PreInsSaveDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/PreInsSaveDTO.java index 4b85793..a67cea4 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/PreInsSaveDTO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/dto/PreInsSaveDTO.java @@ -5,6 +5,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; +import java.time.LocalDate; import java.util.List; /** @@ -25,6 +26,10 @@ public class PreInsSaveDTO { @ApiModelProperty("标段ID") private Long bidId; + @ApiModelProperty("初验时间") + @NotNull(message = "请选择初验时间") + private LocalDate preliminaryInspectionDate; + @ApiModelProperty("初验材料") @NotBlank(message = "请提交初验材料") private String preliminaryInspectionMaterials; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Purchase.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Purchase.java index 500b8a8..c11b6e2 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Purchase.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Purchase.java @@ -128,6 +128,9 @@ public class Purchase { @ApiModelProperty("采购说明") private String purchaseRemark; + @ApiModelProperty("初验时间") + private LocalDate preliminaryInspectionDate; + @ApiModelProperty("初验材料") private String preliminaryInspectionMaterials; @@ -137,6 +140,9 @@ public class Purchase { @ApiModelProperty("(初验)实际成效指标") private String actualPerformanceIndicators; + @ApiModelProperty("终验时间") + private LocalDate finalInspectionDate; + @ApiModelProperty("终验申报材料") private String finalInspectionMaterials; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/req/SubmitFinallyInspectedReq.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/req/SubmitFinallyInspectedReq.java index 5d3b416..50446a4 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/req/SubmitFinallyInspectedReq.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/req/SubmitFinallyInspectedReq.java @@ -5,6 +5,7 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; +import java.time.LocalDate; /** *

@@ -24,6 +25,10 @@ public class SubmitFinallyInspectedReq { @ApiModelProperty("标段ID") private Long bidId; + @ApiModelProperty("终验时间") + @NotNull(message = "终验时间不能为空") + private LocalDate inspectionDate; + @ApiModelProperty("终验材料") @NotBlank(message = "请提交终验材料") private String inspectionMaterials;