From 235a2be052544e41cef217920d4e55fee730995e Mon Sep 17 00:00:00 2001 From: 于紫祥_1901 <email@yuzixiang_1910> Date: Tue, 23 Jun 2020 09:54:30 +0800 Subject: [PATCH] 净化率,收集率,无组织排放 --- src/main/java/com/moral/controller/ScreenController.java | 72 ++++++++++++++++++++++++++++++++++++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/moral/controller/ScreenController.java b/src/main/java/com/moral/controller/ScreenController.java index ee04af0..030a524 100644 --- a/src/main/java/com/moral/controller/ScreenController.java +++ b/src/main/java/com/moral/controller/ScreenController.java @@ -1779,4 +1779,76 @@ return model; } } + + @GetMapping("/purify") + @ApiOperation(value = "���������������������", notes = "���������������������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "monitorPointId", value = "������Id", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "sensorKey", value = "������", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "time", value = "������(���������2020-03-19-14)", required = true, paramType = "query", dataType = "String")}) + public ModelAndView PurificationRate(HttpServletRequest request,ModelAndView model){ + Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null); + String monitPointIdS= (String) parameters.get("monitorPointId"); + String sensor= (String) parameters.get("sensorKey"); + String time= (String) parameters.get("time"); + String YearAndDay = time.substring(0, time.lastIndexOf("-")); + String Hour = time.substring(time.lastIndexOf("-") + 1); + String Time = YearAndDay + " " + Hour + ":00:00"; + int monitPointId=Integer.parseInt(monitPointIdS); + JSONObject params=monitorPointService.getMonitorPointById(monitPointId,Time,1,sensor); + String paramsJson = params.toJSONString(); + model.addObject("mapParams", paramsJson); + model.setViewName("purityMap"); + return model; + } + + + @GetMapping("/collection") + @ApiOperation(value = "���������������������", notes = "���������������������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "monitorPointId", value = "������Id", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "time", value = "������(���������2020-03-19-14)", required = true, paramType = "query", dataType = "String")}) + public ModelAndView collectionRate(HttpServletRequest request,ModelAndView model){ + Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null); + String monitPointIdS= (String) parameters.get("monitorPointId"); + String sensor= ""; + String time= (String) parameters.get("time"); + String YearAndDay = time.substring(0, time.lastIndexOf("-")); + String Hour = time.substring(time.lastIndexOf("-") + 1); + String Time = YearAndDay + " " + Hour + ":00:00"; + int monitPointId=Integer.parseInt(monitPointIdS); + //������������������ + JSONObject params=monitorPointService.getMonitorPointById(monitPointId,Time,2,sensor); + model.addObject("params",params); + model.setViewName("pressureMap"); + return model; + } + + + + @GetMapping("/unorganizedEmissions") + @ApiOperation(value = "���������������", notes = "���������������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "monitorPointId", value = "������Id", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "sensorKey", value = "������", required = true, paramType = "query", dataType = "String"), + // @ApiImplicitParam(name = "sensorKey", value = "���������key,���������������������������", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "time", value = "������(���������2020-03-19-14)", required = true, paramType = "query", dataType = "String")}) + public ModelAndView unorganizedEmissions(HttpServletRequest request,ModelAndView model){ + Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null); + String monitPointIdS= (String) parameters.get("monitorPointId"); + String sensor= (String) parameters.get("sensorKey"); + String time= (String) parameters.get("time"); + String YearAndDay = time.substring(0, time.lastIndexOf("-")); + String Hour = time.substring(time.lastIndexOf("-") + 1); + String Time = YearAndDay + " " + Hour + ":00:00"; + + + int monitPointId=Integer.parseInt(monitPointIdS); + //������������������ + JSONObject params=monitorPointService.getMonitorPointById(monitPointId,Time,3,sensor); + model.addObject("params",params); + model.setViewName("unorganizedMap"); + return model; + } + } -- Gitblit v1.8.0