|
@@ -269,12 +269,17 @@
|
|
|
trsc.company_name companyName,
|
|
|
trsi.store_name storeName,
|
|
|
ci.customer_is_solve customerIsSolve,
|
|
|
- od.batch_create_time batchCreateTime
|
|
|
+ od.batch_create_time batchCreateTime,
|
|
|
+ cpm.proc_method_name procMethodName,
|
|
|
+ cpt.proc_type_name procTypeName
|
|
|
from tb_rst_sales_order_info
|
|
|
LEFT JOIN tb_rst_sales_company trsc ON tb_rst_sales_order_info.sales_company_id = trsc.company_id
|
|
|
LEFT JOIN tb_rst_store_info trsi ON tb_rst_sales_order_info.sales_store_id = trsi.store_id
|
|
|
LEFT JOIN tb_rst_order_batch od ON tb_rst_sales_order_info.sales_batch_id = od.batch_id
|
|
|
LEFT JOIN tb_rst_cm_customer_info ci ON tb_rst_sales_order_info.sales_customer_id = ci.customer_id
|
|
|
+ LEFT JOIN tb_rst_cm_relation cr ON ci.customer_id = cr.customer_id
|
|
|
+ LEFT JOIN tb_rst_cm_proc_method cpm ON cr.proc_method_id = cpm.proc_method_id
|
|
|
+ LEFT JOIN tb_rst_cm_proc_type cpt ON cpm.proc_type_id = cpt.proc_type_id
|
|
|
LEFT JOIN tb_rst_sales_order_item oi ON tb_rst_sales_order_info.sales_id = oi.item_order_id
|
|
|
<where>
|
|
|
tb_rst_sales_order_info.sales_batch_id != 'KS00000000000001'
|