2021与蓝度共同重构项目,服务端
chenjiantian
2022-01-13 3bf546e81db34f69509402fcd42cc5680caad9b9
ximon-admin/src/main/java/com/sandu/ximon/admin/service/LightService.java
@@ -108,14 +108,11 @@
     * @return com.sandu.ximon.dao.enums.DeviceRespStatusEnums
     */
    public Integer controlBrightness(LightControlParam param) {
        Light light = getById(param.getLightId());
        if(light == null){
            throw new BusinessException("找不到路灯");
        }
        A5LightBrightnessReqInnerFrame lightControlFrame = new A5LightBrightnessReqInnerFrame(param.getBrightness());
        A5Frame a5Frame = new A5Frame(A5OrderEnum.REQUEST_LIGHT_DATA.getCode(), lightControlFrame);
        WrapResponseCommonFrame<A5LightBrightnessRespInnerFrame> frame = MainBoardInvokeSyncService.getInstance()
                .sendRRPC(light.getDeviceCode(), a5Frame, A5LightBrightnessRespInnerFrame.class);
                .sendRRPC(param.getDeviceCode(), a5Frame, A5LightBrightnessRespInnerFrame.class);
        if(frame == null){
            throw new BusinessException("发送请求失败");
        }