| | |
| | | package com.fzzy.gateway.controller; |
| | | |
| | | import com.fzzy.api.data.GatewayDeviceProtocol; |
| | | import com.fzzy.api.data.GatewayDeviceType; |
| | | import com.fzzy.gateway.GatewayUtils; |
| | | import com.fzzy.gateway.api.GatewayRemoteManager; |
| | |
| | | return "ERROR:当前设备没有配置布线规则,无法执行"; |
| | | } |
| | | |
| | | BaseResp resp = gatewayRemoteManager.getGatewayTestService(device.getPushProtocol()).testGrain(reqData); |
| | | BaseResp resp =null; |
| | | if(GatewayDeviceProtocol.DEVICE_TEST.getCode().equals(device.getSyncProtocol())){ |
| | | resp = gatewayRemoteManager.getGatewayTestService(device.getPushProtocol()).testGrain(reqData); |
| | | }else{ |
| | | reqData.setAutoReplay(false); |
| | | resp = gatewayRemoteManager.getSyncGrainService(device.getSyncProtocol()).syncGrain(reqData); |
| | | } |
| | | |
| | | //自动推送 |
| | | if (BaseResp.CODE_200 == resp.getCode() && reqData.isAutoReplay()) { |
| | | reqData.setData(resp.getData()); |