Beispiel #1
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");
        }
Beispiel #2
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);
        }
Beispiel #3
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);
     }
 }
Beispiel #4
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);
     }
 }
Beispiel #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);
 }
Beispiel #6
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");
 }