Explorar o código

增加需求,可以分别查询产品的商品化专利清单和产品架构的相关专利清单

chendayu %!s(int64=2) %!d(string=hai) anos
pai
achega
b01d52d54b

+ 4 - 8
PAS/src/main/java/cn/cslg/pas/service/asso/AssoProductPatentService.java

@@ -129,14 +129,10 @@ public class AssoProductPatentService extends ServiceImpl<AssoProductPatentMappe
         IPage<PatentDTO> pageList = new Page<>();
 
         //判断本次请求是查询产品的商品化专利还是相关专利
-        IPage<Patent> dataPage = null;
-        if (params.getQueryType() != null) {
-            if (params.getQueryType() == 1) {  //查商品化专利(与原先相同)
-                dataPage = baseMapper.getPageListProductPatent(new Page<>(params.getCurrent(), params.getSize()), params);
-            } else if (params.getQueryType() == 2) {  //查相关专利
-                dataPage = baseMapper.getPageListStructurePatent(new Page<>(params.getCurrent(), params.getSize()), params);
-            }
-        } else {  //与原先相同
+        IPage<Patent> dataPage;
+        if (params.getQueryType() != null && params.getQueryType() == 2) {  //查相关专利
+            dataPage = baseMapper.getPageListStructurePatent(new Page<>(params.getCurrent(), params.getSize()), params);
+        } else {  //与原先相同(查商品化专利或架构的相关专利)
             dataPage = baseMapper.getPageListProductPatent(new Page<>(params.getCurrent(), params.getSize()), params);
         }
 

+ 1 - 1
PAS/src/main/resources/mapper/AssoProductPatentMapper.xml

@@ -189,7 +189,7 @@
     </select>
 
     <select id="getPatentNos" resultType="java.lang.String">
-        select  a.patentno as patent_no
+        select a.patentno as patent_no
         from os_patent a
         left join asso_product_patent i on i.patent_no=a.patentno
         and i.product_id =#{params.productId}