liuwf 10 months ago
parent 729cf301e9
commit 72eebd2aff

@ -2486,9 +2486,9 @@
条码2记录时间
</summary>
</member>
<member name="P:Admin.Core.Model.CodeBindingRecord.isPlcPass">
<member name="P:Admin.Core.Model.CodeBindingRecord.IsPass">
<summary>
plc放行标志2为放行通过1为pda提示需要放行记录
plc放行标志1为自动放行2为手动放行
</summary>
</member>
<member name="P:Admin.Core.Model.CodeBindingRecord.LinerCode">

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+88718f3b34f7734324ee7cf97223cb04de12229c")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.FrameWork")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
20767d7337a3656e5cd7e3434c747ce5e30a077ccc10b646dba8956b775fa268
7d60a94dd38c10522cbfe4a021ccb6e9c5da0354

@ -1,9 +1,3 @@
is_global = true
build_property.RootNamespace = Admin.Core.FrameWork
<<<<<<< HEAD
build_property.ProjectDir = E:\c#\AUCMA\最新代码整合\new\Admin.Core.FrameWork\
=======
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.FrameWork\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
>>>>>>> 97953438a8516959b94be7b8b7960a70eb343705

@ -51,10 +51,10 @@ namespace Admin.Core.Model
[SugarColumn(ColumnName = "RECORD_TIME2")]
public DateTime RecordTime2 { get; set; }
/// <summary>
/// plc放行标志2为放行通过1为pda提示需要放行记录
/// plc放行标志1为自动放行2为手动放行
/// </summary>
[SugarColumn(ColumnName = "IS_PASS")]
public int isPlcPass { get; set; }
public int IsPass { get; set; }
/// <summary>
/// 内胆码

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+88718f3b34f7734324ee7cf97223cb04de12229c")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyTitleAttribute("Admin.Core.RealTimeService")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

@ -1 +1 @@
689391e9f973c5505f9f19ae7180cf35baa36d32cc9dacfb00d7905272e68934
0868e6bde5b49a65a126b91d794e990427a11761

@ -8,10 +8,4 @@ build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Admin.Core.RealTimeService
<<<<<<< HEAD
build_property.ProjectDir = E:\c#\AUCMA\最新代码整合\new\Admin.Core.RealTimeService\
=======
build_property.ProjectDir = D:\Project\gitea\AUCMA\SCADA\Admin.Core.RealTimeService\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
>>>>>>> 97953438a8516959b94be7b8b7960a70eb343705

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>

@ -31,7 +31,7 @@ namespace Aucma.Core.CodeBinding.Business
/// code1扫码信息刷新
/// </summary>
/// <param name="Code1"></param>
public delegate void BindingReceiveCode(string MesCode, string SnCode);
public delegate void BindingReceiveCode(string MesCode, string SnCode, int flag = 1);
public static event BindingReceiveCode? BindingReceiveCodeEvent;
#region 单例实现
@ -117,7 +117,7 @@ namespace Aucma.Core.CodeBinding.Business
if(!string.IsNullOrEmpty(MESCode) && !string.IsNullOrEmpty(SNCode))
{
// 委托
BindingReceiveCodeEvent?.Invoke(MESCode, SNCode);
BindingReceiveCodeEvent?.Invoke(MESCode, SNCode,2);
SNCode = string.Empty;
MESCode = string.Empty;
}

@ -34,9 +34,9 @@ namespace Aucma.Core.CodeBinding.Models
/// </summary>
public string? BindingResult { get; set; }
/// <summary>
/// plc下传结果
/// 放行方式1-自动2-手动
/// </summary>
public string? IsPlcPass { get; set; }
public string? IsPass { get; set; }
/// <summary>
/// 记录时间
/// </summary>

@ -234,6 +234,7 @@ namespace Aucma.Core.CodeBinding.ViewModels
ProductCode = record.ProductCode,
BoxName = record.BoxName,
BindingResult = record.BindingResult,
IsPass = record.IsPass==1?"自动":"手动",
RecordTime = record.RecordTime2.ToString()
});
@ -574,7 +575,8 @@ namespace Aucma.Core.CodeBinding.ViewModels
/// </summary>
/// <param name="code1">MES码</param>
/// <param name="code2">SN码</param>
public void BindingCode(string code1, string code2)
/// <param name="flag">1为自动扫描2为手动扫描</param>
public void BindingCode(string code1, string code2,int flag =1)
{
try
{
@ -621,7 +623,7 @@ namespace Aucma.Core.CodeBinding.ViewModels
record.ProductCode = code2;
//record.RecordTime1 = System.DateTime.Now;
record.RecordTime2 = System.DateTime.Now;
record.isPlcPass = 1;
record.IsPass = flag;
record.BindingResult = "成功";
bool result = false;
if (Repeatflag == 0)

@ -41,7 +41,7 @@ namespace Aucma.Core.CodeBinding.ViewModels
{
Application.Current.Dispatcher.Invoke(() =>
{
ListItems.Add(new ReaderInfo() { No = ListItems.Count + 1, BoxCode = record.BoxCode, ProductCode = record.ProductCode, BoxName = record.BoxName, BindingResult = record.BindingResult, IsPlcPass = record.isPlcPass == 2 ? "plc放行成功" : "", RecordTime = record.RecordTime2.ToString() });
ListItems.Add(new ReaderInfo() { No = ListItems.Count + 1, BoxCode = record.BoxCode, ProductCode = record.ProductCode, BoxName = record.BoxName, BindingResult = record.BindingResult, IsPass = record.IsPass == 1 ? "自动" : "手动", RecordTime = record.RecordTime2.ToString() });
});
}
@ -114,7 +114,7 @@ namespace Aucma.Core.CodeBinding.ViewModels
foreach (CodeBindingRecord record in list)
{
ListItems.Add(new ReaderInfo() { No = ListItems.Count + 1, BoxCode = record.BoxCode, ProductCode = record.ProductCode, BoxName = record.BoxName, BindingResult = record.BindingResult, IsPlcPass = record.isPlcPass == 2 ? "plc放行成功" : "", RecordTime = record.RecordTime2.ToString() });
ListItems.Add(new ReaderInfo() { No = ListItems.Count + 1, BoxCode = record.BoxCode, ProductCode = record.ProductCode, BoxName = record.BoxName, BindingResult = record.BindingResult, IsPass = record.IsPass == 1 ? "自动" : "手动", RecordTime = record.RecordTime2.ToString() });
}
}));

@ -214,7 +214,8 @@
<DataGridTextColumn Binding="{Binding ProductCode}" Header="成品条码" Width="4*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding BoxName}" Header="产品型号" Width="4*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding BindingResult}" Header="绑定结果" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding IsPass}" Header="绑定方式" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding RecordTime,StringFormat=\{0:yyyy-MM-dd HH:mm\}}" Header="记录时间" Width="4*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>

@ -85,7 +85,7 @@ namespace Aucma.Core.HwPLc
melsecMcNet.Port = port;
// 如果网络不太理想,配置了两个端口,一个有问题,立即切换另一个的话,可以配置如下的代码
// melsecMcNet.GetPipeSocket().SetMultiPorts(new int[] { 5552, 5553, 5554, 5555});
// melsecMcNet.GetPipeSocket().SetMultiPorts(new int[] { 2014, 2015});
try
{
// 先关闭再重连,防止多次重连

@ -186,8 +186,7 @@ namespace Aucma.Core.Palletiz.Business
recordInstore.EntryPattern = 0;
}
_ = _recordInstoreServices.AddAsync(recordInstore).Result;
#endregion
if (!result)
@ -214,7 +213,8 @@ namespace Aucma.Core.Palletiz.Business
//刷新页面
AddDataEvent?.Invoke(recordInstore);
}
_ = _recordInstoreServices.AddAsync(recordInstore).Result;
}
@ -280,7 +280,7 @@ namespace Aucma.Core.Palletiz.Business
}
if (spaceinfos == null)
if (spaceinfos == null || spaceinfos.Count==0)
{
throw new ArgumentException($"通过物料型号获取货道信息异常:根据成品信息获取货道信息为空");
}
@ -289,14 +289,14 @@ namespace Aucma.Core.Palletiz.Business
MatchSpaceInfoByPlc(ref spaceinfos);
if (spaceinfos == null)
if (spaceinfos == null || spaceinfos.Count==0)
{
throw new ArgumentException($"通过物料型号获取货道信息异常:通过PLC匹配可用货道信息为空");
}
FiltrateSpaceInfo(spaceinfos, out laseSpaceinfo, out spaceinfo);
if (spaceinfo == null)
if (spaceinfo == null || spaceinfos.Count==0)
{
throw new ArgumentException($"通过物料型号获取货道信息异常:未获取到匹配的货道信息");
}
@ -346,7 +346,7 @@ namespace Aucma.Core.Palletiz.Business
/// <exception cref="ArgumentException"></exception>
private void FiltrateSpaceInfo(List<BaseSpaceInfo> spaceinfos, out BaseSpaceInfo laseSpaceinfo, out BaseSpaceInfo spaceinfo)
{
if (spaceinfos == null)
if (spaceinfos == null || spaceinfos.Count == 0)
{
throw new ArgumentException($"筛选货道信息异常:传入货道信息参数为空");
}

@ -197,7 +197,7 @@
"PlcType": "Melsec",
"Enabled": true,
"IP": "10.10.92.80", //10.10.92.80
"Port": 2015
"Port": 2014
}
],
"StoreInfo": {

Loading…
Cancel
Save