From df301cb9cc8f81999aed5a039748a6035bb96b23 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Thu, 8 Jun 2023 10:04:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E7=9B=96=E7=AB=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../projectlib/enumeration/CloudTypeEnum.java | 44 ++++++++++++++++++++++ .../pmapi/todocenter/manage/TodoCenterManage.java | 10 ++--- 2 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/CloudTypeEnum.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/CloudTypeEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/CloudTypeEnum.java new file mode 100644 index 0000000..bdb250a --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/enumeration/CloudTypeEnum.java @@ -0,0 +1,44 @@ +package com.ningdatech.pmapi.projectlib.enumeration; + +import java.util.Objects; + +import org.apache.commons.lang3.StringUtils; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; + +/** + * 云类型枚举 + * + * @return + * @author CMM + * @since 2023/03/16 16:27 + */ +@Getter +@AllArgsConstructor +@NoArgsConstructor +public enum CloudTypeEnum { + /** + * 云类型 + */ + GOV_CLOUD_NON_LETTER(1, "政务云(非信创)"), + GOV_CLOUD_LETTER(2, "数字政府"), + OTHER(3,"其他"); + + + private Integer code; + private String desc; + + public static String getDescByCode(Integer code) { + if (Objects.isNull(code)) { + return StringUtils.EMPTY; + } + for (CloudTypeEnum t : CloudTypeEnum.values()) { + if (code.equals(t.getCode())) { + return t.desc; + } + } + return StringUtils.EMPTY; + } +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 2422ea7..ad39b6b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -12,7 +12,7 @@ import javax.servlet.http.HttpServletResponse; import cn.hutool.core.util.ObjectUtil; import com.ningdatech.basic.exception.BizException; -import com.ningdatech.pmapi.projectlib.enumeration.BizDomainEnum; +import com.ningdatech.pmapi.projectlib.enumeration.*; import com.ningdatech.pmapi.todocenter.constant.TodoCenterContant; import com.ningdatech.pmapi.todocenter.handle.PassHandle; import com.ningdatech.pmapi.todocenter.handle.WithDrawHandle; @@ -57,9 +57,6 @@ import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter; import com.ningdatech.pmapi.common.util.ExcelDownUtil; import com.ningdatech.pmapi.irs.sign.IRSAPIRequest; import com.ningdatech.pmapi.projectdeclared.manage.DefaultDeclaredProjectManage; -import com.ningdatech.pmapi.projectlib.enumeration.FourSystemEnum; -import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; -import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; import com.ningdatech.pmapi.projectlib.model.entity.Project; @@ -1135,6 +1132,7 @@ public class TodoCenterManage { paramsMap.put("fourSystems", fourSystem); // 获取是否数字化改革项目 String isDigitalReform = IsOrNotEnum.getDescByCode(project.getIsDigitalReform()); + paramsMap.put("isDigitalReform",isDigitalReform); if (IsOrNotEnum.NOT.getDesc().equals(isDigitalReform)){ paramsMap.put("bizDomain", null); }else { @@ -1146,7 +1144,9 @@ public class TodoCenterManage { if (IsOrNotEnum.NOT.getDesc().equals(isCloud)){ paramsMap.put("cloudType", null); }else { - paramsMap.put("cloudType",project.getCloudType()); + String cloudType = project.getCloudType(); + String cloudTypeName = CloudTypeEnum.getDescByCode(Integer.valueOf(cloudType)); + paramsMap.put("cloudType",cloudTypeName); } // 获取本年计划投资金额 BigDecimal yearPlanInvest = project.getAnnualPlanAmount();