using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEA_Core; using WIDESEA_DTO; using WIDESEA_Model.Models; namespace WIDESEA_StoragIntegrationServices { public partial class WCSService { public WebResponseContent TCGetCarPass(RequestTaskDto json) { WebResponseContent content = new WebResponseContent(); try { Dt_MESLockInfo frist = null; if (json.Position == "TC05") { frist = _mesLockInfoRepository.QueryData(x => Convert.ToInt32(x.TCLine) <= 4).OrderBy(X => X.sequenceNo).First(); } else { frist = _mesLockInfoRepository.QueryData(x => Convert.ToInt32(x.TCLine) >= 5).OrderBy(X => X.sequenceNo).First(); } if (!frist.CarBodyInfo.PVI.Equals(json.PVI)) throw new Exception("非队列首车不允许取车"); return content.OK(); } catch (Exception ex) { return content.Error($"横移机获取队列首车失败:{ex.Message}"); } } } }