/// <summary> /// 录像结束 /// </summary> /// <param name="strCardNo"></param> public void sdnEndRecVideo(string strCardNo, string strqhsj) { HttpClient.sdnHttpWebRequest httpclient = new HttpClient.sdnHttpWebRequest(); string strSJ = Convert.ToDateTime(strqhsj).ToString("yyyyMMddHHmmss"); string strUrl = string.Format(YWUrl + "/api/RecVideoTemp/EndRecVideoTemp?filename={0}", strCardNo + "_" + strSJ); string reslut = httpclient.DoGet(strUrl); }
/// <summary> /// 录像开始 /// </summary> /// <param name="strCardNo">身份证号码</param> /// <param name="strWinIp"></param> public void sdnStartRecVideo(string strCardNo, string strWinIp, string strqhsj) { HttpClient.sdnHttpWebRequest httpclient = new HttpClient.sdnHttpWebRequest(); string strSJ = Convert.ToDateTime(strqhsj).ToString("yyyyMMddHHmmss"); string strUrl = string.Format(YWUrl + "/api/RecVideoTemp/AddRecVideoTemp?filename={0}&identitynum={1}&strWinIp={2}", strCardNo + "_" + strSJ, strCardNo, strWinIp); string reslut = httpclient.DoGet(strUrl); }
/// <summary> /// 通过API 更新中间库数据 /// </summary> /// <param name="QUEUE_NUM">排队号码</param> /// <param name="state">数据状态</param> /// <returns></returns> public int UpdateDBbyAPI(string QUEUE_NUM, int state) { HttpClient.sdnHttpWebRequest httpclient = new HttpClient.sdnHttpWebRequest(); string strUrl = string.Format(PDJUrl + "/api/yypd/UpdateYYState?DEPART_CODE={0}&STATE={1}&NUM={2}", BBDM, state.ToString(), QUEUE_NUM); string reslut = httpclient.DoGet(strUrl); return(0); }
/// <summary> /// 通过API 插入数据到中间库数据 /// </summary> /// <param name="QUEUE_NUM">排队号码</param> /// <param name="state">数据状态</param> /// <returns></returns> public string GetYYNum(string cardNum, string departCode) { HttpClient.sdnHttpWebRequest httpclient = new HttpClient.sdnHttpWebRequest(); string serviceAddress = PDJUrl + "/api/yypd/GetYYNum?cardNum=" + cardNum + "&departCode=" + departCode; string s = httpclient.DoGet(serviceAddress); return(s); }
/// <summary> /// 通过API 插入数据到中间库数据 /// </summary> /// <param name="QUEUE_NUM">排队号码</param> /// <param name="state">数据状态</param> /// <returns></returns> public int AddDBbyAPI(string json) { HttpClient.sdnHttpWebRequest httpclient = new HttpClient.sdnHttpWebRequest(); string strUrl = string.Format(PDJUrl + "/api/yypd/AddYYNum?json={0}", json); string reslut = httpclient.DoGet(strUrl); return(0); }
/// <summary> /// 通过API 更新中间库数据 /// </summary> /// <param name="QUEUE_NUM">排队号码</param> /// <param name="state">数据状态</param> /// <returns></returns> public int UpdateWJWYYDBbyAPI(string XH, int state) { HttpClient.sdnHttpWebRequest httpclient = new HttpClient.sdnHttpWebRequest(); string strUrl = string.Format(PDJUrl + "/api/yypd/UpdateWJWYYState?XH={0}&STATE={1}", XH, state.ToString()); string reslut = httpclient.DoGet(strUrl); return(0); }
/// <summary> /// 根据IP和排队序列号 /// </summary> /// <param name="strIP"></param> /// <param name="strSerialNum"></param> public void addCardMsg2QueueData(string strIP, string strSerialNum) { try { DataSet ds = new QueueSys.BLL.T_CARD_MSG().GetListBySerial(strIP, strSerialNum); //得到身份证信息数据 if (ds != null) { DataTable dt = ds.Tables[0];//得到对应的table foreach (DataRow dr in dt.Rows) { HttpClient.sdnHttpWebRequest httpclient = new HttpClient.sdnHttpWebRequest(); string strUrl = YWUrl + "/api/PdjhInterface/AddRecCardMsg_New"; string[] arrParam = { dr["NAME"].ToString(), dr["CARD_NUM"].ToString(), dr["SEX"].ToString(), dr["NATION"].ToString(), string.IsNullOrWhiteSpace(dr["YEAR"].ToString())?"0": dr["YEAR"].ToString(), string.IsNullOrWhiteSpace(dr["MONTH"].ToString())?"0": dr["MONTH"].ToString(), string.IsNullOrWhiteSpace(dr["DAY"].ToString())?"0": dr["DAY"].ToString(), dr["ADDRESS"].ToString(), dr["SIGN"].ToString(), dr["STARTTIME"].ToString(), dr["ENDTIME"].ToString(), // dr["PHOTOPATH"].ToString(), dr["SERIALNUM"].ToString(), strIP }; string strContent = string.Format("{{\"NAME\":\"{0}\",\"CARDNOIDENTITYNUM\":\"{1}\",\"SEX\":\"{2}\",\"NATION\":\"{3}\",\"YEAR\":{4},\"MONTH\":{5},\"DAY\":{6},\"ADDRESS\":\"{7}\",\"SIGN\":\"{8}\",\"STARTTIME\":\"{9}\",\"ENDTIME\":\"{10}\",\"PHOTOPATH\":\"\",\"QHXXXLH\":\"{11}\",\"winip\":\"{12}\"}}", arrParam); string reslut = httpclient.sdnDoPost(strUrl, strContent); if (!string.IsNullOrEmpty(dr["PHOTOPATH"].ToString()) && File.Exists(dr["PHOTOPATH"].ToString())) { int iUploadRes = new sdnHttpUploadFIle().Upload_Request(UPLOADUrl, dr["PHOTOPATH"].ToString(), "3_" + dr["CARD_NUM"].ToString().Trim() + "_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".bmp"); if (iUploadRes == 1) { File.Delete(dr["PHOTOPATH"].ToString()); } } } } } catch (Exception ex) { Common.SysLog.WriteLog(ex, AppDomain.CurrentDomain.BaseDirectory); } }