Преглед изворни кода

修改标段状态变更事件

tags/24080901
WendyYang пре 10 месеци
родитељ
комит
06e4450e32
6 измењених фајлова са 34 додато и 11 уклоњено
  1. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/event/TenderStatusChangeEvent.java
  2. +0
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java
  3. +10
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java
  4. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Purchase.java
  5. +18
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/IPurchaseService.java
  6. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/TenderStatusEnum.java

+ 2
- 2
hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/event/TenderStatusChangeEvent.java Прегледај датотеку

@@ -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;


+ 0
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java Прегледај датотеку

@@ -616,7 +616,6 @@ public class ConstructionManage {
}

tenderStateMachineUtil.pass(purchase);
purchase.setUpdateOn(now);
purchase.setPreliminaryInspectionMaterials(req.getPreliminaryInspectionMaterials());
purchase.setIsCompletedLogCollection(req.getIsCompletedLogCollection());
purchase.setActualPerformanceIndicators(req.getActualPerformanceIndicators());


+ 10
- 4
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/FinalAcceptanceManage.java Прегледај датотеку

@@ -97,6 +97,7 @@ public class FinalAcceptanceManage {
private final TenderStateMachineUtil tenderStateMachineUtil;
private final IProjectInstService projectInstService;


/**
* 待采购的-项目列表
*
@@ -108,8 +109,13 @@ public class FinalAcceptanceManage {
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::getStatus, ProjectStatusEnum.TO_BE_FINALLY_INSPECTED.getCode());
query.in(Project::getId, projectIds);
query.eq(Project::getStage, ProjectStatusEnum.PROJECT_APPROVED.getCode());
query.eq(Project::getNewest, Boolean.TRUE);
query.orderByAsc(Project::getApprovalDate);
@@ -118,11 +124,11 @@ public class FinalAcceptanceManage {
if ((total = page.getTotal()) == 0) {
return PageVo.empty();
}
List<Long> projectIds = new ArrayList<>();
List<Long> allProjectIds = new ArrayList<>();
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, Contract> contractMap = contractService.listByProjectIds(projectIds);
Map<Long, List<ProjectAnnualPaymentPlan>> paymentPlansMap = projectAnnualPaymentPlanService.listByProjectIds(projectIds);


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/entity/Purchase.java Прегледај датотеку

@@ -1,8 +1,6 @@
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -37,9 +35,11 @@ public class Purchase {
private Long projectId;

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

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

@ApiModelProperty("创建人 工号")


+ 18
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/IPurchaseService.java Прегледај датотеку

@@ -1,10 +1,18 @@
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.extension.service.IService;
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.Set;
import java.util.stream.Collectors;

/**
* <p>
@@ -28,4 +36,14 @@ public interface IPurchaseService extends IService<Purchase> {
.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);
}

}

+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/TenderStatusEnum.java Прегледај датотеку

@@ -28,7 +28,7 @@ public enum TenderStatusEnum {
XCFHX_APPLY_FAILED(ProjectStatusEnum.ON_FIRST_INSPECTED, 303, "信创符合性申请不通过"),
TO_BE_SUBMIT_FINALLY_INSPECTED_APPLY(ProjectStatusEnum.ON_FIRST_INSPECTED, 401, "待终验申报"),
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, "终验完成");

private final ProjectStatusEnum projectStatus;


Loading…
Откажи
Сачувај