@@ -44,7 +44,7 @@ public enum TenderStatusChangeEvent { | |||||
/** | /** | ||||
* 信创符合性申请不通过 | * 信创符合性申请不通过 | ||||
*/ | */ | ||||
XCFHX_APPLY_FAILED(null, 303, null), | |||||
XCFHX_APPLY_FAILED(null, 302, null), | |||||
/** | /** | ||||
* 终验申报 | * 终验申报 | ||||
*/ | */ | ||||
@@ -56,7 +56,7 @@ public enum TenderStatusChangeEvent { | |||||
/** | /** | ||||
* 终验申报拒绝 | * 终验申报拒绝 | ||||
*/ | */ | ||||
FINALLY_INSPECTED_FAILED(null, 502, null); | |||||
FINALLY_INSPECTED_FAILED(null, 501, null); | |||||
private final Integer passStatusCode; | private final Integer passStatusCode; | ||||
@@ -616,7 +616,6 @@ public class ConstructionManage { | |||||
} | } | ||||
tenderStateMachineUtil.pass(purchase); | tenderStateMachineUtil.pass(purchase); | ||||
purchase.setUpdateOn(now); | |||||
purchase.setPreliminaryInspectionMaterials(req.getPreliminaryInspectionMaterials()); | purchase.setPreliminaryInspectionMaterials(req.getPreliminaryInspectionMaterials()); | ||||
purchase.setIsCompletedLogCollection(req.getIsCompletedLogCollection()); | purchase.setIsCompletedLogCollection(req.getIsCompletedLogCollection()); | ||||
purchase.setActualPerformanceIndicators(req.getActualPerformanceIndicators()); | purchase.setActualPerformanceIndicators(req.getActualPerformanceIndicators()); | ||||
@@ -97,6 +97,7 @@ public class FinalAcceptanceManage { | |||||
private final TenderStateMachineUtil tenderStateMachineUtil; | private final TenderStateMachineUtil tenderStateMachineUtil; | ||||
private final IProjectInstService projectInstService; | private final IProjectInstService projectInstService; | ||||
/** | /** | ||||
* 待采购的-项目列表 | * 待采购的-项目列表 | ||||
* | * | ||||
@@ -108,8 +109,13 @@ public class FinalAcceptanceManage { | |||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | ||||
//待终验 并且还未过期 | //待终验 并且还未过期 | ||||
//只能看自己单位的 | //只能看自己单位的 | ||||
Set<Long> projectIds = purchaseService.listProjectIdByStatus(TenderStatusEnum.FINALLY_INSPECTED_FAILED, | |||||
TenderStatusEnum.TO_BE_SUBMIT_FINALLY_INSPECTED_APPLY); | |||||
if (projectIds.isEmpty()) { | |||||
return PageVo.empty(); | |||||
} | |||||
query.eq(Project::getBuildOrgCode, user.getMhUnitIdStr()); | query.eq(Project::getBuildOrgCode, user.getMhUnitIdStr()); | ||||
query.eq(Project::getStatus, ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode()); | |||||
query.in(Project::getId, projectIds); | |||||
query.eq(Project::getStage, ProjectStatusEnum.PROJECT_APPROVED.getCode()); | query.eq(Project::getStage, ProjectStatusEnum.PROJECT_APPROVED.getCode()); | ||||
query.eq(Project::getNewest, Boolean.TRUE); | query.eq(Project::getNewest, Boolean.TRUE); | ||||
query.orderByAsc(Project::getApprovalDate); | query.orderByAsc(Project::getApprovalDate); | ||||
@@ -118,11 +124,11 @@ public class FinalAcceptanceManage { | |||||
if ((total = page.getTotal()) == 0) { | if ((total = page.getTotal()) == 0) { | ||||
return PageVo.empty(); | return PageVo.empty(); | ||||
} | } | ||||
List<Long> projectIds = new ArrayList<>(); | |||||
List<Long> allProjectIds = new ArrayList<>(); | |||||
for (Project project : page.getRecords()) { | for (Project project : page.getRecords()) { | ||||
projectIds.add(project.getId()); | |||||
allProjectIds.add(project.getId()); | |||||
} | } | ||||
List<Purchase> purchases = purchaseService.listByProjectIds(projectIds); | |||||
List<Purchase> purchases = purchaseService.listByProjectIds(allProjectIds); | |||||
Map<Long, List<Purchase>> purchaseMap = CollUtils.group(purchases, Purchase::getProjectId); | Map<Long, List<Purchase>> purchaseMap = CollUtils.group(purchases, Purchase::getProjectId); | ||||
Map<Long, Contract> contractMap = contractService.listByProjectIds(projectIds); | Map<Long, Contract> contractMap = contractService.listByProjectIds(projectIds); | ||||
Map<Long, List<ProjectAnnualPaymentPlan>> paymentPlansMap = projectAnnualPaymentPlanService.listByProjectIds(projectIds); | Map<Long, List<ProjectAnnualPaymentPlan>> paymentPlansMap = projectAnnualPaymentPlanService.listByProjectIds(projectIds); | ||||
@@ -1,8 +1,6 @@ | |||||
package com.hz.pm.api.projectdeclared.model.entity; | package com.hz.pm.api.projectdeclared.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 com.hz.pm.api.common.compare.Compare; | import com.hz.pm.api.common.compare.Compare; | ||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
@@ -37,9 +35,11 @@ public class Purchase { | |||||
private Long projectId; | private Long projectId; | ||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
@TableField(fill = FieldFill.INSERT) | |||||
private LocalDateTime createOn; | private LocalDateTime createOn; | ||||
@ApiModelProperty("修改时间") | @ApiModelProperty("修改时间") | ||||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||||
private LocalDateTime updateOn; | private LocalDateTime updateOn; | ||||
@ApiModelProperty("创建人 工号") | @ApiModelProperty("创建人 工号") | ||||
@@ -1,10 +1,18 @@ | |||||
package com.hz.pm.api.projectdeclared.service; | package com.hz.pm.api.projectdeclared.service; | ||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.hz.pm.api.projectdeclared.model.entity.Purchase; | import com.hz.pm.api.projectdeclared.model.entity.Purchase; | ||||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | |||||
import com.hz.pm.api.projectlib.model.enumeration.TenderStatusEnum; | |||||
import com.ningdatech.basic.util.CollUtils; | |||||
import io.swagger.models.auth.In; | |||||
import java.util.Arrays; | |||||
import java.util.List; | import java.util.List; | ||||
import java.util.Set; | |||||
import java.util.stream.Collectors; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -28,4 +36,14 @@ public interface IPurchaseService extends IService<Purchase> { | |||||
.orderByAsc(Purchase::getId)); | .orderByAsc(Purchase::getId)); | ||||
} | } | ||||
default Set<Long> listProjectIdByStatus(TenderStatusEnum... status){ | |||||
List<Integer> statusCodes = Arrays.stream(status) | |||||
.map(TenderStatusEnum::getTenderStatus) | |||||
.collect(Collectors.toList()); | |||||
LambdaQueryWrapper<Purchase> query = Wrappers.lambdaQuery(Purchase.class) | |||||
.select(Purchase::getProjectId) | |||||
.in(Purchase::getStatus, statusCodes); | |||||
return CollUtils.fieldSet(list(query), Purchase::getProjectId); | |||||
} | |||||
} | } |
@@ -28,7 +28,7 @@ public enum TenderStatusEnum { | |||||
XCFHX_APPLY_FAILED(ProjectStatusEnum.ON_FIRST_INSPECTED, 303, "信创符合性申请不通过"), | XCFHX_APPLY_FAILED(ProjectStatusEnum.ON_FIRST_INSPECTED, 303, "信创符合性申请不通过"), | ||||
TO_BE_SUBMIT_FINALLY_INSPECTED_APPLY(ProjectStatusEnum.ON_FIRST_INSPECTED, 401, "待终验申报"), | TO_BE_SUBMIT_FINALLY_INSPECTED_APPLY(ProjectStatusEnum.ON_FIRST_INSPECTED, 401, "待终验申报"), | ||||
ON_FINALLY_INSPECTED_APPLY(ProjectStatusEnum.ON_FINALLY_INSPECTED, 501, "终验申报中"), | ON_FINALLY_INSPECTED_APPLY(ProjectStatusEnum.ON_FINALLY_INSPECTED, 501, "终验申报中"), | ||||
FINALLY_INSPECTED_FAILED(ProjectStatusEnum.ON_FINALLY_INSPECTED, 502, "终验申报不同过"), | |||||
FINALLY_INSPECTED_FAILED(ProjectStatusEnum.ON_FINALLY_INSPECTED, 502, "终验申报不通过"), | |||||
FINALLY_INSPECTED_PASSED(ProjectStatusEnum.ACCEPTED, 601, "终验完成"); | FINALLY_INSPECTED_PASSED(ProjectStatusEnum.ACCEPTED, 601, "终验完成"); | ||||
private final ProjectStatusEnum projectStatus; | private final ProjectStatusEnum projectStatus; | ||||