dengjunjie
2026-03-12 41613aec0de9e753fed15f8171efbe6dbc042f83
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_Model.Models;
 
namespace WIDESEAWCS_BasicInfoService
{
    public class StationMangerService : ServiceBase<Dt_StationManger, IRepository<Dt_StationManger>>, IStationMangerService
    {
        public StationMangerService(IRepository<Dt_StationManger> BaseDal) : base(BaseDal)
        {
        }
 
        public IRepository<Dt_StationManger> Repository => BaseDal;
 
        public Dt_StationManger GetStationInfo(string fromLocationCode)
        {
            return BaseDal.QueryFirst(x => x.StationCode == fromLocationCode);
        }
 
        public Dt_StationManger GetInStationInfo(string fromLocationCode)
        {
            return BaseDal.QueryFirst(x => x.StationCode == fromLocationCode && (x.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt() || x.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt()));
        }
 
        /// <summary>
        /// 获取出库站台
        /// </summary>
        /// <param name="stationCode"></param>
        /// <returns></returns>
        public Dt_StationManger GetOutStationInfo(string stationCode)
        {
            return BaseDal.QueryFirst(x => x.StationCode == stationCode && (x.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() || x.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt()));
        }
    }
}