Example #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();
        }
Example #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();
 }
Example #3
0
 public PcUpDownService(SlaveInfoService slaveInfoService, ButtonService buttonService, SynchronizationContext current, SysConfig SysConfig, Domain.Models.UserInfo UserInfo)
 {
     this.SlaveInfoService = slaveInfoService;
     this.ButtonService    = buttonService;
     this.SysConfig        = SysConfig;
     this.current          = current;
     this.UserInfo         = UserInfo;
 }
Example #4
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);
 }
Example #5
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);
 }
Example #6
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();
 }
Example #7
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);
             }
         });
     }
 }
Example #8
0
 public void WaveCancelSuccess(UpDownMessage upDownMessage)
 {
     SlaveInfoService.InitSlaveInfo();
     SoundService.PlaySoundAsny(SoundType.WaveCancelSuccess);
 }
Example #9
0
 public BoardUpDownService(SlaveInfoService slaveInfoService)
 {
     SlaveInfoService = slaveInfoService;
 }
Example #10
0
 public UpDownService(SysConfig sysConfig, SlaveInfoService slaveInfoService, Domain.Models.UserInfo curUser)
 {
     this.slaveInfoService = slaveInfoService;
     this.curUser          = curUser;
     this.sysConfig        = sysConfig;
 }
Example #11
0
 public virtual void UpdateButton(UpDownMessage upDownMessage)
 {
     UpdateButton(SlaveInfoService.GetLatticeInfoList(upDownMessage));
 }
Example #12
0
 public ButtonService(SlaveInfoService slaveInfoService)
 {
     this.SlaveInfoService = slaveInfoService;
 }