/// <summary> /// 专利信息概览模糊检索(通过专利号检索) /// </summary> public static CniprResult CheckPatentSingleForNum(string number, string type) { CniprResult result = null; try { Hashtable ht = new Hashtable(); //请求参数 if (type == "1") { ht.Add("exp", string.Format("申请号=CN{0}", number)); } else { ht.Add("exp", string.Format("公开(公告)号={0}", number)); } ht.Add("dbs", "FMZL,FMSQ,WGZL,SYXX"); ht.Add("option", "1"); ht.Add("from", 0); ht.Add("to", 1); ht.Add("access_token", access_token); ht.Add("openid", openid); var doc = HttpClientHelper.QueryPostWebService(patentInfoUrl, ht); result = JsonHelper.JsonToObject <CniprResult>(doc); if (result.status == "0") { result.results[0].flztResults = CheckPatentFlztSingle(result.results[0].appNumber); } } catch (Exception ex) { throw ex; } return(result); }
/// <summary> /// 专利信息概览模糊检索(分页) /// </summary> public static CniprResult CheckPatentInfoLike(Condition condition, int count = 1, int size = 10) { CniprResult results = null; try { if (!string.IsNullOrEmpty(condition.topCondition)) { Hashtable ht = new Hashtable(); //请求参数 ht.Add("exp", ConditionAnalysis(condition)); if (condition.ptDb != null) { ht.Add("dbs", string.Join(",", condition.ptDb)); } else { ht.Add("dbs", "FMZL,FMSQ,WGZL,SYXX"); } if (!string.IsNullOrEmpty(condition.orderBy)) { ht.Add("order", condition.orderBy); } else { ht.Add("order", "RELEVANCE"); } ht.Add("option", "1"); ht.Add("from", (count - 1) * size); ht.Add("to", size * count); ht.Add("access_token", access_token); ht.Add("openid", openid); var doc = HttpClientHelper.QueryPostWebService(patentInfoUrl, ht); results = JsonHelper.JsonToObject <CniprResult>(doc); if (results.status == "0") { results.Pages = results.total % size == 0 ? results.total / size : (results.total / size) + 1; } else { results = new CniprResult { results = new List <Result>(), sectionInfos = new List <SectionInfo>() }; } } else { results = new CniprResult { results = new List <Result>(), sectionInfos = new List <SectionInfo>() }; } } catch (Exception ex) { throw ex; } return(results); }
/// <summary> /// 根据权利人检索专利(分页) /// </summary> /// <param name="app">权利人</param> /// <returns></returns> public static CniprResult CheckPatentListByApplication(string app, int count = 1, int size = 10) { CniprResult results = null; try { if (!string.IsNullOrEmpty(app)) { Hashtable ht = new Hashtable(); //请求参数 ht.Add("exp", "申请(专利权)人=" + app); ht.Add("dbs", "FMZL,FMSQ,WGZL,SYXX"); ht.Add("option", "1"); ht.Add("from", (count - 1) * size); ht.Add("to", size * count); ht.Add("access_token", access_token); ht.Add("openid", openid); var doc = HttpClientHelper.QueryPostWebService(patentInfoUrl, ht); results = JsonHelper.JsonToObject <CniprResult>(doc); if (results.status == "0") { results.Pages = results.total % size == 0 ? results.total / size : (results.total / size) + 1; } else { results = new CniprResult { results = new List <Result>(), sectionInfos = new List <SectionInfo>() }; } } else { results = new CniprResult { results = new List <Result>(), sectionInfos = new List <SectionInfo>() }; } } catch (Exception ex) { throw ex; } return(results); }