|
@@ -292,10 +292,11 @@
|
|
so.sale_custom_no = c.custom_no and c.del_flag = '0'
|
|
so.sale_custom_no = c.custom_no and c.del_flag = '0'
|
|
left join {DBNAME}.product_invoice pi on pi.sale_order_no = so.sale_no and pi.del_flag = '0'
|
|
left join {DBNAME}.product_invoice pi on pi.sale_order_no = so.sale_no and pi.del_flag = '0'
|
|
where so.del_flag = '0'
|
|
where so.del_flag = '0'
|
|
- and so.status = 6
|
|
|
|
|
|
+ and so.status >= 3
|
|
<if test="saleNo != null and saleNo != ''">and so.sale_no = #{saleNo}</if>
|
|
<if test="saleNo != null and saleNo != ''">and so.sale_no = #{saleNo}</if>
|
|
<if test="customerId != null and customerId != ''">and c.id = #{customerId}</if>
|
|
<if test="customerId != null and customerId != ''">and c.id = #{customerId}</if>
|
|
<if test="saleDate != null ">and so.sale_date = #{saleDate}</if>
|
|
<if test="saleDate != null ">and so.sale_date = #{saleDate}</if>
|
|
|
|
+
|
|
<if test="orderType == 'contractOrder'">
|
|
<if test="orderType == 'contractOrder'">
|
|
and so.sale_order_technology_no != 'retailOrder'
|
|
and so.sale_order_technology_no != 'retailOrder'
|
|
</if>
|
|
</if>
|