| | |
| | | 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; |
| | | } |
| | | |
| | | } |