Example #1
0
        private void method_2(DataRow dataRow_0, DataTable dataTable_0)
        {
            int    drInt = base.GetDrInt(dataRow_0, "reserved");
            int    num2  = base.GetDrInt(dataRow_0, "isImportWatch");
            string drStr = base.GetDrStr(dataRow_0, "dutyStr");

            Convert.ToString(dataRow_0["phone"]);
            string str2 = string.Empty;

            if ((drStr != null) && (drStr.Length > 0))
            {
                bool flag = false;
                str2 = this.method_3(drStr, out flag);
            }
            DataRow     row  = dataTable_0.NewRow();
            CarPartInfo info = new CarPartInfo();

            this.updataCommon_0.GetCarPartInfo(row, dataRow_0, info);
            row["isImportWatch"] = num2;
            this.updataCommon_0.SetUpdataPosData(row, dataRow_0, str2, this.updataCommon_0.GetAddMsgText(dataRow_0, drInt), info);
            row["CarStatus"] = 2;
            row["AlarmType"] = 0;
            row["ReceTime"]  = base.GetDrStr(dataRow_0, "instime");
            dataTable_0.Rows.Add(row);
        }
Example #2
0
        private void method_0()
        {
            Trace.Write("appserver - Thread upNewPosition, WebGpsClient_GetCurrentPosData start!");
            DataRow       row    = UpdataStruct.CloneDataTableColumn.NewRow();
            SqlDataAccess access = new SqlDataAccess();
            DateTime      dbTime = base.GetDbTime(access);

Label_0019:
            try
            {
                SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@ReadTime", dbTime) };
                DataTable      table          = access.getDataBySP("WebGpsClient_GetCurrentPosData", parameterArray);
                if (table != null)
                {
                    goto Label_0056;
                }
Label_004A:
                Thread.Sleep(0x7d0);
                goto Label_0019;
Label_0056:
                if (table.Rows.Count <= 0)
                {
                    goto Label_004A;
                }
                dbTime = Convert.ToDateTime(table.Rows[0]["svrTime"]);
                string      str  = string.Empty;
                string      str2 = string.Empty;
                CarInfo     dataCarInfoBySimNum = null;
                CarPartInfo info2 = new CarPartInfo();
                foreach (DataRow row2 in table.Rows)
                {
                    this.method_1(row2, row, info2);
                    str  = Convert.ToString(row2["phone"]);
                    str2 = Convert.ToString(row2["carNum"]);
                    dataCarInfoBySimNum = CarDataInfoBuffer.GetDataCarInfoBySimNum(str);
                    if (((dataCarInfoBySimNum != null) && !string.IsNullOrEmpty(str2)) && !str2.Equals(dataCarInfoBySimNum.CarNum))
                    {
                        CarDataInfoBuffer.GetDataCarInfoByCarNum(str2);
                    }
                    if (dataCarInfoBySimNum != null)
                    {
                        dataCarInfoBySimNum.CarPosData   = row.ItemArray;
                        dataCarInfoBySimNum.IsNewPosTime = dbTime;
                    }
                }
                Thread.Sleep(20);
                goto Label_0019;
            }
            catch (Exception exception)
            {
                Thread.Sleep(0xbb8);
                LogHelper helper = new LogHelper();
                ErrorMsg  msg    = new ErrorMsg("UpdataNewPosition", helper.GetCallFunction(), helper.GetExceptionMsg(exception));
                helper.WriteError(msg);
                goto Label_0019;
            }
        }
Example #3
0
 private void method_0()
 {
     Trace.Write("appserver - Thread upNewPosition, WebGpsClient_GetCurrentPosData start!");
     DataRow row = UpdataStruct.CloneDataTableColumn.NewRow();
     SqlDataAccess access = new SqlDataAccess();
     DateTime dbTime = base.GetDbTime(access);
     Label_0019:
     try
     {
         SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@ReadTime", dbTime) };
         DataTable table = access.getDataBySP("WebGpsClient_GetCurrentPosData", parameterArray);
         if (table != null)
         {
             goto Label_0056;
         }
     Label_004A:
         Thread.Sleep(0x7d0);
         goto Label_0019;
     Label_0056:
         if (table.Rows.Count <= 0)
         {
             goto Label_004A;
         }
         dbTime = Convert.ToDateTime(table.Rows[0]["svrTime"]);
         string str = string.Empty;
         string str2 = string.Empty;
         CarInfo dataCarInfoBySimNum = null;
         CarPartInfo info2 = new CarPartInfo();
         foreach (DataRow row2 in table.Rows)
         {
             this.method_1(row2, row, info2);
             str = Convert.ToString(row2["phone"]);
             str2 = Convert.ToString(row2["carNum"]);
             dataCarInfoBySimNum = CarDataInfoBuffer.GetDataCarInfoBySimNum(str);
             if (((dataCarInfoBySimNum != null) && !string.IsNullOrEmpty(str2)) && !str2.Equals(dataCarInfoBySimNum.CarNum))
             {
                 CarDataInfoBuffer.GetDataCarInfoByCarNum(str2);
             }
             if (dataCarInfoBySimNum != null)
             {
                 dataCarInfoBySimNum.CarPosData = row.ItemArray;
                 dataCarInfoBySimNum.IsNewPosTime = dbTime;
             }
         }
         Thread.Sleep(20);
         goto Label_0019;
     }
     catch (Exception exception)
     {
         Thread.Sleep(0xbb8);
         LogHelper helper = new LogHelper();
         ErrorMsg msg = new ErrorMsg("UpdataNewPosition", helper.GetCallFunction(), helper.GetExceptionMsg(exception));
         helper.WriteError(msg);
         goto Label_0019;
     }
 }
Example #4
0
        private void method_1(DataRow dataRow_0, DataRow dataRow_1, CarPartInfo carPartInfo_0)
        {
            int drInt = base.GetDrInt(dataRow_0, "reserved");

            base.GetDrStr(dataRow_0, "phone");
            this.updataCommon_0.GetCarPartInfo(dataRow_1, dataRow_0, carPartInfo_0);
            this.updataCommon_0.SetUpdataPosData(dataRow_1, dataRow_0, "", this.updataCommon_0.GetAddMsgText(dataRow_0, drInt), carPartInfo_0);
            dataRow_1["CarStatus"] = 2;
            dataRow_1["AlarmType"] = 0;
        }
Example #5
0
        private void method_7(DataRow dataRow_0, DataTable dataTable_0)
        {
            int         drInt = base.GetDrInt(dataRow_0, "commFlag");
            CarPartInfo info  = new CarPartInfo();
            DataRow     row   = dataTable_0.NewRow();
            string      statusNameByCarStatu = AlamStatus.GetStatusNameByCarStatu((long)base.GetDrInt(dataRow_0, "statu"));

            if (base.isPosStatus(base.GetDrInt(dataRow_0, "statu")))
            {
                info.StarNum    = base.GetDrStr(dataRow_0, "starNum");
                row["GpsValid"] = 1;
            }
            else
            {
                row["GpsValid"] = 0;
                info.StarNum    = "0";
            }
            info.AccStatus = base.GetACCStatus(base.GetDrInt(dataRow_0, "zip_carstatu"));
            string drStr = base.GetDrStr(dataRow_0, "zip_speed");

            info.Speed          = drStr.Substring(0, drStr.IndexOf('.') + 3);
            info.TransportStatu = base.GetTransportStatus(base.GetDrInt(dataRow_0, "zip_TransportStatus"));
            info.StatusName     = statusNameByCarStatu;
            info.GpsTime        = base.GetDrStr(dataRow_0, "gpstime");
            info.DistanceDiff   = base.GetDrStr(dataRow_0, "zip_DistanceDiff");
            string str3 = base.GetDrStr(dataRow_0, "latitude1");
            string str4 = base.GetDrStr(dataRow_0, "longitude1");

            info.Lat             = str3.Substring(0, str3.IndexOf('.') + 7);
            info.Lon             = str4.Substring(0, str4.IndexOf('.') + 7);
            row["GpsTime"]       = info.GpsTime;
            row["receTime"]      = base.GetDrStr(dataRow_0, "instime");
            row["OrderID"]       = base.GetDrStr(dataRow_0, "orderId");
            row["CarNum"]        = base.GetDrStr(dataRow_0, "carNum");
            row["CarId"]         = base.GetDrStr(dataRow_0, "carId");
            row["SimNum"]        = base.GetDrStr(dataRow_0, "phone");
            row["OrderType"]     = "接收";
            row["OrderName"]     = "压缩定位信息报文";
            row["msgType"]       = 0x42;
            row["OrderResult"]   = "成功";
            row["CommFlag"]      = base.GetCommFlagName(drInt);
            row["Describe"]      = info.GetCarCurrentInfo() + base.GetCommFlagName(drInt);
            row["Longitude"]     = info.Lon;
            row["Latitude"]      = info.Lat;
            row["IsImportWatch"] = base.GetDrInt(dataRow_0, "isImportWatch");
            row["IsFill"]        = (base.GetDrInt(dataRow_0, "zip_TransportStatus") == 3) ? 1 : 0;
            row["AccOn"]         = ((base.GetDrInt(dataRow_0, "zip_carstatu") & 0x4000) == 0) ? 0 : 1;
            row["statuName"]     = info.StatusName;
            row["Distance"]      = info.DistanceDiff;
            row["Direct"]        = base.GetDrInt(dataRow_0, "zip_direct");
            row["speed"]         = drStr;
            dataTable_0.Rows.Add(row);
        }
Example #6
0
 private void method_0(DataRow dataRow_0, DataTable dataTable_0)
 {
     int drInt = base.GetDrInt(dataRow_0, "reserved");
     CarPartInfo info = new CarPartInfo();
     DataRow row = dataTable_0.NewRow();
     this.updataCommon_0.GetCarPartInfo(row, dataRow_0, info);
     this.updataCommon_0.SetUpdataPosData(row, dataRow_0, null, this.updataCommon_0.GetAddMsgText(dataRow_0, drInt), info);
     row["OrderName"] = "掉线通知";
     row["msgType"] = 0xaa01;
     row["OrderType"] = "信息";
     row["isImportWatch"] = -1;
     row["CarStatus"] = 2;
     row["AlarmType"] = 1;
     row["speed"] = base.GetDrStr(dataRow_0, "speed");
     row["AccOn"] = ((base.GetDrInt(dataRow_0, "statu") & 0x4000) == 0) ? 0 : 1;
     row["ReceTime"] = base.GetDrStr(dataRow_0, "instime");
     dataTable_0.Rows.Add(row);
 }
Example #7
0
        private void method_2(DataRow dataRow_0, DataTable dataTable_0)
        {
            DataTable   cloneDataTableColumn = UpdataStruct.CloneDataTableColumn;
            DataTable   table2 = UpdataStruct.CloneDataTableColumn;
            DataTable   table3 = UpdataStruct.CloneDataTableColumn;
            DataTable   table4 = UpdataStruct.CloneDataTableColumn;
            CarPartInfo info   = new CarPartInfo();

            foreach (DataRow row in dataTable_0.Rows)
            {
                DataRowData data = new DataRowData(row);
                if (data.IsAlamType)
                {
                    this.upAlarm_0.CalAlarmData(row, dataRow_0, info, cloneDataTableColumn);
                }
                else if (data.IsHadBitData)
                {
                    this.upPic_0.CalPicData(row, info, table4);
                }
                else if (data.WorkId == 0)
                {
                    this.upResponse_0.CalNewLog(row, table2);
                }
                else
                {
                    this.upResponse_0.CalNewLog(row, table3);
                    this.upBuffer_2.AddByWorkId(data.WorkId, table3.Copy());
                    table3.Clear();
                }
            }
            if (cloneDataTableColumn.Rows.Count > 0)
            {
                this.upBuffer_1.Add(DateTime.Now, cloneDataTableColumn);
            }
            if (table2.Rows.Count > 0)
            {
                this.upBuffer_0.Add(DateTime.Now, table2);
            }
            if (table4.Rows.Count > 0)
            {
                this.upBuffer_3.Add(DateTime.Now, table4);
            }
        }
Example #8
0
        public void GetCarPartInfo(DataRow dataRow_0, DataRow dataRow_1, CarPartInfo info)
        {
            string drStr = base.GetDrStr(dataRow_1, "phone");
            int    drInt = base.GetDrInt(dataRow_1, "statu");
            long   num2  = 0L;

            if (dataRow_1["carStatuEx"] != DBNull.Value)
            {
                num2 = Convert.ToInt64(dataRow_1["carStatuEx"]);
            }
            dataRow_0["Status"]   = drInt;
            dataRow_0["StatusEx"] = num2;
            if (base.isPosStatus(drInt))
            {
                info.StarNum          = base.GetDrStr(dataRow_1, "starNum");
                dataRow_0["GpsValid"] = 1;
            }
            else
            {
                dataRow_0["GpsValid"] = 0;
                info.StarNum          = "0";
            }
            info.AccStatus      = base.GetACCStatus(drInt);
            info.TransportStatu = base.GetTransportStatus(base.GetDrInt(dataRow_1, "TransportStatus"));
            info.StatusName     = AlamStatus.GetStatusNameByCarStatu((long)drInt) + AlamStatus.GetStatusNameByCarStatuExt(num2) + this.carAlarmType_0.GetCustAlarmName(drStr, drInt);
            info.GpsTime        = base.GetDrStr(dataRow_1, "gpstime");
            info.DistanceDiff   = base.GetDrStr(dataRow_1, "DistanceDiff");
            if (info.DistanceDiff.Length <= 3)
            {
                info.DistanceDiff = "0." + info.DistanceDiff;
            }
            else
            {
                info.DistanceDiff = info.DistanceDiff.Insert(info.DistanceDiff.Length - 3, ".");
                info.DistanceDiff = info.DistanceDiff.Substring(0, info.DistanceDiff.Length - 1);
            }
            info.Speed = base.GetDrStr(dataRow_1, "speed");
            info.Speed = info.Speed.Substring(0, info.Speed.IndexOf('.') + 3);
            info.Lat   = base.GetDrStr(dataRow_1, "latitude");
            info.Lon   = base.GetDrStr(dataRow_1, "longitude");
            info.Lat   = info.Lat.Substring(0, info.Lat.IndexOf('.') + 7);
            info.Lon   = info.Lon.Substring(0, info.Lon.IndexOf('.') + 7);
        }
Example #9
0
        private void method_1(DataRow dataRow_0, DataTable dataTable_0)
        {
            int         drInt = base.GetDrInt(dataRow_0, "reserved");
            CarPartInfo info  = new CarPartInfo();
            DataRow     row   = dataTable_0.NewRow();

            this.updataCommon_0.GetCarPartInfo(row, dataRow_0, info);
            this.updataCommon_0.SetUpdataPosData(row, dataRow_0, null, this.updataCommon_0.GetAddMsgText(dataRow_0, drInt), info);
            row["OrderName"]     = "行政区域报警";
            row["msgType"]       = 0xaa02;
            row["OrderType"]     = "信息";
            row["isImportWatch"] = -1;
            row["CarStatus"]     = 2;
            row["AlarmType"]     = 1;
            row["speed"]         = base.GetDrStr(dataRow_0, "speed");
            row["AccOn"]         = ((base.GetDrInt(dataRow_0, "statu") & 0x4000) == 0) ? 0 : 1;
            row["ReceTime"]      = base.GetDrStr(dataRow_0, "instime");
            dataTable_0.Rows.Add(row);
        }
Example #10
0
 public void GetCarPartInfo(DataRow dataRow_0, DataRow dataRow_1, CarPartInfo info)
 {
     string drStr = base.GetDrStr(dataRow_1, "phone");
     int drInt = base.GetDrInt(dataRow_1, "statu");
     long num2 = 0L;
     if (dataRow_1["carStatuEx"] != DBNull.Value)
     {
         num2 = Convert.ToInt64(dataRow_1["carStatuEx"]);
     }
     dataRow_0["Status"] = drInt;
     dataRow_0["StatusEx"] = num2;
     if (base.isPosStatus(drInt))
     {
         info.StarNum = base.GetDrStr(dataRow_1, "starNum");
         dataRow_0["GpsValid"] = 1;
     }
     else
     {
         dataRow_0["GpsValid"] = 0;
         info.StarNum = "0";
     }
     info.AccStatus = base.GetACCStatus(drInt);
     info.TransportStatu = base.GetTransportStatus(base.GetDrInt(dataRow_1, "TransportStatus"));
     info.StatusName = AlamStatus.GetStatusNameByCarStatu((long) drInt) + AlamStatus.GetStatusNameByCarStatuExt(num2) + this.carAlarmType_0.GetCustAlarmName(drStr, drInt);
     info.GpsTime = base.GetDrStr(dataRow_1, "gpstime");
     info.DistanceDiff = base.GetDrStr(dataRow_1, "DistanceDiff");
     if (info.DistanceDiff.Length <= 3)
     {
         info.DistanceDiff = "0." + info.DistanceDiff;
     }
     else
     {
         info.DistanceDiff = info.DistanceDiff.Insert(info.DistanceDiff.Length - 3, ".");
         info.DistanceDiff = info.DistanceDiff.Substring(0, info.DistanceDiff.Length - 1);
     }
     info.Speed = base.GetDrStr(dataRow_1, "speed");
     info.Speed = info.Speed.Substring(0, info.Speed.IndexOf('.') + 3);
     info.Lat = base.GetDrStr(dataRow_1, "latitude");
     info.Lon = base.GetDrStr(dataRow_1, "longitude");
     info.Lat = info.Lat.Substring(0, info.Lat.IndexOf('.') + 7);
     info.Lon = info.Lon.Substring(0, info.Lon.IndexOf('.') + 7);
 }
Example #11
0
 public void CalAlarmData(DataRow dataRow_0, DataRow dataRow_1, CarPartInfo carPartInfo_0, DataTable dataTable_0)
 {
     try
     {
         int num = Convert.ToInt32(dataRow_0["reserved"]);
         string str = Convert.ToString(dataRow_0["phone"]);
         this.updataCommon_0.GetCarPartInfo(dataRow_1, dataRow_0, carPartInfo_0);
         int num2 = this.updataCommon_0.SetCarAlarmStatus(dataRow_1, dataRow_0, str);
         this.updataCommon_0.SetUpdataPosData(dataRow_1, dataRow_0, "", this.updataCommon_0.GetAddMsgText(dataRow_0, num), carPartInfo_0);
         dataRow_1["IsImportWatch"] = Convert.ToInt32(dataRow_0["isImportWatch"]);
         dataRow_1["statuDesc"] = this.updataCommon_0.GetStatuDesc(str, Convert.ToString(dataRow_0["recetime"]), carPartInfo_0.GpsTime, carPartInfo_0.StatusName);
         dataRow_1["OrderType"] = new CarAlarmType().GetAlarmTypeName(num2);
         dataTable_0.Rows.Add(dataRow_1.ItemArray);
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("UpAlarm", "CalAlarmData", exception.Message + exception.StackTrace);
         new LogHelper().WriteError(msg);
     }
 }
Example #12
0
 public void CalAlarmData(DataRow dataRow_0, DataRow dataRow_1, CarPartInfo carPartInfo_0, DataTable dataTable_0)
 {
     try
     {
         int    num = Convert.ToInt32(dataRow_0["reserved"]);
         string str = Convert.ToString(dataRow_0["phone"]);
         this.updataCommon_0.GetCarPartInfo(dataRow_1, dataRow_0, carPartInfo_0);
         int num2 = this.updataCommon_0.SetCarAlarmStatus(dataRow_1, dataRow_0, str);
         this.updataCommon_0.SetUpdataPosData(dataRow_1, dataRow_0, "", this.updataCommon_0.GetAddMsgText(dataRow_0, num), carPartInfo_0);
         dataRow_1["IsImportWatch"] = Convert.ToInt32(dataRow_0["isImportWatch"]);
         dataRow_1["statuDesc"]     = this.updataCommon_0.GetStatuDesc(str, Convert.ToString(dataRow_0["recetime"]), carPartInfo_0.GpsTime, carPartInfo_0.StatusName);
         dataRow_1["OrderType"]     = new CarAlarmType().GetAlarmTypeName(num2);
         dataTable_0.Rows.Add(dataRow_1.ItemArray);
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("UpAlarm", "CalAlarmData", exception.Message + exception.StackTrace);
         new LogHelper().WriteError(msg);
     }
 }
Example #13
0
 public void CalPicData(DataRow dataRow_0, CarPartInfo carPartInfo_0, DataTable dataTable_0)
 {
     try
     {
         DataRow row = dataTable_0.NewRow();
         this.updataCommon_0.GetCarPartInfo(row, dataRow_0, carPartInfo_0);
         row["GpsTime"] = Convert.ToString(dataRow_0["GpsTime"]);
         row["OrderID"] = Convert.ToString(dataRow_0["orderId"]);
         row["CarId"] = Convert.ToString(dataRow_0["CarId"]);
         row["CarNum"] = Convert.ToString(dataRow_0["CarNum"]);
         row["SimNum"] = Convert.ToString(dataRow_0["Phone"]);
         row["OrderType"] = "";
         row["OrderName"] = "";
         row["MsgType"] = "";
         row["OrderResult"] = "";
         row["CommFlag"] = "";
         row["Describe"] = carPartInfo_0.GetCarCurrentInfo() + "摄像头信息报文";
         row["Longitude"] = carPartInfo_0.Lon;
         row["Latitude"] = carPartInfo_0.Lat;
         row["isImportWatch"] = -1;
         if (dataRow_0["CameraId"] != DBNull.Value)
         {
             row["CameraId"] = this.updataCommon_0.ConvertCameraId(Convert.ToInt32(dataRow_0["CameraId"]));
         }
         row["svrTime"] = Convert.ToString(dataRow_0["svrTime"]);
         row["statuName"] = carPartInfo_0.StatusName;
         row["ReceTime"] = Convert.ToDateTime(Convert.ToString(dataRow_0["ReceTime"])).ToString("yyyy-MM-dd HH:mm:ss.fff");
         row["ReadPicTime"] = Convert.ToDateTime(Convert.ToString(dataRow_0["ReadPicTime"])).ToString("yyyy-MM-dd HH:mm:ss.fff");
         row["CarStatus"] = 2;
         row["AlarmType"] = 0;
         row["PicDataType"] = Convert.ToString(dataRow_0["PicDataType"]);
         dataTable_0.Rows.Add(row);
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("CarPic", "CalPicData", exception.Message);
         new LogHelper().WriteError(msg);
     }
 }
Example #14
0
 public void CalPicData(DataRow dataRow_0, CarPartInfo carPartInfo_0, DataTable dataTable_0)
 {
     try
     {
         DataRow row = dataTable_0.NewRow();
         this.updataCommon_0.GetCarPartInfo(row, dataRow_0, carPartInfo_0);
         row["GpsTime"]       = Convert.ToString(dataRow_0["GpsTime"]);
         row["OrderID"]       = Convert.ToString(dataRow_0["orderId"]);
         row["CarId"]         = Convert.ToString(dataRow_0["CarId"]);
         row["CarNum"]        = Convert.ToString(dataRow_0["CarNum"]);
         row["SimNum"]        = Convert.ToString(dataRow_0["Phone"]);
         row["OrderType"]     = "";
         row["OrderName"]     = "";
         row["MsgType"]       = "";
         row["OrderResult"]   = "";
         row["CommFlag"]      = "";
         row["Describe"]      = carPartInfo_0.GetCarCurrentInfo() + "摄像头信息报文";
         row["Longitude"]     = carPartInfo_0.Lon;
         row["Latitude"]      = carPartInfo_0.Lat;
         row["isImportWatch"] = -1;
         if (dataRow_0["CameraId"] != DBNull.Value)
         {
             row["CameraId"] = this.updataCommon_0.ConvertCameraId(Convert.ToInt32(dataRow_0["CameraId"]));
         }
         row["svrTime"]     = Convert.ToString(dataRow_0["svrTime"]);
         row["statuName"]   = carPartInfo_0.StatusName;
         row["ReceTime"]    = Convert.ToDateTime(Convert.ToString(dataRow_0["ReceTime"])).ToString("yyyy-MM-dd HH:mm:ss.fff");
         row["ReadPicTime"] = Convert.ToDateTime(Convert.ToString(dataRow_0["ReadPicTime"])).ToString("yyyy-MM-dd HH:mm:ss.fff");
         row["CarStatus"]   = 2;
         row["AlarmType"]   = 0;
         row["PicDataType"] = Convert.ToString(dataRow_0["PicDataType"]);
         dataTable_0.Rows.Add(row);
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("CarPic", "CalPicData", exception.Message);
         new LogHelper().WriteError(msg);
     }
 }
Example #15
0
 private void method_7(DataRow dataRow_0, DataTable dataTable_0)
 {
     int drInt = base.GetDrInt(dataRow_0, "commFlag");
     CarPartInfo info = new CarPartInfo();
     DataRow row = dataTable_0.NewRow();
     string statusNameByCarStatu = AlamStatus.GetStatusNameByCarStatu((long) base.GetDrInt(dataRow_0, "statu"));
     if (base.isPosStatus(base.GetDrInt(dataRow_0, "statu")))
     {
         info.StarNum = base.GetDrStr(dataRow_0, "starNum");
         row["GpsValid"] = 1;
     }
     else
     {
         row["GpsValid"] = 0;
         info.StarNum = "0";
     }
     info.AccStatus = base.GetACCStatus(base.GetDrInt(dataRow_0, "zip_carstatu"));
     string drStr = base.GetDrStr(dataRow_0, "zip_speed");
     info.Speed = drStr.Substring(0, drStr.IndexOf('.') + 3);
     info.TransportStatu = base.GetTransportStatus(base.GetDrInt(dataRow_0, "zip_TransportStatus"));
     info.StatusName = statusNameByCarStatu;
     info.GpsTime = base.GetDrStr(dataRow_0, "gpstime");
     info.DistanceDiff = base.GetDrStr(dataRow_0, "zip_DistanceDiff");
     string str3 = base.GetDrStr(dataRow_0, "latitude1");
     string str4 = base.GetDrStr(dataRow_0, "longitude1");
     info.Lat = str3.Substring(0, str3.IndexOf('.') + 7);
     info.Lon = str4.Substring(0, str4.IndexOf('.') + 7);
     row["GpsTime"] = info.GpsTime;
     row["receTime"] = base.GetDrStr(dataRow_0, "instime");
     row["OrderID"] = base.GetDrStr(dataRow_0, "orderId");
     row["CarNum"] = base.GetDrStr(dataRow_0, "carNum");
     row["CarId"] = base.GetDrStr(dataRow_0, "carId");
     row["SimNum"] = base.GetDrStr(dataRow_0, "phone");
     row["OrderType"] = "接收";
     row["OrderName"] = "压缩定位信息报文";
     row["msgType"] = 0x42;
     row["OrderResult"] = "成功";
     row["CommFlag"] = base.GetCommFlagName(drInt);
     row["Describe"] = info.GetCarCurrentInfo() + base.GetCommFlagName(drInt);
     row["Longitude"] = info.Lon;
     row["Latitude"] = info.Lat;
     row["IsImportWatch"] = base.GetDrInt(dataRow_0, "isImportWatch");
     row["IsFill"] = (base.GetDrInt(dataRow_0, "zip_TransportStatus") == 3) ? 1 : 0;
     row["AccOn"] = ((base.GetDrInt(dataRow_0, "zip_carstatu") & 0x4000) == 0) ? 0 : 1;
     row["statuName"] = info.StatusName;
     row["Distance"] = info.DistanceDiff;
     row["Direct"] = base.GetDrInt(dataRow_0, "zip_direct");
     row["speed"] = drStr;
     dataTable_0.Rows.Add(row);
 }
Example #16
0
 private void method_2(DataRow dataRow_0, DataTable dataTable_0)
 {
     int drInt = base.GetDrInt(dataRow_0, "reserved");
     int num2 = base.GetDrInt(dataRow_0, "isImportWatch");
     string drStr = base.GetDrStr(dataRow_0, "dutyStr");
     Convert.ToString(dataRow_0["phone"]);
     string str2 = string.Empty;
     if ((drStr != null) && (drStr.Length > 0))
     {
         bool flag = false;
         str2 = this.method_3(drStr, out flag);
     }
     DataRow row = dataTable_0.NewRow();
     CarPartInfo info = new CarPartInfo();
     this.updataCommon_0.GetCarPartInfo(row, dataRow_0, info);
     row["isImportWatch"] = num2;
     this.updataCommon_0.SetUpdataPosData(row, dataRow_0, str2, this.updataCommon_0.GetAddMsgText(dataRow_0, drInt), info);
     row["CarStatus"] = 2;
     row["AlarmType"] = 0;
     row["ReceTime"] = base.GetDrStr(dataRow_0, "instime");
     dataTable_0.Rows.Add(row);
 }
Example #17
0
 private void method_2(DataRow dataRow_0, DataTable dataTable_0)
 {
     DataTable cloneDataTableColumn = UpdataStruct.CloneDataTableColumn;
     DataTable table2 = UpdataStruct.CloneDataTableColumn;
     DataTable table3 = UpdataStruct.CloneDataTableColumn;
     DataTable table4 = UpdataStruct.CloneDataTableColumn;
     CarPartInfo info = new CarPartInfo();
     foreach (DataRow row in dataTable_0.Rows)
     {
         DataRowData data = new DataRowData(row);
         if (data.IsAlamType)
         {
             this.upAlarm_0.CalAlarmData(row, dataRow_0, info, cloneDataTableColumn);
         }
         else if (data.IsHadBitData)
         {
             this.upPic_0.CalPicData(row, info, table4);
         }
         else if (data.WorkId == 0)
         {
             this.upResponse_0.CalNewLog(row, table2);
         }
         else
         {
             this.upResponse_0.CalNewLog(row, table3);
             this.upBuffer_2.AddByWorkId(data.WorkId, table3.Copy());
             table3.Clear();
         }
     }
     if (cloneDataTableColumn.Rows.Count > 0)
     {
         this.upBuffer_1.Add(DateTime.Now, cloneDataTableColumn);
     }
     if (table2.Rows.Count > 0)
     {
         this.upBuffer_0.Add(DateTime.Now, table2);
     }
     if (table4.Rows.Count > 0)
     {
         this.upBuffer_3.Add(DateTime.Now, table4);
     }
 }
Example #18
0
        /// <summary>
        /// 设置位置更新数据
        /// </summary>
        /// <param name="dataRow_dt">更新 位置数据</param>
        /// <param name="dataRow_src">数据源</param>
        /// <param name="dutyStr">签到数据上传</param>
        /// <param name="szAddMsgText">附加消息</param>
        /// <param name="info">位置信息</param>
        public void SetUpdataPosData(DataRow dataRow_dt, DataRow dataRow_src, string dutyStr, string szAddMsgText, CarPartInfo info)
        {
            int drInt = base.GetDrInt(dataRow_src, "statu");

            dataRow_dt["GpsTime"]     = base.GetDrStr(dataRow_src, "GpsTime");
            dataRow_dt["ReceTime"]    = base.GetDrStr(dataRow_src, "receTime");
            dataRow_dt["OrderID"]     = base.GetDrStr(dataRow_src, "orderId");
            dataRow_dt["CarNum"]      = base.GetDrStr(dataRow_src, "carNum");
            dataRow_dt["CarId"]       = base.GetDrStr(dataRow_src, "CarId");
            dataRow_dt["OrderType"]   = "接收";
            dataRow_dt["orderName"]   = base.GetOrderName(base.GetDrInt(dataRow_src, "msgType"));
            dataRow_dt["msgType"]     = 0x41;
            dataRow_dt["OrderResult"] = "成功";
            dataRow_dt["CommFlag"]    = base.GetCommFlagName(base.GetDrInt(dataRow_src, "commFlag"));
            dataRow_dt["Describe"]    = dutyStr + info.GetCarCurrentInfo() + szAddMsgText;
            dataRow_dt["Longitude"]   = info.Lon;
            dataRow_dt["Latitude"]    = info.Lat;
            dataRow_dt["Speed"]       = info.Speed;
            dataRow_dt["IsFill"]      = (base.GetDrInt(dataRow_src, "TransportStatus") == 3) ? 1 : 0;
            dataRow_dt["AccOn"]       = ((drInt & 0x4000) == 0) ? 0 : 1;
            dataRow_dt["statuName"]   = info.StatusName;
            dataRow_dt["SimNum"]      = base.GetDrStr(dataRow_src, "phone");
            dataRow_dt["Distance"]    = base.GetDrStr(dataRow_src, "distanceDiff");
            dataRow_dt["Direct"]      = base.GetDrInt(dataRow_src, "direct");
            //添加AddMsgTxt用于客户端解析数据,依赖UpdataStruct.m_GetDTColumn  huzh 2014.1.6
            dataRow_dt["AddMsgTxt"] = base.GetDrStr(dataRow_src, "AddMsgTxt");
        }
Example #19
0
 private void method_1(DataRow dataRow_0, DataRow dataRow_1, CarPartInfo carPartInfo_0)
 {
     int drInt = base.GetDrInt(dataRow_0, "reserved");
     base.GetDrStr(dataRow_0, "phone");
     this.updataCommon_0.GetCarPartInfo(dataRow_1, dataRow_0, carPartInfo_0);
     this.updataCommon_0.SetUpdataPosData(dataRow_1, dataRow_0, "", this.updataCommon_0.GetAddMsgText(dataRow_0, drInt), carPartInfo_0);
     dataRow_1["CarStatus"] = 2;
     dataRow_1["AlarmType"] = 0;
 }
Example #20
0
 private CarPartInfo method_5(DataRow dataRow_0, out CmdParam.CommMode commMode_0)
 {
     CarPartInfo info = new CarPartInfo();
     ReceiveDataBase base2 = new ReceiveDataBase();
     int num = int.Parse(dataRow_0["carstatu"].ToString());
     info.AccStatus = base2.GetACCStatus(num);
     long num2 = 0L;
     if (dataRow_0.Table.Columns.Contains("CarStatuEx"))
     {
         num2 = long.Parse(dataRow_0["carStatuEx"].ToString());
     }
     CarAlarmType type = new CarAlarmType();
     string str = AlamStatus.GetStatusNameByCarStatu((long) num) + AlamStatus.GetStatusNameByCarStatuExt(num2) + type.GetCustAlarmName(dataRow_0["telephone"].ToString(), num);
     string str2 = "0";
     if (base2.isPosStatus(num))
     {
         str2 = dataRow_0["starNum"].ToString();
     }
     int num3 = int.Parse(dataRow_0["commflag"].ToString());
     commMode_0 = (CmdParam.CommMode) num3;
     string str3 = dataRow_0["speed"].ToString();
     info.Speed = str3.Substring(0, str3.IndexOf('.') + 3);
     info.TransportStatu = base2.GetTransportStatus(int.Parse(dataRow_0["TransportStatus"].ToString()));
     info.StatusName = str;
     info.GpsTime = Convert.ToDateTime(dataRow_0["gpstime"]).ToString("yyyy-MM-dd HH:mm:ss");
     info.ReceTime = Convert.ToDateTime(dataRow_0["ReceTime"]).ToString("yyyy-MM-dd HH:mm:ss");
     info.DistanceDiff = dataRow_0["DistanceDiff"].ToString();
     info.StarNum = str2;
     if (info.DistanceDiff.Length <= 3)
     {
         info.DistanceDiff = "0." + info.DistanceDiff;
     }
     else
     {
         info.DistanceDiff = info.DistanceDiff.Insert(info.DistanceDiff.Length - 3, ".");
         info.DistanceDiff = info.DistanceDiff.Substring(0, info.DistanceDiff.Length - 1);
     }
     info.Lat = dataRow_0["latitude"].ToString();
     info.Lon = dataRow_0["longitude"].ToString();
     info.Lat = info.Lat.Substring(0, info.Lat.IndexOf('.') + 7);
     info.Lon = info.Lon.Substring(0, info.Lon.IndexOf('.') + 7);
     string aCCStatus = base2.GetACCStatus(base2.GetDrInt(dataRow_0, "carstatu"));
     if ("关".Equals(aCCStatus))
     {
         info.AccOn = "0";
     }
     else
     {
         info.AccOn = "1";
     }
     if (base2.GetDrInt(dataRow_0, "TransportStatus") == 3)
     {
         info.IsFill = "1";
     }
     else
     {
         info.IsFill = "0";
     }
     if (base2.isPosStatus(base2.GetDrInt(dataRow_0, "carstatu")))
     {
         info.GpsValid = "1";
     }
     else
     {
         info.GpsValid = "0";
     }
     info.Direct = Convert.ToInt32(dataRow_0["Direct"]);
     return info;
 }
Example #21
0
 /// <summary>
 /// 设置位置更新数据
 /// </summary>
 /// <param name="dataRow_dt">更新 位置数据</param>
 /// <param name="dataRow_src">数据源</param>
 /// <param name="dutyStr">签到数据上传</param>
 /// <param name="szAddMsgText">附加消息</param>
 /// <param name="info">位置信息</param>
 public void SetUpdataPosData(DataRow dataRow_dt, DataRow dataRow_src, string dutyStr, string szAddMsgText, CarPartInfo info)
 {
     int drInt = base.GetDrInt(dataRow_src, "statu");
     dataRow_dt["GpsTime"] = base.GetDrStr(dataRow_src, "GpsTime");
     dataRow_dt["ReceTime"] = base.GetDrStr(dataRow_src, "receTime");
     dataRow_dt["OrderID"] = base.GetDrStr(dataRow_src, "orderId");
     dataRow_dt["CarNum"] = base.GetDrStr(dataRow_src, "carNum");
     dataRow_dt["CarId"] = base.GetDrStr(dataRow_src, "CarId");
     dataRow_dt["OrderType"] = "接收";
     dataRow_dt["orderName"] = base.GetOrderName(base.GetDrInt(dataRow_src, "msgType"));
     dataRow_dt["msgType"] = 0x41;
     dataRow_dt["OrderResult"] = "成功";
     dataRow_dt["CommFlag"] = base.GetCommFlagName(base.GetDrInt(dataRow_src, "commFlag"));
     dataRow_dt["Describe"] = dutyStr + info.GetCarCurrentInfo() + szAddMsgText;
     dataRow_dt["Longitude"] = info.Lon;
     dataRow_dt["Latitude"] = info.Lat;
     dataRow_dt["Speed"] = info.Speed;
     dataRow_dt["IsFill"] = (base.GetDrInt(dataRow_src, "TransportStatus") == 3) ? 1 : 0;
     dataRow_dt["AccOn"] = ((drInt & 0x4000) == 0) ? 0 : 1;
     dataRow_dt["statuName"] = info.StatusName;
     dataRow_dt["SimNum"] = base.GetDrStr(dataRow_src, "phone");
     dataRow_dt["Distance"] = base.GetDrStr(dataRow_src, "distanceDiff");
     dataRow_dt["Direct"] = base.GetDrInt(dataRow_src, "direct");
     //添加AddMsgTxt用于客户端解析数据,依赖UpdataStruct.m_GetDTColumn  huzh 2014.1.6
     dataRow_dt["AddMsgTxt"] = base.GetDrStr(dataRow_src, "AddMsgTxt");
 }