|
|
@@ -475,17 +475,39 @@
|
|
|
</update>
|
|
|
|
|
|
<select id="selectPatentNewList" resultType="com.goafanti.patent.bo.PatentNewBo">
|
|
|
- select a.id,a.patent_no as patentNo,a.name,a.type,a.status,
|
|
|
+ select a.id,a.patent_no as patentNo,a.name,a.type,a.status,
|
|
|
date_format(a.apply_date,'%Y-%m-%d') as applyDates,
|
|
|
date_format(a.authorization_date ,'%Y-%m-%d ')as authorizationDates,a.patent_amount as patentAmount,a.province,
|
|
|
a.applicant,a.contact_mobile as contactMobile,a.email,a.certificate_url as certificateUrl,
|
|
|
- date_format(a.create_time,'%Y-%m-%d %H:%I:%S') as createTimeS,a.apply_date as applyDate,
|
|
|
+ date_format(a.create_time,'%Y-%m-%d %H:%I:%S') as createTimeS,a.apply_date as applyDate,c.name depName,
|
|
|
date_format(a.update_time,'%Y-%m-%d %H:%I:%S') as updateTimeS,b.name as aname
|
|
|
from patent_new a left join admin b on a.aid=b.id
|
|
|
+ left join department c on b.department_id=c.id
|
|
|
where 1=1
|
|
|
<if test="aid != null">
|
|
|
and a.aid = #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
+ <if test="status != null">
|
|
|
+ and a.status=#{status}
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ and a.type=#{type}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and endDate != null">
|
|
|
+ and a.apply_date between #{startDate} and #{endDate}
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ and a.applicant like concat('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="patentNo != null">
|
|
|
+ and a.patent_no like concat('%',#{patentNo},'%')
|
|
|
+ </if>
|
|
|
+ <if test="aname != null">
|
|
|
+ and b.name like concat('%',#{aname},'%')
|
|
|
+ </if>
|
|
|
+ <if test="departmentId != null">
|
|
|
+ and b.department_id= #{departmentId}
|
|
|
+ </if>
|
|
|
order by status ,applyDate
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
@@ -493,7 +515,32 @@
|
|
|
</select>
|
|
|
<select id="selectPatentNewCount" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
- from patent_new a
|
|
|
+ from patent_new a left join admin b on a.aid=b.id
|
|
|
+ where 1=1
|
|
|
+ <if test="aid != null">
|
|
|
+ and a.aid = #{aid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and a.status=#{status}
|
|
|
+ </if>
|
|
|
+ <if test="type != null">
|
|
|
+ and a.type=#{type}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null and endDate != null">
|
|
|
+ and a.apply_date between #{startDate} and #{endDate}
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ and a.applicant like concat('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="patentNo != null">
|
|
|
+ and a.patent_no like concat('%',#{patentNo},'%')
|
|
|
+ </if>
|
|
|
+ <if test="aname != null">
|
|
|
+ and b.name like concat('%',#{aname},'%')
|
|
|
+ </if>
|
|
|
+ <if test="departmentId != null">
|
|
|
+ and b.department_id= #{departmentId}
|
|
|
+ </if>
|
|
|
where 1=1
|
|
|
<if test="aid != null">
|
|
|
and a.aid = #{aid,jdbcType=VARCHAR}
|