From d3b00f22223be299029b973f2d0fee1432c5668d Mon Sep 17 00:00:00 2001 From: hehaibing-1996 Date: Tue, 11 Mar 2025 16:04:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E7=BB=91=E5=AE=9A=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WCS.BLL/Services/Service/BatchBindMatDetailService.cs | 6 +++--- 货架标准上位机/ViewModels/BatchBindMatDetailViewModel.cs | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/WCS.BLL/Services/Service/BatchBindMatDetailService.cs b/WCS.BLL/Services/Service/BatchBindMatDetailService.cs index b068cec..afe0d8d 100644 --- a/WCS.BLL/Services/Service/BatchBindMatDetailService.cs +++ b/WCS.BLL/Services/Service/BatchBindMatDetailService.cs @@ -388,8 +388,8 @@ namespace WCS.BLL.Services.Service //判断如果导入表中的物料编码数量与数据库中有效的编码数量不一致证明中间有无效的物料编码 if (matBaseInfoInDb != null && matBaseInfoInDb?.Count < matCodes.Count) { - var matCodesInDb = matBaseInfoInDb.Select(t => t.MatName).ToList(); - matCodes.RemoveAll(t => matCodesInDb.Contains(t)); + var matCodesInDb = matBaseInfoInDb.Select(t => t.MatCode.ToUpper()).ToList(); + matCodes.RemoveAll(t => matCodesInDb.Contains(t.ToUpper())); if (matCodes.Count > 0) { return new ResponseCommon>() @@ -410,7 +410,7 @@ namespace WCS.BLL.Services.Service await DbHelp.db.BeginTranAsync(); foreach (var info in lists) { - var matBaseInfo = matBaseInfoInDb?.Where(t => t.MatCode == info.物料编码).First(); + var matBaseInfo = matBaseInfoInDb?.Where(t => t.MatCode.ToUpper() == info.物料编码.ToUpper() || t.MatCode.ToLower() == info.物料编码.ToLower()).First(); var shelfInfo = shelfInfosInDb?.Where(t => t.ShelfCode == info.货架编码).First(); var orderType = orderTypesInDb?.Where(t => t.OrderTypeName == info.单据类型).FirstOrDefault(); //应该是不能走进的分支 diff --git a/货架标准上位机/ViewModels/BatchBindMatDetailViewModel.cs b/货架标准上位机/ViewModels/BatchBindMatDetailViewModel.cs index 2989d6a..f870642 100644 --- a/货架标准上位机/ViewModels/BatchBindMatDetailViewModel.cs +++ b/货架标准上位机/ViewModels/BatchBindMatDetailViewModel.cs @@ -355,7 +355,9 @@ namespace 智慧物流软件系统.ViewModel if (result.Data != null && result.Data.Count > 0) HandyControl.Controls.MessageBox.Show(result.Message + "\t\n" + String.Join("\t\n", result.Data)); else - HandyControl.Controls.MessageBox.Show(result.Message); + { + TipView.Show(result.Message); + } } } catch (Exception ex)