/// <summary> /// 调用存储过程查询车辆超速详细信息 /// </summary> /// <param name="sysflag">系统标志</param> /// <param name="cid">车辆ID</param> /// <param name="stime">开始时间</param> /// <param name="etime">结束时间</param> /// <param name="ispeed">超速速度</param> /// <returns></returns> public static DataTable GetMileageSpeedInfoById(string sysflag, string cid, string stime, string etime, string ispeed) { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@c_ID", cid), new SqlParameter("@startTime", stime), new SqlParameter("@endTime", etime), new SqlParameter("@iSpeed", ispeed) }; return(csh.FillDataSet(sysflag, WebProc.Proc("QWGProc_QS_SpeedEverySearch"), Parameters, null, 300).Tables[0]); }
/// <summary> /// 调用存储过程获取里程统计详细信息 /// </summary> /// <param name="sysflag">系统标志</param> /// <param name="cid">车辆ID</param> /// <param name="stime">开始时间</param> /// <param name="etime">结束时间</param> /// <returns></returns> public static DataTable GetCollectInfoById(string sysflag, int cid, string stime, string etime) { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@C_No", cid), new SqlParameter("@T_TimeBegin", stime), new SqlParameter("@T_TimeEnd", etime) }; return(csh.FillDataSet(sysflag, WebProc.Proc("QWGProc_QM_MileageDetails"), Parameters, null, 300).Tables[0]); }
/// <summary> /// 取得页面下拉框数据表格 /// </summary> /// <param name="sysflag">sysflag</param> /// <returns>DataTable</returns> private DataTable[] GetAllCmb(string sysflag) { DataTable[] dtArr = new DataTable[4]; try { ComSqlHelper csh = new ComSqlHelper(); //调用存储过程取得DataSet DataSet ds = csh.FillDataSet(sysflag, WebProc.Proc("ALProc_GetLogCmb"), null, null, 3600); if (ds.Tables.Count == 4) { dtArr[0] = ds.Tables[0]; dtArr[1] = ds.Tables[1]; dtArr[2] = ds.Tables[2]; dtArr[3] = ds.Tables[3]; } } catch (Exception ex) { throw ex; } return(dtArr); }
/// <summary> /// 调用存储过程查询未上线车辆列表 /// </summary> /// <param name="sysflag">系统标志</param> /// <param name="uid">用户ID</param> /// <param name="datime">车辆未在线天数</param> /// <returns></returns> public static DataTable GetCarOnLine(string sysflag, string uid, string datime, string onecaruser) { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@UserName", uid), new SqlParameter("@NotOnLine", datime), new SqlParameter("@OneCarUser", onecaruser) }; return(csh.FillDataSet(sysflag, WebProc.Proc("QWGProc_QC_CarOnLine"), Parameters, "onlinetbl", 600).Tables[0]); }
/// <summary> /// 添加地图标注 /// </summary> /// <param name="key"></param> /// <param name="DealerCode"></param> /// <param name="OpType"></param> /// <param name="M_Name"></param> /// <param name="M_Lat"></param> /// <param name="M_Lng"></param> /// <param name="M_Desc"></param> /// <param name="cuser"></param> /// <param name="upuser"></param> /// <returns></returns> public int InsertMarker(string key, string RowId, string DealerCode, string OpType, string M_Name, string M_Lat, string M_Lng, string M_Desc, string cuser, string upuser) { ComSqlHelper oSqlUtil = new ComSqlHelper(); try { SqlParameter[] oaPara; //参数构建 oaPara = new SqlParameter[9]; oaPara[0] = new SqlParameter("@DEALERCODE", DealerCode); oaPara[1] = new SqlParameter("@Id", RowId); oaPara[2] = new SqlParameter("@OpType", OpType); oaPara[3] = new SqlParameter("@M_Name", M_Name); oaPara[4] = new SqlParameter("@M_Lat", decimal.Parse(M_Lat)); oaPara[5] = new SqlParameter("@M_Lng", decimal.Parse(M_Lng)); oaPara[6] = new SqlParameter("@M_Desc", M_Desc); oaPara[7] = new SqlParameter("@Create_User", Int32.Parse(cuser)); oaPara[8] = new SqlParameter("@Update_User", Int32.Parse(upuser)); return(oSqlUtil.ExecuteSPNoQuery(key, WebProc.Proc("X80Proc_Marker_Dealer"), oaPara, false)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 调用存储过程获取用户登录统计信息 /// </summary> /// <param name="sysflag">系统标志</param> /// <param name="uname">用户名</param> /// <param name="stime">开始时间</param> /// <param name="etime">结束时间</param> /// <returns></returns> public static DataTable GetUCountLogin(string sysflag, string uname, string stime, string etime) { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@Company", uname), new SqlParameter("@startTime", stime), new SqlParameter("@endtime", etime) }; return(csh.FillDataSet(sysflag, WebProc.Proc("QWGProc_QS_SearchLogin"), Parameters, "userlogintb", 180).Tables[0]); }
/// <summary> /// 调用存储过程查询车辆行驶速度 /// </summary> /// <param name="sysflag">系统标志</param> /// <param name="cid">车辆ID</param> /// <param name="stime">开始时间</param> /// <param name="etime">结束时间</param> /// <returns></returns> public static DataTable GetSearhSpeeds(string sysflag, string cid, string stime, string etime) { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@C_No", cid), new SqlParameter("@StartDate", stime), new SqlParameter("@EndDate", etime) }; return(csh.FillDataSet(sysflag, WebProc.Proc("QWGProc_QS_GetSpeedInfo"), Parameters, null, 1800).Tables[0]); }
/// <summary> /// 查询电子栅栏车辆关联关系 /// </summary> /// <param name="key"></param> /// <param name="uid"></param> /// <param name="fid"></param> /// <returns></returns> private DataTable[] getFenceCarList(string key, string uid, string fid) { DataTable[] list = new DataTable[2]; ComSqlHelper oSqlUtil = new ComSqlHelper(); try { SqlParameter[] oaPara; //参数构建 oaPara = new SqlParameter[2]; oaPara[0] = new SqlParameter("@Uid", uid); oaPara[1] = new SqlParameter("@F_ID", fid); DataSet ds = oSqlUtil.FillDataSet(key, WebProc.Proc("QSProc_QS_FenceCar_List"), oaPara, "fencecartable", 30); if (ds.Tables.Count == 2) { list[0] = ds.Tables[0]; //电子围栏已关联车辆 list[1] = ds.Tables[1]; //电子围栏尚未关联车辆 } return(list); } catch (Exception ex) { throw ex; } }
private string getJsonQueryRourt(string key) { string r = ""; //string strCid = ""; try { ComSqlHelper oSqlUtil = new ComSqlHelper(); SqlParameter[] oaPara; //参数构建 oaPara = new SqlParameter[0]; DataTable dt = new DataTable(); dt = oSqlUtil.FillDataSet(key, "QSProc_GetQsLine", oaPara, "RourtData", 30).Tables[0]; if (dt.Rows.Count > 0) { Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter(); timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm':'ss"; r = JsonConvert.SerializeObject(dt, timeConverter); } } catch (Exception) { r = ""; } return(r); }
private int InsertDriveLine(string sysflag, string uid, string lname, string centerlng, string centerlat, string lradius, string desc, string dealercode, string linemarkers) { ComSqlHelper oSqlUtil = new ComSqlHelper(); try { SqlParameter[] oaPara; //参数构建 oaPara = new SqlParameter[8]; oaPara[0] = new SqlParameter("@L_Name", lname); oaPara[1] = new SqlParameter("@L_CenterLng", centerlng); oaPara[2] = new SqlParameter("@L_CenterLat", centerlat); oaPara[3] = new SqlParameter("@L_RADIUS", lradius); oaPara[4] = new SqlParameter("@L_Desc", desc); oaPara[5] = new SqlParameter("@DEALERCODE", dealercode); oaPara[6] = new SqlParameter("@UID", uid); oaPara[7] = new SqlParameter("@MarkerS", linemarkers); return(oSqlUtil.ExecuteSPNoQuery(sysflag, WebProc.Proc("X80Proc_DriveLine_Insert"), oaPara, false)); } catch (Exception ex) { throw ex; } }
private string getJsonQueryCarData(string key, string CID) { string r = ""; //string strCid = ""; try { ComSqlHelper oSqlUtil = new ComSqlHelper(); SqlParameter[] oaPara; //参数构建 oaPara = new SqlParameter[2]; oaPara[0] = new SqlParameter("@cid", CID); //oaPara[1] = new SqlParameter("@cid", CID); DataTable dt = new DataTable(); dt = oSqlUtil.FillDataSet(key, "JLJGPT_CarInforCarDataSelect", oaPara, "CarData", 30).Tables[0]; if (dt.Rows.Count > 0) { Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter(); timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm':'ss"; r = JsonConvert.SerializeObject(dt, timeConverter); } } catch (Exception) { r = ""; } return(r); }
private string insertLine2DB(string key, int LineAutoID, double[] Longitude, double[] Latitude) { try { ComSqlHelper oSqlUtil = new ComSqlHelper(); SqlParameter[] oaPara; //删除原有线路 oaPara = new SqlParameter[1]; oaPara[0] = new SqlParameter("@LineAutoID", LineAutoID); int f = oSqlUtil.ExecuteSPNoQuery(key, "QSProc_deleteLineInfo", oaPara, false); //插入新的线路 //参数构建 oaPara = new SqlParameter[3]; for (int i = 0; i < Longitude.Length; i++) { oaPara[0] = new SqlParameter("@LineAutoID", LineAutoID); oaPara[1] = new SqlParameter("@Longitude", Longitude[i]); oaPara[2] = new SqlParameter("@Latitude", Latitude[i]); int w = oSqlUtil.ExecuteSPNoQuery(key, "QSProc_InsertLineInfo", oaPara, false); } return("true"); } catch (Exception ex) { return(ex.Message); } }
/// <summary> /// 调用存储过程查询警情详细信息 /// </summary> /// <param name="sysflag">系统标志</param> /// <param name="cid">车辆ID</param> /// <param name="stime">开始时间</param> /// <param name="etime">结束时间</param> /// <param name="alarmtype">警情类型</param> /// <returns></returns> public static DataTable GetMilStatusInfoById(string sysflag, int cid, string stime, string etime, int alarmtype) { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@C_ID", cid), new SqlParameter("@T_TimeBegin", stime), new SqlParameter("@T_TimeEnd", etime), new SqlParameter("@AlarmType", alarmtype) }; return(csh.FillDataSet(sysflag, WebProc.Proc("QWGProc_QM_AlarmDetails"), Parameters, null, 300).Tables[0]); }
/// <summary> /// 调用存储过程查询停车明细数据 /// </summary> /// <param name="sysflag">系统标志</param> /// <param name="cid">车辆ID</param> /// <param name="stime">开始时间</param> /// <param name="etime">结束时间</param> /// <param name="stoptime">停车时长</param> /// <returns></returns> public static DataTable GetParkTotalInfoById(string sysflag, string cid, string stime, string etime, string stoptime) { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@C_NO", cid), new SqlParameter("@StartTime", stime), new SqlParameter("@ToTime", etime), new SqlParameter("@StopTime", stoptime) }; return(csh.FillDataSet(sysflag, WebProc.Proc("QWGProc_QS_GetParkDetailsInFo"), Parameters, null, 300).Tables[0]); }
public ResponseResult GetLastPhoto(Dictionary <string, string> inparams) { ResponseResult Result = null; try { ComSqlHelper csh = new ComSqlHelper(); string sysflag = inparams["sysflag"]; string cids = inparams["cids"]; SqlParameter[] Parameters0 = new SqlParameter[1]; Parameters0[0] = new SqlParameter("@CIDS", cids); DataTable dt = csh.FillDataSet(sysflag, WebProc.Proc("GetLastPhotoByCids"), Parameters0).Tables[0]; int Total = dt.Rows.Count; ResList res = new ResList(); res.page = 0; res.size = 0; res.total = Total; res.records = dt; Result = new ResponseResult(ResState.Success, "", res); } catch (Exception ex) { Result = new ResponseResult(ResState.OperationFailed, ex.Message, ""); } return(Result); }
/// <summary> /// 调用存储过程查询字典项 /// </summary> /// <param name="sysflag">系统标识</param> /// <param name="dictType">字典类别</param> /// <returns>查询结果</returns> private DataTable daoGetDictByType(string sysflag, string dictType) { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@dictType", dictType) }; return(csh.FillDataSet(sysflag, WebProc.Proc("ALProc_SelectDictByType"), Parameters, null, 1800).Tables[0]); }
/// <summary> /// 添加或更新电子围栏 /// </summary> /// <param name="key"></param> /// <param name="OpType"></param> /// <param name="fid"></param> /// <param name="fname"></param> /// <param name="almtype"></param> /// <param name="gratype"></param> /// <param name="content"></param> /// <param name="desc"></param> /// <param name="cuser"></param> /// <param name="upuser"></param> /// <returns></returns> public int InsertOrUpdateFence(string key, string OpType, string fid, string fname, string almtype, string gratype, string content, string desc, string cuser, string upuser) { ComSqlHelper oSqlUtil = new ComSqlHelper(); try { SqlParameter[] oaPara; //参数构建 oaPara = new SqlParameter[9]; oaPara[0] = new SqlParameter("@OpType", OpType); oaPara[1] = new SqlParameter("@F_ID", Int32.Parse(fid)); oaPara[2] = new SqlParameter("@F_Name", fname); oaPara[3] = new SqlParameter("@F_AlarmType", Int32.Parse(almtype)); oaPara[4] = new SqlParameter("@F_GraphType", Int32.Parse(gratype)); oaPara[5] = new SqlParameter("@F_Content", content); oaPara[6] = new SqlParameter("@F_Desc", desc); oaPara[7] = new SqlParameter("@Create_User", Int32.Parse(cuser)); oaPara[8] = new SqlParameter("@Update_User", Int32.Parse(upuser)); return(oSqlUtil.ExecuteSPNoQuery(key, WebProc.Proc("QSProc_QS_Fence_InsertOrUpdate"), oaPara, false)); } catch (Exception ex) { throw ex; } }
/// <summary> /// 根据用户名和手机号码获取用户实体信息 /// </summary> /// <param name="sysflag"></param> /// <param name="usernameormobilenum"></param> /// <param name="pwd"></param> /// <param name="username"></param> /// <returns></returns> private void GetUAppIDUserCheck(string sysflag, string usernameormobilenum, string pwd) { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@nameormobile", usernameormobilenum), new SqlParameter("@pwd", pwd) }; DataTable dt = csh.FillDataSet(WebProc.GetAppSysflagKey(sysflag), WebProc.Proc("QWGProc_Appvd_GetUserByNameORMobilenum"), Parameters).Tables[0]; if (dt.Rows.Count > 0) { appvduser = new userinfos(); string dbpwd = dt.Rows[0]["PASSWORD"].ToString(); appvduser.uid = dt.Rows[0]["UID"].ToString(); appvduser.username = dt.Rows[0]["NAME"].ToString().Trim(); appvduser.pwd = dt.Rows[0]["PASSWORD"].ToString().Trim(); appvduser.mobilenum = dt.Rows[0]["MobileNum"].ToString().Trim(); appvduser.source = dt.Rows[0]["SourceId"].ToString(); appvduser.memo = dt.Rows[0]["MEMO"].ToString(); appvduser.email = dt.Rows[0]["Email"].ToString(); appvduser.fullname = dt.Rows[0]["FullName"].ToString(); appvduser.sex = dt.Rows[0]["SEX"].ToString(); appvduser.phoneno = dt.Rows[0]["PHONENO"].ToString(); appvduser.id_card_no = dt.Rows[0]["ID_CARD_NO"].ToString(); appvduser.adress = dt.Rows[0]["ADDRESS"].ToString(); appvduser.nativeplace = dt.Rows[0]["NATIVEPLACE"].ToString(); appvdreturn.userinfo = appvduser; } }
/// <summary> /// 根据车辆ID取得编辑页dataTable /// </summary> /// <param name="sysflag"></param> /// <param name="cid"></param> /// <returns></returns> private DataTable[] GetBaseInfoByCid(string sysflag, string cid) { DataTable[] dtArr = new DataTable[4]; try { ComSqlHelper csh = new ComSqlHelper(); SqlParameter[] Parameters = { new SqlParameter("@CID", cid) }; //调用存储过程取得DataSet DataSet ds = csh.FillDataSet(sysflag, WebProc.Proc("ALProc_QueryAllByCid"), Parameters, null, 3600); if (ds.Tables.Count == 3) { dtArr[0] = ds.Tables[0]; dtArr[1] = ds.Tables[1]; dtArr[2] = ds.Tables[2]; } } catch (Exception ex) { throw ex; } return(dtArr); }