|
@@ -404,6 +404,369 @@
|
|
|
<if test="params.sort.prop == 'quotedNum'">a.quotedno</if>
|
|
|
${params.sort.order}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getPageListNext5" 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.publictono as public_accredit_no,
|
|
|
+ b.look as `read`, 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.folder != null and params.folder != ''">
|
|
|
+ left join os_portfolio_link b on b.pid = a.id
|
|
|
+ </if>
|
|
|
+ <if test="params.folder == null or params.folder == ''">
|
|
|
+ left join os_thematic_pid b on b.pid = a.id
|
|
|
+ </if>
|
|
|
+ <if test="params.queryLabel == true">
|
|
|
+ left join os_patent_label d on d.pid = a.id and d.tid = b.zid
|
|
|
+ </if>
|
|
|
+ <if test="params.queryApplicantOriginal == true">
|
|
|
+ left join os_applicant_attr e on e.type = 2 and e.pid = a.id
|
|
|
+ </if>
|
|
|
+ <if test="params.queryApplicantCurrent == true">
|
|
|
+ left join os_applicant_attr f on f.type = 1 and f.pid = a.id
|
|
|
+ </if>
|
|
|
+ <if test="params.queryInventor == true">
|
|
|
+ left join os_patent_inventor_relation g on g.pid = a.id
|
|
|
+ left join os_patent_inventor g1 on g1.id = g.fid
|
|
|
+ </if>
|
|
|
+ <if test="params.queryInventorMerge == true">
|
|
|
+ left join os_patent_inventor_merge g2 on g2.inventor_id = g.fid
|
|
|
+ </if>
|
|
|
+ <if test="params.queryApplicantOriginalStandard == true">
|
|
|
+ left join os_applicant_attr h on h.type = 2 and h.pid = a.id
|
|
|
+ left join os_patent_applicant h1 on h1.id = h.applicantid
|
|
|
+ </if>
|
|
|
+ <if test="params.queryApplicantCurrentStandard == true">
|
|
|
+ left join os_applicant_attr i on i.type = 1 and i.pid = a.id
|
|
|
+ left join os_patent_applicant i1 on i1.id = i.applicantid
|
|
|
+ </if>
|
|
|
+ <if test="params.queryApplicantOriginalMerge == true">
|
|
|
+ left join os_associate_applicant j on e.applicantid = j.applicantid
|
|
|
+ </if>
|
|
|
+ <if test="params.queryApplicantCurrentMerge == true">
|
|
|
+ left join os_associate_applicant k on f.applicantid = k.applicantid
|
|
|
+ </if>
|
|
|
+ <if test="params.queryApplicantAddress == true">
|
|
|
+ left join os_applicant_attr m on m.pid = a.id and m.type = 2
|
|
|
+ left join os_patent_applicant o on o.id = m.applicantid
|
|
|
+ </if>
|
|
|
+ <if test="params.queryAffair == true">
|
|
|
+ left join os_patent_affair p on p.pid = a.id
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberIpc == true">
|
|
|
+ left join os_patent_typeno q1 on q1.pid = a.id
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberCpc == true">
|
|
|
+ left join os_patent_typeno q2 on q2.pid = a.id
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberUpc == true">
|
|
|
+ left join os_patent_typeno q3 on q3.pid = a.id
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberLoc == true">
|
|
|
+ left join os_patent_typeno q4 on q4.pid = a.id
|
|
|
+ </if>
|
|
|
+ <if test="params.selfField !=null and params.selfField.size()>0">
|
|
|
+ left join os_patent_field_patent_link a2 on a2.pid = a.id
|
|
|
+ </if>
|
|
|
+ <where>
|
|
|
+ <if test="params.read == 'read'">
|
|
|
+ and b.look = 1
|
|
|
+ </if>
|
|
|
+ <if test="params.read == 'unread'">
|
|
|
+ and b.look = 0
|
|
|
+ </if>
|
|
|
+ <if test="params.projectId != null and params.importTaskId == null">
|
|
|
+ and b.zid = #{params.projectId}
|
|
|
+ </if>
|
|
|
+ <if test="params.importTaskId != null and params.projectId == null">
|
|
|
+ and 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.importTaskId != null and params.projectId != null">
|
|
|
+ and (b.zid = #{params.projectId} 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.projectId == null and params.projectId == null">
|
|
|
+ and 1 !=1
|
|
|
+ </if>
|
|
|
+ <if test="params.folder != null and params.folder != ''">
|
|
|
+ and b.fid = #{params.folder}
|
|
|
+ </if>
|
|
|
+ <if test="params.nameSql != null and params.nameSql != ''">
|
|
|
+ and (${params.nameSql})
|
|
|
+ </if>
|
|
|
+ <if test="params.abstractStrSql != null and params.abstractStrSql != ''">
|
|
|
+ and (${params.abstractStrSql})
|
|
|
+ </if>
|
|
|
+ <if test="params.publicNoSql != null and params.publicNoSql != ''">
|
|
|
+ and (${params.publicNoSql})
|
|
|
+ </if>
|
|
|
+ <if test="params.applicationNoSql != null and params.applicationNoSql != ''">
|
|
|
+ and (${params.applicationNoSql})
|
|
|
+ </if>
|
|
|
+ <if test="params.rightContentSql != null and params.rightContentSql != ''">
|
|
|
+ and (select count(*) from os_patent_right where a.id = patent_id and (${params.rightContentSql})) > 0
|
|
|
+ </if>
|
|
|
+ <if test="params.querySimpleFamily == true">
|
|
|
+ and (a.simple_family = (select id from os_patent_simplefamily where type = 1 and patent_no = a.patentno)
|
|
|
+ or a.simple_family is null)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryInpadocFamily == true">
|
|
|
+ and (a.inpadoc_family = (select id from os_patent_simplefamily where type = 2 and patent_no =
|
|
|
+ a.patentno) or a.inpadoc_family is null)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryPatSnapFamily == true">
|
|
|
+ and (a.patsnap_family = (select id from os_patent_simplefamily where type = 3 and patent_no =
|
|
|
+ a.patentno) or a.patsnap_family is null)
|
|
|
+ </if>
|
|
|
+ <if test="params.whereClassNumberIpc != null">
|
|
|
+ and q1.type = 1 and
|
|
|
+ <foreach collection="params.whereClassNumberIpc" item="item" separator="or" open="(" close=")">
|
|
|
+ <if test="params.queryClassNumberIpcMethod == 1">
|
|
|
+ left(q1.code, 1)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberIpcMethod == 2">
|
|
|
+ left(q1.code, 3)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberIpcMethod == 3">
|
|
|
+ left(q1.code, 4)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberIpcMethod == 4">
|
|
|
+ substring_index(q1.code, '/', 1)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberIpcMethod == 5">
|
|
|
+ q1.code
|
|
|
+ </if>
|
|
|
+ = #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereClassNumberCpc != null">
|
|
|
+ and q2.type = 2 and
|
|
|
+ <foreach collection="params.whereClassNumberCpc" item="item" separator="or" open="(" close=")">
|
|
|
+ <if test="params.queryClassNumberCpcMethod == 1">
|
|
|
+ left(q2.code, 1)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberCpcMethod == 2">
|
|
|
+ left(q2.code, 3)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberCpcMethod == 3">
|
|
|
+ left(q2.code, 4)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberCpcMethod == 4">
|
|
|
+ substring_index(q2.code, '/', 1)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberCpcMethod == 5">
|
|
|
+ q2.code
|
|
|
+ </if>
|
|
|
+ = #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereClassNumberUpc != null">
|
|
|
+ and q3.type = 3 and
|
|
|
+ <foreach collection="params.whereClassNumberUpc" item="item" separator="or" open="(" close=")">
|
|
|
+ <if test="params.queryClassNumberUpcMethod == 1">
|
|
|
+ q3.code
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberUpcMethod == 2">
|
|
|
+ substring_index(q3.code, '/', 1)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberUpcMethod == 3">
|
|
|
+ substring_index(q3.code, '/', -1)
|
|
|
+ </if>
|
|
|
+ = #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereClassNumberLoc != null">
|
|
|
+ and q4.type = 4 and
|
|
|
+ <foreach collection="params.whereClassNumberLoc" item="item" separator="or" open="(" close=")">
|
|
|
+ <if test="params.queryClassNumberLocMethod == 1">
|
|
|
+ q4.code
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberLocMethod == 2">
|
|
|
+ substring_index(q4.code, '/', 1)
|
|
|
+ </if>
|
|
|
+ <if test="params.queryClassNumberLocMethod == 3">
|
|
|
+ substring_index(q4.code, '/', -1)
|
|
|
+ </if>
|
|
|
+ = #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereApplicantOriginal != null">
|
|
|
+ and e.applicantid in
|
|
|
+ <foreach collection="params.whereApplicantOriginal" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereApplicantCurrent != null">
|
|
|
+ and f.applicantid in
|
|
|
+ <foreach collection="params.whereApplicantCurrent" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereInventor != null">
|
|
|
+ and g1.id in
|
|
|
+ <foreach collection="params.whereInventor" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereInventorMerge != null">
|
|
|
+ and (
|
|
|
+ g2.merge_id in
|
|
|
+ <foreach collection="params.whereInventorMerge" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ or
|
|
|
+ g.fid in
|
|
|
+ <foreach collection="params.whereInventorMerge" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="params.whereApplicantOriginalStandard != null">
|
|
|
+ and h1.bname in
|
|
|
+ <foreach collection="params.whereApplicantOriginalStandard" item="item" separator="," open="("
|
|
|
+ close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereApplicantCurrentStandard != null">
|
|
|
+ and i1.bname in
|
|
|
+ <foreach collection="params.whereApplicantCurrentStandard" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereApplicantOriginalMerge != null">
|
|
|
+ and (
|
|
|
+ j.mergeid in
|
|
|
+ <foreach collection="params.whereApplicantOriginalMerge" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ or
|
|
|
+ e.applicantid in
|
|
|
+ <foreach collection="params.whereApplicantOriginalMerge" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="params.whereApplicantCurrentMerge != null">
|
|
|
+ and (
|
|
|
+ k.mergeid in
|
|
|
+ <foreach collection="params.whereApplicantCurrentMerge" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ or
|
|
|
+ f.applicantid in
|
|
|
+ <foreach collection="params.whereApplicantCurrentMerge" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="params.whereBureau != null">
|
|
|
+ and a.bureau in
|
|
|
+ <foreach collection="params.whereBureau" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereType != null">
|
|
|
+ and a.type in
|
|
|
+ <foreach collection="params.whereType" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereStatus != null">
|
|
|
+ and a.status in
|
|
|
+ <foreach collection="params.whereStatus" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereAppDate != null">
|
|
|
+ and from_unixtime(a.appdate, '%Y') in
|
|
|
+ <foreach collection="params.whereAppDate" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.wherePublicDate != null">
|
|
|
+ and from_unixtime(a.publicdate, '%Y') in
|
|
|
+ <foreach collection="params.wherePublicDate" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereCountry != null">
|
|
|
+ and o.country in
|
|
|
+ <foreach collection="params.whereCountry" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereApplicantProvince != null">
|
|
|
+ and o.province_id in
|
|
|
+ <foreach collection="params.whereApplicantProvince" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.whereAffair != null">
|
|
|
+ and p.status REGEXP #{params.whereAffair}
|
|
|
+ </if>
|
|
|
+ <if test="params.whereLabel != null">
|
|
|
+ and d.tagname in
|
|
|
+ <foreach collection="params.whereLabel" item="item" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="params.selfField != null and params.selfField.size()>0">
|
|
|
+ and
|
|
|
+ <foreach collection="params.selfField" item="item" separator=" and " open="(" close=")">
|
|
|
+ a.id in (
|
|
|
+ select distinct a3.id from os_patent a3 left join os_patent_field_patent_link a4
|
|
|
+ on a4.pid = a3.id
|
|
|
+ and a4.cid=#{item.key}
|
|
|
+ <where>
|
|
|
+ a4.fid in
|
|
|
+ <foreach collection="item.value" item="item2" separator="," open="(" close=")">
|
|
|
+ #{item2}
|
|
|
+ </foreach>
|
|
|
+ <if test="item.isnull==true">
|
|
|
+ or a4.id is null
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by a.id
|
|
|
+ order by
|
|
|
+ <if test="params.sort.prop == 'id'">a.id</if>
|
|
|
+ <if test="params.sort.prop == 'name'">a.name</if>
|
|
|
+ <if test="params.sort.prop == 'patentNo'">a.patentno</if>
|
|
|
+ <if test="params.sort.prop == 'applicationNo'">a.applicationno</if>
|
|
|
+ <if test="params.sort.prop == 'applicationDate'">a.appdate</if>
|
|
|
+ <if test="params.sort.prop == 'publicDate'">a.publicdate</if>
|
|
|
+ <if test="params.sort.prop == 'publicAccreditDate'">a.publictodate</if>
|
|
|
+ <if test="params.sort.prop == 'rightNum'">a.num2</if>
|
|
|
+ <if test="params.sort.prop == 'quoteNum'">a.quoteno</if>
|
|
|
+ <if test="params.sort.prop == 'quotedNum'">a.quotedno</if>
|
|
|
+ ${params.sort.order}
|
|
|
+ limit #{beforeNum}, 5
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getPatentQuerySourcePageList" parameterType="cn.cslg.pas.common.model.vo.PatentQueryFieldSourceVO"
|
|
|
resultType="cn.cslg.pas.common.model.dto.PatentQueryFieldSourceDTO">
|
|
|
<if test="params.key == '41-1'">
|