管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-13 7d536d24aa867e9dd4304db39f267373679a6480
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
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
package com.lf.server.controller.show;
 
import com.lf.server.annotation.SysLog;
import com.lf.server.controller.all.BaseController;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.bs.MpipelineEntity;
import com.lf.server.entity.ctrl.CountEntity;
import com.lf.server.entity.show.OneMapEntity;
import com.lf.server.service.show.OneMapService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
import java.util.Map;
 
/**
 * 管网一张图
 * aFigurePipelineNetwork
 *
 * @author xing
 * @date 2023/02/13
 */
@Api(tags = "综合展示\\管网一张图")
@RestController
@RequestMapping("/oneMap")
public class OneMapController extends BaseController {
    @Autowired
    OneMapService oneMapService;
 
    //============[项目统计 project Statistics]==================
 
    /**
     * 项目类别
     * Project category
     */
    @SysLog()
    @ApiOperation(value = "项目类别")
    @GetMapping("/countProjectCategory")
    public ResponseMsg<Object> projectCategoryCount() {
        List<String> resList = oneMapService.projectCategoryCount();
        return success(resList);
    }
 
    /**
     * 项目位置分布接口
     * Project location
     */
    @SysLog()
    @ApiOperation(value = "项目位置分布接口")
    @GetMapping("/countProjectLocation")
    public ResponseMsg<Object> projectLocationCount() {
        List<String> resList = oneMapService.projectLocationCount();
        return success(resList);
    }
 
    /**
     * 国家维度-数量统计
     * Country dimension
     */
    @SysLog()
    @ApiOperation(value = "国家维度-数量统计")
    @GetMapping("/countCountryDimension")
    public ResponseMsg<Object> countryDimensionCount() {
        List<String> resList = oneMapService.countryDimensionCount();
        return success(resList);
    }
 
    /**
     * 省维度-数量统计
     * Province dimension - quantity
     */
    @SysLog()
    @ApiOperation(value = "省维度-数量统计")
    @GetMapping("/countProvinceDimension")
    public ResponseMsg<Object> provinceDimensionCount() {
        List<String> resList = oneMapService.provinceDimensionCount();
        return success(resList);
    }
 
    /**
     * 全国维度-按照项自类型统计不同项目个数
     * Count the number of different items according to their type
     */
    @SysLog()
    @ApiOperation(value = "全国维度-按照项自类型统计不同项目个数")
    @GetMapping("/countProjectTypeNumber")
    public ResponseMsg<Object> countProjectTypeNumber() {
        List<String> resList = oneMapService.countProjectTypeNumber();
        return success(resList);
    }
 
    //============[数据统计 data Statistics]==================
 
    /**
     * 数据统计
     * 数据存储
     * data storage
     */
    @SysLog()
    @ApiOperation(value = "数据存储统计")
    @GetMapping("/countDataStorage")
    public ResponseMsg<Object> dataStorageCount() {
        List<String> resList = oneMapService.dataStorageCount();
        return success(resList);
    }
 
    /**
     * 数据大类统计
     * Statistics of large categories of data
     */
    @SysLog()
    @ApiOperation(value = "数据大类统计")
    @GetMapping("/countLargeCategories")
    public ResponseMsg<Object> statisticalDataCategories() {
        List<String> resList = oneMapService.statisticalDataCategories();
        return success(resList);
    }
 
    /**
     * 数据服务类型统计
     * Data service type statistics
     */
    @SysLog()
    @ApiOperation(value = "数据服务类型统计")
    @GetMapping("/countDataServiceType")
    public ResponseMsg<Object> statisticalDataServiceType() {
        List<String> resList = oneMapService.statisticalDataServiceType();
        return success(resList);
    }
 
    /**
     * 登录次数统计
     * Number of logins
     */
    @SysLog()
    @ApiOperation(value = "登录次数统计")
    @GetMapping("/countLoginNumber")
    public ResponseMsg<Object> loginNumberStatistics() {
        List<String> resList = oneMapService.loginNumberStatistics();
        return success(resList);
    }
 
    /**
     * 数据统计
     * 文件格式维度-文件个数
     * File format dimension
     */
    @SysLog()
    @ApiOperation(value = "文件格式维度-文件个数")
    @GetMapping("/countFileFormat")
    public ResponseMsg<Object> fileFormatCount() {
        List<String> resList = oneMapService.fileFormatCount();
        return success(resList);
    }
 
    /**
     * 数据统计
     * 数据申请
     * Data application
     */
    @SysLog()
    @ApiOperation(value = "数据申请")
    @GetMapping("/countDataApply")
    public ResponseMsg<Object> dataApplyCount() {
        List<String> resList = oneMapService.dataApplyCount();
        return success(resList);
    }
 
    /**
     * 数据统计
     * 访问次数
     * Number of visits
     */
    @SysLog()
    @ApiOperation(value = "访问次数")
    @GetMapping("/countDataVisit")
    public ResponseMsg<Object> dataVisitCount() {
        List<String> resList = oneMapService.dataVisitCount();
        return success(resList);
    }
 
    /**
     * 下载量统计
     * Download statistics
     * <p>type类型:1-Shp文件,2-专题图,3-元数据,4-业务数据,5-管道分析,6-统计报告<p/>
     */
    @SysLog()
    @ApiOperation(value = "下载量统计")
    @GetMapping("/countDownloads")
    public ResponseMsg<Object> countDownloads() {
        List<String> resList = oneMapService.countDownloads();
        return success(resList);
    }
 
    /**
     * 项目工程展示
     * Project engineering display
     */
    @SysLog()
    @ApiOperation(value = "项目工程展示")
    @GetMapping("/countProjectDisplay")
    public ResponseMsg<Object> countProjectDisplay() {
        List<String> resList = oneMapService.countProjectDisplay();
        return success(resList);
    }
 
    /**
     * 项目工程巡视
     * Project inspection tour
     */
    @SysLog()
    @ApiOperation(value = "项目工程巡视")
    @GetMapping("/countProjectTour")
    public ResponseMsg<Object> countProjectTour(MpipelineEntity mpipelineEntity) {
        List<String> resList = oneMapService.countProjectTour(mpipelineEntity);
 
        return success("hello! 您已经成功访问-项目工程巡视", resList);
    }
 
    /**
     * 项目工程巡视列表
     * Project inspection tour
     */
    @SysLog()
    @ApiOperation(value = "项目工程巡视列表")
    @GetMapping("/selectProjectTour")
    public ResponseMsg<Object> selectProjectTour() {
        List<String> resList = oneMapService.selectProjectTour();
        return success(resList);
    }
 
    /**
     * 工程项目目录
     * Project Catalog
     */
    @SysLog()
    @ApiOperation(value = "工程项目目录")
    @GetMapping("/selectProjectType")
    public ResponseMsg<Object> selectProjectType() {
        List<OneMapEntity> resList = oneMapService.selectProjectType1();
        return success(resList);
    }
 
    /**
     * 根据表名查询表字段信息
     * Query table field information according to table name
     */
    @ApiOperation(value = "根据表名查询表字段信息")
    @GetMapping("/selectTableInfo")
    public ResponseMsg<Object> selectTableInfo(@RequestParam("tableName") String tableName) {
        List<String> resList = oneMapService.queryTableInfo(tableName);
        return success(resList);
    }
 
    //============[专题展示 Thematic presentations]==================
 
    /**
     * 全球管网图
     * Global pipe network map
     */
    @SysLog()
    @ApiOperation(value = "全球管网图")
    @GetMapping("/countGlobalPipeMap")
    public ResponseMsg<Object> countGlobalPipeMap() {
        List<String> resList = oneMapService.countGlobalPipeMap();
        return success(resList);
    }
 
    /**
     * 全国管网图
     * National pipe network map
     */
    @SysLog()
    @ApiOperation(value = "全国管网图")
    @GetMapping("/countNationalPipeMap")
    public ResponseMsg<Object> countNationalPipeMap() {
        List<String> resList = oneMapService.countNationalPipeMap();
        return success(resList);
    }
 
    /**
     * 全国管网图输送介质长度
     * National pipe network diagram conveying medium length
     */
    @SysLog()
    @ApiOperation(value = "全国管网图输送介质长度")
    @GetMapping("/countZhPipeMapLength")
    public ResponseMsg<Object> countZhPipeMapLenByMed() {
        List<String> resList = oneMapService.countZhPipeMapLenByMed();
        return success(resList);
    }
 
    /**
     * 统计全国站场座数
     * Number of station seats nationwide
     */
    @SysLog()
    @ApiOperation(value = "全国站场座数、阀室、管道数等")
    @GetMapping("/countZhPipeStations")
    public ResponseMsg<Object> countZhPipeStations() {
        List<String> resList = oneMapService.countZhPipeStations();
        return success(resList);
    }
 
    /**
     * 按项目统计项目存储量
     * Count the amount of project storage by project
     */
    @SysLog()
    @ApiOperation(value = "按项目统计项目存储量")
    @GetMapping("/countStorageByProject")
    public ResponseMsg<Object> countStorageByProject() {
        List<String> resList = oneMapService.countStorageByProject();
        return success(resList);
    }
 
    //============[工程展示 Engineering Showcase]==================
 
    /**
     * 项目信息查询
     * Project information query
     */
    @SysLog()
    @ApiOperation(value = "项目信息查询")
    @GetMapping("/selectProjectInfo")
    public ResponseMsg<Object> selectProjectInfo(@RequestParam("projectCode") String projectCode) {
        List<String> resList = oneMapService.selectProjectInfo(projectCode);
        return success(resList);
    }
    /**
     * 项目文件列表查询
     * Project file list query
     */
    @SysLog()
    @ApiOperation(value = "项目文件列表查询")
    @GetMapping("/selectProjectFileList")
    public ResponseMsg<Object> selectProjectFileList() {
        List<String> resList = oneMapService.selectProjectFileList();
        return success(resList);
    }
 
    /**
     * 单个项目存储量
     *
     * @param projectCode 项目代码
     * @return {@link ResponseMsg}<{@link Object}>
     */
    @SysLog()
    @ApiOperation(value = "单个项目存储量")
    @GetMapping("/countProjectStorage")
    public ResponseMsg<Object> countProjectStorage(@RequestParam("projectCode") String projectCode) {
        List<String> resList = oneMapService.countProjectStorage(projectCode);
        return success(resList);
    }
 
    /**
     * 单个项目文件数量
     * The number of individual project files
     *
     * @param projectCode 项目代码
     * @return {@link ResponseMsg}<{@link Object}>
     */
    @SysLog()
    @ApiOperation(value = "单个项目文件类型数量")
    @GetMapping("/countProjectType")
    public ResponseMsg<Object> countProjectType(@RequestParam("projectCode") String projectCode) {
        List<Map<String, Object>> resList = oneMapService.countProjectType(projectCode);
 
        return success(resList);
    }
 
    /**
     * 统计项目下
     * 单个项目下载量
     *
     * @param projectCode 项目代码
     * @return {@link ResponseMsg}<{@link Object}>
     */
    @SysLog()
    @ApiOperation(value = "单个项目下载量")
    @GetMapping("/countProjectDown")
    public ResponseMsg<Object> countProjectDown(@RequestParam("projectCode") String projectCode) {
        List<String> resList = oneMapService.countProjectDown(projectCode);
        return success(resList);
    }
 
    // ============[ 数据统计 - 2024-03-06]============
    @SysLog()
    @ApiOperation(value = "数据统计(按大类统计)")
    @GetMapping("/countByMajor")
    public ResponseMsg<Object> countByMajor(){
        try {
            List<CountEntity> list = oneMapService.countByMajor();
 
            return success(list);
        }catch (Exception ex){
            log.error(ex.getMessage(), ex);
            return fail(ex.getMessage());
        }
    }
 
    @SysLog()
    @ApiOperation(value = "查询计算数据")
    @GetMapping("/selectCalcData")
    public ResponseMsg<Object> selectCalcData(){
        try {
            String rs = oneMapService.calcData();
 
            return success(rs);
        }catch (Exception ex){
            log.error(ex.getMessage(), ex);
            return fail(ex.getMessage());
        }
    }
}