예제 #1
0
        public SortedDictionary <string, object> Getsendinfo(int BillNo)
        {
            SortedDictionary <string, object> LogisticsInfo = new SortedDictionary <string, object>();
            var task = _BillInfoRepository.FirstOrDefault(t => t.BillNo == BillNo);

            if (task != null)
            {
                if (task.SERVICELEVEL == "2" || task.SERVICELEVEL == "3" || task.SERVICELEVEL == "4")
                {
                    var result = Send100.Instance().Get(task.ExpressNo, Convert.ToString(task.ExpressBillNo));
                    LogisticsInfo.Add("快递", result);
                    return(LogisticsInfo);
                }
                else
                {
                    var result = (from r in _LogisticsInfoRepository.GetAll()
                                  where (r.BillNo == BillNo)
                                  join t in _StateInfoRepository.GetAll() on r.State equals t.Id
                                  select new SearchLogisticsInfoDto
                    {
                        Time = r.FillDate,
                        Context = t.Meaning + " " + r.Infomation
                    }).OrderByDescending(t => t.Time).ToList();

                    LogisticsInfo.Add("瑞庆", result);
                    return(LogisticsInfo);
                }
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        public string Get(string com, string strl)
        {
            var task = Send100.Instance().Get(com, strl);

            return(task);
        }
예제 #3
0
 public static Send100 Instance()
 {
     send100 = new Send100();
     return(send100);
 }