示例#1
0
 public void PutSuccess(UpDownMessage upDownMessage)
 {
     upDownMessage.LatticeByUpDown.ForEach(o =>
     {
         var tempPutNum  = o.Num;
         var latticeInfo = SlaveInfoService.GetLatticeInfo(o.LatticeNo);
         latticeInfo.Product
         .FindAll(p => p.Status == ProductStatus.WaitPut)
         .ForEach(p =>
         {
             var MaxWaitPut = p.WaitNum - p.PutNum;
             if (MaxWaitPut >= tempPutNum)
             {
                 p.PutNum += tempPutNum;
             }
             else
             {
                 p.PutNum   += MaxWaitPut;
                 tempPutNum -= MaxWaitPut;
             }
         });
         //latticeInfo.Product.First(p=>p.Status==ProductStatus.WaitPut).PutNum += o.Num;
         SlaveInfoService.SetLatticeStatus(latticeInfo, LatticeStatus.None);
         SlaveInfoService.ProductTransformNone(latticeInfo);
     });
     UpdateButton(upDownMessage);
     SlaveInfoService.SaveAync();
 }