|
|
@@ -1085,7 +1085,7 @@
|
|
|
o.first_amount as signFirstPayment, o.total_amount as signTotalAmount, date_format(o.create_time, '%Y-%m-%d %H:%i:%s') as createTime,
|
|
|
e.name as outsourceName, 0 as companyId, d.name as departmentName, f.transaction_amount finalReceivables ,
|
|
|
date_format(f.create_time, '%Y-%m-%d %H:%i:%s')finalReceivablesTime, g.invoiceAmount from t_order_new o
|
|
|
-left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on a.order_no=a.order_no
|
|
|
+left join department d on o.order_dep = d.id left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no
|
|
|
left join ( select sum(transaction_amount) as amount , order_no from t_order_bill_new group by order_no ) b
|
|
|
on b.order_no = o.order_no left join ( select order_no, max(name) as name from outsource_organization group by order_no) e on o.order_no = e.order_no
|
|
|
left join (select x1.order_no,max(create_time) create_time,max(transaction_amount)transaction_amount from
|
|
|
@@ -1143,7 +1143,7 @@ where delete_sign != 1 and (approval = 0 or approval = 2) and outsource= #{o.ou
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="financeCount" parameterType="Map" resultType="java.lang.Integer">
|
|
|
- select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id left join t_order_mid a on a.order_no=a.order_no
|
|
|
+ select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id left join t_order_mid a on o.order_no=a.order_no
|
|
|
left join (select sum(transaction_amount) as amount ,order_no from t_order_bill_new group by order_no ) b on b.order_no = o.order_no
|
|
|
left join department d on o.order_dep = d.id left join (select x1.order_no,max(create_time) create_time,max(transaction_amount)transaction_amount from
|
|
|
(select x.order_no,x.create_time,x.transaction_amount from t_order_bill_new x right join (select order_no, max(create_time) maxTime from t_order_bill_new group by order_no)y
|