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

第二版 导出字段顺序优化

刘一凡 пре 3 година
родитељ
комит
c0a7df9b0a

+ 2 - 2
src/main/java/com/chuanghai/h3c_reporting/controller/InformationReportingController.java

@@ -105,10 +105,10 @@ public class InformationReportingController {
         reporting1.setStatus(0);
         boolean flag = informationReportingService.updateById(reporting1);
         if (flag) {
-            log.info("关闭项目=========>>> 管理员【{}】【id:{}】成功关闭了编号为【{}】的项目信息", reporting.getName(), reporting.getId(), reporting.getId());
+            log.info("关闭项目=========>>> 管理员【{}】【id:{}】成功关闭了编号为【{}】的项目信息", reporting.getName(), reporting.getId(), reporting.getItemId());
             return CommonResult.ok();
         } else {
-            log.info("关闭项目失败=========>>> 管理员【{}】【id:{}】关闭编号为【{}】的项目信息失败", reporting.getName(), reporting.getId(), reporting.getId());
+            log.info("关闭项目失败=========>>> 管理员【{}】【id:{}】关闭编号为【{}】的项目信息失败", reporting.getName(), reporting.getId(), reporting.getItemId());
             return CommonResult.fail();
         }
     }

+ 12 - 12
src/main/java/com/chuanghai/h3c_reporting/entity/InformationReporting.java

@@ -31,14 +31,14 @@ public class InformationReporting implements Serializable {
     /**
      * 姓名
      */
-    @ExcelProperty("姓名")
+    @ExcelProperty(value = "姓名", index = 0)
     @ColumnWidth(15)
     private String name;
 
     /**
      * 手机号
      */
-    @ExcelProperty("手机号")
+    @ExcelProperty(value = "手机号", index = 1)
     @ColumnWidth(15)
     private String phone;
 
@@ -53,28 +53,28 @@ public class InformationReporting implements Serializable {
     /**
      * 单位名称
      */
-    @ExcelProperty("单位名称")
+    @ExcelProperty(value = "单位名称", index = 2)
     @ColumnWidth(15)
     private String company;
 
     /**
      * 客户名称
      */
-    @ExcelProperty("客户名称")
+    @ExcelProperty(value = "客户名称", index = 3)
     @ColumnWidth(15)
     private String customerName;
 
     /**
      * 项目名称
      */
-    @ExcelProperty("项目名称")
+    @ExcelProperty(value = "项目名称", index = 4)
     @ColumnWidth(15)
     private String entryName;
 
     /**
      * 项目金额
      */
-    @ExcelProperty("项目金额")
+    @ExcelProperty(value = "项目金额", index = 5)
     @ColumnWidth(15)
     private String projectAmount;
 
@@ -82,27 +82,27 @@ public class InformationReporting implements Serializable {
      * 预计投标时间
      */
     @ColumnWidth(20)
-    @ExcelProperty(value = "预计投标时间")
+    @ExcelProperty(value = "预计投标时间", index = 6)
     private String tenderTime;
 
     /**
      * 项目基本情况
      */
-    @ExcelProperty("项目基本情况")
+    @ExcelProperty(value = "项目基本情况", index = 10)
     @ColumnWidth(35)
     private String content;
 
     /**
      * 所属行业
      */
-    @ExcelProperty("所属行业")
+    @ExcelProperty(value = "所属行业", index = 7)
     @ColumnWidth(15)
     private String trade;
 
     /**
      * 产品类型
      */
-    @ExcelProperty("产品类型")
+    @ExcelProperty(value = "产品类型", index = 8)
     @ColumnWidth(20)
     private String product;
 
@@ -111,7 +111,7 @@ public class InformationReporting implements Serializable {
      * 提交时间
      */
     @ColumnWidth(20)
-    @ExcelProperty(value = "提交时间", converter = LocalDateTimeConverter.class)
+    @ExcelProperty(value = "提交时间", converter = LocalDateTimeConverter.class, index = 11)
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private LocalDateTime reportingTime;
 
@@ -125,7 +125,7 @@ public class InformationReporting implements Serializable {
     /**
      * 项目状态:0已关闭 1进行中
      */
-    @ExcelProperty(value = "项目状态", converter = StatusConverter.class)
+    @ExcelProperty(value = "项目状态", converter = StatusConverter.class, index = 9)
     @ColumnWidth(15)
     @Pattern(regexp = "[0-1]", message = "项目状态只能为0或1")
     private Integer status;

Разлика између датотеке није приказан због своје велике величине
+ 81 - 81
src/main/resources/static/doc/index.html