Browse Source

事项详情增加无参构造

master
WendyYang 8 months ago
parent
commit
7434f0f500
9 changed files with 47 additions and 270 deletions
  1. +1
    -6
      kq-vas-api/src/main/java/com/ningdatech/kqapi/admin/model/enumerization/HandleChannelEnum.java
  2. +7
    -0
      kq-vas-api/src/main/java/com/ningdatech/kqapi/admin/model/vo/MatterDetailDTO.java
  3. +0
    -32
      kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/BoolDisplayEnum.java
  4. +0
    -157
      kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/ExportOptionEnum.java
  5. +19
    -13
      kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/IEnum.java
  6. +1
    -7
      kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/ImplSubjectNatureEnum.java
  7. +0
    -39
      kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/ProjectProcessStageEnum.java
  8. +18
    -16
      kq-vas-api/src/main/java/com/ningdatech/kqapi/zzsfw/enumeration/ItemTypeEnum.java
  9. +1
    -0
      kq-vas-api/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java

+ 1
- 6
kq-vas-api/src/main/java/com/ningdatech/kqapi/admin/model/enumerization/HandleChannelEnum.java View File

@@ -14,7 +14,7 @@ import lombok.Getter;
*/
@Getter
@AllArgsConstructor
public enum HandleChannelEnum implements IEnum<Integer, String, HandleChannelEnum> {
public enum HandleChannelEnum implements IEnum {

HANDLE_ON_WINDOW(1, "现场窗口申请"),
HANDLE_ON_NETWORK(2, "全程网办");
@@ -22,9 +22,4 @@ public enum HandleChannelEnum implements IEnum<Integer, String, HandleChannelEnu
private final Integer code;
private final String desc;

@Override
public HandleChannelEnum[] all() {
return values();
}

}

+ 7
- 0
kq-vas-api/src/main/java/com/ningdatech/kqapi/admin/model/vo/MatterDetailDTO.java View File

@@ -3,6 +3,8 @@ package com.ningdatech.kqapi.admin.model.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Tolerate;

import java.time.LocalDateTime;

@@ -18,6 +20,11 @@ import java.time.LocalDateTime;
@Builder
public class MatterDetailDTO {

@Tolerate
public MatterDetailDTO() {
// 无参构造
}

private Long id;

@ApiModelProperty("事项名称")


+ 0
- 32
kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/BoolDisplayEnum.java View File

@@ -1,32 +0,0 @@
package com.ningdatech.kqapi.common.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
* @author liuxinxin
* @date 2022/7/26 上午9:21
*/
@AllArgsConstructor
@Getter
public enum BoolDisplayEnum {

/**
* true
*/
Y,

/**
* false
*/
N;

public static boolean judgeBoolean(String key) {
return Y.name().equals(key);
}

public static BoolDisplayEnum judgeBoolean(boolean key) {
return key ? Y : N;
}

}

+ 0
- 157
kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/ExportOptionEnum.java View File

@@ -1,157 +0,0 @@
package com.ningdatech.kqapi.common.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;


/**
* 导出选项枚举
*
* @author CMM
* @since 2023/02/10 16:38
*/
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum ExportOptionEnum {
/**
* 导出选项
*/
id(1, "项目ID"),

projectName(2, "项目名称"),

areaCode(3, "行政区划编码"),

area(4, "行政区划名称"),

responsibleMan(5, "项目负责人"),

responsibleManMobile(6, "项目负责人手机号"),

contactName(7, "项目联系人"),

contactPhone(8, "项目联系人手机号"),

higherSuperOrg(9, "上级业务主管单位"),

higherSuperOrgCode(10, "上级主管单位浙政钉ID"),

superOrg(11, "本级主管部门"),

superOrgCode(12, "本级主管部门浙政钉ID"),

buildOrgName(13, "建设单位名称"),

buildOrgZheJiangGovDingId(14, "建设单位浙政钉ID"),

orgCreditCode(15, "建设单位统一信用代码"),

projectType(16, "项目类型"),

isFirst(17, "是否首次新建"),

relatedExistsApplication(18, "关联应用"),

relatedExistsApplicationCode(19, "关联应用IRS编码"),

declareAmount(20, "申报金额"),

approvedTotalInvestmentIncrease(21, "批复金额"),

/**
* 表里没有
*/
budgetSource(22, "预算来源"),

projectYear(23, "预算年度"),

projectIntroduction(24, "项目简介"),

buildBasis(25, "立项依据"),

buildLevel(26, "建设层级"),

developCode(27, "发改编码"),

financialCode(28, "财政编码"),

/**
* 表里没有
*/
informationValidity(29, "信息是否有效"),


isDigitalReform(30, "是否数字化改革项目"),

bizDomain(31, "综合应用领域"),

isCloud(32, "是否上云"),

cloudType(33, "云类型"),

fourSystems(34, "四大体系"),
isTemporaryAugment(35, "是否临时增补"),

protectionLevel(36, "等保级别"),

isSecretComments(37, "是否密评"),

businessNumber(38, "业务编号"),

businessName(39, "业务名称"),

orgName(40, "单位名称"),

softwareDevelopmentAmount(41, "软件开发"),

cloudHardwarePurchaseAmount(42, "云资源、硬件购置"),

thirdPartyAmount(43, "第三方服务"),

safetyInputTitle(44, "投入项"),

safetyInputDescribe(45, "内容描述"),

safetyInputAmount(46, "金额"),

annualPlanAmount(47, "年度支付金额"),

annualPlanHaveAmount(48, "自有资金"),

declareGovOwnFinanceAmount(49, "政府投资-本级财政资金"),

declareGovSuperiorFinanceAmount(50, "政府投资-上级补助资金"),

declareBankLendingAmount(51, "银行贷款"),

declareOtherAmount(52, "其它资金"),

engineeringSpeedOne(53, "第一季度"),

engineeringSpeedTwo(54, "第二季度"),

engineeringSpeedThree(55, "第三季度"),

engineeringSpeedFour(56, "第四季度"),

preliminaryPlanFile(57, "初步方案"),

supportingMaterialsFile(58, "附件-佐证材料"),

projectRemarks(59, "备注"),
processStatusName(60, "流程状态名称"),
processLaunchTime(61,"流程发起时间"),
processHandleTime(62,"流程处理时间"),

projectStatusName(63,"项目状态名称"),

createOn(64,"创建时间"),

updateOn(65,"更新时间");


private Integer code;
private String desc;
}

+ 19
- 13
kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/IEnum.java View File

@@ -1,6 +1,9 @@
package com.ningdatech.kqapi.common.enumeration;

import java.util.Arrays;
import cn.hutool.core.util.StrUtil;
import org.apache.commons.lang3.EnumUtils;

import java.util.List;
import java.util.Optional;

/**
@@ -11,32 +14,35 @@ import java.util.Optional;
* @author WendyYang
* @since 10:10 2024/4/22
*/
public interface IEnum<C, V, E extends Enum<E> & IEnum<C, V, E>> {

E[] all();
public interface IEnum {

C getCode();
Integer getCode();

V getDesc();
String getDesc();

default boolean eq(C code) {
default boolean eq(Integer code) {
return getCode().equals(code);
}

default Optional<E> getByCode(C code) {
return Arrays.stream(all())
static <E extends Enum<E>> List<E> all(Class<E> eClass) {
return EnumUtils.getEnumList(eClass);
}

static <E extends Enum<E> & IEnum> Optional<E> getByCode(Class<E> eClass, Integer code) {
return all(eClass).stream()
.filter(w -> w.getCode().equals(code))
.findFirst();
}

default E getNoNull(C code) {
return Arrays.stream(all())
static <E extends Enum<E> & IEnum> E getNoNull(Class<E> eClass, Integer code) {
return all(eClass).stream()
.filter(w -> w.getCode().equals(code)).findFirst()
.orElseThrow(() -> new IllegalArgumentException("编码对应枚举值不存在"));
}

default V getDesc(C code) {
return getByCode(code).flatMap(w -> Optional.of(w.getDesc())).orElse(null);
static <E extends Enum<E> & IEnum> String getDesc(Class<E> eclass, Integer code) {
return getByCode(eclass, code).flatMap(w -> Optional.of(w.getDesc())).orElse(StrUtil.EMPTY);
}


}

+ 1
- 7
kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/ImplSubjectNatureEnum.java View File

@@ -13,7 +13,7 @@ import lombok.Getter;
*/
@Getter
@AllArgsConstructor
public enum ImplSubjectNatureEnum implements IEnum<Integer, String, ImplSubjectNatureEnum> {
public enum ImplSubjectNatureEnum implements IEnum {

STATUTORY_AUTHORITIES(1, "法定机关"),
THIRD_PARTY_INTERMEDIARIES(2, "第三方中介服务");
@@ -21,10 +21,4 @@ public enum ImplSubjectNatureEnum implements IEnum<Integer, String, ImplSubjectN
private final Integer code;
private final String desc;


@Override
public ImplSubjectNatureEnum[] all() {
return values();
}

}

+ 0
- 39
kq-vas-api/src/main/java/com/ningdatech/kqapi/common/enumeration/ProjectProcessStageEnum.java View File

@@ -1,39 +0,0 @@
package com.ningdatech.kqapi.common.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

import java.util.Objects;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum ProjectProcessStageEnum {
/**
* 项目流程配置 阶段枚举
*/
ORG_INTERNAL_APPROVAL_PROCESS(1,"单位内部审批流程"),
PROJECT_PREQUALIFICATION_APPROVAL_PROCESS(2,"项目预审审批流程"),
DEPARTMENT_JOINT_APPROVAL_PROCESS(3,"部门联合审批流程"),
CONSTRUCTION_PROJECT_APPROVAL_PROCESS(4,"建设方案审批流程"),
ACCEPTANCE_DECLARATION_APPROVAL_PROCESS(5,"验收申报审批流程"),
APPLY_DELAY(6,"申请延期审批流程"),
APPLY_BORROW(7,"申请借阅审批流程");

private Integer code;
private String desc;

public static String getDesc(Integer code) {
if (Objects.isNull(code)) {
return StringUtils.EMPTY;
}
for (ProjectProcessStageEnum t : ProjectProcessStageEnum.values()) {
if (code.equals(t.getCode())) {
return t.desc;
}
}
return StringUtils.EMPTY;
}
}

+ 18
- 16
kq-vas-api/src/main/java/com/ningdatech/kqapi/zzsfw/enumeration/ItemTypeEnum.java View File

@@ -1,34 +1,36 @@
package com.ningdatech.kqapi.zzsfw.enumeration;

import com.ningdatech.kqapi.common.enumeration.IEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.Objects;

/**
* <p>
* ItemTypeEnum
* </p>
*
* @author WendyYang
* @since 15:50 2024/4/22
*/
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum ItemTypeEnum {
public enum ItemTypeEnum implements IEnum {
/**
* 事项类型 枚举
*/
GOV(1,"政府服务"),
ADDED(2,"增值服务"),
SPECIAL(3,"特殊服务");
GOV(1, "政府服务"),
ADDED(2, "增值服务"),
SPECIAL(3, "特殊服务");

private Integer code;
private String desc;
private final Integer code;
private final String desc;

public static ItemTypeEnum match(Integer code) {
if (Objects.isNull(code)) {
return null;
}
for (ItemTypeEnum t : ItemTypeEnum.values()) {
if (code.equals(t.getCode())) {
return t;
}
}
return null;
return IEnum.getByCode(ItemTypeEnum.class, code).orElse(null);
}

}

+ 1
- 0
kq-vas-api/src/main/java/com/ningdatech/kqapi/zzsfw/manage/MatterManage.java View File

@@ -132,6 +132,7 @@ public class MatterManage {

public List<TreeVO> getDepartments(String zoneName,String windowName) {
List<KqZzsfwMenu> matters = menuService.list(Wrappers.lambdaQuery(KqZzsfwMenu.class)
.select(KqZzsfwMenu::getDepartment,KqZzsfwMenu::getType,KqZzsfwMenu::getWebapplyurl)
.eq(StringUtils.isNotBlank(windowName), KqZzsfwMenu::getWindow,windowName)
.eq(StringUtils.isNotBlank(zoneName), KqZzsfwMenu::getZoneName,zoneName)
.orderByAsc(KqZzsfwMenu::getSort));


Loading…
Cancel
Save