Example #1
0
 private void method_0(Exception exception_0)
 {
     Thread.Sleep(0x1388);
     LogHelper helper = new LogHelper();
     ErrorMsg msg = new ErrorMsg("UpDataOtherData", helper.GetCallFunction(), helper.GetExceptionMsg(exception_0));
     helper.WriteError(msg);
 }
Example #2
0
 public DownData(int workId)
 {
     this.log = new LogHelper();
     this.logMsg = new LogMsg()
     {
         ClassName = "GpsPicDownData"
     };
     this.WorkId = workId;
 }
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
 public RemotingServer(UserInfoEntity userInfo, string UserId, int ModuleId)
 {
     this._RemotingState = new RemotingState();
     this.myAlarm = new Alarm();
     this.myCar = new Car();
     this.m_LogHelper = new LogHelper();
     this._DataCSList = new RemotingDataCS();
     this._DataBSList = new RemotingDataBS();
     this._OnlineUserInfo = new OnlineUserInfo(userInfo.WorkId, UserId, userInfo.GroupId, ModuleId, userInfo.AllowSelMutil, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.RoadTransportID, userInfo.AreaCode);
     this.myDownData = new DownData(userInfo.WorkId, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataYD = new DownDataFJYD(userInfo.WorkId, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataDB44 = new DownDataXCJLY(userInfo.WorkId, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataPass = new DownDataPassThrough(userInfo.WorkId, userInfo.AllowEmptyPw, userInfo.SudoOverDue, userInfo.AllowSelMutil, this._OnlineUserInfo);
 }
Example #5
0
 public RemotingServer(int workId, string UserId, int GroupId, int ModuleId, bool AllowSelMutil, bool AllowEmptyPw, bool SudoOverDue)
 {
     this._RemotingState = new RemotingState();
     this.myAlarm = new Alarm();
     this.myCar = new Car();
     this.m_LogHelper = new LogHelper();
     this._DataCSList = new RemotingDataCS();
     this._DataBSList = new RemotingDataBS();
     this._OnlineUserInfo = new OnlineUserInfo(workId, UserId, GroupId, ModuleId, AllowSelMutil, AllowEmptyPw, SudoOverDue, "");
     this.myDownData = new DownData(workId, AllowEmptyPw, SudoOverDue, AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataYD = new DownDataFJYD(workId, AllowEmptyPw, SudoOverDue, AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataDB44 = new DownDataXCJLY(workId, AllowEmptyPw, SudoOverDue, AllowSelMutil, this._OnlineUserInfo);
     this.myDownDataPass = new DownDataPassThrough(workId, AllowEmptyPw, SudoOverDue, AllowSelMutil, this._OnlineUserInfo);
 }
Example #6
0
 public static string checkRoadSpeedAndRank(string inputXML)
 {
     string str;
     try
     {
         string str1 = string.Format("Method={0}&PosMsgsXML={1}", "SpeedLimitAlarm", inputXML);
         byte[] bytes = Encoding.UTF8.GetBytes(str1);
         string roadSpeedAndRankOtherGisAddress = ReadDataFromXml.RoadSpeedAndRankOtherGisAddress;
         ReadDataFromOtherGis.GisWebClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
         byte[] numArray = ReadDataFromOtherGis.GisWebClient.UploadData(roadSpeedAndRankOtherGisAddress, "POST", bytes);
         str = Encoding.UTF8.GetString(numArray);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg("ReadDataFromOtherGis", "checkRoadSpeedAndRank", string.Concat("调用webservice判断车自定义分段超速报警和道路等级错误:", exception.Message));
         logHelper.WriteError(errorMsg);
         str = "";
     }
     return str;
 }
Example #7
0
 public static DateTime GetSvrTime()
 {
     DateTime now;
     try
     {
         DataTable dataBySql = SqlDataAccess.getDataBySql(" select getdate() ");
         now = (dataBySql.Rows.Count <= 0 || dataBySql == null ? DateTime.Now : DateTime.Parse(dataBySql.Rows[0][0].ToString()));
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg()
         {
             ClassName = "ReadDataFromDB",
             FunctionName = "GetSvrTime",
             ErrorText = string.Concat("获取数据库服务器时间发生错误!", exception.Message)
         };
         logHelper.WriteError(errorMsg, exception);
         now = DateTime.Now;
     }
     return now;
 }
Example #8
0
 private void BroadCastUrgentTimer()
 {
     DataTable broadCastUrgent = null;
     broadCastUrgent = this.getBroadCastUrgent();
     if (broadCastUrgent != null && broadCastUrgent.Rows.Count > 0)
     {
         this.BroadUrgentPreTime = DateTime.Parse(broadCastUrgent.Rows[0]["PreTime"].ToString());
         LogMsg logMsg = new LogMsg();
         LogHelper logHelper = new LogHelper();
         foreach (DataRow row in broadCastUrgent.Rows)
         {
             this.AddBroadCastUrgent(row);
         }
     }
     if (broadCastUrgent != null)
     {
         broadCastUrgent.Rows.Clear();
         broadCastUrgent.Dispose();
         broadCastUrgent = null;
     }
 }
Example #9
0
 private DataTable GetCurrentPosInfoData(string sPresTime)
 {
     DataTable dataBySP;
     try
     {
         string str = "GpsPicServer_GetAdminRegionAlarmSet";
         SqlParameter[] sqlParameter = new SqlParameter[] { new SqlParameter("@preTime", sPresTime) };
         dataBySP = SqlDataAccess.getDataBySP(str, sqlParameter);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg("IORegionTimer", "GetCurrentPosInfoData", string.Concat("获取基础行政区报警报文发生错误!", exception.Message));
         logHelper.WriteError(errorMsg);
         dataBySP = null;
     }
     return dataBySP;
 }
Example #10
0
 public static string QueryAllLayerByPoint(string sLon, string sLat)
 {
     string str;
     LogHelper logHelper = null;
     try
     {
         double num = double.Parse(sLon);
         double num1 = double.Parse(sLat);
         string str1 = ReadDataFromGis.GisWebService.QueryAllLayerByPoint(num, num1);
         string[] strArrays = new string[] { ":::" };
         string[] strArrays1 = str1.Split(strArrays, StringSplitOptions.RemoveEmptyEntries);
         str = ((int)strArrays1.Length > 1 ? strArrays1[1] : "");
     }
     catch (WebException webException1)
     {
         WebException webException = webException1;
         logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg()
         {
             ClassName = "ReadDataFromGis",
             FunctionName = "QueryAllLayerByPoint",
             ErrorText = "取得详细位置信息发生WebException错误"
         };
         logHelper.WriteError(errorMsg, webException);
         str = "";
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         logHelper = new LogHelper();
         ErrorMsg errorMsg1 = new ErrorMsg()
         {
             ClassName = "ReadDataFromGis",
             FunctionName = "QueryAllLayerByPoint",
             ErrorText = "取得详细位置信息发生错误"
         };
         logHelper.WriteError(errorMsg1, exception);
         str = "";
     }
     return str;
 }
Example #11
0
 private void BroadCastMsg()
 {
     try
     {
         DataTable msgParamData = this.GetMsgParamData(this.BroadPreTime.ToString());
         if (msgParamData == null || msgParamData.Rows.Count == 0)
         {
             if (this.dtBroadCastUrgent != null && this.dtBroadCastUrgent.Rows.Count > 0)
             {
                 this.BroadCastUrgentMsg();
             }
             if (this.dtBroadCastError != null && this.dtBroadCastError.Rows.Count > 0)
             {
                 this.BroadCastErrorMsg();
             }
         }
         else
         {
             this.BroadPreTime = DateTime.Parse(msgParamData.Rows[0]["PreTime"].ToString());
             LogMsg logMsg = new LogMsg();
             LogHelper logHelper = new LogHelper();
             foreach (DataRow row in msgParamData.Rows)
             {
                 if (this.dtBroadCastUrgent != null && this.dtBroadCastUrgent.Rows.Count > 0)
                 {
                     this.BroadCastUrgentMsg();
                 }
                 this.SendBroadCast(row);
             }
             if (this.dtBroadCastError != null && this.dtBroadCastError.Rows.Count > 0)
             {
                 this.BroadCastErrorMsg();
             }
         }
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg()
         {
             ClassName = "BussinessProcess",
             FunctionName = "BroadCastMsg",
             ErrorText = string.Concat("处理普通信息播报发生错误!", exception.Message)
         };
         (new LogHelper()).WriteError(errorMsg);
     }
 }
 private void InsertAlarmInfo(DataRow dr, CmdParam.CarAlarmState carAlarmState, int regionID)
 {
     try
     {
         int num = 0;
         string empty = string.Empty;
         int num1 = 1;
         long num2 = 4503599627370496L;
         int num3 = 1154;
         int num4 = 65;
         string str = string.Empty;
         string str1 = dr["AddMsgTxt"].ToString();
         string str2 = null;
         bool flag = false;
         string str3 = null;
         int num5 = 0;
         try
         {
             SqlParameter[] sqlParameter = new SqlParameter[] { new SqlParameter("@wrkid", (object)num), new SqlParameter("@orderid", dr["OrderId"]), new SqlParameter("@userid", empty), new SqlParameter("@telephone", dr["telephone"]), new SqlParameter("@msgType", (object)num4), new SqlParameter("@recetime", dr["ReceTime"]), new SqlParameter("@gpstime", dr["GpsTime"]), new SqlParameter("@starCondition", dr["StarCondition"]), new SqlParameter("@starNum", dr["StarNum"]), new SqlParameter("@carStatu", (object)num1), new SqlParameter("@carStatuEx", (object)num2), new SqlParameter("@carCondition", dr["CarCondition"]), new SqlParameter("@Longitude", dr["Longitude"]), new SqlParameter("@Latitude", dr["Latitude"]), new SqlParameter("@direct", dr["Direct"]), new SqlParameter("@speed", dr["Speed"]), new SqlParameter("@Reserved", (object)num3), new SqlParameter("@TransportStatus", dr["TransportStatus"]), new SqlParameter("@Accelerration", dr["Accelerration"]), new SqlParameter("@Altitude", dr["Altitude"]), new SqlParameter("@DistanceDiff", dr["DistanceDiff"]), new SqlParameter("@commflag", dr["CommFlag"]), new SqlParameter("@addType", dr["AddMsgType"]), new SqlParameter("@addTxt", str1), new SqlParameter("@DutyStr", str2), new SqlParameter("@isPic", (object)flag), new SqlParameter("@pic", str3), new SqlParameter("@alarmInfo", str), new SqlParameter("@cameraID", (object)num5) };
             string str4 = "GpsPicServer_Alarm_Insert";
             string str5 = "GpsPicServer_RealTime_Insert";
             int num6 = SqlDataAccess.insertBySp(str4, sqlParameter);
             if (num6 > 0)
             {
                 LogMsg logMsg = new LogMsg("PlatformAlarmRegionAlarm", "InsertAlarmInfo", "");
                 object[] objArray = new object[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文已插入gpsrecebuffer,区域ID:", regionID };
                 logMsg.Msg = string.Concat(objArray);
                 this.logHelper.WriteLog(logMsg);
             }
             else
             {
                 object[] objArray1 = new object[] { "将平台检测", carAlarmState.ToString(), "报警报文插入gpsrecbuffer表错误,返回值!", num6.ToString(), ",区域ID:", regionID };
                 ErrorMsg errorMsg = new ErrorMsg("PlatformAlarmRegionAlarm", "InsertAlarmInfo", string.Concat(objArray1));
                 this.logHelper.WriteError(errorMsg);
             }
             int num7 = SqlDataAccess.insertBySp(str5, sqlParameter);
             if (num7 > 0)
             {
                 string[] strArrays = new string[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文已插入gpsrecerealtime" };
                 LogMsg logMsg1 = new LogMsg("PlatformAlarmRegionAlarm", "InsertAlarmInfo", string.Concat(strArrays));
                 object[] objArray2 = new object[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文已插入gpsrecerealtime,区域ID:", regionID };
                 logMsg1.Msg = string.Concat(objArray2);
                 this.logHelper.WriteLog(logMsg1);
             }
             else
             {
                 object[] objArray3 = new object[] { "将平台检测", carAlarmState.ToString(), "报警报文插入gpsrecerealtime_buffer表发生错误,返回值!", num7.ToString(), ",区域ID:", regionID };
                 ErrorMsg errorMsg1 = new ErrorMsg("PlatformAlarmRegionAlarm", "InsertAlarmInfo", string.Concat(objArray3));
                 this.logHelper.WriteError(errorMsg1);
             }
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             object[] objArray4 = new object[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), ",区域ID:", regionID, "报警报文插入数据库发生错误! 信息:", exception.Message };
             ErrorMsg errorMsg2 = new ErrorMsg("PlatformAlarmRegionAlarm", "InsertAlarmInfo", string.Concat(objArray4));
             this.logHelper.WriteError(errorMsg2);
         }
     }
     catch (Exception exception3)
     {
         Exception exception2 = exception3;
         LogHelper logHelper = new LogHelper();
         object[] objArray5 = new object[] { "将平台检测", carAlarmState.ToString(), ",区域ID:", regionID, "报警报文插入gpsrecbuffer表 、gpsrecerealtime_buffer表发生错误!", exception2.Message };
         ErrorMsg errorMsg3 = new ErrorMsg("PlatformAlarmRegionAlarm", "InsertAlarmInfo", string.Concat(objArray5));
         logHelper.WriteError(errorMsg3);
     }
 }
Example #13
0
 public static string ReadXmlEveryOne(string pName)
 {
     string str = string.Empty;
     try
     {
         str = Convert.ToString(LoadParamData().Tables[0].Rows[0][pName]);
     }
     catch (Exception exception)
     {
         LogHelper helper = new LogHelper();
         ErrorMsg pErrorMsg = new ErrorMsg("filehelper", "方法ReadXmlEveryOne", "读取配置参数错误" + exception.Message);
         helper.WriteError(pErrorMsg);
     }
     return str;
 }
Example #14
0
 public static string[] servicerIsInRegions(string[] paramStr)
 {
     string[] strArrays;
     try
     {
         strArrays = ReadDataFromGis.GisWebService.IsInRegions(paramStr);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg("ReadDataFromGis", "servicerIsInRegion", string.Concat("调用webservice判断车辆是否在行政区内例外:", exception.Message));
         logHelper.WriteError(errorMsg);
         strArrays = null;
     }
     return strArrays;
 }
Example #15
0
 private bool execConnection()
 {
     Response response = RemotingClient.LoginSys_Login(false, true);
     if (response.ResultCode != (long)0)
     {
         Record.execFileRecord("用户登录", string.Format("{0}登录失败:{1}", Variable.sUserId, response.ErrorMsg));
         return false;
     }
     LogHelper logHelper = new LogHelper();
     LogMsg logMsg = new LogMsg()
     {
         Msg = string.Concat("用户登录", string.Format("{0}登录成功:{1}", Variable.sUserId, response.ErrorMsg))
     };
     logHelper.WriteLog(logMsg);
     return true;
 }
Example #16
0
 private DataTable GetOblivionOrderCoordinates(DataRow dr, DateTime eTime)
 {
     DateTime dateTime;
     DataTable dataBySql;
     try
     {
         string str = " select recetime, gpstime, Longitude, Latitude, DistanceDiff ";
         str = string.Concat(str, " from GpsReceRealTime WITH(NOLOCK) ");
         str = string.Concat(str, " where telephone = '{0}' and recetime between '{1}' and '{2}' ");
         if (dr["RemedyTime"].ToString() == null || !(dr["RemedyTime"].ToString() != ""))
         {
             dateTime = Convert.ToDateTime(dr["ShippingTime"].ToString());
         }
         else
         {
             DateTime dateTime1 = Convert.ToDateTime(dr["RemedyTime"].ToString());
             dateTime = dateTime1.AddMinutes(-3);
             dateTime = (dateTime < Convert.ToDateTime(dr["ShippingTime"].ToString()) ? Convert.ToDateTime(dr["ShippingTime"].ToString()) : dateTime);
         }
         DateTime dateTime2 = eTime;
         str = string.Format(str, dr["SimNum"], dateTime, dateTime2);
         dataBySql = SqlDataAccess.getDataBySql(str);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg()
         {
             ClassName = "AddressResolution",
             FunctionName = "GetOblivionOrderCoordinates",
             ErrorText = string.Concat("获得未完成订单坐标信息发生错误!", exception.Message)
         };
         logHelper.WriteError(errorMsg, exception);
         return null;
     }
     return dataBySql;
 }
Example #17
0
 private int InsertCarDayPos(string[] Locations, ref int count)
 {
     int num;
     try
     {
         if (Locations == null || (int)Locations.Length <= 0)
         {
             num = -1;
         }
         else
         {
             string str = " insert into DF_CarDayPos(Gpstime, SimNum, Longitude, Latitude, CarPos) select  '{0}','{1}','{2}','{3}','{4}' ";
             string str1 = " UNION ALL SELECT '{0}','{1}','{2}','{3}','{4}' ";
             bool flag = true;
             string[] locations = Locations;
             for (int i = 0; i < (int)locations.Length; i++)
             {
                 string str2 = locations[i];
                 char[] chrArray = new char[] { ':' };
                 string[] strArrays = str2.Split(chrArray, 2);
                 string[] strArrays1 = strArrays[1].Split(new char[] { ',' });
                 if (strArrays1 != null && (int)strArrays1.Length > 0)
                 {
                     string[] strArrays2 = strArrays1;
                     for (int j = 0; j < (int)strArrays2.Length; j++)
                     {
                         string str3 = strArrays2[j];
                         string[] strArrays3 = str3.Split(new char[] { '@' });
                         if ((int)strArrays3.Length < 4)
                         {
                             LogHelper logHelper = new LogHelper();
                             LogMsg logMsg = new LogMsg()
                             {
                                 ClassName = "ReadDataFromDB",
                                 FunctionName = "InsertCarDayPos",
                                 Msg = string.Concat("组合车辆位置信息失败,", str3)
                             };
                             logHelper.WriteLog(logMsg);
                         }
                         else if (!flag)
                         {
                             object[] objArray = new object[] { strArrays3[0], strArrays3[1], strArrays3[2], strArrays3[3], strArrays[0] };
                             str = string.Concat(str, string.Format(str1, objArray));
                             count = count + 1;
                         }
                         else
                         {
                             flag = false;
                             object[] objArray1 = new object[] { strArrays3[0], strArrays3[1], strArrays3[2], strArrays3[3], strArrays[0] };
                             str = string.Format(str, objArray1);
                             count = 1;
                         }
                     }
                 }
             }
             num = SqlDataAccess.insertBySql(str);
         }
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper1 = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg("AddressResolution", "InsertCarDayPos", string.Concat("插入车辆最接近12点详细位置信息发生错误!", exception.Message));
         logHelper1.WriteError(errorMsg);
         num = -1;
     }
     return num;
 }
Example #18
0
 private DataTable GetOblivionOrder()
 {
     DataTable dataBySql;
     try
     {
         string str = string.Concat(" select * ", " FROM GpsShippingInfo ");
         DateTime now = DateTime.Now;
         str = string.Concat(str, " WHERE Status= 0 and '", now.ToString(), "' > ShippingTime and IsNotRemedy = 0 ");
         dataBySql = SqlDataAccess.getDataBySql(str);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg()
         {
             ClassName = "AddressResolution",
             FunctionName = "GetOblivionOrder",
             ErrorText = string.Concat("获得未完成订单发生错误!", exception.Message)
         };
         logHelper.WriteError(errorMsg, exception);
         return null;
     }
     return dataBySql;
 }
Example #19
0
 private void method_1()
 {
     //Trace.Write("appserver - Thread upResponse, WebGpsClient_GetResponseData start!");
     SqlDataAccess access = new SqlDataAccess();
     DateTime dbTime = base.GetDbTime(access);
     DateTime now = DateTime.Now;
     DataRow row = UpdataStruct.CloneDataTableColumn.NewRow();
     while (true)
     {
         try
         {
             SqlParameter[] parameterArray = new SqlParameter[] { new SqlParameter("@PreReadTime", dbTime) };
             DataTable table = access.getDataBySP("WebGpsClient_GetResponseData", parameterArray);
             if ((table != null) && (table.Rows.Count > 0))
             {
                 dbTime = Convert.ToDateTime(table.Rows[0]["svrTime"]);
                 this.method_2(row, table);
             }
             else
             {
                 Thread.Sleep(0xbb8);
             }
             if (this.method_0(now))
             {
                 now = DateTime.Now;
             }
         }
         catch (Exception exception)
         {
             Thread.Sleep(0x1388);
             LogHelper helper = new LogHelper();
             ErrorMsg msg = new ErrorMsg("UpdataResponseData", helper.GetCallFunction(), helper.GetExceptionMsg(exception));
             helper.WriteError(msg);
         }
         Thread.Sleep(0x3e8);
     }
 }
Example #20
0
 public bool IsUserButCUser()
 {
     bool flag;
     try
     {
         string format = "SELECT UserID FROM GpsUser WHERE IsStop = 0 and UserID= '{0}' and PassWord ='******'";
         format = string.Format(format, this.UserId, this.UserPassword);
         if (this.sqlDataAccess_0.getDataBySql(format).Rows.Count != 0)
         {
             return true;
         }
         flag = false;
     }
     catch (Exception exception)
     {
         LogHelper helper = new LogHelper();
         ErrorMsg msg = new ErrorMsg("login", helper.GetCallFunction(), helper.GetExceptionMsg(exception));
         helper.WriteError(msg, exception);
         throw exception;
     }
     return flag;
 }
Example #21
0
 private void AdminRegionAlarmInsert(DataTable dt)
 {
     if (dt == null || dt.Rows.Count <= 0)
     {
         return;
     }
     try
     {
         LogHelper logHelper = new LogHelper();
         int num = 0;
         string empty = string.Empty;
         int num1 = 1154;
         int num2 = 65;
         string str = string.Empty;
         string str1 = null;
         bool flag = false;
         string str2 = null;
         int num3 = 0;
         foreach (DataRow row in dt.Rows)
         {
             try
             {
                 SqlParameter[] sqlParameter = new SqlParameter[] { new SqlParameter("@wrkid", (object)num), new SqlParameter("@orderid", row["OrderId"]), new SqlParameter("@userid", empty), new SqlParameter("@telephone", row["SimNum"]), new SqlParameter("@msgType", (object)num2), new SqlParameter("@recetime", row["ReceTime"]), new SqlParameter("@gpstime", row["GpsTime"]), new SqlParameter("@starCondition", row["StarCondition"]), new SqlParameter("@starNum", row["StarNum"]), new SqlParameter("@carStatu", row["carStatu"]), new SqlParameter("@carStatuEx", row["CarStatuEx"]), new SqlParameter("@carCondition", row["CarCondition"]), new SqlParameter("@Longitude", row["Longitude"]), new SqlParameter("@Latitude", row["Latitude"]), new SqlParameter("@direct", row["Direct"]), new SqlParameter("@speed", row["Speed"]), new SqlParameter("@Reserved", (object)num1), new SqlParameter("@TransportStatus", row["TransportStatus"]), new SqlParameter("@Accelerration", row["Accelerration"]), new SqlParameter("@Altitude", row["Altitude"]), new SqlParameter("@DistanceDiff", row["DistanceDiff"]), new SqlParameter("@commflag", row["CommFlag"]), new SqlParameter("@addType", row["AddMsgType"]), new SqlParameter("@addTxt", row["AddMsgTxt"]), new SqlParameter("@DutyStr", str1), new SqlParameter("@isPic", (object)flag), new SqlParameter("@pic", str2), new SqlParameter("@alarmInfo", row["AdminRegionName"].ToString()), new SqlParameter("@cameraID", (object)num3) };
                 string str3 = "GpsPicServer_Alarm_Insert";
                 string str4 = "GpsPicServer_RealTime_Insert";
                 int num4 = SqlDataAccess.insertBySp(str3, sqlParameter);
                 if (num4 > 0)
                 {
                     LogMsg logMsg = new LogMsg("", "", string.Concat("车载电话为:", row["SimNum"].ToString(), "的出入行政区报警报文已插入gpsrecebuffer"));
                     logHelper.WriteLog(logMsg);
                 }
                 else
                 {
                     ErrorMsg errorMsg = new ErrorMsg("ReadDataFromDB", "AdminRegionAlarmInsert", string.Concat("将出入行政区报警报文插入gpsrecbuffer表错误,返回值!", num4.ToString()));
                     logHelper.WriteError(errorMsg);
                 }
                 int num5 = SqlDataAccess.insertBySp(str4, sqlParameter);
                 if (num5 > 0)
                 {
                     LogMsg logMsg1 = new LogMsg("", "", string.Concat("车载电话为:", row["SimNum"].ToString(), "的出入行政区报警报文已插入gpsrecerealtime"));
                     logHelper.WriteLog(logMsg1);
                 }
                 else
                 {
                     ErrorMsg errorMsg1 = new ErrorMsg("ReadDataFromDB", "AdminRegionAlarmInsert", string.Concat("将出入行政区报警报文插入gpsrecerealtime_buffer表发生错误,返回值!", num5.ToString()));
                     logHelper.WriteError(errorMsg1);
                 }
             }
             catch (Exception exception1)
             {
                 Exception exception = exception1;
                 ErrorMsg errorMsg2 = new ErrorMsg("IORegionTimer", "AdminRegionAlarmInsert", string.Concat("车载电话为:", row["SimNum"].ToString(), "的出入行政区报警报文插入数据库发生错误! 信息:", exception.Message));
                 logHelper.WriteError(errorMsg2);
             }
         }
     }
     catch (Exception exception3)
     {
         Exception exception2 = exception3;
         LogHelper logHelper1 = new LogHelper();
         ErrorMsg errorMsg3 = new ErrorMsg("IORegionTimer", "AdminRegionAlarmInsert", string.Concat("将出入行政区报警报文插入gpsrecbuffer表 、gpsrecerealtime_buffer表发生错误!", exception2.Message));
         logHelper1.WriteError(errorMsg3);
     }
 }
Example #22
0
 public static bool servicerIsInRegion(double lon, double lat, string regionId)
 {
     bool flag;
     try
     {
         flag = ReadDataFromGis.GisWebService.IsInRegion(lon, lat, regionId);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg("ReadDataFromGis", "servicerIsInRegion", string.Concat("调用webservice判断车辆是否在行政区内例外:", exception.Message));
         logHelper.WriteError(errorMsg);
         flag = false;
     }
     return flag;
 }
Example #23
0
 private void InsertAlarmInfo(DataRow dr, CmdParam.CarAlarmState carAlarmState, int AddMsgType)
 {
     try
     {
         int num = 0;
         string empty = string.Empty;
         int num1 = Convert.ToInt32(dr["carstatu"]);
         long num2 = (long)0;
         num2 = (dr["carstatuex"] == DBNull.Value || dr["carstatuex"].ToString().Equals("") ? 2251799813685248L : 2251799813685248L | Convert.ToInt64(dr["carstatuex"]));
         int num3 = 1154;
         int num4 = 65;
         string str = string.Empty;
         string str1 = dr["AddMsgTxt"].ToString();
         string str2 = null;
         bool flag = false;
         string str3 = null;
         int num5 = 0;
         try
         {
             SqlParameter[] sqlParameter = new SqlParameter[] { new SqlParameter("@wrkid", (object)num), new SqlParameter("@orderid", dr["OrderId"]), new SqlParameter("@userid", empty), new SqlParameter("@telephone", dr["telephone"]), new SqlParameter("@msgType", (object)num4), new SqlParameter("@recetime", dr["ReceTime"]), new SqlParameter("@gpstime", dr["GpsTime"]), new SqlParameter("@starCondition", dr["StarCondition"]), new SqlParameter("@starNum", dr["StarNum"]), new SqlParameter("@carStatu", (object)num1), new SqlParameter("@carStatuEx", (object)num2), new SqlParameter("@carCondition", dr["CarCondition"]), new SqlParameter("@Longitude", dr["Longitude"]), new SqlParameter("@Latitude", dr["Latitude"]), new SqlParameter("@direct", dr["Direct"]), new SqlParameter("@speed", dr["Speed"]), new SqlParameter("@Reserved", (object)num3), new SqlParameter("@TransportStatus", dr["TransportStatus"]), new SqlParameter("@Accelerration", dr["Accelerration"]), new SqlParameter("@Altitude", dr["Altitude"]), new SqlParameter("@DistanceDiff", dr["DistanceDiff"]), new SqlParameter("@commflag", dr["CommFlag"]), new SqlParameter("@addType", (object)AddMsgType), new SqlParameter("@addTxt", str1), new SqlParameter("@DutyStr", str2), new SqlParameter("@isPic", (object)flag), new SqlParameter("@pic", str3), new SqlParameter("@alarmInfo", str), new SqlParameter("@cameraID", (object)num5) };
             string str4 = "GpsPicServer_Alarm_Insert";
             string str5 = "GpsPicServer_RealTime_Insert";
             if (AddMsgType != -99997)
             {
                 int num6 = SqlDataAccess.insertBySp(str4, sqlParameter);
                 if (num6 > 0)
                 {
                     LogMsg logMsg = new LogMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", "");
                     string[] strArrays = new string[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文已插入gpsrecebuffer" };
                     logMsg.Msg = string.Concat(strArrays);
                     this.logHelper.WriteLog(logMsg);
                 }
                 else
                 {
                     ErrorMsg errorMsg = new ErrorMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat("将平台检测", carAlarmState.ToString(), "报警报文插入gpsrecbuffer表错误,返回值!", num6.ToString()));
                     this.logHelper.WriteError(errorMsg);
                 }
             }
             int num7 = SqlDataAccess.insertBySp(str5, sqlParameter);
             if (num7 > 0)
             {
                 string[] strArrays1 = new string[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文已插入gpsrecerealtime" };
                 LogMsg logMsg1 = new LogMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat(strArrays1));
                 string[] strArrays2 = new string[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文已插入gpsrecerealtime" };
                 logMsg1.Msg = string.Concat(strArrays2);
                 this.logHelper.WriteLog(logMsg1);
             }
             else
             {
                 ErrorMsg errorMsg1 = new ErrorMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat("将平台检测", carAlarmState.ToString(), "报警报文插入gpsrecerealtime_buffer表发生错误,返回值!", num7.ToString()));
                 this.logHelper.WriteError(errorMsg1);
             }
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             string[] strArrays3 = new string[] { "车载电话为:", dr["telephone"].ToString(), "的平台检测", carAlarmState.ToString(), "报警报文插入数据库发生错误! 信息:", exception.Message };
             ErrorMsg errorMsg2 = new ErrorMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat(strArrays3));
             this.logHelper.WriteError(errorMsg2);
         }
     }
     catch (Exception exception3)
     {
         Exception exception2 = exception3;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg3 = new ErrorMsg("PlatformAlarmPathAlarm", "InsertAlarmInfo", string.Concat("将平台检测", carAlarmState.ToString(), "报警报文插入gpsrecbuffer表 、gpsrecerealtime_buffer表发生错误!", exception2.Message));
         logHelper.WriteError(errorMsg3);
     }
 }
Example #24
0
 private DataTable method_2()
 {
     DataTable table = null;
     try
     {
         table = this.loginUserInfo.CreateUserAuthorInfomation();
     }
     catch (Exception exception)
     {
         LogHelper helper = new LogHelper();
         ErrorMsg msg = new ErrorMsg("login", helper.GetCallFunction(), helper.GetExceptionMsg(exception));
         helper.WriteError(msg);
         throw exception;
     }
     return table;
 }
Example #25
0
 private void method_5(DataRow dataRow_0, DataTable dataTable_0)
 {
     int drInt = base.GetDrInt(dataRow_0, "RespValue");
     int num2 = base.GetDrInt(dataRow_0, "cmdResult");
     string str = string.Empty;
     int num3 = base.GetDrInt(dataRow_0, "commFlag");
     DataRow row = dataTable_0.NewRow();
     row["GpsTime"] = base.GetDrStr(dataRow_0, "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["OrderType"] = "接收";
     row["OrderName"] = RespCodeParam.GetRespName(drInt);
     row["msgType"] = 0x45;
     row["OrderResult"] = this.method_10(drInt, num2, out str);
     row["CommFlag"] = base.GetCommFlagName(num3);
     row["Describe"] = str;
     row["RespCode"] = drInt;
     row["speed"] = base.GetDrStr(dataRow_0, "speed");
     row["AccOn"] = ((base.GetDrInt(dataRow_0, "statu") & 0x4000) == 0) ? 0 : 1;
     dataTable_0.Rows.Add(row);
     if (base.IsCancelAlarm(drInt) && (num2 == 0))
     {
         this.updataCommon_0.UpdateAlarmFlag(false, Convert.ToString(row["CarId"]), null);
     }
     if ((drInt == 0x1bc) || (drInt == 0x184))
     {
         DataRow row2 = dataTable_0.NewRow();
         try
         {
             row2["GpsTime"] = base.GetDrStr(dataRow_0, "GpsTime");
             row2["ReceTime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
             row2["OrderID"] = 0;
             row2["CarNum"] = base.GetDrStr(dataRow_0, "carNum");
             row2["CarId"] = base.GetDrStr(dataRow_0, "CarId");
             row2["OrderType"] = "信息";
             row2["OrderName"] = "提示信息";
             row2["msgType"] = -1;
             row2["CommFlag"] = "";
             new CarAlarmType().UpdateAlarmType(base.GetDrStr(dataRow_0, "phone"));
             row2["OrderResult"] = "成功";
             row2["Describe"] = "下载数据成功";
         }
         catch (Exception exception)
         {
             row2["OrderResult"] = "失败";
             row2["Describe"] = "下载数据失败";
             LogHelper helper = new LogHelper();
             ErrorMsg msg = new ErrorMsg("UpdataNewLogData", helper.GetCallFunction(), helper.GetExceptionMsg(exception));
             helper.WriteError(msg);
         }
         dataTable_0.Rows.Add(row2);
     }
 }
Example #26
0
 private static void GpsPicMain()
 {
     LogMsg logMsg = new LogMsg()
     {
         ClassName = "Service",
         FunctionName = "GpsPicMain",
         Msg = "启动定时服务器 成功"
     };
     LogHelper logHelper = new LogHelper();
     logHelper.WriteLog(logMsg);
     ReadDataFromXml.UpdateParameter();
     logMsg.Msg = "未开启定时拍照功能";
     if (ReadDataFromXml.IsPic)
     {
         logMsg.Msg = "开启定时拍照功能";
         picTimer = new PicTimer();
         picTimer.start();
         logHelper.WriteLog(logMsg, logMsg.Msg);
     }
     logMsg.Msg = "未开启掉线通知功能";
     if (ReadDataFromXml.IsCuff)
     {
         logMsg.Msg = "开启掉线通知功能";
         cuffTimer = new CuffTimer();
         cuffTimer.start();
         logHelper.WriteLog(logMsg, logMsg.Msg);
     }
     logMsg.Msg = "未开启播报信息功能";
     if (ReadDataFromXml.IsBroadCast)
     {
         logMsg.Msg = "开启播报信息功能";
         broadCastTimer = new BroadCastTimer();
         broadCastTimer.start();
         logHelper.WriteLog(logMsg, logMsg.Msg);
     }
     logMsg.Msg = "未开启LBS定位服务";
     if (ReadDataFromXml.IsLBSPos)
     {
         logMsg.Msg = "开启LBS定位服务";
         lBSTimer = new LBSTimer();
         lBSTimer.start();
         logHelper.WriteLog(logMsg, logMsg.Msg);
     }
     logMsg.Msg = "未开启LCS定位服务";
     if (ReadDataFromXml.IsLCSPos)
     {
         logMsg.Msg = "开启LCS定位服务";
         lCSTimer = new LCSTimer();
         lCSTimer.start();
         logHelper.WriteLog(logMsg, logMsg.Msg);
     }
     logMsg.Msg = "未开启订单状态解析";
     if (ReadDataFromXml.IsBillPos)
     {
         logMsg.Msg = "开启订单状态解析";
         addressResolution = new AddressResolution();
         addressResolution.start();
         logHelper.WriteLog(logMsg, logMsg.Msg);
     }
     logMsg.Msg = "未开启出入行政区报警";
     if (ReadDataFromXml.IsAdminRegionAlarm)
     {
         logMsg.Msg = "开启出入行政区报警服务";
         iORegionTimer = new IORegionTimer();
         iORegionTimer.start();
         logHelper.WriteLog(logMsg, logMsg.Msg);
     }
     logMsg.Msg = "未开故障检测功能";
     if (ReadDataFromXml.IsChkError)
     {
         logMsg.Msg = "开启故障检测功能";
         chkErrorTimer = new ChkErrorTimer();
         chkErrorTimer.start();
         logHelper.WriteLog(logMsg, logMsg.Msg);
     }
     logMsg.Msg = "未开启未按时归班报警";
     if (ReadDataFromXml.IsBeBackOnTime)
     {
         logMsg.Msg = "开启未按时归班报警";
         carBeBackOnTime = new CarBeBackOnTime();
         carBeBackOnTime.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启DWLBS手机定位";
     if (ReadDataFromXml.IsDWLBSPos)
     {
         logMsg.Msg = "开启DWLBS手机定位";
         dWLBSPos = new DWLBSPos();
         dWLBSPos.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启未按时进出站报警";
     if (ReadDataFromXml.IsInOutOfRangeOnTime)
     {
         logMsg.Msg = "开启未按时进出站报警";
         carInOutOfRangeOnTime = new CarInOutOfRangeOnTime();
         carInOutOfRangeOnTime.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启平台报警-偏移路线报警";
     if (ReadDataFromXml.IsPathAlarm)
     {
         logMsg.Msg = "开启平台报警-偏移路线报警";
         platformAlarmPathAlarm = new PlatformAlarmPathAlarm();
         platformAlarmPathAlarm.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启平台报警-分路段超速报警";
     if (ReadDataFromXml.IsPathSegmentAlarm)
     {
         logMsg.Msg = "开启平台报警-分路段超速报警";
         platformAlarmPathSegmentAlarm = new PlatformAlarmPathSegmentAlarm();
         platformAlarmPathSegmentAlarm.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启平台报警-区域报警报警";
     if (ReadDataFromXml.IsRegionAlarm)
     {
         logMsg.Msg = "开启平台报警-区域报警报警";
         platformAlarmRegionAlarm = new PlatformAlarmRegionAlarm();
         platformAlarmRegionAlarm.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启交通部上下线通知";
     if (ReadDataFromXml.IsJTBOnOffNotice)
     {
         logMsg.Msg = "开启交通部上下线通知";
         jTBOnOffLineNotice = new JTBOnOffLineNotice();
         jTBOnOffLineNotice.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启定时下发终端点播";
     if (ReadDataFromXml.IsTerminalDemand)
     {
         logMsg.Msg = "开启定时下发终端点播";
         jTBTerminalDemand = new JTBTerminalDemand();
         jTBTerminalDemand.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启聚集报警";
     if (ReadDataFromXml.IsGatheredAlarm)
     {
         logMsg.Msg = "开启聚集报警";
         platformGatheredAlarm = new PlatformGatheredAlarm();
         platformGatheredAlarm.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启发送详细位置信息";
     if (ReadDataFromXml.IsCurrentAddress)
     {
         logMsg.Msg = "开启发送详细位置信息";
         inquiresCarCurrentAddress = new InquiresCarCurrentAddress();
         inquiresCarCurrentAddress.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启脱车粘车报警";
     if (ReadDataFromXml.IsSeparateAndSticky)
     {
         logMsg.Msg = "开启脱车粘车报警";
         separateAndSticky = new SeparateAndSticky();
         separateAndSticky.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启终端未上线短信提醒";
     if (ReadDataFromXml.IsMsgRemind)
     {
         logMsg.Msg = "开启终端未上线短信提醒";
         terminalOffLineMessageRemind = new TerminalOffLineMessageRemind();
         terminalOffLineMessageRemind.start();
         logHelper.WriteLog(logMsg);
     }
     logMsg.Msg = "未开启发送配置短信功能";
     if (ReadDataFromXml.IsSendPZMsg)
     {
         logMsg.Msg = "开启发送配置短信功能";
         sendPZMessage = new SendPZMessage();
         sendPZMessage.start();
         logHelper.WriteLog(logMsg);
     }
     if (ReadDataFromXml.IsForbidDriveAlarm)
     {
         logMsg.Msg = "开启平台禁驾报警功能";
         platFormrForbidDriveAlarm = new PlatFormrForbidDriveAlarm();
         platFormrForbidDriveAlarm.start();
         logHelper.WriteLog(logMsg);
     }
     if (ReadDataFromXml.IsThreeLevelRoadAlarm)
     {
         logMsg.Msg = "开启平台三级路面报警";
         platFormAlarmThreeLevelRoadAlarm = new PlatFormAlarmThreeLevelRoadAlarm();
         platFormAlarmThreeLevelRoadAlarm.start();
         logHelper.WriteLog(logMsg);
     }
     if (ReadDataFromXml.IschkRoadSpeedAndRank)
     {
         logMsg.Msg = "开启分道路等级超速报警";
         platFormCheckRoadSpeedAndRank = new PlatFormCheckRoadSpeedAndRank();
         platFormCheckRoadSpeedAndRank.start();
         logHelper.WriteLog(logMsg);
     }
     try
     {
         tDeleteLogTimer = new System.Timers.Timer((double)1000);
         tDeleteLogTimer.Elapsed += new System.Timers.ElapsedEventHandler(onDeleteOldRecord);
         tDeleteLogTimer.Enabled = true;
     }
     catch (Exception exception)
     {
         logHelper.WriteError(new ErrorMsg("Service", "启动日志删除失败", exception.Message));
     }
 }
Example #27
0
 private void UpdateRemedyBill(DataTable dtOrder)
 {
     LogHelper logHelper = new LogHelper();
     LogMsg logMsg = new LogMsg();
     try
     {
         string str = "";
         string str1 = " update GpsShippingInfo set ActArrivalDate = {0},LastPosition = '{1}',Status = '{2}',ActShippingTime = {3},BeginMileage = {4},EndMileage = {5},IsNotRemedy = '{6}', RemedyTime = {7}  where Id = {8};";
         foreach (DataRow row in dtOrder.Rows)
         {
             string str2 = (row["ActArrivalDate"] == DBNull.Value ? "null" : string.Concat("'", row["ActArrivalDate"].ToString(), "'"));
             string str3 = row["LastPosition"].ToString();
             string str4 = row["Status"].ToString();
             string str5 = (row["ActShippingTime"] == DBNull.Value ? "null" : string.Concat("'", row["ActShippingTime"].ToString(), "'"));
             string str6 = (row["BeginMileage"] == DBNull.Value ? "null" : string.Concat("'", row["BeginMileage"].ToString(), "'"));
             string str7 = (row["EndMileage"] == DBNull.Value ? "null" : string.Concat("'", row["EndMileage"].ToString(), "'"));
             string str8 = row["IsNotRemedy"].ToString();
             string str9 = (row["RemedyTime"] == DBNull.Value ? "null" : string.Concat("'", row["RemedyTime"].ToString(), "'"));
             string str10 = row["Id"].ToString();
             object[] objArray = new object[] { str2, str3, str4, str5, str6, str7, str8, str9, str10 };
             str = string.Concat(str, string.Format(str1, objArray));
             if (str8 != "-1")
             {
                 if (str8 != "1")
                 {
                     continue;
                 }
                 logMsg.ClassName = "ReadDataFromDB";
                 logMsg.FunctionName = "UpdateRemedyBill";
                 string[] strArrays = new string[] { "Id为", str10, ",订单号为", row["WaybillCode"].ToString(), "的订单已经到达" };
                 logMsg.Msg = string.Concat(strArrays);
                 logHelper.WriteLog(logMsg);
             }
             else
             {
                 logMsg.ClassName = "ReadDataFromDB";
                 logMsg.FunctionName = "UpdateRemedyBill";
                 string[] strArrays1 = new string[] { "Id为", str10, ",订单号为", row["WaybillCode"].ToString(), "的订单已经过期, IsNotRemedy为-1" };
                 logMsg.Msg = string.Concat(strArrays1);
                 logHelper.WriteLog(logMsg);
             }
         }
         SqlDataAccess.insertBySql(str);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         ErrorMsg errorMsg = new ErrorMsg()
         {
             ClassName = "AddressResolution",
             FunctionName = "UpdateRemedyBill",
             ErrorText = string.Concat("更新订单状态发生错误!", exception.Message)
         };
         logHelper.WriteError(errorMsg, exception);
     }
 }
Example #28
0
 public static string CheckRoadSegAlarm(string inputXML)
 {
     string str;
     try
     {
         str = ReadDataFromGis.PlatformAlarmService.ChackRoadSegAlarm(inputXML);
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg("ReadDataFromGis", "CheckRoadSegAlarm", string.Concat("调用webservice判断分路段超速报警错误:", exception.Message));
         logHelper.WriteError(errorMsg);
         str = "";
     }
     return str;
 }
Example #29
0
 private void InsertAlarmInfo(DataRow dr, string regionId)
 {
     try
     {
         int num = 0;
         string empty = string.Empty;
         int num1 = 1154;
         int num2 = 65;
         string str = string.Empty;
         int num3 = Convert.ToInt32(dr["carstatu"]);
         long num4 = (long)0;
         num4 = (dr["carstatuex"] == DBNull.Value || dr["carstatuex"].ToString().Equals("") ? 1125899906842624L : 1125899906842624L | Convert.ToInt64(dr["carstatuex"]));
         string str1 = string.Concat("M150004", regionId);
         string str2 = null;
         bool flag = false;
         string str3 = null;
         int num5 = 0;
         try
         {
             SqlParameter[] sqlParameter = new SqlParameter[] { new SqlParameter("@wrkid", (object)num), new SqlParameter("@orderid", dr["OrderId"]), new SqlParameter("@userid", empty), new SqlParameter("@telephone", dr["telephone"]), new SqlParameter("@msgType", (object)num2), new SqlParameter("@recetime", dr["ReceTime"]), new SqlParameter("@gpstime", dr["GpsTime"]), new SqlParameter("@starCondition", dr["StarCondition"]), new SqlParameter("@starNum", dr["StarNum"]), new SqlParameter("@carStatu", (object)num3), new SqlParameter("@carStatuEx", (object)num4), new SqlParameter("@carCondition", dr["CarCondition"]), new SqlParameter("@Longitude", dr["Longitude"]), new SqlParameter("@Latitude", dr["Latitude"]), new SqlParameter("@direct", dr["Direct"]), new SqlParameter("@speed", dr["Speed"]), new SqlParameter("@Reserved", (object)num1), new SqlParameter("@TransportStatus", dr["TransportStatus"]), new SqlParameter("@Accelerration", dr["Accelerration"]), new SqlParameter("@Altitude", dr["Altitude"]), new SqlParameter("@DistanceDiff", dr["DistanceDiff"]), new SqlParameter("@commflag", dr["CommFlag"]), new SqlParameter("@addType", dr["AddMsgType"]), new SqlParameter("@addTxt", str1), new SqlParameter("@DutyStr", str2), new SqlParameter("@isPic", (object)flag), new SqlParameter("@pic", str3), new SqlParameter("@alarmInfo", str), new SqlParameter("@cameraID", (object)num5) };
             string str4 = "GpsPicServer_Alarm_Insert";
             string str5 = "GpsPicServer_RealTime_Insert";
             int num6 = SqlDataAccess.insertBySp(str4, sqlParameter);
             if (num6 > 0)
             {
                 LogMsg logMsg = new LogMsg("CarBeBackOnTime", "InsertAlarmInfo", string.Concat("车载电话为:", dr["telephone"].ToString(), "的未按时归班报警报文已插入gpsrecebuffer"));
                 this.logHelper.WriteLog(logMsg);
             }
             else
             {
                 ErrorMsg errorMsg = new ErrorMsg("CarBeBackOnTime", "InsertAlarmInfo", string.Concat("将未按时归班报警报文插入gpsrecbuffer表错误,返回值!", num6.ToString()));
                 this.logHelper.WriteError(errorMsg);
             }
             int num7 = SqlDataAccess.insertBySp(str5, sqlParameter);
             if (num7 > 0)
             {
                 LogMsg logMsg1 = new LogMsg("CarBeBackOnTime", "InsertAlarmInfo", string.Concat("车载电话为:", dr["telephone"].ToString(), "的未按时归班报警报文已插入gpsrecerealtime"));
                 this.logHelper.WriteLog(logMsg1);
             }
             else
             {
                 ErrorMsg errorMsg1 = new ErrorMsg("CarBeBackOnTime", "InsertAlarmInfo", string.Concat("将未按时归班报警报文插入gpsrecerealtime_buffer表发生错误,返回值!", num7.ToString()));
                 this.logHelper.WriteError(errorMsg1);
             }
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             ErrorMsg errorMsg2 = new ErrorMsg("CarBeBackOnTime", "InsertAlarmInfo", string.Concat("车载电话为:", dr["telephone"].ToString(), "的未按时归班报警报文插入数据库发生错误! 信息:", exception.Message));
             this.logHelper.WriteError(errorMsg2);
         }
     }
     catch (Exception exception3)
     {
         Exception exception2 = exception3;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg3 = new ErrorMsg("CarBeBackOnTime", "InsertAlarmInfo", string.Concat("将未按时归班报警报文插入gpsrecbuffer表 、gpsrecerealtime_buffer表发生错误!", exception2.Message));
         logHelper.WriteError(errorMsg3);
     }
 }
Example #30
0
 private DataTable GetCarDayPos()
 {
     DataTable dataBySql;
     try
     {
         dataBySql = SqlDataAccess.getDataBySql(" exec WebMgr_DF_GetCarDayPos ");
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         LogHelper logHelper = new LogHelper();
         ErrorMsg errorMsg = new ErrorMsg("AddressResolution", "GetCarDayPos", string.Concat("获取车辆当天末次坐标发生错误!", exception.Message));
         logHelper.WriteError(errorMsg);
         dataBySql = null;
     }
     return dataBySql;
 }