| | |
| | | */ |
| | | @Scheduled(cron = "0/3 * * * * ?") |
| | | public void scheduled3() { |
| | | try{ |
| | | //执行HTTP地磅请求 |
| | | exeHttpWeightReq(); |
| | | }catch (Exception e){ |
| | | log.error(e.getMessage(),e); |
| | | } |
| | | |
| | | //执行HTTP地磅请求 |
| | | exeHttpWeightReq(); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | BaseReqData reqData; |
| | | for (GatewayDevice device : list) { |
| | | |
| | | if (!GatewayDeviceProtocol.DEVICE_WEIGHT_HTTP.getCode().equals(device.getSyncProtocol())) { |
| | | continue; |
| | | } |
| | | |
| | | reqData = new BaseReqData(); |
| | | reqData.setDevice(device); |
| | | reqData.setDeviceName(device.getDeviceName()); |
| | | reqData.setProductId(device.getProductId()); |
| | | reqData.setDeviceId(device.getDeviceId()); |
| | | |
| | | gatewayRemoteManager.getSyncWeightService(device.getSyncProtocol()).syncWeightInfo(reqData); |
| | | } |
| | | } |