|
|
@@ -0,0 +1,55 @@ |
|
|
|
package com.hz.pm.api.projectlib.model.enumeration; |
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
import lombok.Getter; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
/** |
|
|
|
* <p> |
|
|
|
* 标段状态 |
|
|
|
* </p> |
|
|
|
* |
|
|
|
* @author WendyYang |
|
|
|
* @since 15:49 2024/2/23 |
|
|
|
*/ |
|
|
|
@Getter |
|
|
|
@AllArgsConstructor |
|
|
|
public enum TenderStatusEnum { |
|
|
|
|
|
|
|
DTXCGXX(ProjectStatusEnum.ON_PURCHASING, 101, "待填写采购信息"), |
|
|
|
DTXHTXX(ProjectStatusEnum.ON_PURCHASING, 102, "待填写合同信息"), |
|
|
|
DTXSSJH(ProjectStatusEnum.ON_PURCHASING, 103, "待填写实施计划"), |
|
|
|
DSCCYCL(ProjectStatusEnum.TO_BE_FIRST_INSPECTED, 201, "待上传初验材料"), |
|
|
|
DXCFHXSQ(ProjectStatusEnum.ON_FIRST_INSPECTED, 301, "待信创符合性申请"), |
|
|
|
XCFHXSQZ(ProjectStatusEnum.ON_FIRST_INSPECTED, 302, "信创符合性申请中"), |
|
|
|
XCFHXSQSB(ProjectStatusEnum.ON_FIRST_INSPECTED, 303, "信创符合性申请不通过"), |
|
|
|
DZYSB(ProjectStatusEnum.ON_FIRST_INSPECTED, 401, "待终验申报"), |
|
|
|
ZYSQZ(ProjectStatusEnum.ON_FINALLY_INSPECTED, 501, "终验申报中"), |
|
|
|
ZYSQSB(ProjectStatusEnum.ON_FINALLY_INSPECTED, 502, "终验申报不同过"), |
|
|
|
ZYWC(ProjectStatusEnum.ACCEPTED, 601, "终验完成"); |
|
|
|
|
|
|
|
private final ProjectStatusEnum projectStatus; |
|
|
|
private final Integer tenderStatus; |
|
|
|
private final String desc; |
|
|
|
|
|
|
|
public boolean eq(Integer tenderStatus) { |
|
|
|
return this.getTenderStatus().equals(tenderStatus); |
|
|
|
} |
|
|
|
|
|
|
|
public static TenderStatusEnum getByStatus(Integer tenderStatus) { |
|
|
|
return Arrays.stream(values()) |
|
|
|
.filter(w -> w.eq(tenderStatus)) |
|
|
|
.findFirst() |
|
|
|
.orElse(null); |
|
|
|
} |
|
|
|
|
|
|
|
public static String getDescByStatus(Integer tenderStatus) { |
|
|
|
return Optional.ofNullable(getByStatus(tenderStatus)) |
|
|
|
.flatMap(w -> Optional.of(w.getDesc())) |
|
|
|
.orElse(StrUtil.EMPTY); |
|
|
|
} |
|
|
|
|
|
|
|
} |