Browse Source

优化地理设施系统-设施采集的地理设施信息的导入和导出共用模板,设施编号、创建日期自动生成

james 2 weeks ago
parent
commit
f18a34ec4d

+ 1 - 1
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/impl/BaseGgpFacilityServiceImpl.java

@@ -164,7 +164,7 @@ public class BaseGgpFacilityServiceImpl extends AbstractCrudService<BaseGgpFacil
                 baseGgpFacilityExportVo.setImagesUrl(baseGgpFacilityList.get(i).getImagesUrl());
                 baseGgpFacilityExportVo.setContact(baseGgpFacilityList.get(i).getContact());
                 baseGgpFacilityExportVo.setContactPhone(baseGgpFacilityList.get(i).getContactPhone());
-                baseGgpFacilityExportVo.setStatus(baseGgpFacilityList.get(i).getFacilityStatus());
+                baseGgpFacilityExportVo.setFacilityStatus(baseGgpFacilityList.get(i).getFacilityStatus());
                 baseGgpFacilityExportVo.setLongitude(baseGgpFacilityList.get(i).getLongitude());
                 baseGgpFacilityExportVo.setLatitude(baseGgpFacilityList.get(i).getLatitude());
                 baseGgpFacilityExportVo.setCreateTime(baseGgpFacilityList.get(i).getCreateTime().format(df));

+ 1 - 1
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/vo/BaseGgpFacilityExportVo.java

@@ -70,7 +70,7 @@ public class BaseGgpFacilityExportVo implements Serializable {
      * 设施状态
      */
     @Excel(name = "设施状态", readConverterExp = "0=正常,1=维修,2=关闭")
-    private Integer status;
+    private Integer facilityStatus;
 
     /**
      * 经度

+ 5 - 3
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/vo/FacilityImportVo.java

@@ -1,9 +1,10 @@
 package com.usky.iot.service.vo;
 
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import com.usky.common.core.annotation.Excel;
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 import java.time.LocalDateTime;
 
@@ -16,6 +17,7 @@ import java.time.LocalDateTime;
  * @since 2023-07-27
  */
 @Data
+@EqualsAndHashCode(callSuper = false)
 public class FacilityImportVo{
     /**
      * 设施编号
@@ -62,8 +64,8 @@ public class FacilityImportVo{
     /**
      * 设施状态
      */
-    @Excel(name = "设施状态", readConverterExp = "正常=0,维修=1,关闭=2")
-    private Integer status;
+    @Excel(name = "设施状态",replace = {"正常_0", "维修_1", "关闭_2"})
+    private Integer facilityStatus;
 
     /**
      * 经度(必填)