| | |
| | | import com.moral.common.bean.PageResult;
|
| | | import com.moral.common.bean.ResultBean;
|
| | | import com.moral.common.util.ValidateUtil;
|
| | | import com.moral.common.util.WebUtils;
|
| | | import com.moral.common.xml.Version;
|
| | | import com.moral.entity.alarm.AlarmSensorLevel;
|
| | |
|
| | |
| | | areaNamesBuilder.append(String.join("/",names));
|
| | | }
|
| | | // 企业用户
|
| | | if( 0 == organization.getRank()) {
|
| | | if(organization.getRank()!=null && organization.getRank() == 0) {
|
| | | resultMap.put("type","enterprise");
|
| | | }else{
|
| | | resultMap.put("type","government");
|
| | |
| | | }else if(organization.getProvinceCode()!=null) {
|
| | | mapAreaCode = organization.getProvinceCode();
|
| | | }
|
| | | resultMap.put("mapAreaCode ",mapAreaCode );
|
| | | resultMap.put("mapAreaCode",mapAreaCode.toString() );
|
| | | }
|
| | | resultMap.put("mapPath",areaNamesBuilder.toString());
|
| | | }
|
| | |
| | | @ApiImplicitParams(value = {
|
| | | @ApiImplicitParam(name = "orgid",defaultValue = "5",value = "组织id", required = true, paramType = "query", dataType = "Integer"),
|
| | | })
|
| | | public ResultBean<List<Map>> getAqi24HoursNC(@RequestParam("orgid") Integer organizationId) {
|
| | | public ResultBean<List<Map<String,Object>>> getAqi24HoursNC(@RequestParam("orgid") Integer organizationId) {
|
| | | return new ResultBean<>(hangzhouAqiService.queryAqi24Hours(organizationId));
|
| | | }
|
| | | @GetMapping("mpt-dev-summary")
|
| | |
| | | Map<String, Object> map = qualityDailyService.getQualityCountDayByRegion(parameters);
|
| | | return new ResultBean<Map<String, Object>>(map);
|
| | | }
|
| | |
|
| | | @GetMapping("monitorpoints-devices")
|
| | | @ApiOperation(value = "获取监控点以及设备", notes = "获取监控点以及设备")
|
| | | @ApiImplicitParams(value = {
|
| | | @ApiImplicitParam(name = "organizationId",defaultValue = "8", value = "登录账号的组织id", required = true, paramType = "query", dataType = "Integer"),
|
| | | @ApiImplicitParam(name = "regionCode",defaultValue = "320583", value = "区域码", required = true, paramType = "query", dataType = "String")
|
| | | })
|
| | | public ResultBean<List<MonitorPoint>> getMonitorPointsAndDevicesByRegion(HttpServletRequest request) throws Exception {
|
| | | Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null);
|
| | | List<MonitorPoint> monitorPoints= monitorPointService.getMonitorPointsAndDevicesByRegion(parameters);
|
| | | return new ResultBean<List<MonitorPoint>>(monitorPoints);
|
| | | }
|
| | |
|
| | |
|
| | | @GetMapping("devices-state")
|
| | | @ApiOperation(value = "刷新设备状态", notes = "刷新设备状态")
|
| | | @ApiImplicitParams(value = {
|
| | | @ApiImplicitParam(name = "organizationId",defaultValue = "8", value = "登录账号的组织id", required = true, paramType = "query", dataType = "Integer"),
|
| | | @ApiImplicitParam(name = "regionCode",defaultValue = "320583", value = "区域码", required = true, paramType = "query", dataType = "String")
|
| | | })
|
| | | public ResultBean<Collection<Object>> getDevicesStateByRegion(HttpServletRequest request) throws Exception {
|
| | | Map<String, Object> parameters = WebUtils.getParametersStartingWith(request, null);
|
| | | Collection<Object> monitorPoints= monitorPointService.getDevicesStateByRegion(parameters);
|
| | | return new ResultBean<Collection<Object>>(monitorPoints);
|
| | | }
|
| | | }
|