|
|
@@ -445,7 +445,7 @@
|
|
|
|
|
|
<select id="selectExpenseAccountList" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccountBo">
|
|
|
select a.id,a.total_amount totalAmount,a.`type`,a.process_status processStatus,a.type_other typeOther,
|
|
|
- a.attachment_url attachmentUrl ,a.real_amount realAmount,e.contract_no contractNo,tm.buyer_name buyerName,
|
|
|
+ a.attachment_url attachmentUrl ,a.real_amount realAmount,
|
|
|
a.secondary_type secondaryType, a.secondary_type_other secondaryTypeOther,a.status,a.user_names userNames,
|
|
|
date_format(a.release_start,'%Y-%m-%d %H:%i:%S')releaseStartStr,a.user_names userNames,a.amount,
|
|
|
date_format(a.release_end,'%Y-%m-%d %H:%i:%S')releaseEndStr,
|
|
|
@@ -454,7 +454,6 @@
|
|
|
</if>
|
|
|
<if test="expenseMain ==0">
|
|
|
mea.examine_name examineName,mea.check_no checkNo,mea.id mainId, a.target_type targetType,
|
|
|
-
|
|
|
</if>
|
|
|
<if test="expenseMain ==1">
|
|
|
a.examine_name examineName,a.check_no checkNo,a.target_type targetType,
|
|
|
@@ -477,13 +476,15 @@
|
|
|
left join admin d2 on b.expense_finance_id =d2.id
|
|
|
</if>
|
|
|
<if test="expenseMain ==1">
|
|
|
- left join expense_relationship er on a.id=er.id
|
|
|
- left join expense_account sea on er.ea_id=sea.id
|
|
|
left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
|
|
|
- left join t_order_new e on sea.order_no =e.order_no
|
|
|
+ <if test="contractNo !=null">
|
|
|
+ left join expense_relationship er on a.id=er.id
|
|
|
+ left join expense_account sea on er.ea_id=sea.id
|
|
|
+ left join t_order_new e on sea.order_no =e.order_no
|
|
|
+ left join t_order_mid tm on e.order_no =tm.order_no
|
|
|
+ </if>
|
|
|
left join admin d2 on b.expense_finance_id =d2.id
|
|
|
</if>
|
|
|
- left join t_order_mid tm on e.order_no =tm.order_no
|
|
|
<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
|
|
|
@@ -581,19 +582,22 @@
|
|
|
left join expense_account c on b.ea_id =c.id
|
|
|
where c.`type` = #{type})x on a.id=x.id
|
|
|
</if>
|
|
|
- left join admin d on a.aid =d.id left join department f on d.department_id =f.id
|
|
|
- left join admin d2 on f.finance_id =d2.id
|
|
|
+ left join admin d on a.aid =d.id
|
|
|
<if test="expenseMain ==0">
|
|
|
left join expense_relationship er on a.id=er.ea_id
|
|
|
left join expense_account mea on er.id=mea.id
|
|
|
- left join t_order_new e on mea.order_no =e.order_no
|
|
|
+ left join t_order_new e on a.order_no =e.order_no
|
|
|
left join department b on mea.apply_dep =b.id left join department c on mea.pay_dep =c.id
|
|
|
+ left join admin d2 on b.expense_finance_id =d2.id
|
|
|
</if>
|
|
|
<if test="expenseMain ==1">
|
|
|
- left join expense_relationship er on a.id=er.id
|
|
|
- left join expense_account sea on er.ea_id=sea.id
|
|
|
left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
|
|
|
- left join t_order_new e on sea.order_no =e.order_no
|
|
|
+ <if test="contractNo !=null">
|
|
|
+ left join expense_relationship er on a.id=er.id
|
|
|
+ left join expense_account sea on er.ea_id=sea.id
|
|
|
+ left join t_order_new e on sea.order_no =e.order_no
|
|
|
+ left join t_order_mid tm on e.order_no =tm.order_no
|
|
|
+ </if>
|
|
|
left join admin d2 on b.expense_finance_id =d2.id
|
|
|
</if>
|
|
|
<if test="processStatus ==1">
|
|
|
@@ -612,18 +616,22 @@
|
|
|
left join expense_account c on b.ea_id =c.id
|
|
|
where c.`type` = #{type})x on a.id=x.id
|
|
|
</if>
|
|
|
- left join admin d on a.aid =d.id left join department f on d.department_id =f.id
|
|
|
+ left join admin d on a.aid =d.id
|
|
|
<if test="expenseMain ==0">
|
|
|
left join expense_relationship er on a.id=er.ea_id
|
|
|
left join expense_account mea on er.id=mea.id
|
|
|
- left join t_order_new e on mea.order_no =e.order_no
|
|
|
+ left join t_order_new e on a.order_no =e.order_no
|
|
|
left join department b on mea.apply_dep =b.id left join department c on mea.pay_dep =c.id
|
|
|
+ left join admin d2 on b.expense_finance_id =d2.id
|
|
|
</if>
|
|
|
<if test="expenseMain ==1">
|
|
|
- left join expense_relationship er on a.id=er.id
|
|
|
- left join expense_account sea on er.ea_id=sea.id
|
|
|
left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
|
|
|
- left join t_order_new e on sea.order_no =e.order_no
|
|
|
+ <if test="contractNo !=null">
|
|
|
+ left join expense_relationship er on a.id=er.id
|
|
|
+ left join expense_account sea on er.ea_id=sea.id
|
|
|
+ left join t_order_new e on sea.order_no =e.order_no
|
|
|
+ left join t_order_mid tm on e.order_no =tm.order_no
|
|
|
+ </if>
|
|
|
left join admin d2 on b.expense_finance_id =d2.id
|
|
|
</if>
|
|
|
<if test="processStatus ==1">
|