管道基础大数据平台系统开发-【后端】-Server
1.7
13693261870
2023-01-07 3372ad6e59c7da5abf28e65447c7b428e5793326
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
package com.lf.server.service.data;
 
import com.lf.server.entity.ctrl.FmeReqEntity;
import com.lf.server.entity.ctrl.NameValueEntity;
import com.lf.server.helper.RestHelper;
import com.lf.server.helper.WebHelper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
 
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
 
/**
 * FME服务类
 * @author WWW
 */
@Service
public class FmeService {
    @Value("${sys.fmeUrl}")
    private String fmeUrl;
 
    /**
     * 1.OSGB检查:.osgb + *倾斜摄影*.xls/.xlsx
     */
    public void checkOsgb(String path) {
 
    }
 
    /**
     * 2.表格数据检查:.xls/.xlsx(排除元数据)
     */
    public void checkXls() {
 
    }
 
    /**
     * 3.点云检查:.laz + *激光点云*.xls/.xlsx
     */
    public void checkLaz() {
 
    }
 
    /**
     * 4.高程检查:.tif/.prj/.tfw/.tif.ovr + *地形图*.dwg
     */
    public void checkDem() {
 
    }
 
    /**
     * 5.属性检查:*dlg*.gdb + *地形图*.dwg
     */
    public void checkAttrs() {
 
    }
 
    /**
     * 6.拓扑检查:*地形图*.dwg
     */
    public void checkTopology() {
 
    }
 
    /**
     * 7.图面整饰检查:.dwg
     */
    public void checkDecorate() {
 
    }
 
    /**
     * 8.原点检查:*剖面图*.dwg
     */
    public void checkOrigin() {
 
    }
 
    /**
     * 9.栅格检查:.tif/.prj/.tfw/.tif.ovr + .xls/.xlsx
     */
    public void checkDom() {
 
    }
 
    /**
     * 10.数学基础检查:.shp, .gdb, *元数据*.xls/.xlsx
     */
    public String checkMath(FmeReqEntity fme, HttpServletRequest req) {
        String url = getUrl("datax/task/run/B1入库质检_数学基础检查", req);
 
        List<NameValueEntity> list = getKeyValues(fme.name);
        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);
    }
 
    /**
     * 11.元数据检查:*元数据*.xls/.xlsx
     */
    public void checkMeta() {
        
    }
 
    /**
     * 12.入库质检总:.zip/.7z + .xls/.xlsx
     */
    public String checkMain(FmeReqEntity fme, HttpServletRequest req) {
        String url = getUrl("datax/task/run/B0入库质检__总", req);
 
        List<NameValueEntity> list = getKeyValues(fme.name);
        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("S_WBSBG", fme.wbsPath));
        list.add(new NameValueEntity("S_DZDK", fme.isDiZai));
        list.add(new NameValueEntity("DZ_ZLLX", fme.diZaiType));
 
        return RestHelper.postForRest(url, list);
    }
 
    /**
     * 获取Url
     */
    public String getUrl(String subUrl, HttpServletRequest req) {
        String token = WebHelper.getToken(req);
 
        return fmeUrl + subUrl + "?token=" + token;
    }
 
    /**
     * 获取名称值对集合
     */
    public List<NameValueEntity> getKeyValues(String guid) {
        List<NameValueEntity> list = new ArrayList<>();
        list.add(new NameValueEntity("_name", guid));
        list.add(new NameValueEntity("_priority", 100));
        list.add(new NameValueEntity("_terminate_on_error", true));
        list.add(new NameValueEntity("IID", ""));
        list.add(new NameValueEntity("FANOUT_DIR", "$(OrgResultStorage)"));
        list.add(new NameValueEntity("IID_JL", "$(OrgUserStorage)\\质检配置文件\\IID记录表.xlsx"));
        list.add(new NameValueEntity("S_ZJXZ", "$(OrgUserStorage)\\质检配置文件\\质检细则总.xlsx"));
        list.add(new NameValueEntity("S_BZPZB", "$(OrgUserStorage)\\质检配置文件\\质检配置表总.xlsx"));
 
        return list;
    }
}