/// <summary> /// 图片服务器表 /// </summary> /// <returns></returns> public static IDictionary <int, OcrDBPmsServer> GetOcrDBPmsServer() { using (DataSet ds = NpgSqlHelper.ExecuteDataSet2(SQL_OcrDBPmsServer)) { if (ds.Tables[0].Rows.Count > 0) { IDictionary <int, OcrDBPmsServer> dic = new Dictionary <int, OcrDBPmsServer>(); foreach (DataRow dr in ds.Tables[0].Rows) { OcrDBPmsServer data = new OcrDBPmsServer(); data.Id = Convert.ToInt32(ds.Tables[0].Rows[0]["i_id"]); data.Name = ds.Tables[0].Rows[0]["c_name"].ToString(); data.IndexCode = ds.Tables[0].Rows[0]["c_index_code"].ToString(); data.Ip = ds.Tables[0].Rows[0]["i_ip"].ToString(); data.Port = ds.Tables[0].Rows[0]["i_port"].ToString(); dic.Add(data.Id, data); } return(dic); } } return(null); }
/// <summary> /// 读取OCR DB图片数据 /// </summary> /// <param name="photo_id">图片ID</param> public static DataSet GetOcrDBPhoto1(long photo_id) { string sql = string.Format(@"{0}{1} order by photo_id asc ", SQL_OcrDBPhoto1, photo_id); return(NpgSqlHelper.ExecuteDataSet1(sql)); }
/// <summary> /// 读取OCR DB新识别数据 /// </summary> /// <param name="maxid">已同步的最大ID</param> public static DataSet GetOcrDBCnt(long maxid) { string sql = string.Format(@"{0}{1} order by c.dock_id asc ", SQL_OcrDBCnt, maxid); return(NpgSqlHelper.ExecuteDataSet1(sql)); }
/// <summary> /// 读取OCR DB车号数据 /// </summary> /// <param name="truck_id">车号ID</param> public static DataSet GetOcrDBTruck(long truck_id) { string sql = string.Format(@"{0}{1} order by temp_dock_id asc ", SQL_OcrDBTruck, truck_id); return(NpgSqlHelper.ExecuteDataSet1(sql)); }