EventMapController.java
2.7 KB
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
package com.skua.modules.emergency.controller;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.modules.emergency.service.IEmergencyRiskEventService;
import com.skua.modules.emergency.vo.DangerDatabaseResult;
import com.skua.modules.emergency.vo.MapDatabaseResult;
import com.skua.modules.emergency.vo.RiskDatabaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.*;
/**
* 安全环保地图接口
*/
@Slf4j
@Api(tags="安全环保地图")
@RestController
@RequestMapping("/safetyEnviron/map")
public class EventMapController {
@Autowired
private IEmergencyRiskEventService emergencyRiskEventService;
/**
* 安全隐患事件数量
*/
@AutoLog(value = "安全隐患事件数量")
@ApiOperation(value="安全隐患事件数量", notes="安全隐患事件数量")
@GetMapping(value = "/getCount")
public Result<Map<String,Object>> getHandleCount(String year){
Result<Map<String,Object>> result = new Result<>();
Map<String,Object> map = emergencyRiskEventService.getCount(year);
result.setSuccess(true);
result.setResult(map);
return result;
}
/**
* 风险库统计
*/
@AutoLog(value = "风险库统计")
@ApiOperation(value="风险库统计", notes="风险库统计")
@GetMapping(value = "/getRiskList")
public Result<List<RiskDatabaseResult>> getRiskList(String year){
Result<List<RiskDatabaseResult>> result = new Result<>();
List<RiskDatabaseResult> list = emergencyRiskEventService.getRiskList(year);
result.setSuccess(true);
result.setResult(list);
return result;
}
/**
* 隐患排查巡检统计
*/
@AutoLog(value = "隐患排查巡检统计")
@ApiOperation(value="隐患排查巡检统计", notes="隐患排查巡检统计")
@GetMapping(value = "/getDangerList")
public Result<List<DangerDatabaseResult>> getDangerList(String year){
Result<List<DangerDatabaseResult>> result = new Result<>();
List<DangerDatabaseResult> list = emergencyRiskEventService.getDangerList(year);
result.setSuccess(true);
result.setResult(list);
return result;
}
/**
* 地图隐患排查巡检统计
*/
@AutoLog(value = "地图隐患排查巡检统计")
@ApiOperation(value="地图隐患排查巡检统计", notes="地图隐患排查巡检统计")
@GetMapping(value = "/getMapData")
public Result<List<MapDatabaseResult>> getMapData(String year){
Result<List<MapDatabaseResult>> result = new Result<>();
List<MapDatabaseResult> list = emergencyRiskEventService.getMapData(year);
result.setSuccess(true);
result.setResult(list);
return result;
}
}