From 64319bd8e5e716e759020f945482f178727e6a16 Mon Sep 17 00:00:00 2001 From: liuwf Date: Mon, 18 Mar 2024 20:03:04 +0800 Subject: [PATCH] =?UTF-8?q?change-=E6=9D=A1=E7=A0=81=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E5=8E=BB=E9=87=8D=EF=BC=8C=E4=B8=8B=E7=BA=BF=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E5=8A=A069=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Admin.Core.Api/Admin.Core.Model.xml | 5 ++ .../ViewModels/IndexPageViewModel.cs | 11 ++- .../Views/IndexPageView.xaml | 2 +- .../Business/MvCodeHelper.cs | 80 +++++++++++-------- .../Business/offLineBusiness.cs | 24 ++++-- 5 files changed, 78 insertions(+), 44 deletions(-) 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 @@ -