管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-12 c0ffe9147554b1e3e4d5459b1cc530d09b55b165
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
package com.lf.server.service.show;
 
import com.lf.server.entity.bs.MpipelineEntity;
import com.lf.server.entity.ctrl.CountEntity;
import com.lf.server.entity.ctrl.IdNameEntity;
import com.lf.server.entity.show.OneMapEntity;
import com.lf.server.mapper.show.OneMapMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
 
/**
 * 管网一张图Service
 *
 * @author 邢锦双
 */
@Service
public class OneMapService implements OneMapMapper {
    @Autowired
    OneMapMapper oneMapMapper;
 
    /**
     * 测绘
     */
    private static final String MEASUREMENT = "测绘(ESV)";
    /**
     * 调查
     */
    private static final String TOINVESTIGATE = "勘察(EGE)";
    /**
     * 地灾
     */
    private static final String DISASTER = "地灾(EGD)";
    /**
     * 地下结构洞库
     */
    private static final String UNDERGROUNDSTRUCTURE = "洞库(EGD)";
 
    /**
     * 项目类别conut
     */
    @Override
    public List<String> projectCategoryCount() {
        return oneMapMapper.projectCategoryCount();
    }
 
    /**
     * 项目位置conut
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> projectLocationCount() {
        return oneMapMapper.projectLocationCount();
    }
 
    /**
     * 国家维度conut
     */
    @Override
    public List<String> countryDimensionCount() {
        return oneMapMapper.countryDimensionCount();
    }
 
    /**
     * 省维conut
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> provinceDimensionCount() {
        return oneMapMapper.provinceDimensionCount();
    }
 
    /**
     * 全国维度-按照项自类型统计不同项目个数
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countProjectTypeNumber() {
        return oneMapMapper.countProjectTypeNumber();
    }
 
    /**
     * 数据存储conut
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> dataStorageCount() {
        return oneMapMapper.dataStorageCount();
    }
 
    /**
     * 统计数据类别
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> statisticalDataCategories() {
        return oneMapMapper.statisticalDataCategories();
    }
 
    /**
     * 统计数据服务类型
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> statisticalDataServiceType() {
        return oneMapMapper.statisticalDataServiceType();
    }
 
    /**
     * 登录人数统计
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> loginNumberStatistics() {
        return oneMapMapper.loginNumberStatistics();
    }
 
    /**
     * 文件格式conut
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> fileFormatCount() {
        return oneMapMapper.fileFormatCount();
    }
 
    /**
     * 数据申请conut
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> dataApplyCount() {
        return oneMapMapper.dataApplyCount();
    }
 
    /**
     * 数据访问数
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> dataVisitCount() {
        return oneMapMapper.dataVisitCount();
    }
 
    /**
     * 下载数统计
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countDownloads() {
        return oneMapMapper.countDownloads();
    }
 
    /**
     * 统计项目显示
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countProjectDisplay() {
        return oneMapMapper.countProjectDisplay();
    }
 
    /**
     * 统计项目参观
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countProjectTour(MpipelineEntity mpipelineEntity) {
        return oneMapMapper.countProjectTour(mpipelineEntity);
    }
 
    /**
     * 选择项目参观列表
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> selectProjectTour() {
        return oneMapMapper.selectProjectTour();
    }
 
 
    /**
     * 选择项目类型
     *
     * @return {@link List}<{@link OneMapEntity}>
     */
    @Override
    public List<OneMapEntity> selectProjectType1() {
        List<OneMapEntity> resList = new ArrayList<>();
        List<OneMapEntity> resInfo = oneMapMapper.selectProjectType1();
        for (OneMapEntity oneMapEntity : resInfo) {
            if (MEASUREMENT.equals(oneMapEntity.getValue())) {
                resList.addAll(queryDirectory(oneMapEntity));
            } else if (TOINVESTIGATE.equals(oneMapEntity.getValue())) {
                resList.addAll(queryDirectory(oneMapEntity));
            } else if (DISASTER.equals(oneMapEntity.getValue())) {
                resList.addAll(queryDirectory(oneMapEntity));
            } else if (UNDERGROUNDSTRUCTURE.equals(oneMapEntity.getValue())) {
                resList.addAll(queryDirectory(oneMapEntity));
            }
        }
        return resList;
    }
 
    /**
     * 查询目录
     *
     * @return {@link List}<{@link OneMapEntity}>
     */
    public List<OneMapEntity> queryDirectory(OneMapEntity oneMapEntity) {
        String valueStr = oneMapEntity.getKey();
        System.out.println(oneMapEntity.getValue() + " == value == " + valueStr);
        String endSql = null;
        String sqlQur;
        if (valueStr.length() > 0) {
            String[] arrStr = valueStr.split(",");
            StringBuilder one = new StringBuilder();
            if (arrStr.length > 0) {
                System.out.println("arrStr = " + arrStr.length);
            }
            for (String s : arrStr) {
                sqlQur = "'" + s + "%' " + "or dircode like";
                one.append(sqlQur);
            }
            endSql = " where dircode like " + one.substring(0, one.toString().length() - 15);
            System.out.println("endSql = " + endSql);
        }
        return oneMapMapper.selectProjectTypeOne(endSql);
    }
 
    /**
     * 选择项目类型一
     *
     * @param sqlQur sql
     * @return {@link List}<{@link OneMapEntity}>
     */
    @Override
    public List<OneMapEntity> selectProjectTypeOne(String sqlQur) {
        return null;
    }
 
 
    /**
     * 查询表信息
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> queryTableInfo(String tableName) {
        return oneMapMapper.queryTableInfo(tableName);
    }
 
    /**
     * 计算全球管道图
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countGlobalPipeMap() {
        return oneMapMapper.countGlobalPipeMap();
    }
 
    /**
     * 计算全国管道图
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countNationalPipeMap() {
        return oneMapMapper.countNationalPipeMap();
    }
 
    /**
     * 全国管网图输送介质长度
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countZhPipeMapLenByMed() {
        return oneMapMapper.countZhPipeMapLenByMed();
    }
 
    /**
     * 全国站场座数、阀室、管道数等
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countZhPipeStations() {
        return oneMapMapper.countZhPipeStations();
    }
 
    /**
     * 按项目统计项目存储量
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countStorageByProject() {
        return oneMapMapper.countStorageByProject();
    }
 
    /**
     * 选择项目信息
     * 查询项目信息
     *
     * @param projectCode 项目名称
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> selectProjectInfo(String projectCode) {
        return oneMapMapper.selectProjectInfo(projectCode);
    }
 
    /**
     * 选择项目文件列表
     *
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> selectProjectFileList() {
        return oneMapMapper.selectProjectFileList();
    }
 
    /**
     * 计算存储项目
     *
     * @param projectCode 项目代码
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countProjectStorage(String projectCode) {
        return oneMapMapper.countProjectStorage(projectCode);
    }
 
    /**
     * 单个项目文件数量
     *
     * @param projectCode 项目代码
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<Map<String, Object>> countProjectType(String projectCode) {
        return oneMapMapper.countProjectType(projectCode);
    }
 
    /**
     * 统计项目下
     *
     * @param projectCode 项目代码
     * @return {@link List}<{@link String}>
     */
    @Override
    public List<String> countProjectDown(String projectCode) {
        return oneMapMapper.countProjectDown(projectCode);
    }
 
    @Override
    public List<CountEntity> countByMajor() {
        return oneMapMapper.countByMajor();
    }
 
    @Override
    public Integer selectLineBuffer() {
        return oneMapMapper.selectLineBuffer();
    }
 
    @Override
    public List<IdNameEntity> selectMetaByType() {
        return oneMapMapper.selectMetaByType();
    }
}