DeviceExtention.cs 673 B

123456789101112131415161718192021
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using WCS.Core;
  4. using WCS.Entity;
  5. using WCS.Entity.Protocol;
  6. namespace WCS.Service.Extensions
  7. {
  8. public static class DeviceExtention
  9. {
  10. /// <summary>
  11. /// 双工位RGV获取需要取货的站点
  12. /// </summary>
  13. /// <param name="deviceList"></param>
  14. /// <returns></returns>
  15. public static List<WCS_DEVICE> DRGVGetValidPickupPoint(this WCS_DEVICE[] deviceList)
  16. {
  17. return deviceList.ToList().Select(v => v.Device<IStation521, IStation520, IStation523>()).Where(v => v.Data.PH_STATUS && v.Data.TASKNUM > 10000 && !v.Data2.CONFIRM);
  18. }
  19. }
  20. }