liulb@mesnac.com 9 months ago
parent de67e88911
commit e2b7da4584

@ -47,12 +47,28 @@ namespace Aucma.Core.DataCollector
Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity)); Parallel.Invoke(() => collector.CollectDeviceAlarmInfo(out var alarmInfos), () => collector.CollectDeviceElectricity(out var electricity));
}); });
} }
else if (stationCode == "1005")//泡前库、发泡线、发泡机
else if (stationCode == "1005")//箱体发泡、发泡线、发泡机、异常数据采集
{ {
//发泡机
Task.Run(() => Task.Run(() =>
{ {
DataCollectorFactory collector = new BoxFoamFactory(_deviceParamServices, _deviceAlarmInfoServices, _deviceElectricityServices); 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)); 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)); 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}"); _logger.Error($"UseDataCollectorExtensions逻辑执行异常:{ex.Message}");
} }

Loading…
Cancel
Save