抽屉绑定多批次页面

移除重复的channel_Stock信息,以免更新屏显库存时更新了重复数据
This commit is contained in:
maqiao 2023-11-13 14:09:02 +08:00
parent 2a636e10c2
commit b48f062e32
1 changed files with 0 additions and 18 deletions

View File

@ -319,21 +319,11 @@ namespace DM_Weight.ViewModels
} }
else else
{ {
//if (repeatList.Count > 0)
//{
// AlertMsg alertMsg = new AlertMsg
// {
// Message = $"该抽屉已存在此药品批次{string.Join(',', repeatList)},请选择其他批次",
// Type = MsgType.ERROR
// };
// _eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
//}
if (f.Data) if (f.Data)
{ {
string msg = string.Empty; string msg = string.Empty;
MsgType type = MsgType.SUCCESS; MsgType type = MsgType.SUCCESS;
//if (repeatList.Count > 0)
if (stockRepeats.Count > 0) if (stockRepeats.Count > 0)
{ {
msg = $"该抽屉下批次{string.Join(',', stockRepeats.Select(r => r.ManuNo).ToArray())}已存在,不可重复添加,其他批次加药完成,库存已更新"; msg = $"该抽屉下批次{string.Join(',', stockRepeats.Select(r => r.ManuNo).ToArray())}已存在,不可重复添加,其他批次加药完成,库存已更新";
@ -419,7 +409,6 @@ namespace DM_Weight.ViewModels
cls.DrugInfo = channelLS.Drug; cls.DrugInfo = channelLS.Drug;
if (channelLS.channelStocks.Count > 0) if (channelLS.channelStocks.Count > 0)
{ {
//drugManu = channelLS.channelStocks[0].DrugInfo.DrugManuNos[0];
cls.drugManuNo = channelLS.channelStocks[0].drugManuNo; cls.drugManuNo = channelLS.channelStocks[0].drugManuNo;
} }
else else
@ -449,13 +438,6 @@ namespace DM_Weight.ViewModels
cls.ColNo = channelLS.ColNo; cls.ColNo = channelLS.ColNo;
cls.DrugId = channelLS.DrugId; cls.DrugId = channelLS.DrugId;
cls.AddQuantity = 0; cls.AddQuantity = 0;
//string sqlStr = @"select drug_id,manu_no,manu_date,eff_date from drug_manu_no where drug_id=@drugId
// and manu_no not in(select manu_no from channel_stock where drug_id=@drugId) ";
//cls.DrugInfo.DrugManuNos=SqlSugarHelper.Db.SqlQueryable<dynamic>(sqlStr).AddParameters(new
//{
// drugId = channelLS.DrugId
//})
//.Select(it => new DrugManuNo()).ToList();
List<ChannelStock> stockList = new List<ChannelStock>(); List<ChannelStock> stockList = new List<ChannelStock>();
stockList.AddRange(channelLS.channelStocks); stockList.AddRange(channelLS.channelStocks);
stockList.Add(cls); stockList.Add(cls);