huanghongfeng
7 小时以前 6ba24a49c009cca01d9c02b9dae692a53b8be116
´úÂë¹ÜÀí/WCS/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/AgvStationService.cs
@@ -36,6 +36,7 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm.Http;
using WIDESEA_Common.Log;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Core.Enums;
@@ -52,28 +53,56 @@
    {
        public AgvStationService(IAgvStationRepository BaseDal) : base(BaseDal)
        {
        }
        public AGVStation GetAllStationByDeviceCode(int Station_code)
        {
            return BaseDal.QueryFirst(x=>x.Station_code== Station_code);
        }
        public AGVStation GetMothercarDeviceCode(string Station_code)
        /// <summary>
        /// æ ¹æ®è®¾å¤‡ä¿¡æ¯ï¼ŒèŽ·å–å°è½¦å†…å®¹
        /// </summary>
        /// <param name="ChildPosiDeviceCode">设备</param>
        /// <returns></returns>
        public AGVStation Corridorequipment(string ChildPosiDeviceCode)
        {
            return BaseDal.QueryFirst(x => x.Station_code== int.Parse(Station_code));
            return BaseDal.QueryFirst(x=>x.ChildPosiDeviceCode == ChildPosiDeviceCode && x.Station_enable==1);
        }
        public AGVStation GetMothercarCode(string Station_code)
        /// <summary>
        /// æ ¹æ®å­åœ°å€ï¼ŒèŽ·å–æ¯è½¦è®¾å¤‡ä¿¡æ¯
        /// </summary>
        /// <param name="ZicheMotAddres">子地址</param>
        /// <returns></returns>
        public AGVStation GetMothervehicle(int ZicheMotAddres)
        {
            return BaseDal.QueryFirst(x => x.ZicheMotherinlaw == Station_code);
            return BaseDal.QueryFirst(x => x.ZicheMotherinlaw == ZicheMotAddres && x.Station_enable == 1);
        }
        public AGVStation GetZicheCode(string Station_code)
        /// <summary>
        /// æ ¹æ®è¿‡é“地址,获取过道子车设备信息
        /// </summary>
        /// <param name="ZicheMotAddres">子地址</param>
        /// <returns></returns>
        public AGVStation GetMotheaisle(int ZicheMotAddres)
        {
            return BaseDal.QueryFirst(x => x.Motherinlaw == Station_code);
            return BaseDal.QueryFirst(x => (x.MotherCarDeviceCode == ZicheMotAddres || x.MotherCardeputy == ZicheMotAddres) && x.Station_enable == 1);
        }
        /// <summary>
        /// æ ¹æ®HCJ站台查找内侧子车设备信息
        /// </summary>
        /// <param name="HCJAddres">HCJ站台编号</param>
        /// <returns></returns>
        public AGVStation GetZicheDeep(int HCJAddres)
        {
            return BaseDal.QueryFirst(x => (x.HCJStorageaddress == HCJAddres || x.Station_Area == 2) && x.Station_enable == 1);
        }
        /// <summary>
        /// æ ¹æ®HCJ站台查找内侧子车设备信息
        /// </summary>
        /// <param name="HCJAddres">HCJ站台编号</param>
        /// <returns></returns>
        public AGVStation GetZicheDeep(int HCJAddres)
        {
            return BaseDal.QueryFirst(x => (x.HCJStorageaddress == HCJAddres || x.Station_Area == 2) && x.Station_enable == 1);
        }
    }
}