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(); }
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); }
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); }
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(); }