|
|
@@ -482,6 +482,12 @@
|
|
|
and a.process_status >eae.`type`
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="processStatus ==5">
|
|
|
+
|
|
|
+ </if>
|
|
|
+ <if test="processStatus ==6">
|
|
|
+
|
|
|
+ </if>
|
|
|
<if test="status != null">
|
|
|
and a.status= #{status}
|
|
|
</if>
|
|
|
@@ -901,6 +907,11 @@
|
|
|
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
|
|
|
where 1=1 and b.expense_main =1
|
|
|
+ <include refid="ExpenseMainSql"/>
|
|
|
+ order by b.status ,b.create_time desc
|
|
|
+ ${page_sql}
|
|
|
+ </select>
|
|
|
+ <sql id="ExpenseMainSql">
|
|
|
<if test="checkNo !=null">
|
|
|
and b.check_no like concat('%',#{checkNo},'%')
|
|
|
</if>
|
|
|
@@ -948,62 +959,17 @@
|
|
|
and b.process_status =5 and b.status=2
|
|
|
</if>
|
|
|
</if>
|
|
|
- order by b.status ,b.create_time desc
|
|
|
- ${page_sql}
|
|
|
- </select>
|
|
|
+ <if test="roleType == 5">
|
|
|
+ and adDep.finance_id in (select id from admin where superior_id = #{aid})
|
|
|
+ </if>
|
|
|
+ </sql>
|
|
|
<select id="ExpenseMainCount" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
from expense_account b
|
|
|
left join admin ad on b.aid=ad.id
|
|
|
left join department adDep on ad .department_id=adDep.id
|
|
|
where 1=1 and b.expense_main =1
|
|
|
- <if test="checkNo !=null">
|
|
|
- and b.check_no like concat('%',#{checkNo},'%')
|
|
|
- </if>
|
|
|
- <if test=" status != null">
|
|
|
- and b.status = #{status}
|
|
|
- </if>
|
|
|
- <if test=" roleType ==0">
|
|
|
- and b.aid = #{aid}
|
|
|
- </if>
|
|
|
- <if test="roleType == 1">
|
|
|
- <if test="listStatus ==0">
|
|
|
- and b.process_status =1
|
|
|
- </if>
|
|
|
- <if test="listStatus ==1">
|
|
|
- and b.process_status > 1
|
|
|
- </if>
|
|
|
- and ad.superior_id= #{aid}
|
|
|
- </if>
|
|
|
- <if test="roleType == 2">
|
|
|
- <if test="listStatus ==0">
|
|
|
- and b.process_status =2
|
|
|
- </if>
|
|
|
- <if test="listStatus ==1">
|
|
|
- and b.process_status > 2
|
|
|
- </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
|
|
|
- </if>
|
|
|
- <if test="listStatus ==1">
|
|
|
- and b.process_status =5 and b.status=2
|
|
|
- </if>
|
|
|
- </if>
|
|
|
+ <include refid="ExpenseMainSql"/>
|
|
|
</select>
|
|
|
|
|
|
|