diff --git a/Aucma.Core.DataCollector/DataCollectorSetup.cs b/Aucma.Core.DataCollector/DataCollectorSetup.cs index 0b978baa..9f24a236 100644 --- a/Aucma.Core.DataCollector/DataCollectorSetup.cs +++ b/Aucma.Core.DataCollector/DataCollectorSetup.cs @@ -47,12 +47,28 @@ namespace Aucma.Core.DataCollector Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity)); }); } - else if (stationCode == "1005")//泡前库、发泡线、发泡机 + + else if (stationCode == "1005")//箱体发泡、发泡线、发泡机、异常数据采集 { + //发泡机 Task.Run(() => { DataCollectorFactory collector = new BoxFoamFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices); + Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity)); + }); + //发泡线1 + Task.Run(() => + { + DataCollectorFactory collector = new BoxFoamFixture1Factory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices); + + Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity)); + }); + //发泡线2 + Task.Run(() => + { + DataCollectorFactory collector = new BoxFoamFixture2Factory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices); + Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity)); }); } @@ -119,8 +135,19 @@ namespace Aucma.Core.DataCollector Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity)); }); } + else if (stationCode == "1012")//门体发泡 + { + Console.WriteLine("开始执行异常数据采集"); + Task.Run(() => + { + DataCollectorFactory collector = new DoorFoamFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices); + + Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity)); + }); + } + } - catch(Exception ex) + catch (Exception ex) { _logger.Error($"UseDataCollectorExtensions逻辑执行异常:{ex.Message}"); }