|
@@ -243,7 +243,6 @@
|
|
c.question_id,
|
|
c.question_id,
|
|
c.store_id,
|
|
c.store_id,
|
|
c.company_id,
|
|
c.company_id,
|
|
- c.customer_area,
|
|
|
|
c.customer_in_TDS,
|
|
c.customer_in_TDS,
|
|
c.customer_out_TDS,
|
|
c.customer_out_TDS,
|
|
c.customer_is_solve,
|
|
c.customer_is_solve,
|
|
@@ -262,13 +261,10 @@
|
|
c.customer_province_id as customerProvinceId,
|
|
c.customer_province_id as customerProvinceId,
|
|
c.customer_city_id as customerCityId,
|
|
c.customer_city_id as customerCityId,
|
|
c.customer_district_id as customerDistrictId,
|
|
c.customer_district_id as customerDistrictId,
|
|
- ct.complaint_class_name,
|
|
|
|
csc.small_class_name,
|
|
csc.small_class_name,
|
|
t.type_name,
|
|
t.type_name,
|
|
a.admin_name,
|
|
a.admin_name,
|
|
qd.describe_title,
|
|
qd.describe_title,
|
|
- qd.describe_handle_desc,
|
|
|
|
- qd.describe_content,
|
|
|
|
sc.company_name,
|
|
sc.company_name,
|
|
si.store_name,
|
|
si.store_name,
|
|
v.visit_status,
|
|
v.visit_status,
|
|
@@ -280,7 +276,6 @@
|
|
v.visit_complete_name,
|
|
v.visit_complete_name,
|
|
v.visit_complete_tel,
|
|
v.visit_complete_tel,
|
|
sa.admin_name AS visitDesignatedAdminName,
|
|
sa.admin_name AS visitDesignatedAdminName,
|
|
- cq.question_profile,
|
|
|
|
sx.sendback_status AS backStatus,
|
|
sx.sendback_status AS backStatus,
|
|
cc.relationSendLogisticsNo AS sendLogisticsNo,
|
|
cc.relationSendLogisticsNo AS sendLogisticsNo,
|
|
cc.relationSendLogisticsCompany AS sendLogisticsCompany,
|
|
cc.relationSendLogisticsCompany AS sendLogisticsCompany,
|
|
@@ -294,7 +289,6 @@
|
|
cc.customerIsSolve as customerIsSolve,
|
|
cc.customerIsSolve as customerIsSolve,
|
|
cc.procMethodIsBack as procMethodIsBack,
|
|
cc.procMethodIsBack as procMethodIsBack,
|
|
cc.procMethodIsSend as procMethodIsSend,
|
|
cc.procMethodIsSend as procMethodIsSend,
|
|
- cc.relationSendAddress as customerSendAddress,
|
|
|
|
cc.relationId as relationId,
|
|
cc.relationId as relationId,
|
|
ri.receivingOne as receivingOne,
|
|
ri.receivingOne as receivingOne,
|
|
ri.receivingTwo as receivingTwo,
|
|
ri.receivingTwo as receivingTwo,
|
|
@@ -311,7 +305,6 @@
|
|
cs.completeMaintenanceNum as completeMaintenanceNum,
|
|
cs.completeMaintenanceNum as completeMaintenanceNum,
|
|
cs.beenScrappedNum as beenScrappedNum,
|
|
cs.beenScrappedNum as beenScrappedNum,
|
|
cs.beenRenovatedNum as beenRenovatedNum,
|
|
cs.beenRenovatedNum as beenRenovatedNum,
|
|
- ti.tag_desc as tagDesc,
|
|
|
|
ti.tag_flag as tagFlag
|
|
ti.tag_flag as tagFlag
|
|
FROM
|
|
FROM
|
|
tb_rst_cm_customer_info c
|
|
tb_rst_cm_customer_info c
|
|
@@ -334,8 +327,7 @@
|
|
tb_rst_cm_proc_type.proc_type_id AS procTypeId,
|
|
tb_rst_cm_proc_type.proc_type_id AS procTypeId,
|
|
tb_rst_cm_proc_type.proc_type_name AS procTypeName,
|
|
tb_rst_cm_proc_type.proc_type_name AS procTypeName,
|
|
tb_rst_cm_proc_method.proc_method_is_back AS procMethodIsBack,
|
|
tb_rst_cm_proc_method.proc_method_is_back AS procMethodIsBack,
|
|
- tb_rst_cm_proc_method.proc_method_is_send AS procMethodIsSend,
|
|
|
|
- tb_rst_cm_relation.relation_send_address AS relationSendAddress
|
|
|
|
|
|
+ tb_rst_cm_proc_method.proc_method_is_send AS procMethodIsSend
|
|
FROM
|
|
FROM
|
|
tb_rst_cm_relation
|
|
tb_rst_cm_relation
|
|
LEFT JOIN tb_rst_cm_proc_method ON tb_rst_cm_proc_method.proc_method_id = tb_rst_cm_relation.proc_method_id
|
|
LEFT JOIN tb_rst_cm_proc_method ON tb_rst_cm_proc_method.proc_method_id = tb_rst_cm_relation.proc_method_id
|
|
@@ -352,24 +344,16 @@
|
|
select tb_rst_cm_sendback_info.sendback_status,tb_rst_cm_sendback_info.relation_id,tb_rst_cm_relation.customer_id
|
|
select tb_rst_cm_sendback_info.sendback_status,tb_rst_cm_sendback_info.relation_id,tb_rst_cm_relation.customer_id
|
|
FROM tb_rst_cm_sendback_info
|
|
FROM tb_rst_cm_sendback_info
|
|
LEFT JOIN tb_rst_cm_relation on tb_rst_cm_relation.relation_id = tb_rst_cm_sendback_info.relation_id
|
|
LEFT JOIN tb_rst_cm_relation on tb_rst_cm_relation.relation_id = tb_rst_cm_sendback_info.relation_id
|
|
- ORDER BY sendback_create_time desc
|
|
|
|
|
|
+ ORDER BY sendback_id desc
|
|
) ss
|
|
) ss
|
|
GROUP BY ss.relation_id
|
|
GROUP BY ss.relation_id
|
|
) sxx
|
|
) sxx
|
|
) sx ON sx.customer_id = c.customer_id
|
|
) sx ON sx.customer_id = c.customer_id
|
|
- LEFT JOIN (
|
|
|
|
- SELECT ss.*
|
|
|
|
- from (
|
|
|
|
- select tb_rst_cm_sendback_info.*,tb_rst_cm_relation.customer_id
|
|
|
|
- FROM tb_rst_cm_sendback_info
|
|
|
|
- LEFT JOIN tb_rst_cm_relation on tb_rst_cm_relation.relation_id = tb_rst_cm_sendback_info.relation_id
|
|
|
|
- ORDER BY
|
|
|
|
- sendback_create_time desc
|
|
|
|
- ) ss
|
|
|
|
- ) sss ON sss.customer_id = c.customer_id
|
|
|
|
|
|
+
|
|
LEFT JOIN (SELECT
|
|
LEFT JOIN (SELECT
|
|
signclosed_id,
|
|
signclosed_id,
|
|
signclosed_customer_id,
|
|
signclosed_customer_id,
|
|
|
|
+ signclosed_logistics_number,
|
|
COUNT(
|
|
COUNT(
|
|
CASE signclosed_is_receiving
|
|
CASE signclosed_is_receiving
|
|
WHEN 1 THEN
|
|
WHEN 1 THEN
|
|
@@ -473,7 +457,7 @@
|
|
<if test="sendLogisticsNo != null and sendLogisticsNo != ''">
|
|
<if test="sendLogisticsNo != null and sendLogisticsNo != ''">
|
|
AND (
|
|
AND (
|
|
cc.relationSendLogisticsNo = #{sendLogisticsNo} OR
|
|
cc.relationSendLogisticsNo = #{sendLogisticsNo} OR
|
|
- sss.sendback_logistics_no = #{sendLogisticsNo} OR
|
|
|
|
|
|
+ ri.signclosed_logistics_number = #{sendLogisticsNo} OR
|
|
soi.sales_post_num = #{sendLogisticsNo}
|
|
soi.sales_post_num = #{sendLogisticsNo}
|
|
)
|
|
)
|
|
</if>
|
|
</if>
|