|
|
@@ -869,22 +869,22 @@
|
|
|
where a.id= #{id} and a.ea_id=b.id
|
|
|
</update>
|
|
|
<update id="updateSonByDetId">
|
|
|
- update expense_account x ,(select b.id,sum(c.amount) amount
|
|
|
+ update expense_account x ,(select b.id,sum(c.real_amount) amount
|
|
|
from expense_account_details a left join expense_account b on a.eaid =b.id
|
|
|
left join expense_account_details c on b.id =c.eaid
|
|
|
where a.id= #{id} group by b.id)y
|
|
|
- set x.total_amount =y.amount
|
|
|
+ set x.real_amount =y.amount
|
|
|
where x.id=y.id;
|
|
|
</update>
|
|
|
<update id="updateMainByDetId">
|
|
|
- update expense_account x ,( select a.id,sum(c.total_amount)amount
|
|
|
+ update expense_account x ,( select a.id,sum(c.real_amount)amount
|
|
|
from expense_account a left join expense_relationship b on a.id=b.id
|
|
|
left join expense_account c on b.ea_id =c.id
|
|
|
where a.id in(select c.id
|
|
|
from expense_account_details a left join expense_account b on a.eaid =b.id
|
|
|
left join expense_relationship c on b.id =c.ea_id
|
|
|
where a.id= #{id}) group by a.id)y
|
|
|
- set x.total_amount =y.amount
|
|
|
+ set x.real_amount =y.amount
|
|
|
where x.id=y.id
|
|
|
</update>
|
|
|
|
|
|
@@ -893,7 +893,7 @@
|
|
|
select b.id,b.check_no,b.total_amount,b.order_no,o.contract_no,b.aname,b.apply_dep,b.pay_dep,
|
|
|
date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,b.status,b.process_status,b.examine_name,
|
|
|
dep.name applyDepName,dep2.name payDepName, b.remarks,b.eaaid ,
|
|
|
- c.id sonId,c.total_amount sonAmount,c.`type` ,c.type_other ,c.user_names ,c.release_start ,c.release_end,
|
|
|
+ c.id sonId,c.total_amount sonAmount,c.`type` sonType,c.type_other sonTypeOTher,c.user_names ,c.release_start ,c.release_end,
|
|
|
c.attachment_url attachmentUrl,c.secondary_type,c.secondary_type_other
|
|
|
from expense_relationship a
|
|
|
left join expense_account b on a.id =b.id
|
|
|
@@ -939,8 +939,16 @@
|
|
|
<foreach collection="deps" item="dep" open="(" close=")" separator=",">
|
|
|
#{dep}
|
|
|
</foreach>
|
|
|
- order by a.status ,a.create_time desc
|
|
|
</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>
|
|
|
+ order by b.status ,b.create_time desc
|
|
|
${page_sql}
|
|
|
</select>
|
|
|
<select id="ExpenseMainCount" resultType="java.lang.Integer">
|
|
|
@@ -988,6 +996,14 @@
|
|
|
#{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>
|
|
|
</select>
|
|
|
|
|
|
|