From 7bfbdcdab10c58ecf96b45543c0d0df948af4ba5 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 12 三月 2024 16:43:18 +0800
Subject: [PATCH] 修改根据类型查询元数据方法

---
 src/main/java/com/lf/server/service/data/FmeService.java |   82 ++++++++++++++++++++++++++++++----------
 1 files changed, 61 insertions(+), 21 deletions(-)

diff --git a/src/main/java/com/lf/server/service/data/FmeService.java b/src/main/java/com/lf/server/service/data/FmeService.java
index 5e58ebb..7fb782d 100644
--- a/src/main/java/com/lf/server/service/data/FmeService.java
+++ b/src/main/java/com/lf/server/service/data/FmeService.java
@@ -2,8 +2,8 @@
 
 import com.lf.server.entity.ctrl.FmeReqEntity;
 import com.lf.server.entity.ctrl.NameValueEntity;
+import com.lf.server.entity.ctrl.RegisterEntity;
 import com.lf.server.entity.data.MetaFileEntity;
-import com.lf.server.entity.data.PublishEntity;
 import com.lf.server.helper.RestHelper;
 import com.lf.server.helper.StringHelper;
 import com.lf.server.helper.WebHelper;
@@ -221,7 +221,36 @@
     }
 
     /**
-     * 13.琛ㄦ牸鍏ュ簱锛歋_RKBG銆乨irid銆乸arentid锛屽涓互鑻辨枃閫楀彿闅斿紑
+     * 13.閫昏緫涓�鑷存�ф鏌ワ細.dwg/.xls/.xlsx
+     */
+    public String checkLogical(FmeReqEntity fme, HttpServletRequest req) {
+        String url = getUrl("datax/task/run/B3鍏ュ簱璐ㄦ_閫昏緫涓�鑷存�ф鏌�", req);
+
+        List<NameValueEntity> list = getKeyValues("閫昏緫涓�鑷存�ф鏌�");
+        list.add(new NameValueEntity("XMMC", fme.xmmc));
+        list.add(new NameValueEntity("SJZY", fme.sjzy));
+        list.add(new NameValueEntity("GCXMYSB", fme.zipPath));
+
+        return RestHelper.postForRest(url, list);
+    }
+
+    /**
+     * 14.鍗曢」鎴愭灉瀹屾暣鎬ф鏌ワ細.*
+     */
+    public String checkSingleIntegrity(FmeReqEntity fme, HttpServletRequest req) {
+        String url = getUrl("datax/task/run/B6鍏ュ簱璐ㄦ_鍗曢」鎴愭灉瀹屾暣鎬ф鏌�", req);
+
+        List<NameValueEntity> list = getKeyValues("鍗曢」鎴愭灉瀹屾暣鎬ф鏌�");
+        list.add(new NameValueEntity("XMMC", fme.xmmc));
+        list.add(new NameValueEntity("SJZY", fme.sjzy));
+        list.add(new NameValueEntity("GCXMYSB", fme.zipPath));
+        list.add(new NameValueEntity("SJFL", fme.sjfl));
+
+        return RestHelper.postForRest(url, list);
+    }
+
+    /**
+     * a.琛ㄦ牸鍏ュ簱锛歋_RKBG銆乨irid銆乸arentid锛屽涓互鑻辨枃閫楀彿闅斿紑
      */
     public String excelLoader(MetaFileEntity meta, HttpServletRequest req) {
         String url = getUrl("datax/task/run/琛ㄦ牸鍏ュ簱", req);
@@ -239,7 +268,7 @@
     }
 
     /**
-     * 14.CRDS骞冲彴浜や粯
+     * b.CRDS骞冲彴浜や粯
      */
     public String crdsPackaging(String dirCode, String major, String isCut, HttpServletRequest req) {
         // datax/task/run/CRDS骞冲彴浜や粯_娴嬭瘯
@@ -254,38 +283,32 @@
     }
 
     /**
-     * 鏈嶅姟娉ㄥ唽
+     * c.鏈嶅姟娉ㄥ唽
      */
-    public String serverRegister(String name, String serverUri, String type, HttpServletRequest req) {
+    public RegisterEntity serverRegister(String name, String serverUri, String type, HttpServletRequest req) {
         String url = getUrl("resource/res/item", req);
 
-        List<NameValueEntity> list = new ArrayList<>();
-        list.add(new NameValueEntity("tags", new String[]{name}));
-        list.add(new NameValueEntity("name", name));
-        list.add(new NameValueEntity("address", serverUri));
-        list.add(new NameValueEntity("detailUrl", serverUri));
-        list.add(new NameValueEntity("type", type));
-        list.add(new NameValueEntity("description", name));
-        list.add(new NameValueEntity("isrequest", true));
+        RegisterEntity entity = new RegisterEntity(name, serverUri, type);
 
-        return RestHelper.postForRest(url, list);
+        String resid = RestHelper.postForRest(url, entity);
+        entity.setSerialnum(resid);
+
+        return entity;
     }
 
     /**
-     * 鏈嶅姟鐢宠
+     * d.鏈嶅姟鐢宠
      */
-    public String serverApply(String id, Integer pubid, HttpServletRequest req) {
+    public void serverApply(String id, Integer pubid, HttpServletRequest req) {
         String url = getUrl("resource/res/request", req) + "&resourceid=" + id;
 
-        List<NameValueEntity> list = new ArrayList<>();
-        list.add(new NameValueEntity("reason", "娉ㄥ唽"));
-        list.add(new NameValueEntity("serialnum", pubid.toString()));
+        RegisterEntity entity = new RegisterEntity(pubid);
 
-        return RestHelper.postForRest(url, list);
+        RestHelper.postForRest(url, entity);
     }
 
     /**
-     * 鍒犻櫎璧勬簮
+     * e.鍒犻櫎璧勬簮
      */
     public void deleteRes(String id, HttpServletRequest req) {
         String url = getUrl("resource/res/hashid", req) + "&hashid=" + id;
@@ -294,6 +317,23 @@
     }
 
     /**
+     * f.璁$畻闈㈢Н
+     */
+    public String calcArea(String sjfl, String id, String wjlj, HttpServletRequest req) {
+        String url = getUrl("datax/task/run/鏁版嵁鍗犲湴闈㈢Н璁$畻", req);
+
+        List<NameValueEntity> list = new ArrayList<>();
+        list.add(new NameValueEntity("_name", String.format("%s_%s", "鏁版嵁鍗犲湴闈㈢Н璁$畻", StringHelper.YMDHMS2_FORMAT.format(new Date()))));
+        list.add(new NameValueEntity("_terminate_on_error", false));
+        list.add(new NameValueEntity("_priority", 100));
+        list.add(new NameValueEntity("SJFL", sjfl));
+        list.add(new NameValueEntity("ID", id));
+        list.add(new NameValueEntity("WJLJ", wjlj));
+
+        return RestHelper.postForRest(url, list);
+    }
+
+    /**
      * 鑾峰彇Url
      */
     public String getUrl(String subUrl, HttpServletRequest req) {

--
Gitblit v1.9.3