| | |
| | | } |
| | | |
| | | @Override |
| | | public String report2GatewayBySn(double weigh, GatewayDevice device) { |
| | | |
| | | if (null == device) { |
| | | log.error("-----------没有获取到设备配置信息-----"); |
| | | return "ERROR:没有获取到设备配置信息"; |
| | | } |
| | | |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public BaseResp reportGrainData(BaseReqData reqData) { |
| | | |
| | | String topic = ScConstant.TOPIC_REPORT; |
| | |
| | | |
| | | String topic = ScConstant.TOPIC_MESSAGE_REPORT; |
| | | |
| | | topic = topic.replace("${productId}", reqData.getProductId()).replace("{deviceId}", reqData.getDeviceId()); |
| | | topic = topic.replace("${productId}", reqData.getProductId()).replace("${deviceId}", reqData.getDeviceId()); |
| | | |
| | | publishService.publishMqttWithTopic(reqData.getData(), topic); |
| | | |
| | |
| | | @Override |
| | | public BaseResp reportLprData(BaseReqData reqData) { |
| | | String topic = ScConstant.TOPIC_MESSAGE_REPORT; |
| | | topic = topic.replace("${productId}", reqData.getProductId()).replace("{deviceId}", reqData.getDeviceId()); |
| | | topic = topic.replace("${productId}", reqData.getProductId()).replace("${deviceId}", reqData.getDeviceId()); |
| | | |
| | | publishService.publishMqttWithTopic(reqData.getData(), topic); |
| | | |