chendayu 2 سال پیش
والد
کامیت
670e9ec7a5

+ 1 - 0
PAS/src/main/java/cn/cslg/pas/service/PatentSimpleFamilyService.java

@@ -104,6 +104,7 @@ public class PatentSimpleFamilyService extends ServiceImpl<PatentSimpleFamilyMap
     }
 
     public void updateData(List<String> familyNo, String patentNo, Integer patentId, Integer type) {
+        familyNo = new ArrayList<>(familyNo);
         //0.合并专利号
         if (!familyNo.contains(patentNo)) {
             familyNo.add(patentNo);

+ 2 - 2
PAS/src/main/java/cn/cslg/pas/service/TaskService.java

@@ -304,11 +304,11 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> implements ITaskS
 
         //装载创建人名称、装载任务名称
         if (tasks.size() > 0) {
+            //装载创建人名称
             List<Integer> createPersonIds = tasks.stream().map(QueryTaskVO::getCreateBy).collect(Collectors.toList());
             String res = outInterfaceService.getPersonnelByIdsFromPCS(createPersonIds);
             com.alibaba.fastjson.JSONObject jsonObject = com.alibaba.fastjson.JSONObject.parseObject(res);
             List<Personnel> personnels = com.alibaba.fastjson.JSONObject.parseArray(jsonObject.getString("data"), Personnel.class);
-            //遍历装载创建人名称
             for (QueryTaskVO task : tasks) {
                 for (Personnel personnel : personnels) {
                     if (personnel.getId().equals(task.getCreateBy())) {
@@ -317,7 +317,7 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> implements ITaskS
                     }
                 }
             }
-            //遍历装载任务名称(检索式+创建时间+创建人名称)
+            //装载任务名称(检索式+创建时间+创建人名称)
             for (QueryTaskVO task : tasks) {
                 if (task.getType().equals(3) || task.getType().equals(4)) {
                     String conditions = task.getConditions();

+ 6 - 4
PAS/src/main/java/cn/cslg/pas/service/getPatentStarPart/GetPatentStarPartService.java

@@ -52,9 +52,9 @@ public class GetPatentStarPartService {
         String patentNo = getPatentStarPartDTO.getPatentNo();
         PatentDTO patentDTO;
         if (patentCell == 1) {
-            patentDTO = getParentRight(appNo);  //拿权要
+            patentDTO = getParentRight(appNo, patentNo);  //拿权要
         } else if (patentCell == 2) {
-            patentDTO = getInstructionText(appNo);  //拿说明书文本
+            patentDTO = getInstructionText(appNo, patentNo);  //拿说明书文本
         } else if (patentCell == 3) {
             patentDTO = getInstructionPDF(appNo, patentNo);  //拿说明书pdf
         } else if (patentCell == 4) {
@@ -76,8 +76,9 @@ public class GetPatentStarPartService {
      * @param appNo 申请号
      * @return 返回装载着权要的对象
      */
-    public PatentDTO getParentRight(String appNo) throws IOException {
+    public PatentDTO getParentRight(String appNo, String patentNo) throws IOException {
         StarPatentVO starPatentVO = new StarPatentVO()
+                .setPublicNo(patentNo)
                 .setApplicationNo(appNo);
         UploadParamsVO uploadParamsVO = new UploadParamsVO();
         //调用"获得中国专利全文文本"接口,处理xml格式权要
@@ -97,8 +98,9 @@ public class GetPatentStarPartService {
      * @param appNo 申请号
      * @return 返回装载着说明书文本的对象
      */
-    public PatentDTO getInstructionText(String appNo) throws IOException {
+    public PatentDTO getInstructionText(String appNo, String patentNo) throws IOException {
         StarPatentVO starPatentVO = new StarPatentVO()
+                .setPublicNo(patentNo)
                 .setApplicationNo(appNo);
         UploadParamsVO uploadParamsVO = new UploadParamsVO();
         //调用"获得中国专利全文文本"接口,处理xml格式说明书文本

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/service/impl/ProductServiceImpl.java

@@ -234,7 +234,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
         Integer size = productQueryPageDTO.getSize();
         String groupBy = productQueryPageDTO.getGroupBy();
         String orderBy = productQueryPageDTO.getOrderBy();
-        if (orderBy != null) {
+        if (orderBy != null && !orderBy.equals("")) {
             String regex = "[A-Z]+";
             Pattern pattern = Pattern.compile(regex);
             Matcher matcher = pattern.matcher(orderBy);

+ 24 - 11
PAS/src/main/java/cn/cslg/pas/service/upLoadPatent/ExcutePatentDataStar.java

@@ -351,6 +351,13 @@ public class ExcutePatentDataStar implements IExcutePatentData {
      * @param uploadParamsVO 专利实体类对象
      */
     public void setPatentZhuLu(StarPatentVO starPatent, UploadParamsVO uploadParamsVO) throws IOException {
+        String usedPatentNo;
+        if (starPatent.getPublicNo() != null && !starPatent.getPublicNo().equals("")) {
+            usedPatentNo = starPatent.getPublicNo();
+        } else {
+            usedPatentNo = starPatent.getPatentNo();
+        }
+
         //以下 ↓装载的是调用"一般检索"接口返回的专利相关数据
         //装载专利类型
         Integer patentType = starPatent.getPatentType();
@@ -498,7 +505,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
 
         try {
             //以下 ↓装载的是调用"获得中国专利著录"接口返回的专利相关数据
-            if (appNo.contains("CN")) {
+            if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
                 String chinaPatentZhuLuStr = patentStarApiService.getCnBibApi(appNo);
                 if (chinaPatentZhuLuStr != null && !chinaPatentZhuLuStr.trim().equals("") && !chinaPatentZhuLuStr.equals("{}") && !chinaPatentZhuLuStr.contains("请求不合法")) {
                     List<ChinaPatentZhuLu> chinaPatentZhuLus = JSON.parseArray(chinaPatentZhuLuStr, ChinaPatentZhuLu.class);
@@ -559,7 +566,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
                     }
                 }
             } else {  //以下 ↓装载的是调用"获得世界专利著录"接口返回的专利相关数据
-                String worldPatentZhuLuStr = patentStarApiService.getENBibApi(starPatent.getPatentNo());
+                String worldPatentZhuLuStr = patentStarApiService.getENBibApi(usedPatentNo);
                 List<WorldPatentZhuLu> worldPatentZhuLus = JSON.parseArray(worldPatentZhuLuStr, WorldPatentZhuLu.class);
                 WorldPatentZhuLu worldPatentZhuLu = worldPatentZhuLus.get(0);
 
@@ -638,7 +645,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
         //以下 ↓装载的是调用"获得同族专利"接口返回的专利相关数据
         try {
             if (starPatent.getPatentNo() != null && !starPatent.getPatentNo().equals("")) {
-                String familyPatentNoStr = patentStarApiService.getFamilyByPubNoApi(starPatent.getPatentNo());
+                String familyPatentNoStr = patentStarApiService.getFamilyByPubNoApi(usedPatentNo);
                 if (!familyPatentNoStr.equals("no data") && !familyPatentNoStr.equals("{}")) {
                     FamilyPatentNo familyPatentNo = JSON.parseObject(familyPatentNoStr, FamilyPatentNo.class);
                     List<String> familyPatentNos = Arrays.asList(familyPatentNo.getFamilyinfo().split(";"));
@@ -651,7 +658,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
 
         //以下 ↓装载的是调用"获得中国专利法律状态"接口返回的专利相关数据
         try {
-            if (appNo.contains("CN")) {
+            if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
                 PatentAffair patentAffair = new PatentAffair();
                 String cnLegalApiStr = patentStarApiService.getCnLegalApi(appNo);
                 if (!cnLegalApiStr.equals("")) {
@@ -705,7 +712,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
      */
     public Boolean setPatentClaim(StarPatentVO starPatent, UploadParamsVO uploadParamsVO, PQueueData pQueueData) throws IOException {
         try {
-            if (starPatent.getApplicationNo().contains("CN")) {
+            if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
                 String applicationNo = starPatent.getApplicationNo() + "";
                 String appNo;
                 if (starPatent.getApplicationNo().contains(".")) {
@@ -771,7 +778,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
      */
     public Boolean setPatentInstructionText(StarPatentVO starPatent, UploadParamsVO uploadParamsVO, PQueueData pQueueData) throws IOException {
         try {
-            if (starPatent.getApplicationNo().contains("CN")) {
+            if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
                 String applicationNo = starPatent.getApplicationNo() + "";
                 String appNo;
                 if (starPatent.getApplicationNo().contains(".")) {
@@ -828,11 +835,17 @@ public class ExcutePatentDataStar implements IExcutePatentData {
      * @param uploadParamsVO 专利实体类对象
      */
     public void setPatentInstructionPDF(StarPatentVO starPatent, UploadParamsVO uploadParamsVO, Task task) throws IOException {
+        String usedPatentNo;
+        if (starPatent.getPublicNo() != null && !starPatent.getPublicNo().equals("")) {
+            usedPatentNo = starPatent.getPublicNo();
+        } else {
+            usedPatentNo = starPatent.getPatentNo();
+        }
         try {
             String pdfUrl = "", pdfUrl1 = "", pdfUrl2 = "";
             if ((starPatent.getPatentNo() != null && !starPatent.getPatentNo().equals("")) || (starPatent.getApplicationNo() != null && !starPatent.getApplicationNo().equals(""))) {
-                //根据申请号调用"获得中国专利pdf"接口,获得1个或2个pdf的url地址
-                if (starPatent.getPatentNo().contains("CN")) {
+                //先根据公开号判断国家,若没有公开号再根据申请号判断,调用"获得中国专利pdf"接口,获得1个或2个pdf的url地址
+                if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
                     String appNo = starPatent.getApplicationNo();
                     if (appNo.contains(".")) {
                         appNo = appNo.substring(0, appNo.lastIndexOf("."));
@@ -873,7 +886,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
 
                     //根据专利号调用"获得世界专利pdf"接口,获得pdf的url地址
                 } else {
-                    pdfUrl = patentStarApiService.getEnPdfApi(starPatent.getPatentNo());
+                    pdfUrl = patentStarApiService.getEnPdfApi(usedPatentNo);
 
                     //若没有取到说明书pdf,则将当前申请号和备注信息存入问题记录表,并返回空对象
                     if (pdfUrl.equals("") || pdfUrl.equals("{}")) {
@@ -905,7 +918,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
             if (appNo.contains(".")) {
                 appNo = appNo.substring(0, appNo.lastIndexOf("."));
             }
-            if (appNo.contains("CN")) {
+            if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
                 String pictureUrl = patentStarApiService.getPictureApi(appNo);
                 URL url = new URL(pictureUrl);  //想要读取的url地址
                 InputStream in = url.openStream();
@@ -1117,7 +1130,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
                 .setCell(cell)
                 .setTaskId(taskId)
                 .setRemark("该申请号的该字段(2权要 3说明书文本 4说明书pdf)接口检索返回原始数据为空");
-        List<QuestionRecord> questionRecords = questionRecordService.list(new LambdaQueryWrapper<QuestionRecord>().eq(QuestionRecord::getPatentNo, applicationNoOrPatentNo).eq(QuestionRecord::getCell, cell).eq(QuestionRecord::getTaskId, -1));
+        List<QuestionRecord> questionRecords = questionRecordService.list(new LambdaQueryWrapper<QuestionRecord>().eq(QuestionRecord::getPatentNo, applicationNoOrPatentNo).eq(QuestionRecord::getCell, cell));
         if (questionRecords == null || questionRecords.size() == 0) {
             questionRecordService.save(questionRecord);
         }