|
|
@@ -588,12 +588,13 @@
|
|
|
LEFT JOIN organization_identity o on p.uid =
|
|
|
o.uid
|
|
|
LEFT JOIN admin a on a.id = p.author
|
|
|
+ <if test="principal != null">
|
|
|
+ left join patent_log l on p.id=l.pid
|
|
|
+ </if>
|
|
|
where p.deleted_sign = 0
|
|
|
-
|
|
|
<if test="principal != null">
|
|
|
- and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
|
|
|
+ and l.principal = #{principal,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
-
|
|
|
<if test="serialNumber != null">
|
|
|
and p.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -642,6 +643,9 @@
|
|
|
and o.location_province =
|
|
|
#{locationProvince,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="principal != null">
|
|
|
+ group by p.id
|
|
|
+ </if>
|
|
|
ORDER BY p.serial_number DESC
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
@@ -656,10 +660,12 @@
|
|
|
LEFT JOIN organization_identity o on
|
|
|
p.uid = o.uid
|
|
|
LEFT JOIN admin a on a.id = p.author
|
|
|
+ <if test="principal != null">
|
|
|
+ left join patent_log l on p.id=l.pid
|
|
|
+ </if>
|
|
|
where p.deleted_sign = 0
|
|
|
-
|
|
|
<if test="principal != null">
|
|
|
- and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
|
|
|
+ and l.principal = #{principal,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
|
|
|
<if test="serialNumber != null">
|
|
|
@@ -710,6 +716,9 @@
|
|
|
and
|
|
|
o.location_province=#{locationProvince,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="principal != null">
|
|
|
+ group by p.id
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="findManagePendingPaymentListByPage" resultType="com.goafanti.patent.bo.PatentPendingBo"
|
|
|
@@ -724,16 +733,21 @@
|
|
|
from patent_info p
|
|
|
INNER JOIN patent_cost c on p.id = c.pid
|
|
|
LEFT JOIN organization_identity o on p.uid = o.id
|
|
|
+ <if test="principal != null">
|
|
|
+ left join patent_log l on p.id=l.pid
|
|
|
+ </if>
|
|
|
where p.deleted_sign = 0
|
|
|
-
|
|
|
<if test="principal != null">
|
|
|
- and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
|
|
|
+ and l.principal = #{principal,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
|
|
|
<if test="locationProvince != null">
|
|
|
and o.location_province =
|
|
|
#{locationProvince,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="principal != null">
|
|
|
+ group by p.id
|
|
|
+ </if>
|
|
|
ORDER BY p.serial_number DESC
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
@@ -746,17 +760,20 @@
|
|
|
from patent_info p
|
|
|
INNER JOIN patent_cost c on p.id = c.pid
|
|
|
LEFT JOIN organization_identity o on p.uid = o.id
|
|
|
+ <if test="principal != null">
|
|
|
+ left join patent_log l on p.id=l.pid
|
|
|
+ </if>
|
|
|
where p.deleted_sign = 0
|
|
|
-
|
|
|
<if test="principal != null">
|
|
|
- and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
|
|
|
+ and l.principal = #{principal,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
-
|
|
|
<if test="locationProvince != null">
|
|
|
and o.location_province =
|
|
|
#{locationProvince,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
-
|
|
|
+ <if test="principal != null">
|
|
|
+ group by p.id
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="findNoticeOfCorrectionListByPage" parameterType="String"
|
|
|
@@ -772,11 +789,14 @@
|
|
|
FROM patent_info p
|
|
|
LEFT JOIN organization_identity o ON o.uid = p.uid
|
|
|
LEFT JOIN admin a on a.id = p.author
|
|
|
+ <if test="principal != null">
|
|
|
+ left join patent_log l on p.id=l.pid
|
|
|
+ </if>
|
|
|
where p.patent_state in
|
|
|
(6,8) and p.deleted_sign = 0
|
|
|
|
|
|
<if test="principal != null">
|
|
|
- and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
|
|
|
+ and l.principal = #{principal,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
|
|
|
<if test="serialNumber != null">
|
|
|
@@ -811,6 +831,9 @@
|
|
|
and
|
|
|
o.location_province=#{locationProvince,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="principal != null">
|
|
|
+ group by p.id
|
|
|
+ </if>
|
|
|
order by p.serial_number DESC
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
@@ -823,11 +846,13 @@
|
|
|
FROM patent_info p
|
|
|
LEFT JOIN organization_identity o ON o.uid = p.uid
|
|
|
LEFT JOIN admin a on a.id = p.author
|
|
|
+ <if test="principal != null">
|
|
|
+ left join patent_log l on p.id=l.pid
|
|
|
+ </if>
|
|
|
where p.patent_state in
|
|
|
(6,8) and p.deleted_sign = 0
|
|
|
-
|
|
|
<if test="principal != null">
|
|
|
- and p.id in (SELECT l.pid FROM patent_log l where l.principal = #{principal,jdbcType=VARCHAR})
|
|
|
+ and l.principal = #{principal,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
|
|
|
<if test="serialNumber != null">
|
|
|
@@ -862,6 +887,9 @@
|
|
|
and
|
|
|
o.location_province=#{locationProvince,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="principal != null">
|
|
|
+ group by p.id
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
|