|
@@ -693,24 +693,7 @@ ct.complaint_class_name as complaintClassName,
|
|
|
csc.small_class_name as smallClassName,
|
|
|
qd.describe_title as describeTitle,
|
|
|
qd.describe_handle_desc as describeHandleDesc,
|
|
|
-(CASE
|
|
|
-WHEN c.customer_is_solve = 1 THEN
|
|
|
- '已解决'
|
|
|
-WHEN c.customer_is_solve = 2 THEN
|
|
|
- '未解决'
|
|
|
-WHEN c.customer_is_solve = 3 THEN
|
|
|
- '换新'
|
|
|
-WHEN c.customer_is_solve = 4 THEN
|
|
|
- '维修'
|
|
|
-WHEN c.customer_is_solve = 5 THEN
|
|
|
- '补发'
|
|
|
-WHEN c.customer_is_solve = 6 THEN
|
|
|
- '退货'
|
|
|
-WHEN c.customer_is_solve = 7 THEN
|
|
|
- '无理由退货'
|
|
|
-ELSE
|
|
|
- '未知'
|
|
|
-END) AS customerIsSolve,
|
|
|
+cpt.proc_type_name AS customerIsSolve,
|
|
|
null AS salesPayTime,
|
|
|
sc.company_name AS companyName,
|
|
|
si.store_name AS storeName,
|
|
@@ -739,7 +722,16 @@ WHEN c.customer_secondary_customer = 2 THEN
|
|
|
ELSE
|
|
|
'未知'
|
|
|
END) AS customerSecondaryCustomer,
|
|
|
-sa.admin_name AS adminName
|
|
|
+sa.admin_name AS adminName,
|
|
|
+cr.relation_back_logistics_company AS relationBackLogisticsCompany,
|
|
|
+cr.relation_back_logistics_no AS relationBackLogisticsNo,
|
|
|
+cr.relation_back_receipt_date AS relationBackReceiptDate,
|
|
|
+cr.relation_send_status AS relationBackStatus,
|
|
|
+cr.relation_send_logistics_company AS relationSendLogisticsCompany,
|
|
|
+cr.relation_send_logistics_no AS relationSendLogisticsNo,
|
|
|
+cr.relation_factory_costs AS relationFactoryCosts,
|
|
|
+cr.relation_customer_costs AS relationCustomerCosts,
|
|
|
+cr.relation_id AS relationId
|
|
|
FROM
|
|
|
tb_rst_cm_customer_info c
|
|
|
LEFT JOIN tb_rst_cm_question_describe qd ON c.customer_id = qd.customer_id
|
|
@@ -749,6 +741,9 @@ LEFT JOIN tb_rst_cm_complaint_type ct ON ct.complaint_id = csc.complaint_id
|
|
|
LEFT JOIN tb_rst_sales_company sc ON c.company_id = sc.company_id
|
|
|
LEFT JOIN tb_rst_store_info si ON c.store_id = si.store_id
|
|
|
LEFT JOIN tb_rst_sys_admin sa ON c.admin_id = sa.admin_id
|
|
|
+LEFT JOIN tb_rst_cm_relation cr ON cr.customer_id = c.customer_id
|
|
|
+LEFT JOIN tb_rst_cm_proc_method cpm ON cpm.proc_method_id = cr.proc_method_id
|
|
|
+LEFT JOIN tb_rst_cm_proc_type cpt ON cpt.proc_type_id = cpm.proc_type_id
|
|
|
</select>
|
|
|
<!-- 退换货统计sql start -->
|
|
|
<!-- 总销量 -->
|
|
@@ -1048,4 +1043,5 @@ LEFT JOIN tb_rst_sys_admin sa ON c.admin_id = sa.admin_id
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
</mapper>
|