|
@@ -45,12 +45,7 @@ import java.util.regex.Pattern;
|
|
|
@Service
|
|
|
|
|
|
public class PatentStarApiService {
|
|
|
- @Value("${authorUrl}")
|
|
|
- private String PCSUrl;
|
|
|
- @Value("${OPSUrl}")
|
|
|
- private String OPSUrl;
|
|
|
- @Value("${PASUrl}")
|
|
|
- private String PASUrl;
|
|
|
+
|
|
|
public static String formatValue(String value){
|
|
|
return value.replace("~",">");
|
|
|
}
|
|
@@ -99,6 +94,7 @@ public class PatentStarApiService {
|
|
|
reStr = "FXX" + reStr.replace("=", "/");
|
|
|
return reStr;
|
|
|
}
|
|
|
+ //装载专利信息
|
|
|
public void loadStarPatentVOS(List<StarPatentVO> starPatentVOS){
|
|
|
starPatentVOS.forEach(item->{
|
|
|
if(item.getPublicNo()!=null&&item.getPublicNo()!=""){
|
|
@@ -153,6 +149,9 @@ public class PatentStarApiService {
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
+ //附图
|
|
|
+ String apN=item.getApplicationNo().replace(".","");
|
|
|
+ item.setAbstractPath(this.getPictureApi(apN.substring(2)));
|
|
|
if(item.getLG()!=null){
|
|
|
switch (item.getLG()){
|
|
|
case 1:
|
|
@@ -211,7 +210,7 @@ public class PatentStarApiService {
|
|
|
Map<String, Object> reMap = new HashMap<>();
|
|
|
reMap.put("size", patentStarListDto.getRowCount());
|
|
|
reMap.put("current", patentStarListDto.getPageNum());
|
|
|
- reMap.put("records",Data.get("List"));
|
|
|
+ reMap.put("records",starPatentVOS);
|
|
|
reMap.put("total", Data.get("HitCount"));
|
|
|
return reMap;
|
|
|
}
|
|
@@ -264,14 +263,14 @@ public class PatentStarApiService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @param patentNo
|
|
|
+ * @param
|
|
|
* @return
|
|
|
* @throws IOException
|
|
|
* @author 李仁杰
|
|
|
* 从专利之星获取中国专利摘要附图
|
|
|
*/
|
|
|
- public String getPictureApi(String patentNo) {
|
|
|
- String url = "https://api.patentstar.com.cn/api/Patent/CnMainImage/" + patentNo;
|
|
|
+ public String getPictureApi(String appNo) {
|
|
|
+ String url = "https://api.patentstar.com.cn/api/Patent/CnMainImage/" + appNo;
|
|
|
String appId = "2000041";
|
|
|
String appkey = "F0E183D5F02C48E391F5FADF1B646F54";
|
|
|
Long currentTimeMillis = System.currentTimeMillis() / 1000;
|