Exemple #1
0
        public static CarInfo GetDataCarInfoBySimNum(string sSimNum)
        {
            if (!_keySimNumList.ContainsKey(sSimNum))
            {
                Add(Enum0.SimNum, sSimNum);
            }
            CarInfo info = _keySimNumList[sSimNum] as CarInfo;

            if ((info != null) && !sSimNum.Equals(info.SimNum))
            {
                Add(Enum0.SimNum, sSimNum);
                info = _keySimNumList[sSimNum] as CarInfo;
            }
            return(info);
        }
Exemple #2
0
        public static CarInfo GetDataCarInfoByCarNum(string string_0)
        {
            if (!_keyCarNumList.ContainsKey(string_0))
            {
                Add(Enum0.CarNum, string_0);
            }
            CarInfo info = _keyCarNumList[string_0] as CarInfo;

            if ((info != null) && !string_0.Equals(info.CarNum))
            {
                Add(Enum0.CarNum, string_0);
                info = _keyCarNumList[string_0] as CarInfo;
            }
            return(info);
        }
Exemple #3
0
 public void AddCarFilterList(CarInfo carInfo_0)
 {
     if ((this.hashtable_0 != null) && !this.hashtable_0.ContainsKey(carInfo_0.SimNum))
     {
         CarFilterInfo info = new CarFilterInfo {
             SimNum      = carInfo_0.SimNum,
             CarInfoData = carInfo_0,
             PosReadTime = carInfo_0.IsNewPosTime,
             PicReadTime = carInfo_0.IsNewPicTime
         };
         lock (this.hashtable_0.SyncRoot)
         {
             this.hashtable_0.Add(info.SimNum, info);
         }
     }
 }
Exemple #4
0
 public void AddCarFilterList(CarInfo carInfo_0)
 {
     if ((this.hashtable_0 != null) && !this.hashtable_0.ContainsKey(carInfo_0.SimNum))
     {
         CarFilterInfo info = new CarFilterInfo {
             SimNum = carInfo_0.SimNum,
             CarInfoData = carInfo_0,
             PosReadTime = carInfo_0.IsNewPosTime,
             PicReadTime = carInfo_0.IsNewPicTime
         };
         lock (this.hashtable_0.SyncRoot)
         {
             this.hashtable_0.Add(info.SimNum, info);
         }
     }
 }
Exemple #5
0
        /// <summary>
        /// 添加客户端最新日志
        /// </summary>
        /// <param name="OrderID"></param>
        /// <param name="carNum"></param>
        /// <param name="strType"></param>
        /// <param name="strOrderCode"></param>
        /// <param name="strResult"></param>
        /// <param name="strMode"></param>
        /// <param name="strInfo"></param>
        /// <param name="strLon"></param>
        /// <param name="strLat"></param>
        /// <param name="strAcc"></param>
        /// <param name="speed"></param>
        /// <param name="IsFill"></param>
        /// <param name="GpsValid"></param>
        /// <param name="CarId"></param>
        /// <param name="Direct"></param>
        /// <param name="ReceTime"></param>
        /// <param name="GpsTime"></param>
        public void AddCarNewLogData(int OrderID, string carNum, string strType, string strOrderCode, string strResult, string strMode, string strInfo, string strLon, string strLat, string strAcc, string speed, string IsFill, string GpsValid, string CarId, int Direct, string ReceTime, string GpsTime)
        {
            this.initData();
            DataRow row = UpdataStruct.CloneDataTableColumn.NewRow();

            if (string.IsNullOrEmpty(CarId))
            {
                CarInfo dataCarInfoByCarNum = CarDataInfoBuffer.GetDataCarInfoByCarNum(carNum);
                if (dataCarInfoByCarNum != null)
                {
                    row["CarId"]  = dataCarInfoByCarNum.CarId;
                    row["SimNum"] = dataCarInfoByCarNum.SimNum;
                }
            }
            else
            {
                row["CarId"] = CarId;
            }
            row["GpsTime"]  = GpsTime;
            row["ReceTime"] = ReceTime;
            if (string.IsNullOrEmpty(GpsTime) || string.IsNullOrEmpty(ReceTime))
            {
                row["ReceTime"] = row["GpsTime"] = base.GetDBCurrentDateTime();
            }
            row["OrderID"]     = OrderID;
            row["CarNum"]      = carNum;
            row["OrderType"]   = strType;
            row["OrderName"]   = strOrderCode;
            row["msgType"]     = -1;
            row["OrderResult"] = strResult;
            row["CommFlag"]    = strMode;
            row["Describe"]    = strInfo;
            row["Longitude"]   = strLon;
            row["Latitude"]    = strLat;
            row["AccOn"]       = strAcc;
            row["Speed"]       = speed;
            row["IsFill"]      = IsFill;
            row["GpsValid"]    = GpsValid;
            row["Direct"]      = Direct;
            this.arrayList_CarNewLogData.Add(row.ItemArray);
        }
Exemple #6
0
 protected bool CheckCar(CmdParam.ParamType paramType_0, string string_1, string string_2)
 {
     if ((this.carInfoList != null) && (this.carInfoList.Count > 0))
     {
         this.carInfoList.Clear();
         this.carInfoList.TrimToSize();
     }
     if (string.IsNullOrEmpty(string_1))
     {
         this.ErrorMsg = "请输入查询内容!";
         return(false);
     }
     string[] strArray = string_1.Split(new char[] { ',' });
     if ((strArray.Length > 1) && !this.IsMultiSend)
     {
         this.ErrorMsg = "不允许多车发送!";
         return(false);
     }
     if (strArray.Length > 500)
     {
         this.ErrorMsg = "下发指令的车辆数不能超过500!";
         return(false);
     }
     foreach (string str in strArray)
     {
         CarInfo info = this.method_3(paramType_0, str);
         if (!this.method_0(info))
         {
             return(false);
         }
         if ((this.IsAllowNullPassWord && (strArray.Length == 1)) && !this.method_2(info.SimNum, string_2))
         {
             this.ErrorMsg = "车辆密码不对!";
             return(false);
         }
         this.carInfoList.Add(info);
     }
     return(true);
 }
Exemple #7
0
 private bool method_0(CarInfo carInfo_0)
 {
     if ((carInfo_0 != null) && this.method_1(carInfo_0.SimNum))
     {
         if (!this.IsSudoOverDue && (carInfo_0.overTime < 0))
         {
             this.ErrorMsg = "车牌号为:" + carInfo_0.CarNum + "该车辆服务已到期!";
             return false;
         }
         return true;
     }
     this.ErrorMsg = "查询内容中存在不正确的车辆信息!";
     return false;
 }
Exemple #8
0
 private static void Update(CarInfo carInfo_0, DataRow dataRow_0)
 {
     carInfo_0.AreaCode = Convert.ToString(dataRow_0["areacode"]);
     carInfo_0.AreaName = Convert.ToString(dataRow_0["areaname"]);
     carInfo_0.AreaId = Convert.ToInt32(dataRow_0["areaid"]);
     carInfo_0.overTime = Convert.ToInt32(dataRow_0["overTime"]);
     carInfo_0.IsStop = Convert.ToInt32(dataRow_0["isStop"]);
     carInfo_0.ProtocolName = (dataRow_0["ProtocolName"] == DBNull.Value) ? "" : dataRow_0["ProtocolName"].ToString();
 }
Exemple #9
0
 private static void AddCarInfoToList(DataTable dataTable_0)
 {
     lock (_keyCarIdList.SyncRoot)
     {
         foreach (DataRow row in dataTable_0.Rows)
         {
             CarInfo info = new CarInfo();
             FillCarInfo(info, row);
             if (_keyCarIdList.ContainsKey(info.CarId))
             {
                 CarInfo info2 = _keyCarIdList[info.CarId] as CarInfo;
                 _keyCarIdList.Remove(info2.CarId);
                 _keyCarIdList.Remove(info.CarId);
                 _keySimNumList.Remove(info2.SimNum);
                 _keyCarNumList.Remove(info2.CarNum);
             }
             _keyCarIdList.Add(info.CarId, info);
             if (_keySimNumList.ContainsKey(info.SimNum))
             {
                 CarInfo info3 = _keySimNumList[info.SimNum] as CarInfo;
                 _keySimNumList.Remove(info3.SimNum);
                 _keySimNumList.Remove(info.SimNum);
             }
             _keySimNumList.Add(info.SimNum, info);
             if (_keyCarNumList.ContainsKey(info.CarNum))
             {
                 CarInfo info4 = _keyCarNumList[info.CarNum] as CarInfo;
                 _keyCarNumList.Remove(info4.CarNum);
                 _keyCarNumList.Remove(info.CarNum);
             }
             _keyCarNumList.Add(info.CarNum, info);
         }
     }
 }