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) { } /// /// 获取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 GetPlatformList(string deviceNo) { return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && x.Station_material == (int)PlatformStationEnum.BoardLoad).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(); } /// /// 获取单个RGV出库站台编号 /// /// /// public string GetSCName(string deviceNo) { return BaseDal.QueryFirst(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_material == (int)PlatformStationEnum.PadUse && x.Station_enable == 1).Station_code; } /// /// 获取堆垛机出库站台编号 /// /// /// public string GetOutSCName(string deviceNo, int Station_storey) { return BaseDal.QueryFirst(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_storey == Station_storey && x.Station_material == (int)PlatformStationEnum.PadStore && x.Station_enable == 1).Station_code; } /// /// 获取堆垛机入库站台编号 /// /// /// 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(); } } }