diff --git a/Admin.Core.Api/Admin.Core.Model.xml b/Admin.Core.Api/Admin.Core.Model.xml index 995f99cd..6b0ad824 100644 --- a/Admin.Core.Api/Admin.Core.Model.xml +++ b/Admin.Core.Api/Admin.Core.Model.xml @@ -3726,6 +3726,11 @@ 同步时间 + + + 是否同步给质检 + + 测温历史记录 diff --git a/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs b/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs index df34b13b..6088145c 100644 --- a/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs +++ b/Aucma.Core.CodeBinding/ViewModels/IndexPageViewModel.cs @@ -575,7 +575,8 @@ namespace Aucma.Core.CodeBinding.ViewModels RefreshAndWriteLog("开始绑定MES条码:" + code1 + " SN条码:" + code2); // 1.数据库查询各个工序质检结果,不合格报警 - //// 2.查询条码绑定记录表(内胆箱壳绑定处就应该插入记录),绑定SN码 + //// 2.查询条码绑定记录表(内胆箱壳绑定处就应该插入记录),绑定SN码 + int Repeatflag = 0; CodeBindingRecord record = _codeBindingRecordServices.FirstAsync(x => x.BoxCode == code1).Result; if (record == null) { @@ -584,6 +585,10 @@ namespace Aucma.Core.CodeBinding.ViewModels // 没有记录重新插入一条 record = new CodeBindingRecord(); } + else + { + Repeatflag = 1; + } BaseMaterialInfo materialInfo = _baseMaterialInfoServices.FirstAsync(x => x.MaterialCode == code1.Substring(7, 10)).Result; if(materialInfo == null) @@ -601,11 +606,11 @@ namespace Aucma.Core.CodeBinding.ViewModels record.isPlcPass = 1; record.BindingResult = "成功"; bool result = false; - if (string.IsNullOrEmpty(record.LinerCode)) + if (Repeatflag==0) { // 没有记录,新加 result = _codeBindingRecordServices.AddAsync(record).Result >0? true: false; } - else + else if(Repeatflag==1) { result = _codeBindingRecordServices.UpdateAsync(record).Result; } diff --git a/Aucma.Core.CodeBinding/Views/IndexPageView.xaml b/Aucma.Core.CodeBinding/Views/IndexPageView.xaml index 9d3afa20..803d0614 100644 --- a/Aucma.Core.CodeBinding/Views/IndexPageView.xaml +++ b/Aucma.Core.CodeBinding/Views/IndexPageView.xaml @@ -136,7 +136,7 @@ -