|
@@ -38,7 +38,7 @@
|
|
|
cd.signclosed_id signclosedId,
|
|
|
pi.product_name productName,
|
|
|
ci.color_name colorName,
|
|
|
- cci.customer_create_time customerCreateTime,
|
|
|
+ c.customer_create_time customerCreateTime,
|
|
|
oi.sales_pay_time salesPayTime,
|
|
|
cpm.proc_method_name procMethodName,
|
|
|
cpt.proc_type_name procTypeName,
|
|
@@ -60,7 +60,6 @@
|
|
|
LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
|
|
|
LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
|
|
|
LEFT JOIN tb_rst_product_color ci on cd.product_color_id = ci.color_id
|
|
|
- LEFT JOIN tb_rst_cm_customer_info cci on cci.customer_id = cd.customer_id
|
|
|
LEFT JOIN tb_rst_cm_relation cr ON cd.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
|
|
@@ -71,8 +70,9 @@
|
|
|
LEFT JOIN tb_rst_address_province ap ON cs.signclosed_addr_provinces = ap.province_id
|
|
|
LEFT JOIN tb_rst_address_city ac ON cs.signclosed_addr_city = ac.city_id
|
|
|
LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
|
|
|
+ LEFT JOIN tb_rst_sys_admin sa on c.admin_id = sa.admin_id
|
|
|
where detect_id = #{detectId,jdbcType=INTEGER}
|
|
|
- GROUP BY cci.customer_id
|
|
|
+ GROUP BY c.customer_id
|
|
|
</select>
|
|
|
<select id="listComplaintDetect" resultType="ComplaintDetectInfo" parameterType="ComplaintDetectInfo" >
|
|
|
select
|
|
@@ -129,7 +129,10 @@
|
|
|
cd.detect_completion_time detectCompletionTime,
|
|
|
cd.maintenance_completion_time maintenanceCompletionTime,
|
|
|
cd.renovation_completion_time renovationCompletionTime,
|
|
|
- cd.scrap_completion_time scrapCompletionTime
|
|
|
+ cd.scrap_completion_time scrapCompletionTime,
|
|
|
+ qd.describe_content describeContent,
|
|
|
+ qd.describe_handle_desc describeHandleDesc,
|
|
|
+ sa.admin_name adminName
|
|
|
from tb_rst_complaint_detect cd
|
|
|
LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
|
|
|
LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
|
|
@@ -145,6 +148,7 @@
|
|
|
LEFT JOIN tb_rst_address_province ap ON cs.signclosed_addr_provinces = ap.province_id
|
|
|
LEFT JOIN tb_rst_address_city ac ON cs.signclosed_addr_city = ac.city_id
|
|
|
LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
|
|
|
+ LEFT JOIN tb_rst_sys_admin sa on c.admin_id = sa.admin_id
|
|
|
<where>
|
|
|
<if test="productTypeId != null" >
|
|
|
AND pt.type_id = #{productTypeId,jdbcType=INTEGER}
|
|
@@ -236,6 +240,9 @@
|
|
|
<if test="status != null and status == 8">
|
|
|
and cd.detect_state = 23
|
|
|
</if>
|
|
|
+ <if test="status != null and status == 9">
|
|
|
+ and cd.detect_state in(33,37)
|
|
|
+ </if>
|
|
|
<if test="signclosedName != null and signclosedName != ''">
|
|
|
and cs.signclosed_send_name like CONCAT('%',#{signclosedName},'%')
|
|
|
</if>
|