Jelajahi Sumber

查询专利号带筛选 2022/12/12

lwhhszx 2 tahun lalu
induk
melakukan
85294dfbc3

+ 5 - 2
PAS/src/main/java/cn/cslg/pas/controller/PatentController.java

@@ -41,9 +41,7 @@ import java.util.List;
 public class PatentController {
 
     private final PatentService patentService;
-    private final PatentFieldService patentFieldService;
     private final ProjectPatentLinkService projectPatentLinkService;
-    private final ProjectFieldService projectFieldService;
     private final TaskService taskService;
     private final CacheUtils cacheUtils;
     private final ProjectFieldPatentLinkService projectFieldPatentLinkService;
@@ -82,12 +80,14 @@ public class PatentController {
         PatentDTO patentDTO =patentService.getPatentDTOById(patentNo);
         return Response.success(patentDTO);
     }
+
     @GetMapping("id")
     @Operation(summary = "根据专利号获取专利")
     public String getPatentByPatentNo(String patentNo) {
         Patent patent = patentService.getByPatentNo(patentNo);
         return Response.success(patent);
     }
+
     @PostMapping("ids")
     @Operation(summary = "根据范围获取专利ID")
     public String getPatentListIds(@RequestBody PatentVO params) {
@@ -169,18 +169,21 @@ public class PatentController {
     public String getBetweenPatentList(@RequestBody PatentVO params) {
         return Response.success(patentService.getBetweenPatentList(params));
     }
+
     @GetMapping("right")
     @Operation(summary = "根据专利号获得专利的权要")
     public String getRightList(String patentNo) {
         List<PatentRight> patentRights =patentRightService.getPatentRightByPatentNo(patentNo);
         return Response.success(patentRights);
     }
+
     @GetMapping("getPatentNos")
     @Operation(summary = "根据专题库号获得专利号")
     public String getPatentNos(Integer projectId) {
       String res =patentService.getPatentNos(projectId);
         return res;
     }
+
     @PostMapping("getPagination")
     @Operation(summary = "分页获取专利")
     public String getPagination(@RequestBody PatentVO patentVO){

+ 5 - 7
PAS/src/main/java/cn/cslg/pas/controller/SystemController.java

@@ -38,7 +38,6 @@ public class SystemController {
 
     private final SystemDictService systemDictService;
     private final PatentService patentService;
-    private final PatentMapper patentMapper;
     @PostMapping("dict")
     @Operation(summary = "根据类型获得字典")
     public String getPageList(@RequestBody  List<String> dicts) {
@@ -53,18 +52,17 @@ public class SystemController {
         return Response.success(patentService.getPageListForRMS(params));
     }
 
-
-    @PostMapping("test")
-    @Operation(summary = "专利列表")
-    public String getList1(@RequestBody QueryPatentVO params) {
-        return Response.success(patentMapper.getPageListForRMS2(new Page<>(params.getCurrent(), params.getSize()),params));
-    }
     @PostMapping("getComPantentNos")
     @Operation(summary = "获得对比专利号")
     public String getComPantentNos(@RequestBody PatentVO params) {
         return patentService.getComPantentNos(params);
     }
 
+    @PostMapping("getConPantentNos")
+    @Operation(summary = "获得条件过滤的专利号")
+    public String getConPantentNos(@RequestBody QueryPatentVO params) {
+        return patentService.getConPantentNos(params);
+    }
     @PostMapping("getPatentDTOListForRMS")
     @Operation(summary = "获得所有对比文件详细信息")
     public String   getPatentDTOListForRMS(@RequestBody PatentVO params) {

+ 1 - 2
PAS/src/main/java/cn/cslg/pas/mapper/PatentMapper.java

@@ -37,7 +37,6 @@ public interface PatentMapper extends BaseMapper<Patent> {
     Map<String, Object> getPatentListByIdAndColumn(Integer id, String column);
 
     IPage<Patent> getPageList(Page<Patent> page, @Param("params") PatentVO params);
-    IPage<Patent> getPageListForRMS(Page<Patent> page, @Param("params") PatentVO params);
     IPage<Patent> getPageListForRMS2(Page<Patent> page, @Param("params") QueryPatentVO params);
     List<String> getListForRMS( @Param("params") PatentVO params);
     List<Patent> getPageList(@Param("params") PatentVO params);
@@ -56,6 +55,6 @@ public interface PatentMapper extends BaseMapper<Patent> {
     List<PatentQueryFieldSourceDTO> getCountStatus(@Param("projectId") Integer projectId);
     List<Patent> getPatent(@Param("patentNo")List<String> patentNo,@Param("n")int n,@Param("p")int p);
     int getPatentNumber(@Param("patentNo")List<String> patentNo);
-
+    List<String> getConPantentNos(QueryPatentVO params);
 }
 

+ 6 - 7
PAS/src/main/java/cn/cslg/pas/service/PatentService.java

@@ -566,18 +566,17 @@ public class PatentService extends ServiceImpl<PatentMapper, Patent> {
         });
         return records;
     }
-
+// 获得对比专利号
 public String getComPantentNos(PatentVO params){
   List<String> patents = baseMapper.getListForRMS(params);
   return Response.success(patents);
-
 }
 
-
-
-
-
-
+// 获得带筛选条件的对比专利号
+public String getConPantentNos(QueryPatentVO params){
+    List<String> patents = baseMapper.getConPantentNos(params);
+    return Response.success(patents);
+}
     public PatentDTO getPatentDTOById(Integer id, Integer projectId) {
         Patent patent = baseMapper.selectById(id);
         PatentDTO patentDTO = new PatentDTO();

+ 127 - 0
PAS/src/main/resources/mapper/PatentMapper.xml

@@ -1474,6 +1474,133 @@
         </where>
     </select>
 
+    <select id="getConPantentNos" parameterType="cn.cslg.pas.common.model.vo.QueryPatentVO"
+            resultType="java.lang.String">
+        select DISTINCT  a.patentno as patent_no
+        from os_patent a
+        <if test="params.applicationName !=null ">
+            left join os_applicant_attr b on a.id=b.pid and b.type =1
+            left join os_patent_applicant c on c.id=b.applicantid
+        </if>
+        <if test=" params.obligeeName !=null">
+            left join os_applicant_attr d on a.id=d.pid and d.type =2
+            left join os_patent_applicant e on e.id=d.applicantid
+        </if>
+        <if test="params.numberIpc!=null ">
+            left join os_patent_typeno f on f.pid =a.id and f.type =1
+        </if>
+        <if test=" params.numberCpc!=null ">
+            left join os_patent_typeno g on g.pid =a.id and g.type =2
+        </if>
+        <if test=" params.numberUpc!=null">
+            left join os_patent_typeno h on h.pid =a.id and h.type =3
+        </if>
+        <where>
+
+            <choose>
+                <when test="params.projectId != null or (params.patentNos != null and params.patentNos.size()!=0) or (params.importTaskId != null and params.importTaskId.size()!=0)">
+                    <if test="params.projectId != null">
+                        and ( a.id in (select pid from os_thematic_pid where zid = #{params.projectId})
+                        <if test="params.patentNos != null and params.patentNos.size()!=0">
+                            or patentno in
+                            <foreach item="item" collection="params.patentNos" index="index" open="(" separator=","
+                                     close=")">
+                                #{item}
+                            </foreach>
+                        </if>
+
+                        <if test="params.importTaskId != null and params.importTaskId.size()!=0">
+                            or patentno in
+                            ( select PATENT_NO from ASSO_IMPORTTASK_PATENT where IMPORTTASK_ID in
+                            <foreach item="item" collection="params.importTaskId" index="index" open="(" separator=","
+                                     close=") ">
+                                #{item}
+                            </foreach>
+                            )
+                        </if>
+                        )
+
+                    </if>
+
+                    <if test="params.projectId == null and params.patentNos != null and params.patentNos.size()!=0">
+                        (patentno in
+                        <foreach item="item" collection="params.patentNos" index="index" open="(" separator=","
+                                 close=")">
+                            #{item}
+                        </foreach>
+                        <if test="params.importTaskId != null and params.importTaskId.size()!=0">
+                            or patentno in
+                            ( select PATENT_NO from ASSO_IMPORTTASK_PATENT where IMPORTTASK_ID in
+                            <foreach item="item" collection="params.importTaskId" index="index" open="(" separator=","
+                                     close=") ">
+                                #{item}
+                            </foreach>
+                            )
+                        </if>
+                        )
+                    </if>
+
+                    <if test="params.projectId == null and (params.patentNos == null or params.patentNos.size()==0) and params.importTaskId != null and params.importTaskId.size()!=0">
+                        patentno in
+                        ( select PATENT_NO from ASSO_IMPORTTASK_PATENT where IMPORTTASK_ID in
+                        <foreach item="item" collection="params.importTaskId" index="index" open="(" separator=","
+                                 close=") ">
+                            #{item}
+                        </foreach>
+                        )
+                    </if>
+
+
+                    <if test="params.notInPatentNos != null and params.notInPatentNos.size!=0">
+                        and patentno not in
+                        <foreach item="item" collection="params.notInPatentNos" index="index" open="(" separator=","
+                                 close=")">
+                            #{item}
+                        </foreach>
+                    </if>
+                    <if test="params.conPatentNos != null and params.conPatentNos.size!=0">
+                        and patentno in
+                        <foreach item="item" collection="params.conPatentNos" index="index" open="(" separator=","
+                                 close=")">
+                            #{item}
+                        </foreach>
+                    </if>
+
+                    <if test="params.applicationName !=null and params.applicationName !=''  ">
+                        and c.name like concat("%",#{params.applicationName}, "%")
+                    </if>
+                    <if test="params.obligeeName !=null and params.obligeeName!=''">
+                        and e.name like concat("%", #{params.obligeeName}, "%")
+                    </if>
+                    <if test="params.numberIpc !=null and params.numberIpc!=''">
+                        and f.code like concat("%", #{params.numberIpc}, "%")
+                    </if>
+                    <if test="params.numberCpc !=null and params.numberCpc!=''">
+                        and g.code like concat("%", #{params.numberCpc}, "%")
+                    </if>
+                    <if test="params.numberUpc !=null and params.numberUpc!=''">
+                        and h.code like concat("%", #{params.numberUpc}, "%")
+                    </if>
+                    <if test="params.patentNo !=null and params.patentNo !=''">
+                        and a.patentNo like concat("%",#{params.patentNo}, "%")
+                    </if>
+                    <if test="params.applicationNo !=null and params.applicationNo !=''">
+                        and a.applicationNo like concat("%", #{params.applicationNo}, "%")
+                    </if>
+                    <if test="params.abstractStr !=null and params.abstractStr !=''">
+                        and a.abstract like concat("%", #{params.abstractStr}, "%")
+                    </if>
+                    <if test="params.patentName !=null and params.patentName !=''">
+                        and a.`name` like concat("%", #{params.patentName}, "%")
+                    </if>
+                </when>
+
+                <otherwise>
+                    1!=1
+                </otherwise>
+            </choose>
+        </where>
+    </select>
     <select id="getPatent" parameterType="java.util.List" resultType="cn.cslg.pas.domain.Patent">
         select a.id, a.`name` as name, a.nameout as name_out, a.patentno as patent_no, a.abstract_path, a.abstract as
         abstract_str, a.abstractout as abstract_out,