GeneralHelper.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using DBHelper;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using WCS.Core;
  8. using WCS.Entity;
  9. using WCS.Entity.Protocol;
  10. namespace WCS.Service.Helpers
  11. {
  12. /// <summary>
  13. /// 通用帮助内
  14. /// </summary>
  15. public class GeneralHelper
  16. {
  17. /// <summary>
  18. /// 托盘排出
  19. /// </summary>
  20. public static void DischargeOfTray(Device<IStation521, IStation520, IRobotStation> device)
  21. {
  22. DB.Do(db =>
  23. {
  24. var t = db.Default.Set<WCS_TASK>().Find(device.Data.TASKNUM);
  25. if (t != null)
  26. {
  27. t.ADDRTO = "2202";
  28. db.Default.SaveChanges();
  29. WMS.UnBound(t.BARCODE);
  30. }
  31. device.Data3.PalletType = 0;
  32. device.Data3.MaxQty = 0;
  33. device.Data3.DocId = 0;
  34. device.Data2.TASKNUM = device.Data.TASKNUM;
  35. device.Data2.GOODSSIZE = device.Data.GOODSSIZE;
  36. device.Data2.GOODSEND = 2202;
  37. device.Data2.CONFIRM = true;
  38. });
  39. }
  40. }
  41. }