抽屉打开 订阅事件里设置channelStocks[0].process字段去掉
This commit is contained in:
parent
7cbf366a98
commit
f43e691ee0
|
@ -824,6 +824,7 @@ namespace DM_Weight.Port
|
|||
|
||||
private bool DrawerState(int[] r)
|
||||
{
|
||||
logger.Info($"DrawerState DrawerNo:{DrawerNo};r.length:{r.Length}");
|
||||
int index = DrawerNo > 8 ? DrawerNo - 7 : DrawerNo + 1;
|
||||
return r[index] == 0;
|
||||
}
|
||||
|
|
|
@ -221,25 +221,25 @@ namespace DM_Weight.ViewModels
|
|||
// 抽屉打开
|
||||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
//Status = 2;
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks!=null&& channelStocks[0]!=null&&channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
// //Status = 2;
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key; //Convert.ToInt32(groupingBefore.Key.Substring(0, groupingBefore.Key.IndexOf('-')));
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -104,24 +104,25 @@ namespace DM_Weight.ViewModels
|
|||
// 抽屉打开
|
||||
case EventType.DRAWEROPEN:
|
||||
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
@ -339,7 +340,7 @@ namespace DM_Weight.ViewModels
|
|||
// .Where(cs => cs.ManuNo == invoicesManuNo[j].DrugManuNo && cs.DrugId == invoicesManuNo[j].DrugId && cs.MachineId == (ConfigurationManager.AppSettings["machineId"] ?? "DM1")).ToList();
|
||||
List<ChannelStock> stockList = _mysqlHelper.GetInvoiceStock(invoicesManuNo[j].DrugId, invoicesManuNo[j].DrugManuNo);
|
||||
// List <DrugManuNo> manuNoList = SqlSugarHelper.Db.Queryable<DrugManuNo>().Where(dm => dm.ManuNo == invoicesManuNo[j].DrugManuNo && dm.DrugId == invoicesManuNo[j].DrugId).ToList();
|
||||
// DrugManuNo manuNoList = _mysqlHelper.GetManuNoList(invoicesManuNo[j].DrugId, invoicesManuNo[j].DrugManuNo);
|
||||
// DrugManuNo manuNoList = _mysqlHelper.GetManuNoList(invoicesManuNo[j].DrugId, invoicesManuNo[j].DrugManuNo);
|
||||
if (stockList == null || stockList.Count <= 0)
|
||||
{
|
||||
//if (manuNoList == null||manuNoList.Id==null)
|
||||
|
@ -388,7 +389,7 @@ namespace DM_Weight.ViewModels
|
|||
stock.ColNo = channelL[k].ColNo;
|
||||
stock.DrugId = channelL[k].DrugId;
|
||||
stock.ManuNo = invoicesManuNo[j].DrugManuNo;
|
||||
stock.EffDate =Convert.ToDateTime(invoicesManuNo[j].DrugEffDate).ToString("yyyy-MM-dd");
|
||||
stock.EffDate = Convert.ToDateTime(invoicesManuNo[j].DrugEffDate).ToString("yyyy-MM-dd");
|
||||
stock.Chnguid = channelL[k].Id;
|
||||
stockList.Add(stock);
|
||||
}
|
||||
|
@ -550,7 +551,7 @@ namespace DM_Weight.ViewModels
|
|||
|
||||
|
||||
_isFinishClick = true;
|
||||
List<ChannelStock> record = ChannelStocks.Where(cs=>cs.AddQuantity>0).ToList();
|
||||
List<ChannelStock> record = ChannelStocks.Where(cs => cs.AddQuantity > 0).ToList();
|
||||
string InvoiceId = SelectedInvoice.InvoiceNo;
|
||||
//var f = SqlSugarHelper.Db.UseTran(() =>
|
||||
//{
|
||||
|
|
|
@ -61,24 +61,25 @@ namespace DM_Weight.ViewModels
|
|||
// 抽屉打开
|
||||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -66,23 +66,24 @@ namespace DM_Weight.ViewModels
|
|||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -65,23 +65,24 @@ namespace DM_Weight.ViewModels
|
|||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
//IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
//int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -70,23 +70,24 @@ namespace DM_Weight.ViewModels
|
|||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
|
@ -62,23 +62,24 @@ namespace DM_Weight.ViewModels
|
|||
case EventType.DRAWEROPEN:
|
||||
|
||||
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 1)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 2);
|
||||
}
|
||||
}
|
||||
logger.Info($"抽屉打开,channelStocks{channelStocks != null}");
|
||||
//if (Status == 1)
|
||||
//{
|
||||
// if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 1)
|
||||
// {
|
||||
// channelStocks.ForEach(it => it.process = 2);
|
||||
// }
|
||||
//}
|
||||
|
||||
break;
|
||||
// 抽屉关闭
|
||||
case EventType.DRAWERCLOSE:
|
||||
if (Status == 1)
|
||||
{
|
||||
if (channelStocks[0].process == 2)
|
||||
{
|
||||
channelStocks.ForEach(it => it.process = 3);
|
||||
}
|
||||
//if (channelStocks != null && channelStocks[0] != null && channelStocks[0].process == 2)
|
||||
//{
|
||||
// channelStocks.ForEach(it => it.process = 3);
|
||||
//}
|
||||
IGrouping<int, ChannelStock> groupingBefore = enumerator.Current;
|
||||
int DrawerNoBefore = groupingBefore.Key;
|
||||
if (enumerator.MoveNext())
|
||||
|
|
Loading…
Reference in New Issue