ソースを参照

添加了图层名称

wuweihao 5 年 前
コミット
9eaf5682bc

+ 18 - 9
src/main/java/com/fd/entity/OutputFileEntity.java

@@ -94,6 +94,23 @@ public class OutputFileEntity extends BaseEntity implements Serializable {
     private Integer layerMax;
 
     /**
+     * 图层角色
+     * 指定角色才能看图层
+     *
+     * admin
+     * user
+     */
+    @Column
+    private String layerRole;
+
+    /**
+     * 发布的图层名称
+     *
+     */
+    @Column
+    private String layerName;
+
+    /**
      * 坐标类型
      */
     @Column
@@ -118,15 +135,7 @@ public class OutputFileEntity extends BaseEntity implements Serializable {
     @Column
     private String userGroup;
 
-    /**
-     * 图层角色
-     * 指定角色才能看图层
-     *
-     * admin
-     * user
-     */
-    @Column
-    private String layerRole;
+
 
     /**
      * 打包数据

+ 3 - 0
src/main/java/com/fd/server/impl/DemServerImpl.java

@@ -265,6 +265,9 @@ public class DemServerImpl extends BaseServerImpl implements DemServer {
         entity.setStatus(8);
         entity.setUpdateTime(new Date());
 
+        // 添加图层名称
+        entity.setLayerName(param.getText());
+
         // 添加图层角色
         entity.setLayerRole(param.getRole());
         outputFileRepository.save(entity);

+ 3 - 0
src/main/java/com/fd/server/impl/ModelServerImpl.java

@@ -240,6 +240,9 @@ public class ModelServerImpl extends BaseServerImpl implements ModelServer  {
             entity.setStatus(8);
             entity.setUpdateTime(new Date());
 
+            // 添加图层名称
+            entity.setLayerName(param.getText());
+
             // 添加图层角色
             entity.setLayerRole(param.getRole());
             outputFileRepository.save(entity);

+ 3 - 0
src/main/java/com/fd/server/impl/RasterServerImpl.java

@@ -188,6 +188,9 @@ public class RasterServerImpl extends BaseServerImpl implements RasterServer {
             entity.setStatus(8);
             entity.setUpdateTime(new Date());
 
+            // 添加图层名称
+            entity.setLayerName(param.getText());
+
             // 添加图层角色
             entity.setLayerRole(param.getRole());
             outputFileRepository.save(entity);

+ 2 - 10
src/main/java/com/fd/server/impl/VectorServerImpl.java

@@ -93,24 +93,16 @@ public class VectorServerImpl extends BaseServerImpl implements VectorServer {
             return new R(50002, MsgCode.E50002);
         }
         OutputFileEntity entity = o.get();
-//        FileUtils.createDir(MOVE_FILE_TO_SERVER);
 
         try {
-//            org.apache.commons.io.FileUtils.copyDirectoryToDirectory(new File(entity.getSlicePath()), new File(MOVE_FILE_TO_SERVER));
             // 修改前端的config.json 文件
             writeJsonFile(param, entity.getDirectory(), entity);
 
-            //修改linux 文件权限
-//            String cmd = Command.CMD_CHOMD_755;
-//            String slice = MOVE_FILE_TO_SERVER + entity.getDirectory();
-//            cmd = cmd.replace("@path", slice);
-//            log.info("cmd: {}", cmd);
-//            cmdServer.exeCmdInt(cmd);
-
-
             entity.setStatus(8);
             entity.setServicePath(entity.getSlicePath());
             entity.setUpdateTime(new Date());
+            // 添加图层名称
+            entity.setLayerName(param.getText());
 
             // 添加图层角色
             entity.setLayerRole(param.getRole());