Commit da0dd8c1 authored by 万建斌's avatar 万建斌

2019-10-08 id查询-bug修复

parent 8dca11e1
...@@ -240,14 +240,21 @@ public class QueryService { ...@@ -240,14 +240,21 @@ public class QueryService {
String kind_code_desc = sourceJsonObject.getString("patent_type"); String kind_code_desc = sourceJsonObject.getString("patent_type");
resultMap.put("kind_code_desc", kind_code_desc); resultMap.put("kind_code_desc", kind_code_desc);
JSONArray IPC_list = sourceJsonObject.getJSONObject("ipcs").getJSONArray("mainclass"); try {
List<String> ipcNames = new ArrayList<String>(); JSONArray IPC_list = sourceJsonObject.getJSONObject("ipcs").getJSONArray("mainclass");
for (int j = 0; j < IPC_list.size(); j++) { List<String> ipcNames = new ArrayList<String>();
String nameString=null!=IPC_list.getString(j)?PatentTypeEnum.parse(IPC_list.getString(j)).getMessage().replaceAll(" ", ""):""; for (int j = 0; j < IPC_list.size(); j++) {
ipcNames.add(nameString); String nameString = null != IPC_list.getString(j) ? PatentTypeEnum.parse(IPC_list.getString(j)).getMessage().replaceAll(" ", "") : "";
} ipcNames.add(nameString);
resultMap.put("IPC_list", IPC_list); }
resultMap.put("IPC_desc", ipcNames); resultMap.put("IPC_list", IPC_list);
resultMap.put("IPC_desc", ipcNames);
}catch (NullPointerException e){
e.printStackTrace();
resultMap.put("IPC_list", null);
resultMap.put("IPC_desc", null);
}
String appcountry = StringUtils.isNoneBlank(sourceJsonObject.getString("appno")) String appcountry = StringUtils.isNoneBlank(sourceJsonObject.getString("appno"))
? sourceJsonObject.getString("appno").substring(0, 2) ? sourceJsonObject.getString("appno").substring(0, 2)
: ""; : "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment