Esempio n. 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();
 }
Esempio n. 2
0
 public void RemoveBlockErrorSuccess(UpDownMessage upDownMessage)
 {
     upDownMessage.LatticeByUpDown.ForEach(o =>
     {
         var latticeInfo = SlaveInfoService.GetLatticeInfo(o.LatticeNo);
         SlaveInfoService.SetLatticeStatus(latticeInfo, LatticeStatus.None);
     });
     UpdateButton(upDownMessage);
     SoundService.PlaySoundAsny(SoundType.RemoveBlockError);
 }
Esempio n. 3
0
 public void PutError(UpDownMessage upDownMessage)
 {
     upDownMessage.LatticeByUpDown.ForEach(o =>
     {
         var latticeInfo = SlaveInfoService.GetLatticeInfo(o.LatticeNo);
         SlaveInfoService.SetLatticeStatus(latticeInfo, LatticeStatus.PutError);
     });
     UpdateButton(upDownMessage);
     SlaveInfoService.SaveAync();
     SoundService.PlaySoundAsny(SoundType.PutError);
 }
Esempio n. 4
0
 public void WaitPut(List <LatticeInfo> latticeInfoList, string barCode)
 {
     latticeInfoList.ForEach(o =>
     {
         if (o.Product.Exists(p => p.BarCode == barCode && !p.IsComplete))
         {
             SlaveInfoService.SetLatticeStatus(o, LatticeStatus.WaitPut);
             SlaveInfoService.SetProductStatus(o, barCode, ProductStatus.WaitPut);
         }
     });
     current.Post((o) => { ButtonService.UpdateButton(latticeInfoList); }, null);
     SlaveInfoService.SaveAync();
 }