| | |
| | | and (oi.status = 'reduce' or oi.status = 'abnormal') |
| | | ) |
| | | and q.transfer_id is null |
| | | and q.status in ('COLLECTION', 'SEND') |
| | | and q.status in ('COLLECTION', 'SEND','RECEIVE') |
| | | </if> |
| | | <if test="condition.billId != null and condition.billId != ''"> |
| | | AND q.bill_id = #{condition.billId} |
| | |
| | | and (oi.status = 'reduce' or oi.status = 'abnormal') |
| | | ) |
| | | and q.transfer_id is null |
| | | and q.status in ('COLLECTION', 'SEND') |
| | | and q.status in ('COLLECTION', 'SEND','RECEIVE') |
| | | </if> |
| | | <if test="condition.billId != null and condition.billId != ''"> |
| | | AND q.bill_id = #{condition.billId} |
| | |
| | | on oi.order_id=o.id |
| | | where oi.status in ('abnormal','reduce','lack','back') |
| | | and o.transfer_id is null |
| | | and o.status in ('COLLECTION','SEND') |
| | | and o.status in ('COLLECTION','SEND','RECEIVE') |
| | | ) |
| | | -- AND exists( |
| | | -- select 1 from t_order_item oi |
| | | -- where oi.order_id = q.id |
| | | -- and oi.status in ('abnormal','reduce','lack','back') |
| | | -- ) |
| | | -- and q.transfer_id is null |
| | | -- and q.status in ('COLLECTION', 'SEND') |
| | | </if> |
| | | |
| | | <if test="condition.abnormalOrderStatus != null and condition.abnormalOrderStatus != '' and condition.abnormalOrderStatus == 'PROCESSED'"> |
| | |
| | | on oi.order_id=o.id |
| | | where oi.status in ('abnormal','reduce','lack','back') |
| | | and o.transfer_id is null |
| | | and o.status in ('COLLECTION','SEND') |
| | | and o.status in ('COLLECTION','SEND','RECEIVE') |
| | | ) |
| | | -- AND exists( |
| | | -- select 1 from t_order_item oi |
| | | -- where oi.order_id = q.id |
| | | -- and oi.status in ('abnormal','reduce','lack','back') |
| | | -- ) |
| | | -- AND not exists( |
| | | -- select 1 from t_order_item oi |
| | | -- where oi.order_id = q.id |
| | | -- and oi.status in ('abnormal','reduce','lack','back') |
| | | -- and q.transfer_id is null |
| | | -- and q.status in ('COLLECTION', 'SEND') |
| | | -- ) |
| | | |
| | | |
| | | </if> |
| | | |
| | | ORDER BY q.create_time desc, q.payment_time desc |
| | |
| | | and (oi.status = 'reduce' or oi.status = 'abnormal') |
| | | ) |
| | | and q.transfer_id is null |
| | | and q.status in ('COLLECTION', 'SEND') |
| | | and q.status in ('COLLECTION', 'SEND','RECEIVE') |
| | | </if> |
| | | <if test="condition.billId != null and condition.billId != ''"> |
| | | AND q.bill_id = #{condition.billId} |
| | |
| | | on oi.order_id=o.id |
| | | where oi.status in ('abnormal','reduce','lack','back') |
| | | and o.transfer_id is null |
| | | and o.status in ('COLLECTION','SEND') |
| | | and o.status in ('COLLECTION','SEND','RECEIVE') |
| | | ) |
| | | |
| | | union |
| | |
| | | on oi.order_id=o.id |
| | | where oi.status in ('abnormal','reduce','lack','back') |
| | | and o.transfer_id is null |
| | | and o.status in ('COLLECTION','SEND') |
| | | and o.status in ('COLLECTION','SEND','RECEIVE') |
| | | ) |
| | | |
| | | </select> |
| | |
| | | and oi.status in ('abnormal','reduce','lack','back') |
| | | ) |
| | | and q.transfer_id is null |
| | | and q.status in ('COLLECTION', 'SEND') |
| | | and q.status in ('COLLECTION', 'SEND','RECEIVE') |
| | | |
| | | union |
| | | |
| | |
| | | where oi.order_id = q.id |
| | | and oi.status in ('abnormal','reduce','lack','back') |
| | | and q.transfer_id is null |
| | | and q.status in ('COLLECTION', 'SEND') |
| | | and q.status in ('COLLECTION', 'SEND','RECEIVE') |
| | | ) |
| | | |
| | | </select> |
| | |
| | | <!-- and (oi.status = 'reduce' or oi.status = 'abnormal')--> |
| | | <!-- )--> |
| | | <!-- and q.transfer_id is null--> |
| | | <!-- and q.status in ('COLLECTION', 'SEND')--> |
| | | <!-- and q.status in ('COLLECTION', 'SEND','RECEIVE')--> |
| | | <!-- </if>--> |
| | | <if test="condition.billId != null and condition.billId != ''"> |
| | | AND q.bill_id = #{condition.billId} |