| | |
| | | <if test="uname != null"> |
| | | and b.uname like #{uname} |
| | | </if> |
| | | <choose> |
| | | <when test="status == 0"> |
| | | <if test="status != null"> |
| | | <if test="status == 0"> |
| | | and a.status between 0 and 9 |
| | | </when> |
| | | <otherwise> |
| | | </if> |
| | | <if test="status != 0"> |
| | | and a.status = #{status} |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </if> |
| | | <if test="start != null"> |
| | | and a.create_time >= #{start} |
| | | </if> |
| | |
| | | <if test="uname != null"> |
| | | and b.uname like #{uname} |
| | | </if> |
| | | <choose> |
| | | <when test="status == 0"> |
| | | <if test="status != null"> |
| | | <if test="status == 0"> |
| | | and a.status between 0 and 9 |
| | | </when> |
| | | <otherwise> |
| | | </if> |
| | | <if test="status != 0"> |
| | | and a.status = #{status} |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </if> |
| | | <if test="start != null"> |
| | | and a.create_time >= #{start} |
| | | </if> |
| | |
| | | and a.create_time <= #{end} |
| | | </if> |
| | | </where> |
| | | order by a.create_time desc |
| | | order by a.id desc |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.show.ApplyEntity"> |
| | | select * from lf.sys_apply order by id; |
| | | select * from lf.sys_apply order by id desc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.show.ApplyEntity"> |
| | |
| | | order by c.id limit 1 |
| | | </select> |
| | | |
| | | <select id="selectSubmits"> |
| | | <select id="selectSubmits" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_apply a inner join lf.sys_flow b on a.id = b.applyid |
| | | where a.status between 0 and 9 and b.status = 0 and b.userid = #{userid} |
| | | </select> |
| | | |
| | | <select id="selectFlows" resultType="com.lf.server.entity.show.FlowEntity"> |
| | | select a.*, b.uname, fn_rec_query(a.depid, 'dep') depName |
| | | select a.*, b.uname, fn_get_fullname(b.depcode, 1) depName |
| | | from lf.sys_flow a inner join lf.sys_user b on a.userid = b.id |
| | | where a.applyid = #{applyid} |
| | | </select> |