|
|
@@ -984,15 +984,41 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="countPatentDone" parameterType="java.lang.String" resultType="java.lang.Integer">
|
|
|
- select count(1) from patent_info
|
|
|
- where uid = #{uid,jdbcType=VARCHAR}
|
|
|
- and deleted_sign = 0 and patent_state in (12,13)
|
|
|
+ select
|
|
|
+ count(1) from patent_info
|
|
|
+ where uid = #{uid,jdbcType=VARCHAR}
|
|
|
+ and deleted_sign = 0
|
|
|
+ and patent_state in (12,13)
|
|
|
+ and authorized_date >=
|
|
|
+ (
|
|
|
+ select
|
|
|
+ str_to_date(CONCAT(#{year,jdbcType=INTEGER}-3,'-01-01'), '%Y-%m-%d %H')
|
|
|
+ )
|
|
|
+ and authorized_date <![CDATA[ < ]]>
|
|
|
+ (
|
|
|
+ select
|
|
|
+ str_to_date(CONCAT(#{year,jdbcType=INTEGER},'-01-01'), '%Y-%m-%d %H')
|
|
|
+ )
|
|
|
+
|
|
|
</select>
|
|
|
|
|
|
<select id="countPatentUndone" parameterType="java.lang.String" resultType="java.lang.Integer">
|
|
|
- select count(1) from patent_info
|
|
|
- where uid = #{uid,jdbcType=VARCHAR}
|
|
|
- and deleted_sign = 0 and patent_state <![CDATA[ < ]]> 12
|
|
|
+ select
|
|
|
+ count(1)
|
|
|
+ from patent_info
|
|
|
+ where uid = #{uid,jdbcType=VARCHAR}
|
|
|
+ and deleted_sign = 0
|
|
|
+ and patent_state <![CDATA[ < ]]> 12
|
|
|
+ and authorized_date >=
|
|
|
+ (
|
|
|
+ select
|
|
|
+ str_to_date(CONCAT(#{year,jdbcType=INTEGER}-3,'-01-01'), '%Y-%m-%d %H')
|
|
|
+ )
|
|
|
+ and authorized_date <![CDATA[ < ]]>
|
|
|
+ (
|
|
|
+ select
|
|
|
+ str_to_date(CONCAT(#{year,jdbcType=INTEGER},'-01-01'), '%Y-%m-%d %H')
|
|
|
+ )
|
|
|
</select>
|
|
|
|
|
|
<select id="selectExpireRecord" resultType="com.goafanti.patent.bo.PatentExpireBo">
|