|
@@ -287,10 +287,10 @@ public class PatentStarApiService {
|
|
|
|
|
|
public Map<String, Object> patentStarSearchApi(PatentStarListDto patentStarListDto) throws IOException {
|
|
|
try {
|
|
|
-if(patentStarListDto.getFormed()==null||patentStarListDto.getFormed()==false) {
|
|
|
- String formQuery = patentStarListDto.getCurrentQuery();
|
|
|
- patentStarListDto.setCurrentQuery(PatentStarApiService.formatQuery(formQuery));
|
|
|
-}
|
|
|
+ if (patentStarListDto.getFormed() == null || patentStarListDto.getFormed() == false) {
|
|
|
+ String formQuery = patentStarListDto.getCurrentQuery();
|
|
|
+ patentStarListDto.setCurrentQuery(PatentStarApiService.formatQuery(formQuery));
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
return null;
|
|
|
}
|
|
@@ -333,7 +333,7 @@ if(patentStarListDto.getFormed()==null||patentStarListDto.getFormed()==false) {
|
|
|
Map<String, Object> reMap = new HashMap<>();
|
|
|
reMap.put("size", patentStarListDto.getRowCount());
|
|
|
reMap.put("current", patentStarListDto.getPageNum());
|
|
|
- reMap.put("records", starPatentVOS);
|
|
|
+ reMap.put("records", Data.get("List"));
|
|
|
reMap.put("total", Data.get("HitCount"));
|
|
|
return reMap;
|
|
|
}
|
|
@@ -390,12 +390,12 @@ if(patentStarListDto.getFormed()==null||patentStarListDto.getFormed()==false) {
|
|
|
|
|
|
public void setConditions(PatentStarListDto patentStarListDto) {
|
|
|
DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyyMMdd");
|
|
|
- String startStr =formatter.print(patentStarListDto.getStartTime());
|
|
|
- String endStr =formatter.print(patentStarListDto.getEndTime());
|
|
|
- String cond = "*(" + startStr+ ">" + endStr + "/" + "AD)";
|
|
|
- Integer len =patentStarListDto.getOrginCondition().length();
|
|
|
- StringBuilder stringBuilder =new StringBuilder(patentStarListDto.getOrginCondition());
|
|
|
- stringBuilder.insert(len-1,cond);
|
|
|
+ String startStr = formatter.print(patentStarListDto.getStartTime());
|
|
|
+ String endStr = formatter.print(patentStarListDto.getEndTime());
|
|
|
+ String cond = "*(" + startStr + ">" + endStr + "/" + "AD)";
|
|
|
+ Integer len = patentStarListDto.getOrginCondition().length();
|
|
|
+ StringBuilder stringBuilder = new StringBuilder(patentStarListDto.getOrginCondition());
|
|
|
+ stringBuilder.insert(len - 1, cond);
|
|
|
patentStarListDto.setCurrentQuery(stringBuilder.toString());
|
|
|
}
|
|
|
|
|
@@ -450,8 +450,10 @@ if(patentStarListDto.getFormed()==null||patentStarListDto.getFormed()==false) {
|
|
|
*/
|
|
|
public String getPictureApi(String appNo) {
|
|
|
String url = "https://api.patentstar.com.cn/api/Patent/CnMainImage/" + appNo;
|
|
|
- String appId = "2000041";
|
|
|
- String appkey = "F0E183D5F02C48E391F5FADF1B646F54";
|
|
|
+ //String appId = "2000041";
|
|
|
+ //String appkey = "F0E183D5F02C48E391F5FADF1B646F54";
|
|
|
+ String appId = "1000046";
|
|
|
+ String appkey = "6AE6D4DC6AF94F26862501EDEE9E27A2";
|
|
|
Long currentTimeMillis = System.currentTimeMillis() / 1000;
|
|
|
String Sign = appId + appkey + currentTimeMillis.toString();
|
|
|
String signMd5 = FormatUtil.MD5(Sign);
|
|
@@ -463,7 +465,7 @@ if(patentStarListDto.getFormed()==null||patentStarListDto.getFormed()==false) {
|
|
|
.build();
|
|
|
// 创建一个请求对象
|
|
|
Request request = new Request.Builder().url(url)
|
|
|
- .addHeader("_appid", "2000041")
|
|
|
+ .addHeader("_appid", appId)
|
|
|
.addHeader("_timestamp", currentTimeMillis.toString())
|
|
|
.addHeader("_sign", signMd5)
|
|
|
.get().build();
|
|
@@ -657,8 +659,10 @@ if(patentStarListDto.getFormed()==null||patentStarListDto.getFormed()==false) {
|
|
|
*/
|
|
|
public String getEnPdfApi(String patentNo) {
|
|
|
String url = " https://api.patentstar.com.cn/api/Patent/EnPdf/" + patentNo;
|
|
|
- String appId = "2000041";
|
|
|
- String appkey = "F0E183D5F02C48E391F5FADF1B646F54";
|
|
|
+ //String appId = "2000041";
|
|
|
+ //String appkey = "F0E183D5F02C48E391F5FADF1B646F54";
|
|
|
+ String appId = "1000046";
|
|
|
+ String appkey = "6AE6D4DC6AF94F26862501EDEE9E27A2";
|
|
|
Long currentTimeMillis = System.currentTimeMillis() / 1000;
|
|
|
String Sign = appId + appkey + currentTimeMillis.toString();
|
|
|
String signMd5 = FormatUtil.MD5(Sign);
|
|
@@ -670,7 +674,7 @@ if(patentStarListDto.getFormed()==null||patentStarListDto.getFormed()==false) {
|
|
|
.build();
|
|
|
// 创建一个请求对象
|
|
|
Request request = new Request.Builder().url(url)
|
|
|
- .addHeader("_appid", "2000041")
|
|
|
+ .addHeader("_appid", appId)
|
|
|
.addHeader("_timestamp", currentTimeMillis.toString())
|
|
|
.addHeader("_sign", signMd5)
|
|
|
.get().build();
|