From deb49773f332f83dafb78788bc3d9b2b39fa421c Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 23 十二月 2024 09:50:03 +0800
Subject: [PATCH] 项目库上传后端逻辑完善

---
 business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java |   95 ++++++++++++++++++++++++++++-------------------
 1 files changed, 56 insertions(+), 39 deletions(-)

diff --git a/business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java b/business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java
index 58228b0..510292d 100644
--- a/business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java
+++ b/business/src/main/java/com/ycl/domain/excel/ProjectExcelTemplate.java
@@ -1,7 +1,14 @@
 package com.ycl.domain.excel;
 
 import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ycl.common.enums.business.ImportanceTypeEnum;
+import com.ycl.common.enums.business.ProjectStatusEnum;
+import com.ycl.common.enums.business.ProjectTypeEnum;
+import com.ycl.common.utils.excel.annotation.ExcelEnumFormat;
+import com.ycl.common.utils.excel.convert.ExcelEnumConvert;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 
@@ -36,13 +43,15 @@
     /**
      * 椤圭洰绫诲瀷
      */
-    @ExcelProperty(value = "椤圭洰绫诲瀷")
+    @ExcelProperty(value = "椤圭洰绫诲瀷",converter = ExcelEnumConvert.class)
+    @ExcelEnumFormat(enumClass = ProjectTypeEnum.class,codeField = "type",textField = "desc")
     private String projectType;
 
     /**
      * 椤圭洰鐘舵��
      */
-    @ExcelProperty(value = "椤圭洰鐘舵��")
+    @ExcelProperty(value = "椤圭洰鐘舵��",converter = ExcelEnumConvert.class)
+    @ExcelEnumFormat(enumClass = ProjectStatusEnum.class,codeField = "type",textField = "desc")
     private String projectStatus;
 
     /**
@@ -60,7 +69,8 @@
     /**
      * 閲嶇偣鍒嗙被
      */
-    @ExcelProperty(value = "閲嶇偣鍒嗙被")
+    @ExcelProperty(value = "閲嶇偣鍒嗙被",converter = ExcelEnumConvert.class)
+    @ExcelEnumFormat(enumClass = ImportanceTypeEnum.class,codeField = "type",textField = "desc")
     private String importanceType;
 
     /**
@@ -82,12 +92,6 @@
     private String competentDepartment;
 
     /**
-     * 椤圭洰褰掑睘鍦�
-     */
-    @ExcelProperty(value = "椤圭洰褰掑睘鍦�")
-    private String projectLocation;
-
-    /**
      * 缁忓害
      */
     @ExcelProperty(value = "缁忓害")
@@ -105,11 +109,11 @@
     @ExcelProperty(value = "绠$悊褰掑彛")
     private String managementCentralization;
 
-    /**
-     * 椤圭洰鐢虫姤闃舵
-     */
-    @ExcelProperty(value = "椤圭洰鐢虫姤闃舵")
-    private String projectApplicationPhase;
+//    /**
+//     * 椤圭洰鐢虫姤闃舵
+//     */
+//    @ExcelProperty(value = "椤圭洰鐢虫姤闃舵")
+//    private String projectApplicationPhase;
 
     /**
      * 椤圭洰瀹℃壒绫诲瀷
@@ -117,11 +121,11 @@
     @ExcelProperty(value = "椤圭洰瀹℃壒绫诲瀷")
     private String projectApprovalType;
 
-    /**
-     * 鎶曡祫鐩綍
-     */
-    @ExcelProperty(value = "鎶曡祫鐩綍")
-    private String investmentCatalogue;
+//    /**
+//     * 鎶曡祫鐩綍
+//     */
+//    @ExcelProperty(value = "鎶曡祫鐩綍")
+//    private String investmentCatalogue;
 
     /**
      * 瀹℃壒璁″垝涔�
@@ -129,25 +133,25 @@
     @ExcelProperty(value = "瀹℃壒璁″垝涔︼紙闄勪欢鍚嶏級")
     private String approvalPlan;
 
-    /**
-     * 鏄惁绔嬮」
-     */
-    @ExcelProperty(value = "鏄惁绔嬮」")
-    private String isSetProject;
+//    /**
+//     * 鏄惁绔嬮」
+//     */
+//    @ExcelProperty(value = "鏄惁绔嬮」")
+//    private String isSetProject;
 
     /**
-     * 鎴愮珛鏃堕棿
+     * 绔嬮」鏃堕棿
      */
-    @ExcelProperty(value = "鎴愮珛鏃堕棿")
+    @ExcelProperty(value = "绔嬮」鏃堕棿")
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date setTime;
+    private Date createProjectTime;
 
-    /**
-     * 璧嬬爜鐘舵��
-     */
-    @ExcelProperty(value = "璧嬬爜鐘舵��")
-    private String assignmentStatus;
+//    /**
+//     * 璧嬬爜鐘舵��
+//     */
+//    @ExcelProperty(value = "璧嬬爜鐘舵��")
+//    private String assignmentStatus;
 
     /**
      * 琛屾斂鍖哄垝
@@ -179,7 +183,7 @@
      * 璇︾粏鍦板潃
      */
     @ExcelProperty(value = "璇︾粏鍦板潃")
-    private String address;
+    private String projectAddress;
 
     /**
      * 寤鸿鍐呭
@@ -223,7 +227,9 @@
     @ExcelProperty(value = "鏈勾璁″垝鎶曡祫")
     private BigDecimal yearInvestAmount;
 
-
+    @ExcelProperty("浣跨敤鐘舵��")
+    /** 浣跨敤鐘舵�侊紙0锛氳崏绋匡紝1锛氭彁浜�,2:瀹℃牳閫氳繃锛�-1锛氶┏鍥烇級 */
+    private Integer usedStatus;
                                         /* 鎶曡祫椤圭洰鍩虹淇℃伅琛� */
 
     /**
@@ -596,37 +602,48 @@
      * 鏄惁灞炰簬銆婁骇涓氱粨鏋勮皟鏁存寚瀵肩洰褰曘�嬩笅鐨勯」鐩�
      */
     @ExcelProperty(value = "灞炰簬銆婁骇涓氱粨鏋勮皟鏁存寚瀵肩洰褰曘�嬩笅鐨勯」鐩�")
-    private String belongsToIndustryAdjustmentDirectory;
+    private Boolean belongsToIndustryAdjustmentDirectory;
 
     /**
      * 鏄惁灞炰簬鏈垪鍏ャ�婁骇涓氱粨鏋勮皟鏁存寚瀵肩洰褰曘�嬬殑鍏佽绫婚」鐩�
      */
     @ExcelProperty(value = "灞炰簬鏈垪鍏ャ�婁骇涓氱粨鏋勮皟鏁存寚瀵肩洰褰曘�嬬殑鍏佽绫婚」鐩�")
-    private String belongsToAllowedProjects;
+    private Boolean belongsToAllowedProjects;
 
     /**
      * 鏄惁灞炰簬銆婅タ閮ㄥ湴鍖洪紦鍔辩被浜т笟鐩綍銆嬬殑椤圭洰
      */
     @ExcelProperty(value = "灞炰簬銆婅タ閮ㄥ湴鍖洪紦鍔辩被浜т笟鐩綍銆嬬殑椤圭洰")
-    private String belongsToWesternEncouragedDirectory;
+    private Boolean belongsToWesternEncouragedDirectory;
 
     /**
      * 鏄惁涓嶅睘浜庝骇涓氭斂绛栫姝㈡姇璧勫缓璁炬垨瀹炶鏍稿噯銆佸鎵圭鐞嗙殑椤圭洰
      */
     @ExcelProperty(value = "涓嶅睘浜庝骇涓氭斂绛栫姝㈡姇璧勫缓璁炬垨瀹炶鏍稿噯銆佸鎵圭鐞嗙殑椤圭洰")
-    private String notBannedOrControlledProject;
+    private Boolean notBannedOrControlledProject;
 
     /**
      * 濉姤淇℃伅鏄惁鐪熷疄
      */
     @ExcelProperty(value = "濉姤淇℃伅鏄惁鐪熷疄")
-    private String informationIsTrue;
+    private Boolean informationIsTrue;
 
     /**
      * 涓撻」瑙勫垝澶嶅悎鎯呭喌
      */
     @ExcelProperty(value = "涓撻」瑙勫垝澶嶅悎鎯呭喌")
     private String specialPlanningCompliance;
+    /**
+     * 鑺傝兘瀹℃煡
+     */
+    @ExcelProperty(value = "鑺傝兘瀹℃煡")
+    private Boolean energyCheck;
+
+    /**
+     * 涓嶅啀鍗曠嫭杩涜鑺傝兘瀹℃煡鐨勭被鍨�
+     */
+    @ExcelProperty("涓嶅啀鍗曠嫭杩涜鑺傝兘瀹℃煡鐨勭被鍨�")
+    private Integer noOnlyCheckType;
 
     /**
      * 椤圭洰鑳借�楁儏鍐�

--
Gitblit v1.8.0