|
|
@@ -1093,15 +1093,16 @@ left join (select x1.order_no,max(create_time) create_time,max(transaction_amoun
|
|
|
(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
|
|
|
on x.order_no=y.order_no and x.create_time=y.maxTime)x1 group by x1.order_no ) f on o.order_no = f.order_no
|
|
|
left join ( select order_no , sum(amount) invoiceAmount from t_order_invoice where status = 2 group by order_no ) g on o.order_no = g.order_no
|
|
|
-where delete_sign != 1 and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
+where delete_sign != 1 and (approval = 0 or approval = 2) and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
<if test="o.processStatus == 3">
|
|
|
and o.process_status = #{o.processStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="o.processStatus == 4">
|
|
|
and o.process_status >= #{o.processStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
- and (approval = 0 or approval = 2)
|
|
|
+ <if test="o.financeId != null and o.financeId != """>
|
|
|
and d.finance_id = #{o.financeId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="o.orderStatus != null and o.orderStatus != """>
|
|
|
and o.order_status = #{o.orderStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
@@ -1143,15 +1144,16 @@ where delete_sign != 1 and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
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
|
|
|
on x.order_no=y.order_no and x.create_time=y.maxTime)x1 group by x1.order_no ) f on o.order_no = f.order_no
|
|
|
- where delete_sign != 1 and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
+ where delete_sign != 1 and (approval = 0 or approval = 2) and outsource= #{o.outsource,jdbcType=INTEGER}
|
|
|
<if test="o.processStatus == 3">
|
|
|
and o.process_status = #{o.processStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="o.processStatus == 4">
|
|
|
and o.process_status >= #{o.processStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
- and (approval = 0 or approval = 2)
|
|
|
+ <if test="o.financeId != null and o.financeId != """>
|
|
|
and d.finance_id = #{o.financeId,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="o.orderStatus != null and o.orderStatus != """>
|
|
|
and o.order_status = #{o.orderStatus,jdbcType=INTEGER}
|
|
|
</if>
|