| | |
| | | |
| | | public static Map<String, GatewayRemoteService> remoteMap = new HashMap<>(); |
| | | |
| | | public static Map<String, DeviceReportService> reportMap = new HashMap<>(); |
| | | |
| | | public static Map<String, GatewaySyncGranService> syncGrain = new HashMap<>(); |
| | | |
| | | public static Map<String, GatewaySyncIdCardService> syncIdCard = new HashMap<>(); |
| | |
| | | Map<String, GatewaySyncWeightService> serviceMap6 = applicationContext.getBeansOfType(GatewaySyncWeightService.class); |
| | | for (String key : serviceMap6.keySet()) { |
| | | syncWeight.put(serviceMap6.get(key).getWeightProtocol(), serviceMap6.get(key)); |
| | | } |
| | | |
| | | Map<String, DeviceReportService> serviceMap7 = applicationContext.getBeansOfType(DeviceReportService.class); |
| | | for (String key : serviceMap7.keySet()) { |
| | | reportMap.put(serviceMap7.get(key).getProvinceProtocol(), serviceMap7.get(key)); |
| | | } |
| | | } |
| | | |
| | |
| | | return syncWeight.get(protocol); |
| | | } |
| | | |
| | | /** |
| | | * 根据实现协议获取当前实现方法 |
| | | * |
| | | * @param protocol |
| | | * @return |
| | | */ |
| | | public DeviceReportService getDeviceReportService(String protocol) { |
| | | return reportMap.get(protocol); |
| | | } |
| | | |
| | | } |