コード例 #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();
        }
コード例 #2
0
        public void WaveComplete(UpDownMessage upDownMessage)
        {
            upDownMessage.UpDownCommand = UpDownCommand.WaveComplete;
            var data = slaveInfoService.GetSortingDetail().Where(o => o.WaitNum > o.PutNum).ToList();

            if (OrderAPI.CompleteWaveAPI(sysConfig.DomainName, slaveInfoService.SlaveInfo.WaveNo, data, curUser.UserId))
            {
                Parallel.ForEach(service, o => o.WaveComplete(upDownMessage));

                SetText($"完成波次:{slaveInfoService.SlaveInfo.WaveNo}");
            }
            else
            {
                SetText($"接口报错:CompleteWaveAPI");
            }
        }