Merge branch 'XiangTan_MaZuiKe' of http://27.128.204.251:9999/maqiao/HKC into XiangTan_MaZuiKe

This commit is contained in:
maqiao 2024-07-06 15:17:29 +08:00
commit 6fd35e569f
12 changed files with 14 additions and 33 deletions

View File

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

View File

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

View File

@ -296,15 +296,6 @@ namespace DM_Weight.ViewModels
}); });
if (f.Data) 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(); RequestData();
AlertMsg alertMsg = new AlertMsg AlertMsg alertMsg = new AlertMsg
{ {

View File

@ -301,15 +301,6 @@ namespace DM_Weight.ViewModels
}); });
if (f.Data) 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(); RequestData();
AlertMsg alertMsg = new AlertMsg AlertMsg alertMsg = new AlertMsg
{ {

View File

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

View File

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

View File

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

View File

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

View File

@ -311,7 +311,7 @@ namespace DM_Weight.ViewModels
if (f.Data) if (f.Data)
{ {
// 更新屏显库存 // 更新屏显库存
if (ChannelStock.BoardType.ToString().Contains("5")) if (ChannelStock.BoardType == 5)
{ {
_portUtil.WriteQuantity(ChannelStock.DrawerNo, ChannelStock.ColNo, ChannelStock.Quantity + ReturnQuantity); _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); List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1).ToString().Contains("5")) if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
{ {
singleChannels.ForEach(it => singleChannels.ForEach(it =>
{ {

View File

@ -337,8 +337,7 @@ namespace DM_Weight.ViewModels
{ {
// 更新屏显库存 // 更新屏显库存
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1); 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 => singleChannels.ForEach(it =>
{ {