|
|
@@ -806,6 +806,10 @@
|
|
|
left join department dep on b.apply_dep =dep.id left join department dep2 on b.pay_dep =dep2.id
|
|
|
left join t_order_new o on b.order_no =o.order_no left join expense_account c on a.ea_id =c.id
|
|
|
left join admin ad on b.aid=ad.id left join department adDep on ad.department_id=adDep.id
|
|
|
+ <if test="roleType == 1">
|
|
|
+ inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
|
|
|
+ where auditor= #{aid} group by eaid) eae on b.id=eae.eaid
|
|
|
+ </if>
|
|
|
<include refid="ExpenseMainSql"/>
|
|
|
order by if(b.status=3,-1,b.status) ,b.create_time desc
|
|
|
${page_sql}
|
|
|
@@ -823,12 +827,11 @@
|
|
|
</if>
|
|
|
<if test="roleType == 1">
|
|
|
<if test="listStatus ==0">
|
|
|
- and b.process_status =1
|
|
|
+ and b.process_status =eae.type
|
|
|
</if>
|
|
|
<if test="listStatus ==1">
|
|
|
- and b.process_status > 1
|
|
|
+ and b.process_status > eae.type
|
|
|
</if>
|
|
|
- and ad.superior_id= #{aid}
|
|
|
</if>
|
|
|
<if test="roleType == 2">
|
|
|
<if test="listStatus ==0">
|
|
|
@@ -839,18 +842,6 @@
|
|
|
</if>
|
|
|
and adDep.finance_id = #{aid}
|
|
|
</if>
|
|
|
- <if test="roleType == 3">
|
|
|
- <if test="listStatus ==0">
|
|
|
- and b.process_status =3
|
|
|
- </if>
|
|
|
- <if test="listStatus ==1">
|
|
|
- and b.process_status > 3
|
|
|
- </if>
|
|
|
- and ad.department_id in
|
|
|
- <foreach collection="deps" item="dep" open="(" close=")" separator=",">
|
|
|
- #{dep}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
<if test="roleType == 4">
|
|
|
<if test="listStatus ==0">
|
|
|
and b.process_status =4 and b.status=1
|
|
|
@@ -868,6 +859,10 @@
|
|
|
from expense_account b
|
|
|
left join admin ad on b.aid=ad.id
|
|
|
left join department adDep on ad .department_id=adDep.id
|
|
|
+ <if test="roleType == 1">
|
|
|
+ inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
|
|
|
+ where auditor= #{aid} group by eaid) eae on b.id=eae.eaid
|
|
|
+ </if>
|
|
|
<include refid="ExpenseMainSql"/>
|
|
|
</select>
|
|
|
|