|
|
@@ -156,13 +156,29 @@
|
|
|
from standard_document a left join admin b on a.aid=b.id
|
|
|
left join department c on a.dep_id=c.id
|
|
|
where 1=1
|
|
|
+ <include refid="standardSql"/>
|
|
|
</select>
|
|
|
+ <sql id="standardSql">
|
|
|
+ <if test="status !=null">
|
|
|
+ and a.status = #{status,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="startTime !=null and endTime !=null">
|
|
|
+ and a.create_time between #{startTime,jdbcType=TIMESTAMP} and #{endTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="depId !=null">
|
|
|
+ and a.dep_id = #{depId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="name !=null">
|
|
|
+ and a.name like concat('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ </sql>
|
|
|
|
|
|
<select id="standardCount" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(*)
|
|
|
from standard_document a
|
|
|
where 1=1
|
|
|
+ <include refid="standardSql"/>
|
|
|
</select>
|
|
|
|
|
|
|