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<PlatformStation, IPlatformStationRepository>, IPlatformStationService
|
{
|
public PlatformStationService(IPlatformStationRepository BaseDal) : base(BaseDal)
|
{
|
|
}
|
|
/// <summary>
|
/// 获取入库站台信息
|
/// </summary>
|
/// <param name="deviceNo"></param>
|
/// <returns></returns>
|
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;
|
}
|
|
/// <summary>
|
/// 获取堆垛机取货站台信息
|
/// </summary>
|
/// <param name="deviceNo"></param>
|
/// <returns></returns>
|
public List<PlatformStation> 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();
|
}
|
|
/// <summary>
|
/// 获取该库位站台类型
|
/// </summary>
|
/// <param name="deviceNo"></param>
|
/// <returns></returns>
|
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);
|
}
|
|
/// <summary>
|
/// 获取堆垛机出库站台编号
|
/// </summary>
|
/// <param name="deviceNo"></param>
|
/// <returns></returns>
|
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;
|
|
}
|
|
//*****************************************************************************************************
|
|
/// <summary>
|
/// 获取RGV入库站台编号
|
/// </summary>
|
/// <param name="deviceNo"></param>
|
/// <returns></returns>
|
public List<string> 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();
|
}
|
|
/// <summary>
|
/// 获取RGV出库站台编号
|
/// </summary>
|
/// <param name="deviceNo"></param>
|
/// <returns></returns>
|
public List<string> 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<string> 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();
|
}
|
|
|
|
/// <summary>
|
/// 获取出库站台信息,更新出库口
|
/// </summary>
|
/// <param name="deviceNo"></param>
|
/// <returns></returns>
|
public List<PlatformStation> GetPlatformOutList(string deviceNo)
|
{
|
return BaseDal.QueryData(x => x.ChildPosiDeviceCode.Contains(deviceNo) && x.Station_enable == 1 && x.Station_material == (int)PlatformStationEnum.BoardUnload).ToList();
|
}
|
|
|
|
|
|
/// <summary>
|
/// 获取堆垛机入库站台编号
|
/// </summary>
|
/// <param name="deviceNo"></param>
|
/// <returns></returns>
|
public List<string> 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();
|
}
|
}
|
}
|