|
|
@@ -436,11 +436,18 @@
|
|
|
</if>
|
|
|
f.name depName,d2.name financeName, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,a.aname,
|
|
|
b.name appDepName, c.name payDepName
|
|
|
- from expense_account a left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
|
|
|
+ from expense_account a
|
|
|
+
|
|
|
left join admin d on a.aid =d.id left join t_order_new e on a.order_no =e.order_no
|
|
|
left join t_order_mid tm on a.order_no =tm.order_no left join department f on d.department_id =f.id
|
|
|
left join admin d2 on f.finance_id =d2.id left join expense_relationship er on a.id=er.ea_id
|
|
|
left join expense_account mea on er.id=mea.id
|
|
|
+ <if test="expenseMain ==0">
|
|
|
+ left join department b on mea.apply_dep =b.id left join department c on mea.pay_dep =c.id
|
|
|
+ </if>
|
|
|
+ <if test="expenseMain ==1">
|
|
|
+ left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
|
|
|
+ </if>
|
|
|
<if test="processStatus ==1">
|
|
|
inner join (select eaid ,auditor,min(process_status)`type` from expense_account_examine
|
|
|
where auditor= #{auditor} group by eaid) eae on a.id=eae.eaid
|
|
|
@@ -716,6 +723,7 @@
|
|
|
select b.id,b.check_no,b.total_amount,b.order_no,o.contract_no,b.aname,b.apply_dep,b.pay_dep,
|
|
|
dep.name applyDepName,dep2.name payDepName, b.remarks,b.eaaid ,eap.name ,eap.bank ,eap.accounts ,b.status,b.process_status,
|
|
|
c.id sonId,c.total_amount sonAmount,c.`type` ,c.type_other ,c.user_names ,c.release_start ,c.release_end ,
|
|
|
+ c.district_name districtName,c.user_names userNames
|
|
|
d.id detId,d.`type` detType,d.amount,d.real_amount realAmount ,d.start_district ,d.end_district
|
|
|
from expense_relationship a left join expense_account b on a.id =b.id
|
|
|
left join department dep on b.apply_dep =dep.id left join department dep2 on b.pay_dep =dep2.id
|
|
|
@@ -760,6 +768,7 @@
|
|
|
<result column="user_names" jdbcType="VARCHAR" property="userNames" />
|
|
|
<result column="release_start" jdbcType="VARCHAR" property="releaseStart" />
|
|
|
<result column="release_end" jdbcType="VARCHAR" property="releaseEnd" />
|
|
|
+ <result column="districtName" jdbcType="VARCHAR" property="districtName" />
|
|
|
<association property="detList" resultMap="ExpenseAccountDetailsMap"></association>
|
|
|
</resultMap>
|
|
|
<!--d.`type` detType,d.amount ,d.start_district ,d.end_district-->
|