using StackExchange.Profiling.Internal; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEAWCS_Core.BaseServices; using WIDESEAWCS_DTO.Enum; using WIDESEAWCS_ISystemRepository; using WIDESEAWCS_ISystemServices; using WIDESEAWCS_Model.Models; using WIDESEAWCS_Model.Models.System; namespace WIDESEAWCS_SystemServices { public class PlatformStationService : ServiceBase, IPlatformStationService { public PlatformStationService(IPlatformStationRepository BaseDal) : base(BaseDal) { } /// /// 获取入库站台信息 /// /// /// public string GetSCName(string deviceNo) { return BaseDal.QueryFirst(x => x.Station_code.Contains(deviceNo) && x.Station_material == (int)PlatformStationEnum.PadRecycle && x.Station_enable == 1).Station_code; } /// /// 获取堆垛机取货站台信息 /// /// /// public List GetPlatformList(string deviceNo) { return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && (x.Station_material == (int)PlatformStationEnum.PadRecycle || x.Station_material == (int)PlatformStationEnum.BoardStore || x.Station_material == (int)PlatformStationEnum.EmptyRecycle)).ToList(); } /// /// 获取该库位站台类型 /// /// /// public PlatformStation GetPlatInList(int deviceNo) { return BaseDal.QueryFirst(x => x.Station_code== deviceNo.ToString()); } public string GetSCAdder(int deviceNo,int coty) { if (coty == 1) { return BaseDal.QueryFirst(x => x.Station_code == deviceNo.ToString()).Station_storey; } else { return BaseDal.QueryFirst(x => x.ChildPosiDeviceCode.Contains(deviceNo.ToString())).Station_storey; } } public PlatformStation GetPlatInData() { return BaseDal.QueryFirst(x => x.Station_material == (int)PlatformStationEnum.PadUse); } /// /// 获取堆垛机出库站台编号 /// /// /// public string GetOutSCName(string Station_storey) { return BaseDal.QueryFirst(x => x.ChildPosiDeviceCode.Contains(Station_storey) && x.Station_material == (int)PlatformStationEnum.MaintenanceoutStore && x.Station_enable == 1).Station_code; } //***************************************************************************************************** /// /// 获取RGV入库站台编号 /// /// /// public List GetPlatform(string deviceNo) { return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && (x.Station_material == (int)PlatformStationEnum.BoardStore)).Select(x => x.Station_code).ToList(); } /// /// 获取RGV出库站台编号 /// /// /// public List GetPlatform2(string deviceNo) { return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && x.Station_material == (int)PlatformStationEnum.PadUse).Select(x => x.Station_code).ToList(); } public List GetPlatform3(string deviceNo) { return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && (x.Station_material == (int)PlatformStationEnum.BoardUnload || x.Station_material == (int)PlatformStationEnum.BoardStore)).Select(x => x.Station_code).ToList(); } /// /// 获取出库站台信息,更新出库口 /// /// /// public List GetPlatformOutList(string deviceNo) { return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && x.Station_material == (int)PlatformStationEnum.BoardUnload).ToList(); } /// /// 获取堆垛机入库站台编号 /// /// /// public List GetPlatIn(string deviceNo) { return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && x.Station_material == (int)PlatformStationEnum.PadRecycle).Select(x => x.Station_code).ToList(); } } }