批量绑定优化
This commit is contained in:
@ -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<List<string>>()
|
||||
@ -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();
|
||||
//应该是不能走进的分支
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user