kaiyu
2021-07-16 3b29244703787dda85386167dca4126b5b0f150c
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);
    }
}