ソースを参照

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

lwhhszx 2 年 前
コミット
826199b0c7

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

@@ -151,7 +151,6 @@ public class UploadPatentBatchService {
                 //专利信息需要特殊处理部分
                 //专利信息(摘要附图)数据装配
                 PictureData pictureData = pictureDataMap.get(String.valueOf(index+ 1));
-
                 if (uploadParamsVO.getPatent() != null) {
                     if (uploadParamsVO.getPatent().getId() != null && pictureData != null) {
                         uploadParamsVO.getPatent().setAbstractPath(patentImageService.updatePatentImage(uploadParamsVO.getPatent().getId(), pictureData));

+ 10 - 74
PAS/src/main/resources/mapper/PatentMapper.xml

@@ -1255,21 +1255,13 @@
     </sql>
 
     <select id="getListForRMS" resultType="java.lang.String">
-        select a.patentno as patent_no
+        select DISTINCT a.patentno as patent_no
         from os_patent a
         <where>
             patentno="0"
             <if test="params.projectId != null">
                 or a.id in (select pid from os_thematic_pid where zid = #{params.projectId})
             </if>
-            <if test="params.importTaskId != null and params.importTaskId.size()!=0">
-                or a.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.patentNos != null and params.patentNos.size()!=0">
                 or patentno in
@@ -1277,65 +1269,21 @@
                     #{item}
                 </foreach>
             </if>
-            <if test="params.startNumber!=null and params.endNumber!=null">
-                limit #{params.startNumber} , #{params.endNumber}
-            </if>
-        </where>
-
-    </select>
-
-
-    <select id="getPageListForRMS" parameterType="cn.cslg.pas.common.model.vo.PatentVO"
-            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,
-        a.publicno as public_no, a.publicdate as public_date, a.simple_family, a.inpadoc_family, a.applicationno as
-        application_no, a.appdate as application_date,
-        a.`status` as simple_status, a.type, a.publictodate as public_accredit_date, a.fpublicdate as first_public_date,
-        a.prioritydate as priority_date,
-        a.agencyid as agency_id, a.num2 as right_num, a.quoteno as quote_num, a.quotedno as quoted_num,
-        a.patsnap_family as patSnapFamily, a.patsnapfamilynum as patSnapFamilyNum
-        from os_patent a
-        <where>
-            patentno="0"
-            <if test="params.projectId != null">
-                or a.id in (select pid from os_thematic_pid where zid = #{params.projectId})
-                <if test="params.notInPatentNos != null">
-                    and patentno not in
-                    <foreach item="item" collection="params.notInPatentNos" index="index" open="(" separator=","
-                             close=")">
-                        #{item}
-                    </foreach>
-                </if>
-
-            </if>
             <if test="params.importTaskId != null and params.importTaskId.size()!=0">
-                or (patentno in
+                or a.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 test="params.notInPatentNos != null">
-                    and patentno not in
-                    <foreach item="item" collection="params.notInPatentNos" index="index" open="(" separator=","
-                             close=")">
-                        #{item}
-                    </foreach>
-                </if>
-                )
             </if>
-            <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>
+            order by a.patentno
+            <if test="params.startNumber!=null and params.endNumber!=null">
+                limit #{params.startNumber} , #{params.endNumber}
             </if>
-
         </where>
-
     </select>
+
     <select id="getPageListForRMS2" parameterType="cn.cslg.pas.common.model.vo.PatentVO"
             resultType="cn.cslg.pas.domain.Patent">
         select DISTINCT a.id, a.`name` as name, a.nameout as name_out, a.patentno as patent_no, a.abstract_path,
@@ -1348,8 +1296,6 @@
         a.agencyid as agency_id, a.num2 as right_num, a.quoteno as quote_num, a.quotedno as quoted_num,
         a.patsnap_family as patSnapFamily, a.patsnapfamilynum as patSnapFamilyNum
         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
@@ -1368,7 +1314,6 @@
             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">
@@ -1380,20 +1325,8 @@
                                 #{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=","
@@ -1411,7 +1344,6 @@
                         </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
@@ -1465,6 +1397,7 @@
                     <if test="params.patentName !=null and params.patentName !=''">
                         and a.`name` like concat("%", #{params.patentName}, "%")
                     </if>
+                    order  by a.patentno
                 </when>
 
                 <otherwise>
@@ -1593,6 +1526,9 @@
                     <if test="params.patentName !=null and params.patentName !=''">
                         and a.`name` like concat("%", #{params.patentName}, "%")
                     </if>
+                    <if test="params.startNumber!=null and params.endNumber!=null">
+                        limit #{params.startNumber} , #{params.endNumber}
+                    </if>
                 </when>
 
                 <otherwise>