yanjinhui
7 天以前 b9c76ce85e533250cd36de670146530f970859e7
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
 
namespace WIDESEAWCS_TelescopicService
{
    public class IPaddressServer : ServiceBase<Dt_CustomIPaddress, IRepository<Dt_CustomIPaddress>>, IIPaddressServer
    {
        public IRepository<Dt_CustomIPaddress> Repository => BaseDal;
        public IPaddressServer(IRepository<Dt_CustomIPaddress> BaseDal) : base(BaseDal)
        {
            
        }
 
        public WebResponseContent GetStandid(string LocalIP)
        {
            var cunstomip = BaseDal.QueryData(x => x.IPaddress == LocalIP).FirstOrDefault();
            if (cunstomip == null)
            {
                return new WebResponseContent { Status = false, Message = "请配置该轨道站ip地址" };
            }
            return new WebResponseContent { Status = true, Data = cunstomip.StationID };
        }
    }
}