| | |
| | | 锘縰sing System; |
| | | 锘縰sing SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | using WIDESEAWCS_Core.BaseRepository; |
| | | using WIDESEAWCS_Core.BaseServices; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | public RGVLocationInfoService(IRepository<Dt_RGVLocationInfo> BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | private Dictionary<string, OrderByType> _emptyAssignOrderBy = new Dictionary<string, OrderByType>() |
| | | { |
| | | { nameof(Dt_RGVLocationInfo.Depth), OrderByType.Desc }, |
| | | { nameof(Dt_RGVLocationInfo.Layer), OrderByType.Asc }, |
| | | //{ nameof(Dt_RGVLocationInfo.Column), OrderByType.Asc }, |
| | | { nameof(Dt_RGVLocationInfo.Row), OrderByType.Asc }, |
| | | }; |
| | | public IRepository<Dt_RGVLocationInfo> Repository => BaseDal; |
| | | |
| | | public List<Dt_RGVLocationInfo> GetFreeLocationInfos() |
| | | { |
| | | return BaseDal.QueryData(x => x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt(), _emptyAssignOrderBy); |
| | | } |
| | | |
| | | public Dt_RGVLocationInfo GetFreeLocationInfo(string AreaCode) |
| | | { |
| | | Dt_RGVLocationInfo? rGVLocationInfo = BaseDal.QueryFirst(x => x.WarehouseId.ToString() == AreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt(), _emptyAssignOrderBy); |
| | | return rGVLocationInfo; |
| | | } |
| | | } |
| | | } |