Exemplo n.º 1
0
        public void WavePowerCompleteSuccess(UpDownMessage upDownMessage)
        {
            SlaveInfoService.SlaveInfo.IsCompleteHand = true;
            SlaveInfoService.SaveAync();
            new WaveApiService().Complete(SlaveInfoService.SlaveInfo.WaveNo);
            //打印缺货
            var data       = SlaveInfoService.GetSortingDetail().Where(o => o.WaitNum > o.PutNum).ToList();
            var lattieInfo = new LatticeInfo
            {
                Product = new List <Product>()
            };

            for (int i = 0; i < data.Count; i++)
            {
                lattieInfo.Product.Add(new Product
                {
                    ProductName = data[i].OrderNo,
                    BarCode     = data[i].BarCode,
                    PutNum      = data[i].PutNum,
                    WaitNum     = data[i].WaitNum
                });
                lattieInfo.OrderNo = data[i].OrderNo;

                new ProductPrint().PrintSetup(lattieInfo);
                lattieInfo.Product.Clear();
            }
            if (lattieInfo.Product.Count > 0)
            {
                new ProductPrint().PrintSetup(lattieInfo);
            }
            // SlaveInfoService.InitSlaveInfo();
            SoundService.PlaySoundAsny(SoundType.WavePowerComplete);
            FlashGreenLight();
        }
Exemplo n.º 2
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();
 }
Exemplo n.º 3
0
 public void RemovePutError(UpDownMessage upDownMessage)
 {
     upDownMessage.LatticeByUpDown.ForEach(o =>
     {
         var latticeInfo = SlaveInfoService.GetLatticeInfo(o.LatticeNo);
         SlaveInfoService.SetLatticeStatus(latticeInfo, LatticeStatus.None);
     });
     UpdateButton(upDownMessage);
     SlaveInfoService.SaveAync();
     SoundService.PlaySoundAsny(SoundType.RemovePutError);
 }
Exemplo 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();
 }
Exemplo n.º 5
0
 public void PrintAll(UpDownMessage upDownMessage)
 {
     if (SysConfig.PrintType == PrintType.一次性打印)
     {
         SlaveInfoService?.LatticeInfoList?.ForEach(o =>
         {
             var latticeInfo = SlaveInfoService.GetLatticeInfo(o.LatticeNo);
             if (!string.IsNullOrWhiteSpace(latticeInfo.OrderNo))
             {
                 latticeInfo.IsPrint = true;
                 SlaveInfoService.SaveAync();
                 new CustomPrint().PrintSetup(latticeInfo);
             }
         });
     }
 }