|
@@ -26,7 +26,7 @@
|
|
|
a.patsnap_family as patSnapFamily, a.patsnapfamilynum as patSnapFamilyNum
|
|
|
from os_patent a
|
|
|
left join asso_product_patent i on i.patent_no=a.patentno
|
|
|
- left join asso_structure_patent t on t.patent_no =a.patentno
|
|
|
+ left join asso_structure_patent t on t.patent_no =a.patentno
|
|
|
<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
|
|
@@ -45,51 +45,51 @@
|
|
|
left join os_patent_typeno h on h.pid =a.id and h.type =3
|
|
|
</if>
|
|
|
<where>
|
|
|
- ( i.product_id =#{params.productId}
|
|
|
+ ( i.product_id =#{params.productId}
|
|
|
or t.product_id =#{params.productId} )
|
|
|
- <if test="params.applicationName !=null and params.applicationName !='' ">
|
|
|
- and c.name REGEXP #{params.applicationName}
|
|
|
- </if>
|
|
|
- <if test="params.obligeeName !=null and params.obligeeName!=''">
|
|
|
- and e.name REGEXP #{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 REGEXP #{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>
|
|
|
- <if test="params.orderItem!=null and params.orderItem!='SysOrder'">
|
|
|
- order by #{params.orderItem}
|
|
|
- <if test="params.orderType!=null">
|
|
|
- #{params.orderType}
|
|
|
- </if>
|
|
|
- </if>
|
|
|
- <if test="params.orderItem==null">
|
|
|
- order by a.patentno
|
|
|
- </if>
|
|
|
- <if test="params.orderItem=='SysOrder' and params.patentNos != null and params.patentNos.size()!=0">
|
|
|
- order by field (a.patentno,
|
|
|
- <foreach item="item" collection="params.patentNos" index="index" open="" separator=","
|
|
|
- close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
+ <if test="params.applicationName !=null and params.applicationName !='' ">
|
|
|
+ and c.name REGEXP #{params.applicationName}
|
|
|
+ </if>
|
|
|
+ <if test="params.obligeeName !=null and params.obligeeName!=''">
|
|
|
+ and e.name REGEXP #{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 REGEXP #{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>
|
|
|
+ <if test="params.orderItem!=null and params.orderItem!='SysOrder'">
|
|
|
+ order by #{params.orderItem}
|
|
|
+ <if test="params.orderType!=null">
|
|
|
+ #{params.orderType}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="params.orderItem==null">
|
|
|
+ order by a.patentno
|
|
|
+ </if>
|
|
|
+ <if test="params.orderItem=='SysOrder' and params.patentNos != null and params.patentNos.size()!=0">
|
|
|
+ order by field (a.patentno,
|
|
|
+ <foreach item="item" collection="params.patentNos" index="index" open="" separator=","
|
|
|
+ close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
|
|
|
</where>
|
|
|
</select>
|
|
@@ -119,10 +119,10 @@
|
|
|
<where>
|
|
|
|
|
|
<if test="params.applicationName !=null and params.applicationName !='' ">
|
|
|
- and c.name REGEXP #{params.applicationName}
|
|
|
+ and c.name REGEXP #{params.applicationName}
|
|
|
</if>
|
|
|
<if test="params.obligeeName !=null and params.obligeeName!=''">
|
|
|
- and e.name REGEXP #{params.obligeeName}
|
|
|
+ and e.name REGEXP #{params.obligeeName}
|
|
|
</if>
|
|
|
<if test="params.numberIpc !=null and params.numberIpc!=''">
|
|
|
and f.code like concat("%", #{params.numberIpc}, "%")
|
|
@@ -134,7 +134,7 @@
|
|
|
and h.code like concat("%", #{params.numberUpc}, "%")
|
|
|
</if>
|
|
|
<if test="params.patentNo !=null and params.patentNo !=''">
|
|
|
- and a.patentNo REGEXP #{params.patentNo}
|
|
|
+ and a.patentNo = #{params.patentNo}
|
|
|
</if>
|
|
|
<if test="params.applicationNo !=null and params.applicationNo !=''">
|
|
|
and a.applicationNo like concat("%", #{params.applicationNo}, "%")
|
|
@@ -146,11 +146,11 @@
|
|
|
and a.`name` like concat("%", #{params.patentName}, "%")
|
|
|
</if>
|
|
|
<if test="params.isIn ==0">
|
|
|
- and (i.product_id !=#{params.productId} or i.product_id is null)
|
|
|
+ and (i.product_id !=#{params.productId} or i.product_id is null)
|
|
|
and (t.product_id !=#{params.productId} or t.product_id is null)
|
|
|
</if>
|
|
|
<if test="params.isIn !=0">
|
|
|
- and (i.product_id =#{params.productId} or t.product_id =#{params.productId})
|
|
|
+ and (i.product_id =#{params.productId} or t.product_id =#{params.productId})
|
|
|
</if>
|
|
|
<if test="params.orderItem!=null and params.orderItem!='SysOrder'">
|
|
|
order by #{params.orderItem}
|
|
@@ -175,4 +175,12 @@
|
|
|
|
|
|
</select>
|
|
|
|
|
|
+ <!--插入数据-->
|
|
|
+ <!--int insert(AssoProductPatent assoProductPatent);-->
|
|
|
+ <insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into asso_product_patent (patent_no, product_id)
|
|
|
+ values (#{patentNo}, #{productId});
|
|
|
+ </insert>
|
|
|
+
|
|
|
+
|
|
|
</mapper>
|