change-集存库测试版本0309

collectionStore
liuwf 12 months ago
parent f72138f2b5
commit f7fed8b983

@ -32,14 +32,14 @@ namespace Aucma.Scada.Business
#endregion
#region 对象引用
private LogHelper logHelper = LogHelper.Instance;
private LogHelper logHelper = LogHelper.Instance;
private AppConfig appConfig = AppConfig.Instance;
private RegisterServices registerServices = RegisterServices.Instance;
private InStoreTaskHandle taskHandle = InStoreTaskHandle.Instance;
#endregion
@ -60,7 +60,7 @@ namespace Aucma.Scada.Business
private IRecordInStoreService _recordInStore;
private IPrintBarCodeServices _printBarCodeServices;
private IPrintBarCodeServices _printBarCodeServices;
// 过点数据表
private IMaterialCompletionServices _iMaterialCompletionServices;
@ -109,14 +109,15 @@ namespace Aucma.Scada.Business
_printBarCodeServices = registerServices.GetService<IPrintBarCodeServices>();
_productPlanInfoServices = registerServices.GetService<IProductPlanInfoService>();
_iMaterialCompletionServices = registerServices.GetService<IMaterialCompletionServices>();
// taskHandle.InStoreFinsihEvent += InStoreFinish;
// taskHandle.InStoreFinsihEvent += InStoreFinish;
taskHandle.InStoreAnswerEvent += InStoreAnswer;
MvCodeHelper.MessageNoReadEvent += MessageNoRead;
MvCodeHelper.RefreshMaterialCodeStrEvent += InStore;
MvCodeHelper.RefreshLogMessageEvent += PrintLogInfoMessage;
StartPassDown();
// shell 8301501047 liner 8301501067
// shell 8301501047 liner 8301501067
//Task.Run(() =>
//{
// Thread.Sleep(5000);
@ -161,7 +162,7 @@ namespace Aucma.Scada.Business
/// </summary>
/// <param name="storeCode"></param>
/// <param name="materialType"></param>
private void InStore(string materialCode,string scannerIp)
private void InStore(string materialCode, string scannerIp)
{
try
{
@ -174,15 +175,15 @@ namespace Aucma.Scada.Business
{
storeCode = appConfig.linerStoreCode;
}
if(materialCode== "1111111111111111111111")
if (materialCode == "1111111111111111111111")
{
PrintLogInfoMessage("空板经过:"+storeCode);
PrintLogInfoMessage("空板经过:" + storeCode);
}
else
{
PrintLogInfoMessage($"扫码成功,物料码:{materialCode}");
}
string materialType = SubStringMaterialCode(materialCode);
#region Delete By wenjy 2023-10-30 11:41:00 取消通过数据库获取货道数量、在途量改为通过PLC获取货道信息
//var spaceInfo = _spaceInfoService.InStoreGetSpaceInfoByMaterialType(storeCode, materialType);
@ -191,7 +192,7 @@ namespace Aucma.Scada.Business
if (spaceInfo != null)
{
PrintLogInfoMessage($"匹配货道:{spaceInfo.spaceName}");
if(materialType == "1111111111")
if (materialType == "1111111111")
{ // 空板只有在空白货道的时候占据货道,否则只入不占据货道
if (string.IsNullOrEmpty(spaceInfo.materialType))
{
@ -201,7 +202,8 @@ namespace Aucma.Scada.Business
else
{
spaceInfo.materialType = materialType;
}
spaceInfo.typeNameA = GetMaterialName(materialType);
}
RefreshScanMateriaCodeEvent?.Invoke(materialCode, GetMaterialName(materialType), spaceInfo.spaceName, storeCode); //刷新界面扫码信息
var result = CreateInStoreTask(spaceInfo, materialCode); //创建入库任务
if (result)
@ -231,7 +233,7 @@ namespace Aucma.Scada.Business
//报警停线
PrintLogInfoMessage($"物料码:{materialCode};未匹配到可用货道");
}
}
}
catch (Exception ex)
{
PrintLogErrorMessage("入库业务异常", ex);
@ -320,7 +322,7 @@ namespace Aucma.Scada.Business
{
shellNoReadFlag = 1;
int result = taskHandle.SendShellTask_InStore(taskInfo);
if (result==1)
if (result == 1)
{
PrintLogInfoMessage($"箱壳入库任务:{taskInfo.taskCode}下发成功等待PLC执行反馈");
@ -358,7 +360,8 @@ namespace Aucma.Scada.Business
// }
//}
}catch(Exception ex)
}
catch (Exception ex)
{
PrintLogErrorMessage("依次获取箱壳任务队列进行下发逻辑异常", ex);
}
@ -371,7 +374,7 @@ namespace Aucma.Scada.Business
{
try
{
lock(string.Empty)
lock (string.Empty)
{
RealTaskInfo taskInfo = _taskInfoService.GetTaskInfoByStoreCode(appConfig.linerStoreCode, appConfig.instoreTaskType);
if (taskInfo != null)
@ -396,7 +399,7 @@ namespace Aucma.Scada.Business
}
else if (result == 2)
{
// PrintLogInfoMessage("内胆入库任务下发失败PLC接收任务未就绪");
// PrintLogInfoMessage("内胆入库任务下发失败PLC接收任务未就绪");
}
else
{
@ -417,7 +420,8 @@ namespace Aucma.Scada.Business
// }
//}
}
}catch(Exception ex)
}
catch (Exception ex)
{
PrintLogErrorMessage("依次获取内胆任务队列进行下发逻辑异常", ex);
}
@ -481,26 +485,26 @@ namespace Aucma.Scada.Business
var taskInfo = _taskInfoService.GetTaskInfoByTaskCode(taskCode, storeCode);
if (taskInfo != null)
{
var spaceInfo = _spaceInfoService.GetSpaceInfoBySpaceCode(taskInfo.storeCode, taskInfo.spaceCode);
if (spaceInfo != null)
{
// taskHandle.WritePlc(spaceInfo.storeCode, spaceInfo.spaceCode, true);
// spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
// spaceInfo.onRouteAmount -= 1;
// taskHandle.WritePlc(spaceInfo.storeCode, spaceInfo.spaceCode, true);
// spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
// spaceInfo.onRouteAmount -= 1;
//读取PLC获取货道信息存放数量、在途数量,
#region Add By wenjy 2023-10-30 13:44:00 通过PLC获取货道信息
// var item = taskHandle.ReadSpaceInfoByPlc(spaceInfo);
// var item = taskHandle.ReadSpaceInfoByPlc(spaceInfo);
// spaceInfo.spaceStock = item.spaceStock;
// spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
// spaceInfo.onRouteAmount = item.onRouteAmount;
// spaceInfo.spaceStatus = item.spaceStatus;
// spaceInfo.spaceStock = spaceInfo.spaceStock + 1;
// spaceInfo.onRouteAmount = item.onRouteAmount;
// spaceInfo.spaceStatus = item.spaceStatus;
#endregion
// _spaceInfoService.UpdateSpaceInfo(spaceInfo);
// _spaceInfoService.UpdateSpaceInfo(spaceInfo);
#region 添加货道明细
BaseSpaceDetail spaceDetail = new BaseSpaceDetail();
@ -562,7 +566,7 @@ namespace Aucma.Scada.Business
/// <returns></returns>
public List<RealTaskInfo> GetInStoreTask()
{
return _taskInfoService.GetTaskInfosByStoreCode(new string[] { appConfig.shellStoreCode,appConfig.linerStoreCode }, appConfig.instoreTaskType);
return _taskInfoService.GetTaskInfosByStoreCode(new string[] { appConfig.shellStoreCode, appConfig.linerStoreCode }, appConfig.instoreTaskType);
}
/// <summary>
@ -574,7 +578,7 @@ namespace Aucma.Scada.Business
{
string materialName = string.Empty;
var info = _baseBomInfoService.GetBomInfoByMaterialCode(materialType);
if(info != null)
if (info != null)
{
materialName = info.materialName;
}
@ -702,5 +706,34 @@ namespace Aucma.Scada.Business
logHelper.Error(message, ex);
}
#endregion
/// <summary>
/// 截取两个逗号之间的字符串
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
static string GetSubstringBetweenCommas(string input)
{
// 找到第一个逗号的位置
int firstCommaIndex = input.IndexOf(',');
if (firstCommaIndex != -1)
{
// 找到第二个逗号的位置
int secondCommaIndex = input.IndexOf(',', firstCommaIndex + 1);
if (secondCommaIndex != -1)
{
// 使用Substring截取第一个逗号和第二个逗号之间的字符
return input.Substring(firstCommaIndex + 1, secondCommaIndex - firstCommaIndex - 1);
}
else
{
return null ;
}
}
else
{
return null ;
}
}
}
}

@ -15,7 +15,7 @@ namespace Aucma.Scada.Business
/// <summary>
/// 入库任务处理
/// </summary>
internal sealed class InStoreTaskHandle
public sealed class InStoreTaskHandle
{
#region 单例实现
private static readonly Lazy<InStoreTaskHandle> lazy = new Lazy<InStoreTaskHandle>(() => new InStoreTaskHandle());
@ -64,11 +64,26 @@ namespace Aucma.Scada.Business
/// <summary>
/// 已下传的任务信息
/// </summary>
// private List<RealTaskInfo> shellTaskInfos = new List<RealTaskInfo>();
// private List<RealTaskInfo> linerTaskInfos = new List<RealTaskInfo>();
// private List<RealTaskInfo> shellTaskInfos = new List<RealTaskInfo>();
// private List<RealTaskInfo> linerTaskInfos = new List<RealTaskInfo>();
#endregion
#region 委托事件
/// <summary>
/// 箱壳实时库存刷新
/// </summary>
/// <param name="message"></param>
public delegate void RefreshShellStock();
public event RefreshShellStock RefreshShellStockEvent;
/// <summary>
/// 内胆实时库存刷新
/// </summary>
/// <param name="message"></param>
public delegate void RefreshLinerStock();
public event RefreshLinerStock RefreshLinerStockEvent;
/// <summary>
/// 入库完成
/// </summary>
@ -110,40 +125,51 @@ namespace Aucma.Scada.Business
{
Task.Run(() =>
{
List<BaseSpaceInfo> spaceList = _spaceInfoService.GetSpaceInfosByStoreCode(appConfig.shellStoreCode, appConfig.linerStoreCode);
// List<SpaceAddress> spaceAddressList = spaceConfig.GetAllSpaceAddress(spaceList);
if (spaceList!=null && spaceList.Count>0)
{
// List<SpaceAddress> spaceAddressList = spaceConfig.GetAllSpaceAddress(spaceList);
Thread.Sleep(2000);
while (true)
{
foreach(BaseSpaceInfo spaceInfo in spaceList)
List<BaseSpaceInfo> spaceList = _spaceInfoService.GetSpaceInfosByStoreCode(appConfig.shellStoreCode, appConfig.linerStoreCode);
if (spaceList != null && spaceList.Count > 0)
{
foreach (BaseSpaceInfo spaceInfo in spaceList)
{
BaseSpaceInfo tempSpace = new BaseSpaceInfo();
tempSpace.storeCode = spaceInfo.storeCode;
tempSpace.spaceCode = spaceInfo.spaceCode;
tempSpace = ReadSpaceInfoByPlc(tempSpace);
int Stock = spaceInfo.spaceStock;
int OnAmount = spaceInfo.onRouteAmount;
//BaseSpaceInfo tempSpace = new BaseSpaceInfo();
//tempSpace.storeCode = spaceInfo.storeCode;
//tempSpace.spaceCode = spaceInfo.spaceCode;
ReadSpaceInfoByPlc(spaceInfo);
//if (spaceInfo.spaceStock == 0 && spaceInfo.onRouteAmount == 0)
//{
// // 清空型号供新型号使用
// spaceInfo.materialType = null;
// spaceInfo.typeNameA = null;
// _spaceInfoService.UpdateSpaceInfo(spaceInfo);
// RefreshShellStockEvent?.Invoke();
// RefreshLinerStockEvent?.Invoke();
//}
// 更新库存
if(tempSpace.spaceStock!=spaceInfo.spaceStock || tempSpace.onRouteAmount != spaceInfo.onRouteAmount)
if (Stock != spaceInfo.spaceStock || OnAmount != spaceInfo.onRouteAmount)
{
// Console.WriteLine("RealUpdateSpaceInfoByPlc1 " + JsonChange.Instance.ModeToJson(spaceInfo));
spaceInfo.spaceStock = tempSpace.spaceStock;
spaceInfo.onRouteAmount = tempSpace.onRouteAmount;
if(spaceInfo.spaceStock==0 && spaceInfo.onRouteAmount == 0)
{
// 清空型号供新型号使用
spaceInfo.materialType = null;
spaceInfo.typeNameA = null;
}
// Console.WriteLine("RealUpdateSpaceInfoByPlc2 "+JsonChange.Instance.ModeToJson(spaceInfo));
// Console.WriteLine("RealUpdateSpaceInfoByPlc1 " + JsonChange.Instance.ModeToJson(spaceInfo));
// spaceInfo.spaceStock = tempSpace.spaceStock;
// spaceInfo.onRouteAmount = tempSpace.onRouteAmount;
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
RefreshShellStockEvent?.Invoke();
RefreshLinerStockEvent?.Invoke();
}
}
Thread.Sleep(3000);
}
}
Thread.Sleep(3000);
}
});
}

@ -462,40 +462,43 @@ namespace Aucma.Scada.Business
{
while (true)
{
//var shellTasks = shellTaskInfos.Where(x => x.taskStatus == 3).ToList();
//var linerTasks = linerTaskInfos.Where(x => x.taskStatus == 3).ToList();
try
{
var shellTasks = GetTaskInfoByTaskStatus(appConfig.shellStoreCode, 3);
var linerTasks = GetTaskInfoByTaskStatus(appConfig.linerStoreCode, 3);
if (shellTasks == null || linerTasks == null) continue;
RealTaskInfo shellTask = null;
RealTaskInfo linerTask = null;
var shellTasks = GetTaskInfoByTaskStatus(appConfig.shellStoreCode,3);
var linerTasks = GetTaskInfoByTaskStatus(appConfig.linerStoreCode, 3);
if (shellTasks == null || linerTasks == null) continue;
RealTaskInfo shellTask = null;
RealTaskInfo linerTask = null;
if (shellTasks.Count > 0)
{
shellTask = shellTasks.First();
}
if (shellTasks.Count > 0)
{
shellTask = shellTasks.First();
}
if (linerTasks.Count > 0)
{
linerTask = linerTasks.First();
}
if (linerTasks.Count > 0)
{
linerTask = linerTasks.First();
}
if (shellTask != null && linerTask != null)
{
Console.WriteLine($"绑定箱壳:{shellTask.materialCode};内胆:{linerTask.materialCode};条码");
_codeBindingRecordServices.BindingCode(shellTask.materialCode, linerTask.materialCode);
// 更新mes完成计划数
UpdateMesPlanCompleteEvent?.Invoke(shellTask.planCode);
_taskInfoService.DeleteTaskInfoById(shellTask.objId);
_taskInfoService.DeleteTaskInfoById(linerTask.objId);
}
if (shellTask != null && linerTask != null)
Thread.Sleep(2000);
}
catch (Exception ex)
{
Console.WriteLine($"绑定箱壳:{shellTask.materialCode};内胆:{linerTask.materialCode};条码");
_codeBindingRecordServices.BindingCode(shellTask.materialCode, linerTask.materialCode);
// 更新mes完成计划数
UpdateMesPlanCompleteEvent?.Invoke(shellTask.planCode);
_taskInfoService.DeleteTaskInfoById(shellTask.objId);
_taskInfoService.DeleteTaskInfoById(linerTask.objId);
// shellTaskInfos.Remove(shellTask);
// linerTaskInfos.Remove(linerTask);
logHelper.Error(ex.Message.ToString());
}
Thread.Sleep(2000);
}
});

@ -155,7 +155,9 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="White" BorderThickness="1">
<TextBlock Text="型号" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
@ -165,6 +167,16 @@
<TextBlock Text="{Binding materialType}" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</Border>
<Border Grid.Column="2" BorderBrush="White" BorderThickness="1">
<TextBlock Text="名称" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="3" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.SubmitCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding Text, ElementName=spaceCodeText}" Background="Transparent">
<TextBlock Text="{Binding typeNameA}" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</Border>
</Grid>
</Border>

@ -156,7 +156,9 @@
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="6*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="White" BorderThickness="1">
<TextBlock Text="型号" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
@ -166,6 +168,15 @@
<TextBlock Text="{Binding materialType}" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</Border>
<Border Grid.Column="2" BorderBrush="White" BorderThickness="1">
<TextBlock Text="名称" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="3" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.SubmitCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding Text, ElementName=spaceCodeText}" Background="Transparent">
<TextBlock Text="{Binding typeNameA}" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</Border>
</Grid>
</Border>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -1,8 +1,8 @@
[plcSystem]
دل؟اPLCIP=127.0.0.1
دل؟اPLC<EFBFBD>ث؟غ=6000
ؤغ<EFBFBD><EFBFBD>PLCIP=127.0.0.1
ؤغ<EFBFBD><EFBFBD>PLC<EFBFBD>ث؟غ=6001
دل؟اPLCIP=10.10.92.22
دل؟اPLC<EFBFBD>ث؟غ=2015
ؤغ<EFBFBD><EFBFBD>PLCIP=10.10.92.6
ؤغ<EFBFBD><EFBFBD>PLC<EFBFBD>ث؟غ=2015
#眊褲⻌踱華硊
[shell_inStore_address]

@ -1,8 +1,8 @@
[plcSystem]
دل؟اPLCIP=10.10.92.22
دل؟اPLC<EFBFBD>ث؟غ=2015
ؤغ<EFBFBD><EFBFBD>PLCIP=10.10.92.6
ؤغ<EFBFBD><EFBFBD>PLC<EFBFBD>ث؟غ=2015
دل؟اPLCIP=127.0.0.1
دل؟اPLC<EFBFBD>ث؟غ=6000
ؤغ<EFBFBD><EFBFBD>PLCIP=127.0.0.1
ؤغ<EFBFBD><EFBFBD>PLC<EFBFBD>ث؟غ=6001
#眊褲⻌踱華硊
[shell_inStore_address]

@ -24,9 +24,12 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
private OutStoreBusiness outStoreBusiness = OutStoreBusiness.Instance;
private InStoreBusiness inStoreBusiness = InStoreBusiness.Instance;
private AppConfig appConfig = AppConfig.Instance;
private InStoreTaskHandle taskHandle = InStoreTaskHandle.Instance;
public LinerInventoryViewModel()
{
@ -50,7 +53,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
outStoreBusiness.RefreshStoreStockEvent += Query;
SelectTypeViewModel.RefreshLinerPageEvent += Query;
inStoreBusiness.RefreshInStoreTaskEvent += RefreshSpaceInfo;
taskHandle.RefreshLinerStockEvent += Query;
Query();
}
@ -132,6 +135,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
foreach (var item in info)
{
item.typeNameA = GetSubstringBetweenCommas(item.typeNameA);
spaceItems.Add(item);
}
Shapes = spaceItems;
@ -139,6 +143,36 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
}));
}
/// <summary>
/// 截取两个逗号之间的字符串
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
static string GetSubstringBetweenCommas(string input)
{
if (input == null) return null;
// 找到第一个逗号的位置
int firstCommaIndex = input.IndexOf(',');
if (firstCommaIndex != -1)
{
// 找到第二个逗号的位置
int secondCommaIndex = input.IndexOf(',', firstCommaIndex + 1);
if (secondCommaIndex != -1)
{
// 使用Substring截取第一个逗号和第二个逗号之间的字符
return input.Substring(firstCommaIndex + 1, secondCommaIndex - firstCommaIndex - 1);
}
else
{
return null;
}
}
else
{
return null;
}
}
private void RefreshSpaceInfo(object obj = null, bool isFinish = true)
{
Query();

@ -27,6 +27,8 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
private AppConfig appConfig = AppConfig.Instance;
private InStoreTaskHandle taskHandle = InStoreTaskHandle.Instance;
public ShellInventoryViewModel()
{
@ -52,7 +54,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
SelectTypeViewModel.RefreshShellPageEvent += Query;
inStoreBusiness.RefreshInStoreTaskEvent += RefreshSpaceInfo;
taskHandle.RefreshShellStockEvent += Query;
Query();
@ -137,6 +139,7 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
foreach (var item in info)
{
item.typeNameA = GetSubstringBetweenCommas(item.typeNameA);
spaceItems.Add(item);
}
Shapes = spaceItems;
@ -145,6 +148,36 @@ namespace Aucma.Scada.UI.viewModel.InventoryInfo
}
/// <summary>
/// 截取两个逗号之间的字符串
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
static string GetSubstringBetweenCommas(string input)
{
if (input == null) return null;
// 找到第一个逗号的位置
int firstCommaIndex = input.IndexOf(',');
if (firstCommaIndex != -1)
{
// 找到第二个逗号的位置
int secondCommaIndex = input.IndexOf(',', firstCommaIndex + 1);
if (secondCommaIndex != -1)
{
// 使用Substring截取第一个逗号和第二个逗号之间的字符
return input.Substring(firstCommaIndex + 1, secondCommaIndex - firstCommaIndex - 1);
}
else
{
return null;
}
}
else
{
return null;
}
}
private void RefreshSpaceInfo(object obj = null, bool isFinish = true)
{
Query();

@ -522,21 +522,28 @@ namespace Aucma.Scada.UI.viewModel
/// <param name="type"></param>
public void ShellScannerState(bool type)
{
Application.Current.Dispatcher.Invoke(() =>
try
{
if (type)
{
Scanner1UIStatusWb = "箱壳扫码器";
Scanner1UIColor = "Green";
Scanner1UIIcon = "templates/image/Green.png";
}
else
{
Scanner1UIStatusWb = "箱壳扫码器";
Scanner1UIColor = "Red";
Scanner1UIIcon = "templates/image/Red.png";
}
});
Application.Current.Dispatcher.Invoke(() =>
{
if (type)
{
Scanner1UIStatusWb = "箱壳扫码器";
Scanner1UIColor = "Green";
Scanner1UIIcon = "templates/image/Green.png";
}
else
{
Scanner1UIStatusWb = "箱壳扫码器";
Scanner1UIColor = "Red";
Scanner1UIIcon = "templates/image/Red.png";
}
});
}
catch (Exception ex)
{
logHelper.Error(ex.Message.ToString());
}
}
#endregion
@ -584,21 +591,28 @@ namespace Aucma.Scada.UI.viewModel
/// <param name="type"></param>
public void LinerScannerState(bool type)
{
Application.Current.Dispatcher.Invoke(() =>
try
{
if (type)
{
Scanner2UIStatusWb = "内胆扫码器";
Scanner2UIColor = "Green";
Scanner2UIIcon = "templates/image/Green.png";
}
else
{
Scanner2UIStatusWb = "内胆扫码器";
Scanner2UIColor = "Red";
Scanner2UIIcon = "templates/image/Red.png";
}
});
Application.Current.Dispatcher.Invoke(() =>
{
if (type)
{
Scanner2UIStatusWb = "内胆扫码器";
Scanner2UIColor = "Green";
Scanner2UIIcon = "templates/image/Green.png";
}
else
{
Scanner2UIStatusWb = "内胆扫码器";
Scanner2UIColor = "Red";
Scanner2UIIcon = "templates/image/Red.png";
}
});
}
catch (Exception ex)
{
logHelper.Error(ex.Message.ToString());
}
}
#endregion

Loading…
Cancel
Save