管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-03-23 835d7bc6b421ec998f2c7d04f528b36c52035c90
src/main/java/com/lf/server/service/data/FmeService.java
@@ -3,6 +3,7 @@
import com.lf.server.entity.ctrl.FmeReqEntity;
import com.lf.server.entity.ctrl.NameValueEntity;
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;
@@ -240,11 +241,12 @@
    /**
     * 14.CRDS平台交付
     */
    public String crdsPackaging(String dir, String major, String isCut, HttpServletRequest req) {
        String url = getUrl("datax/task/run/CRDS平台交付_测试", req);
    public String crdsPackaging(String dirCode, String major, String isCut, HttpServletRequest req) {
        // datax/task/run/CRDS平台交付_测试
        String url = getUrl("datax/task/run/CRDS平台交付_code测试", req);
        List<NameValueEntity> list = getKeyValues("CRDS平台交付_测试");
        list.add(new NameValueEntity("S_FFXMMC", dir));
        List<NameValueEntity> list = getKeyValues("CRDS平台交付");
        list.add(new NameValueEntity("S_FFXMMC", dirCode));
        list.add(new NameValueEntity("MBZY", major));
        list.add(new NameValueEntity("P_WBFW", isCut));
@@ -252,6 +254,46 @@
    }
    /**
     * 15.服务注册
     */
    public String 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));
        return RestHelper.postForRest(url, list);
    }
    /**
     * 16.服务申请
     */
    public String 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()));
        return RestHelper.postForRest(url, list);
    }
    /**
     * 17.删除资源
     */
    public void deleteRes(String id, HttpServletRequest req) {
        String url = getUrl("resource/res/hashid", req) + "&hashid=" + id;
        RestHelper.deleteForRest(url);
    }
    /**
     * 获取Url
     */
    public String getUrl(String subUrl, HttpServletRequest req) {