|
|
@@ -278,28 +278,26 @@
|
|
|
|
|
|
|
|
|
<select id="selectExpenseAccountList" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccountBo">
|
|
|
- select a.id,a.total_amount totalAmount,a.`type`,a.process_status processStatus,
|
|
|
+ select a.id,a.total_amount totalAmount,a.`type`,a.process_status processStatus,a.status,
|
|
|
date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr
|
|
|
from expense_account a
|
|
|
+ <if test="processStatus ==1">
|
|
|
+ left join admin b on a.aid =b.id
|
|
|
+ </if>
|
|
|
where 1=1
|
|
|
<if test="processStatus ==0">
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
|
- order by
|
|
|
- <if test="timeSort !=null">
|
|
|
- create_time
|
|
|
- <if test="timeSort == 1">
|
|
|
- desc
|
|
|
- </if>
|
|
|
- ,
|
|
|
+ <if test="processStatus ==1">
|
|
|
+ and b.superior_id =#{aid}
|
|
|
</if>
|
|
|
- <if test="examineSort!=null">
|
|
|
- a.status
|
|
|
- <if test="examineSort == 1">
|
|
|
- desc
|
|
|
- </if>
|
|
|
-
|
|
|
+ <if test="status != null">
|
|
|
+ and a.status= #{status}
|
|
|
+ </if>
|
|
|
+ <if test="startTime !=null and endTime !=null">
|
|
|
+ and a.create_time between #{startTime} and #{endTime}
|
|
|
</if>
|
|
|
+ order by a.create_time desc
|
|
|
<if test="page_sql !=null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
@@ -308,10 +306,22 @@
|
|
|
<select id="selectExpenseAccountCount" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
from expense_account a
|
|
|
+ <if test="processStatus ==1">
|
|
|
+ left join admin b on a.aid =b.id
|
|
|
+ </if>
|
|
|
where 1=1
|
|
|
<if test="processStatus ==0">
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
|
+ <if test="processStatus ==1">
|
|
|
+ and b.superior_id =#{aid}
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and a.status= #{status}
|
|
|
+ </if>
|
|
|
+ <if test="startTime !=null and endTime !=null">
|
|
|
+ and a.create_time between #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<select id="selectByaidAndPrid" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccount">
|
|
|
SELECT
|