|
|
@@ -136,6 +136,7 @@
|
|
|
WHERE
|
|
|
po.tenant_id = #{order.tenantId}
|
|
|
AND po.is_deleted = 0
|
|
|
+ and (( business_source = '外部销售' AND FIND_IN_SET( actual_payment_status, '2,3' ) ) OR (business_source = '内部销售' AND FIND_IN_SET( actual_payment_status, '0,1,2,3' )))
|
|
|
<if test="order.businesDateList != null and order.businesDateList[0] != null and order.businesDateList[0]!= ''">
|
|
|
and po.busines_date >= #{order.businesDateList[0]}
|
|
|
</if>
|
|
|
@@ -161,10 +162,10 @@
|
|
|
and po.bs_type = 'XS'
|
|
|
AND ((
|
|
|
po.business_source = '外部销售'
|
|
|
- AND FIND_IN_SET( po.actual_payment_status, '2,3,4' ))
|
|
|
+ AND FIND_IN_SET( po.actual_payment_status, '2,3' ))
|
|
|
OR (
|
|
|
po.business_source = '内部销售'
|
|
|
- AND FIND_IN_SET( po.actual_payment_status, '0,1,2,3,4' )))
|
|
|
+ AND FIND_IN_SET( po.actual_payment_status, '0,1,2,3' )))
|
|
|
<if test="firstDay != null">
|
|
|
and po.busines_date >= #{firstDay}
|
|
|
</if>
|