Browse Source

优化地理信息-导出和地理设施-导入两个接口,使得地理设施系统-设施采集的地理设施信息的导入和导出共用一个模板

james 3 weeks ago
parent
commit
8ca0095668

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

@@ -149,8 +149,6 @@ public class BaseGgpFacilityServiceImpl extends AbstractCrudService<BaseGgpFacil
         if (CollectionUtils.isNotEmpty(baseGgpFacilityList)) {
             for (int i = 0; i < baseGgpFacilityList.size(); i++) {
                 BaseGgpFacilityExportVo baseGgpFacilityExportVo = new BaseGgpFacilityExportVo();
-                baseGgpFacilityExportVo.setXh(i + 1);
-                baseGgpFacilityExportVo.setId(baseGgpFacilityList.get(i).getId());
                 baseGgpFacilityExportVo.setFacilityNum(baseGgpFacilityList.get(i).getFacilityNum());
                 baseGgpFacilityExportVo.setFacilityType("未知");
                 if (CollectionUtils.isNotEmpty(typeList)) {
@@ -167,6 +165,8 @@ public class BaseGgpFacilityServiceImpl extends AbstractCrudService<BaseGgpFacil
                 baseGgpFacilityExportVo.setContact(baseGgpFacilityList.get(i).getContact());
                 baseGgpFacilityExportVo.setContactPhone(baseGgpFacilityList.get(i).getContactPhone());
                 baseGgpFacilityExportVo.setStatus(baseGgpFacilityList.get(i).getFacilityStatus());
+                baseGgpFacilityExportVo.setLongitude(baseGgpFacilityList.get(i).getLongitude());
+                baseGgpFacilityExportVo.setLatitude(baseGgpFacilityList.get(i).getLatitude());
                 baseGgpFacilityExportVo.setCreateTime(baseGgpFacilityList.get(i).getCreateTime().format(df));
                 list.add(baseGgpFacilityExportVo);
             }

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

@@ -24,18 +24,6 @@ public class BaseGgpFacilityExportVo implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Integer id;
-
-    /**
-     * 序号
-     */
-    @Excel(name = "序号")
-    private Integer xh;
-
     /**
      * 设施编号
      */
@@ -61,7 +49,7 @@ public class BaseGgpFacilityExportVo implements Serializable {
     private String address;
 
     /**
-     * 图片地址URL
+     * 设施图片
      */
     @Excel(name = "设施图片")
     private String imagesUrl;
@@ -73,9 +61,9 @@ public class BaseGgpFacilityExportVo implements Serializable {
     private String contact;
 
     /**
-     * 联系方式
+     * 联系电话
      */
-    @Excel(name = "联系方式")
+    @Excel(name = "联系电话")
     private String contactPhone;
 
     /**
@@ -85,7 +73,19 @@ public class BaseGgpFacilityExportVo implements Serializable {
     private Integer status;
 
     /**
-     * 开始时间
+     * 经度
+     */
+    @Excel(name = "经度")
+    private String longitude;
+
+    /**
+     * 维度
+     */
+    @Excel(name = "维度")
+    private String latitude;
+
+    /**
+     * 创建时间
      */
     @Excel(name = "创建时间")
     private String createTime;

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

@@ -14,6 +14,12 @@ import lombok.Data;
  */
 @Data
 public class FacilityImportVo{
+    /**
+     * 设施编号
+     */
+    @Excel(name = "设施编号")
+    private String facilityNum;
+
     /**
      * 设施类型(必填)
      */
@@ -31,6 +37,13 @@ public class FacilityImportVo{
      */
     @Excel(name = "设施地址(必填)")
     private String address;
+
+    /**
+     * 设施图片
+     */
+    @Excel(name = "设施图片")
+    private String imagesUrl;
+
     /**
      * 联系人
      */
@@ -44,10 +57,10 @@ public class FacilityImportVo{
     private String contactPhone;
 
     /**
-     * 备注
+     * 设施状态
      */
-    @Excel(name = "备注")
-    private String facilityDesc;
+    @Excel(name = "设施状态")
+    private Integer status;
 
     /**
      * 经度(必填)
@@ -61,4 +74,10 @@ public class FacilityImportVo{
     @Excel(name = "维度(必填)")
     private String latitude;
 
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间")
+    private String createTime;
+
 }