| | |
| | | |
| | | public static Map<String, GatewayRemoteService> remoteMap = new HashMap<>(); |
| | | |
| | | public static Map<String, DeviceReportService> reportMap = new HashMap<>(); |
| | | public static Map<String, GatewayDeviceReportService> reportMap = new HashMap<>(); |
| | | |
| | | public static Map<String, GatewaySyncGranService> syncGrain = new HashMap<>(); |
| | | |
| | |
| | | public static Map<String, GatewaySyncLprService> syncLpr = new HashMap<>(); |
| | | |
| | | public static Map<String, GatewaySyncWeightService> syncWeight = new HashMap<>(); |
| | | |
| | | public static Map<String, GatewayDeviceTestService> testMap = new HashMap<>(); |
| | | |
| | | @Override |
| | | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { |
| | |
| | | syncWeight.put(serviceMap6.get(key).getWeightProtocol(), serviceMap6.get(key)); |
| | | } |
| | | |
| | | Map<String, DeviceReportService> serviceMap7 = applicationContext.getBeansOfType(DeviceReportService.class); |
| | | Map<String, GatewayDeviceReportService> serviceMap7 = applicationContext.getBeansOfType(GatewayDeviceReportService.class); |
| | | for (String key : serviceMap7.keySet()) { |
| | | reportMap.put(serviceMap7.get(key).getProvinceProtocol(), serviceMap7.get(key)); |
| | | reportMap.put(serviceMap7.get(key).getProtocol(), serviceMap7.get(key)); |
| | | } |
| | | |
| | | Map<String, GatewayDeviceTestService> serviceMap8 = applicationContext.getBeansOfType(GatewayDeviceTestService.class); |
| | | for (String key : serviceMap8.keySet()) { |
| | | testMap.put(serviceMap8.get(key).getProtocol(), serviceMap8.get(key)); |
| | | } |
| | | } |
| | | |
| | |
| | | * @param protocol |
| | | * @return |
| | | */ |
| | | public DeviceReportService getDeviceReportService(String protocol) { |
| | | public GatewayDeviceReportService getDeviceReportService(String protocol) { |
| | | return reportMap.get(protocol); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param protocol |
| | | * @return |
| | | */ |
| | | public GatewayDeviceTestService getGatewayTestService(String protocol) { |
| | | return testMap.get(protocol); |
| | | } |
| | | |
| | | } |