Commit 17e20c0e authored by suhuiguang's avatar suhuiguang

1.大屏-区域安全指数

parent ae0d3b3f
......@@ -30,35 +30,30 @@ public class AQZSDPStatisticsController {
this.statisticsService = statisticsService;
}
/**
* 预警预报统计
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/earlyWarning/child", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "预警预报")
public ResponseModel<Map<String, Object>> getChildEarlyWarning(@RequestBody Map<String, Object> map) throws Exception {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "大屏-气瓶-区域安全指数")
@PostMapping(value = "/security-index")
public ResponseModel<Map<String, Object>> getSecurityIndex(@RequestBody Map<String, Object> map) throws Exception {
Object regionCode = map.get("cityCode");
if (ObjectUtils.isEmpty(regionCode)) {
regionCode = "610000";
}
return ResponseHelper.buildResponse(statisticsService.getChildEarlyWarning(regionCode.toString()));
Map<String, Object> result = statisticsService.getSecurityIndex(regionCode.toString());
return ResponseHelper.buildResponse(result);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "区域安全指数")
@PostMapping(value = "/security-index")
public ResponseModel<Map<String, Object>> getsecurityIndex(@RequestBody Map<String, Object> map) throws Exception {
@RequestMapping(value = "/earlyWarning/child", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "大屏-气瓶-区域安全指数统计")
public ResponseModel<Map<String, Object>> getChildEarlyWarning(@RequestBody Map<String, Object> map) throws Exception {
Object regionCode = map.get("cityCode");
if (ObjectUtils.isEmpty(regionCode)) {
regionCode = "610000";
}
Map<String, Object> result = statisticsService.getsecurityIndex(regionCode.toString());
return ResponseHelper.buildResponse(result);
return ResponseHelper.buildResponse(statisticsService.getChildEarlyWarning(regionCode.toString()));
}
......
......@@ -217,7 +217,7 @@ public class AQZSDPStatisticsServiceImpl {
}
public Map<String, Object> getsecurityIndex(String regionCode) throws Exception {
public Map<String, Object> getSecurityIndex(String regionCode) throws Exception {
List<RegionModel> regionModels = this.setRegionIfRootParent(regionCode);
List<String> collect = regionModels.stream().map(c -> c.getRegionCode().toString()).collect(Collectors.toList());
List<CompanyModel> companyModelList = Privilege.companyClient.queryListByCompanyCode(Strings.join(collect, ",")).getResult();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment