From 81decd363a1cd1e6af770380745d644f6931d13e Mon Sep 17 00:00:00 2001 From: kaiyu <404897439@qq.com> Date: Mon, 02 Aug 2021 09:34:59 +0800 Subject: [PATCH] screen-api 修复获取五分钟数据空指针BUG --- screen-api/src/main/java/com/moral/api/controller/MonitorPointController.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/controller/MonitorPointController.java b/screen-api/src/main/java/com/moral/api/controller/MonitorPointController.java index 8eb74e9..ce0faaa 100644 --- a/screen-api/src/main/java/com/moral/api/controller/MonitorPointController.java +++ b/screen-api/src/main/java/com/moral/api/controller/MonitorPointController.java @@ -3,6 +3,7 @@ import com.moral.api.entity.MonitorPoint; import com.moral.api.pojo.form.device.MonitorPointQueryForm; import com.moral.api.pojo.vo.monitorPoint.MonitorPointsVO; +import com.moral.api.pojo.vo.monitorPoint.StateControllerStationVO; import com.moral.api.service.MonitorPointService; import com.moral.api.service.OrganizationService; import com.moral.constant.ResponseCodeEnum; @@ -41,7 +42,7 @@ return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); //������������������ - List<MonitorPoint> monitorPoints = monitorPointService.query(form); + List<MonitorPoint> monitorPoints = monitorPointService.queryByOrgIdAndRegionCode(form); //������������������ MonitorPointsVO vo = MonitorPointsVO.convert(monitorPoints); @@ -49,5 +50,16 @@ return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(), vo); } + @GetMapping("queryStateControlStation") + public ResultMessage queryStateControlStation(Integer regionCode){ + + List<MonitorPoint> monitorPoints = monitorPointService.queryStateControlStationByRegionCode(regionCode); + + //������������������������ + StateControllerStationVO vo = StateControllerStationVO.convert(monitorPoints); + + return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),vo); + } + } -- Gitblit v1.8.0