@@ -157,7 +157,7 @@ public class ProjectStateMachineBuilderImpl implements BaseStateMachineBuilder<P | |||||
// 填写试试计划 -> 待初验 | // 填写试试计划 -> 待初验 | ||||
.withExternal() | .withExternal() | ||||
.source(ProjectStatus.ON_PURCHASING) | .source(ProjectStatus.ON_PURCHASING) | ||||
.target(ProjectStatus.TO_BE_FIRST_INSPECTED) | |||||
.target(ProjectStatus.ACCEPTED) | |||||
.event(ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD) | .event(ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD) | ||||
.guard(projectPurchaseToAcceptGuard) | .guard(projectPurchaseToAcceptGuard) | ||||
.and() | .and() | ||||
@@ -90,7 +90,7 @@ public class TenderStateMachineBuilderImpl implements BaseStateMachineBuilder<Pu | |||||
.and() | .and() | ||||
.withExternal() | .withExternal() | ||||
.source(TenderMainStatus.TO_BE_SUBMIT_PURCHASE_CONSTRUCTION_INFO) | .source(TenderMainStatus.TO_BE_SUBMIT_PURCHASE_CONSTRUCTION_INFO) | ||||
.target(TenderMainStatus.TO_BE_SUBMIT_FIRST_INSPECTED_INFO) | |||||
.target(TenderMainStatus.FINALLY_INSPECTED_PASSED) | |||||
.event(TenderStateChangeEvent.SUBMIT_PURCHASE_CONSTRUCTION_INFO) | .event(TenderStateChangeEvent.SUBMIT_PURCHASE_CONSTRUCTION_INFO) | ||||
.guard(purchaseContractRecordToAcceptGuard) | .guard(purchaseContractRecordToAcceptGuard) | ||||
.and() | .and() | ||||
@@ -24,6 +24,7 @@ import com.hz.pm.api.projectdeclared.model.dto.DeclaredProjectExportDTO; | |||||
import com.hz.pm.api.projectdeclared.model.dto.PaymentPlanSupplementDTO; | import com.hz.pm.api.projectdeclared.model.dto.PaymentPlanSupplementDTO; | ||||
import com.hz.pm.api.projectdeclared.model.dto.PreInsSaveDTO; | import com.hz.pm.api.projectdeclared.model.dto.PreInsSaveDTO; | ||||
import com.hz.pm.api.projectdeclared.model.entity.*; | import com.hz.pm.api.projectdeclared.model.entity.*; | ||||
import com.hz.pm.api.projectdeclared.model.enumerization.BidTypeEnum; | |||||
import com.hz.pm.api.projectdeclared.model.req.XcfhxApplyReq; | import com.hz.pm.api.projectdeclared.model.req.XcfhxApplyReq; | ||||
import com.hz.pm.api.projectdeclared.model.vo.*; | import com.hz.pm.api.projectdeclared.model.vo.*; | ||||
import com.hz.pm.api.projectdeclared.service.*; | import com.hz.pm.api.projectdeclared.service.*; | ||||
@@ -578,6 +579,7 @@ public class ConstructionManage { | |||||
} | } | ||||
tenderStateMachineUtil.pass(purchase); | tenderStateMachineUtil.pass(purchase); | ||||
purchase.setPreliminaryInspectionDate(req.getPreliminaryInspectionDate()); | |||||
purchase.setPreliminaryInspectionMaterials(req.getPreliminaryInspectionMaterials()); | purchase.setPreliminaryInspectionMaterials(req.getPreliminaryInspectionMaterials()); | ||||
purchase.setIsCompletedLogCollection(req.getIsCompletedLogCollection()); | purchase.setIsCompletedLogCollection(req.getIsCompletedLogCollection()); | ||||
purchase.setActualPerformanceIndicators(req.getActualPerformanceIndicators()); | purchase.setActualPerformanceIndicators(req.getActualPerformanceIndicators()); | ||||
@@ -585,6 +587,7 @@ public class ConstructionManage { | |||||
// 判断是否所有标段都上传了初验材料 | // 判断是否所有标段都上传了初验材料 | ||||
LambdaQueryWrapper<Purchase> purchaseQuery = Wrappers.lambdaQuery(Purchase.class) | LambdaQueryWrapper<Purchase> purchaseQuery = Wrappers.lambdaQuery(Purchase.class) | ||||
.eq(Purchase::getProjectId, req.getProjectId()) | .eq(Purchase::getProjectId, req.getProjectId()) | ||||
.eq(Purchase::getBidType, BidTypeEnum.BUILD_APP) | |||||
.apply("LENGTH(NVL(preliminary_inspection_materials,'')) = 0") | .apply("LENGTH(NVL(preliminary_inspection_materials,'')) = 0") | ||||
.last(BizConst.LIMIT_1); | .last(BizConst.LIMIT_1); | ||||
if (purchaseService.count(purchaseQuery) == 0) { | if (purchaseService.count(purchaseQuery) == 0) { | ||||
@@ -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.Contract; | ||||
import com.hz.pm.api.projectdeclared.model.entity.Purchase; | 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.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.req.SubmitFinallyInspectedReq; | ||||
import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptProgressStatisticsVO; | import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptProgressStatisticsVO; | ||||
import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptanceVO; | import com.hz.pm.api.projectdeclared.model.vo.FinalAcceptanceVO; | ||||
@@ -319,6 +320,7 @@ public class FinalAcceptanceManage { | |||||
log.info("终验方案项目申报成功 【{}】", instanceId); | log.info("终验方案项目申报成功 【{}】", instanceId); | ||||
tenderStateMachineUtil.pass(purchase); | tenderStateMachineUtil.pass(purchase); | ||||
purchase.setFinalInspectionDate(req.getInspectionDate()); | |||||
purchase.setFinalInspectionMaterials(req.getInspectionMaterials()); | purchase.setFinalInspectionMaterials(req.getInspectionMaterials()); | ||||
purchaseService.updateById(purchase); | purchaseService.updateById(purchase); | ||||
PurchaseInst purchaseInst = new PurchaseInst(); | PurchaseInst purchaseInst = new PurchaseInst(); | ||||
@@ -341,7 +343,8 @@ public class FinalAcceptanceManage { | |||||
.in(PurchaseInst::getBidId, purchaseMap.keySet()); | .in(PurchaseInst::getBidId, purchaseMap.keySet()); | ||||
List<PurchaseInst> currPurchaseInstList = purchaseInstService.list(purchaseInstQuery); | List<PurchaseInst> currPurchaseInstList = purchaseInstService.list(purchaseInstQuery); | ||||
Set<Long> finalInspectedBidIds = CollUtils.fieldSet(currPurchaseInstList, PurchaseInst::getBidId); | Set<Long> 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); | projectStateMachineUtil.pass(project); | ||||
projectService.updateById(project); | projectService.updateById(project); | ||||
} | } | ||||
@@ -5,6 +5,7 @@ import lombok.Data; | |||||
import javax.validation.constraints.NotBlank; | import javax.validation.constraints.NotBlank; | ||||
import javax.validation.constraints.NotNull; | import javax.validation.constraints.NotNull; | ||||
import java.time.LocalDate; | |||||
import java.util.List; | import java.util.List; | ||||
/** | /** | ||||
@@ -25,6 +26,10 @@ public class PreInsSaveDTO { | |||||
@ApiModelProperty("标段ID") | @ApiModelProperty("标段ID") | ||||
private Long bidId; | private Long bidId; | ||||
@ApiModelProperty("初验时间") | |||||
@NotNull(message = "请选择初验时间") | |||||
private LocalDate preliminaryInspectionDate; | |||||
@ApiModelProperty("初验材料") | @ApiModelProperty("初验材料") | ||||
@NotBlank(message = "请提交初验材料") | @NotBlank(message = "请提交初验材料") | ||||
private String preliminaryInspectionMaterials; | private String preliminaryInspectionMaterials; | ||||
@@ -128,6 +128,9 @@ public class Purchase { | |||||
@ApiModelProperty("采购说明") | @ApiModelProperty("采购说明") | ||||
private String purchaseRemark; | private String purchaseRemark; | ||||
@ApiModelProperty("初验时间") | |||||
private LocalDate preliminaryInspectionDate; | |||||
@ApiModelProperty("初验材料") | @ApiModelProperty("初验材料") | ||||
private String preliminaryInspectionMaterials; | private String preliminaryInspectionMaterials; | ||||
@@ -137,6 +140,9 @@ public class Purchase { | |||||
@ApiModelProperty("(初验)实际成效指标") | @ApiModelProperty("(初验)实际成效指标") | ||||
private String actualPerformanceIndicators; | private String actualPerformanceIndicators; | ||||
@ApiModelProperty("终验时间") | |||||
private LocalDate finalInspectionDate; | |||||
@ApiModelProperty("终验申报材料") | @ApiModelProperty("终验申报材料") | ||||
private String finalInspectionMaterials; | private String finalInspectionMaterials; | ||||
@@ -5,6 +5,7 @@ import lombok.Data; | |||||
import javax.validation.constraints.NotBlank; | import javax.validation.constraints.NotBlank; | ||||
import javax.validation.constraints.NotNull; | import javax.validation.constraints.NotNull; | ||||
import java.time.LocalDate; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -24,6 +25,10 @@ public class SubmitFinallyInspectedReq { | |||||
@ApiModelProperty("标段ID") | @ApiModelProperty("标段ID") | ||||
private Long bidId; | private Long bidId; | ||||
@ApiModelProperty("终验时间") | |||||
@NotNull(message = "终验时间不能为空") | |||||
private LocalDate inspectionDate; | |||||
@ApiModelProperty("终验材料") | @ApiModelProperty("终验材料") | ||||
@NotBlank(message = "请提交终验材料") | @NotBlank(message = "请提交终验材料") | ||||
private String inspectionMaterials; | private String inspectionMaterials; | ||||