添加35药盒智能标签类型并添加相关类型写标签信息

This commit is contained in:
maqiao 2024-07-06 13:21:51 +08:00
parent 8fe17f7517
commit 07db386649
13 changed files with 46 additions and 14 deletions

View File

@ -94,6 +94,19 @@ namespace DM_Weight.Converter
{
return "计数回收(外置)";
}
case 35:
if (DrawerType == 1)
{
return "药盒智能显示";
}
else if (DrawerType == 2)
{
return "药盒智能显示回收(内置)";
}
else
{
return "药盒智能显示回收(外置)";
}
}
return "";
}

View File

@ -736,7 +736,7 @@ namespace DM_Weight.ViewModels
{
// 更新屏显库存
//List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
List<ChannelStock> singleChannels = record.Where(it => it.BoardType == 5)
List<ChannelStock> singleChannels = record.Where(it => it.BoardType.ToString().Contains("5"))
.GroupBy(it => new { it.DrawerNo, it.ColNo })
.Select(it =>
{

View File

@ -228,7 +228,7 @@ namespace DM_Weight.ViewModels
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.PosNo }).ExecuteCommand();
GetChannelsByDrawerNo();
if (item.BoardType == 5)
if (item.BoardType.ToString().Contains("5"))
{
_portUtil.WindowName = "BindingChannelDialog";
// 向显示屏写入库位信息
@ -283,7 +283,7 @@ namespace DM_Weight.ViewModels
item.EffDate = String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate);
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
if (item.BoardType == 5)
if (item.BoardType.ToString().Contains("5"))
{
_portUtil.WindowName = "BindingChannelDialog";
// 向显示屏写入库位信息
@ -333,7 +333,7 @@ namespace DM_Weight.ViewModels
item.EffDate = null;
item.DrugInfo = null;
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.ManuNo, it.EffDate }).ExecuteCommand();
if (item.BoardType == 5)
if (item.BoardType.ToString().Contains("5"))
{
// 清除显示屏库位信息
_portUtil.ClearContent(item.DrawerNo, item.ColNo);

View File

@ -274,7 +274,7 @@ namespace DM_Weight.ViewModels
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.PosNo,it.DrugSpec }).ExecuteCommand();
GetChannelsByDrawerNo();
if (item.BoardType == 5)
if (item.BoardType.ToString().Contains("5"))
{
_portUtil.WindowName = "BindingChannelDialog";
// 向显示屏写入库位信息
@ -344,7 +344,7 @@ namespace DM_Weight.ViewModels
//item.EffDate = String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate);
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.PosNo,it.DrugSpec }).ExecuteCommand();
if (item.BoardType == 5)
if (item.BoardType.ToString().Contains("5"))
{
_portUtil.WindowName = "BindingChannelDialog";
// 向显示屏写入库位信息
@ -411,7 +411,7 @@ namespace DM_Weight.ViewModels
item.Drug = null;
item.DrugSpec = null;
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId,it.DrugSpec }).ExecuteCommand();
if (item.BoardType == 5)
if (item.BoardType.ToString().Contains("5"))
{
// 清除显示屏库位信息
_portUtil.ClearContent(item.DrawerNo, item.ColNo);

View File

@ -296,6 +296,15 @@ namespace DM_Weight.ViewModels
});
if (f.Data)
{
// 更新屏显库存
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5"))
{
singleChannels.ForEach(it =>
{
_portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.Quantity - it.TakeQuantity);
});
}
RequestData();
AlertMsg alertMsg = new AlertMsg
{

View File

@ -301,6 +301,15 @@ namespace DM_Weight.ViewModels
});
if (f.Data)
{
// 更新屏显库存
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5"))
{
singleChannels.ForEach(it =>
{
_portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.Quantity - it.TakeQuantity);
});
}
RequestData();
AlertMsg alertMsg = new AlertMsg
{

View File

@ -371,7 +371,7 @@ namespace DM_Weight.ViewModels
{
// 更新屏显库存
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5"))
{
singleChannels.ForEach(it =>
{

View File

@ -435,7 +435,7 @@ namespace DM_Weight.ViewModels
{
// 更新屏显库存
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5"))
{
singleChannels.ForEach(it =>
{

View File

@ -429,7 +429,7 @@ namespace DM_Weight.ViewModels
{
// 更新屏显库存
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5"))
{
singleChannels.ForEach(it =>
{

View File

@ -360,7 +360,7 @@ namespace DM_Weight.ViewModels
if (f.Data)
{
// 更新屏显库存
if (ChannelStock.BoardType == 5)
if (ChannelStock.BoardType.ToString().Contains("5"))
{
_portUtil.WriteQuantity(ChannelStock.DrawerNo, ChannelStock.ColNo, ChannelStock.Quantity + ReturnQuantity);
}

View File

@ -311,7 +311,7 @@ namespace DM_Weight.ViewModels
if (f.Data)
{
// 更新屏显库存
if (ChannelStock.BoardType == 5)
if (ChannelStock.BoardType.ToString().Contains("5"))
{
_portUtil.WriteQuantity(ChannelStock.DrawerNo, ChannelStock.ColNo, ChannelStock.Quantity + ReturnQuantity);
}

View File

@ -363,7 +363,7 @@ namespace DM_Weight.ViewModels
{
// 更新屏显库存
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5"))
{
singleChannels.ForEach(it =>
{

View File

@ -337,7 +337,8 @@ namespace DM_Weight.ViewModels
{
// 更新屏显库存
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
//if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5"))
{
singleChannels.ForEach(it =>
{