地址:https://open.cnipr.com/cnipr-api/v1/api/cocave/gi1/{client_id}
HTTP POST
| 参数名称 | 参数说明 | 是否必填 | 参数类型 |
|---|---|---|---|
| client_id | 应用id,如没有clientId请先接入应用,查看接入流程获取 | true | String |
| openid | 用户id,可通过 Password Grant 方式 或 Implicit Grant 方式 或 Authorization Code 方式 获取 | true | String |
| access_token | 访问令牌,可通过
Password Grant 方式 或
Implicit Grant 方式 或
Authorization Code 方式或
Refresh Token 方式 |
true | String |
| exp | 检索表达式,例:地标名称=太白酒 表达式能够拼写字段见 GeoDto说明字段 |
true | String |
| from | 返回值起始坐标,默认为0,不能为负数。from:0表示从第1条开始取数据 | true | int |
| size | 检索结果集数,上限为100,默认为10 | true | String |
| queryType | 检索类型:2 (按字检索,默认值); 1 (按词检索); 3 (同义词检索) | false | int |
exp:地标名称=太白酒
queryType:2
from:0
size:10
public class SearchClientTest {
String client_id = "CLIENT_ID";
String access_token = "ACCESS_TOKEN";
String openid = "OPENID";
/**
* 裁判文书检索接口
*/
@Test
public void expSerachTest() throws Exception {
String url = "/v1/api/cocave/gi1/"+client_id;
List<NameValuePair> nvps = new ArrayList<NameValuePair>();
// 提交参数及值
nvps.add(new BasicNameValuePair("openid", openid));
nvps.add(new BasicNameValuePair("access_token", access_token));
nvps.add(new BasicNameValuePair("exp", "地标名称=太白酒"));
nvps.add(new BasicNameValuePair("from", "0")); //from:0,表示从第1条开始取,不能为负数
nvps.add(new BasicNameValuePair("size", "10")); //size:10,表示取10条,上限为50条,不能为负数
nvps.add(new BasicNameValuePair("queryType", "2"));
courtLevel,courtName,courtNum,courtProvince"));
this.POST(url, nvps);
}
public void POST(String url, List<NameValuePair> nvps) throws Exception {
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
httppost.setHeader("ContentType", "application/x-www-form-urlencoded");
// 设置表单提交编码为UTF-8
UrlEncodedFormEntity entry = new UrlEncodedFormEntity(nvps, "UTF-8");
entry.setContentType("application/x-www-form-urlencoded;charset=UTF-8");
httppost.setEntity(entry);
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
String ss = EntityUtils.toString(entity, "UTF-8");
//打印返回结果
System.out.println(ss);
EntityUtils.consume(entity);
httpclient.getConnectionManager().shutdown();
}
}
| 属性名称 | 属性说明 | 属性类型 |
|---|---|---|
| status | 状态码,0代表成功,其它值含义见附录 | long |
| message | 响应的信息描述 | String |
| total | 命中总数 | long |
| from | 检索起始位 | int |
| size | 检索数量 | int |
| results | 检索结果集 | List<GeoDto> -- 数据详细 |
GeoDto
| 属性名称 | 属性说明 | 属性类型 |
|---|---|---|
| id | 编号 | String |
| landmarkName | 地标名称 | String |
| landmarkType | 地标类别 | String |
| afficheDept | 公告部门 | String |
| landmarkMainPic | 地标主图 | String |
| landmarkPhoto | 地标相册 | List <String> |
| registerAffiche | 注册公告 | List <RegisterDto>-- 注册公告 |
| registerAfficheChange | 注册公告变更 | List <RegisterChangeDto>-- 注册公告变更 |
| approvelAffiche | 核准企业公告 | List <ApprovelDto>-- 核准企业公告 |
| approvelAfficheChange | 核准企业变更公告 | List <ApprovelChangeDto>-- 核准企业变更公告 |
RegisterDto -- 注册公告
| 属性名称 | 属性说明 | 属性类型 |
|---|---|---|
| address | 地址 | string |
| applicant | 申请机构 | string |
| area | 区域 | string |
| bhffCity | 保护范围市 | string |
| bhffCounty | 保护范围区 | string |
| bhffProvince | 保护范围省 | string |
| city | 市 | string |
| commodity | 适用商品 | string |
| county | 县 | string |
| date | 日期 | string |
| dept | 部门 | string |
| dlz | 代理组织 | string |
| fdate | 初审时间 | string |
| fpath | 文件存放路径 | string |
| gmjt | 国民经济分类 | string |
| number | 编号 | string |
| preliminaryOrganization | 初审机构 | string |
| protectScope | 保护范围 | string |
| protectScopeFile | 保护范围界定文件 | string |
| province | 省 | string |
| pty | 商品组别 | string |
| socialCreditCode | 统一社会信用代码 | string |
| specialMarks | 专用标志使用 | string |
| standard | 标准或技术规范 | string |
| type | 类型 | string |
| sequenceNumber | 序号 | string |
| updateBatch | 更新批次 | string |
RegisterChangeDto -- 注册公告变更
| 属性名称 | 属性说明 | 属性类型 |
|---|---|---|
| number | 编号 | String |
| date | 日期 | String |
| type | 类型 | String |
| dept | 部门 | String |
| area | 区域 | String |
| protectScope | 保护范围 | String |
| standard | 标准或技术规范 | String |
| specialMarks | 专用标志使用 | String |
| applicant | 申请机构 | String |
| address | 地址 | String |
| socialCreditCode | 统一社会信用代码 | String |
| commodity | 适用商品 | String |
| afficheNumber | 原公告号 | String |
| changeContent | 变更内容 | String |
| changeBeforeApplicant | 变更前申请机构 | String |
| changeReason | 变更原因 | String |
| changeBeforeProtectScope | 变更前地域保护范围 | String |
| remark | 备注 | String |
| sequenceNumber | 序号 | String |
| updateBatch | 更新批次 | int |
ApprovelDto -- 核准企业公告
| 属性名称 | 属性说明 | 属性类型 |
|---|---|---|
| number | 编号 | String |
| date | 日期 | String |
| type | 类型 | String |
| dept | 部门 | String |
| enterpriseName | 企业名称 | String |
| address | 地址 | String |
| socialCreditCode | 统一社会信用代码 | String |
| lawPerson | 法人代表 | String |
| trademark | 商标 | String |
| telephone | 电话 | String |
| approvedBatch | 核准批次 | String |
| remark | 备注 | String |
| sequenceNumber | 序号 | String |
| updateBatch | 更新批次 | int |
ApprovelChangeDto -- 核准企业变更公告
| 属性名称 | 属性说明 | 属性类型 |
|---|---|---|
| number | 编号 | String |
| date | 日期 | String |
| type | 类型 | String |
| dept | 部门 | String |
| changeBeforeEnterpriseName | 变更前企业名称 | String |
| changeAfterEnterpriseName | 变更后企业名称 | String |
| address | 地址 | String |
| socialCreditCode | 统一社会信用代码 | String |
| lawPerson | 法人代表 | String |
| trademark | 商标 | String |
| telephone | 电话 | String |
| approvedBatch | 核准批次 | String |
| remark | 备注 | String |
| sequenceNumber | 序号 | String |
| updateBatch | 更新批次 | int |