Browse Source

客诉列表寄回状态修改

liujiankang 6 years ago
parent
commit
03a9e55137

+ 9 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java

@@ -164,6 +164,7 @@ public class CustomerInfo  implements Serializable {
     private String customerCityId;    //市
     private String customerDistrictId;    //区
     private List<PostageInfo> postageInfoList;    //邮费集合
+    private List<SendbackInfo> sendbackInfoList;    //寄回信息集合
 
     public void setComplaintDetectList(List<ComplaintDetectInfo> complaintDetectList) {
         this.complaintDetectList = complaintDetectList;
@@ -826,4 +827,12 @@ public class CustomerInfo  implements Serializable {
     public void setPostageInfoList(List<PostageInfo> postageInfoList) {
         this.postageInfoList = postageInfoList;
     }
+
+    public List<SendbackInfo> getSendbackInfoList() {
+        return sendbackInfoList;
+    }
+
+    public void setSendbackInfoList(List<SendbackInfo> sendbackInfoList) {
+        this.sendbackInfoList = sendbackInfoList;
+    }
 }

+ 43 - 6
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml

@@ -461,7 +461,8 @@
     <result column="describe_handle_desc" property="describeHandleDesc"/>
     <result column="describe_content" property="describeContent"/>
     <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
-    <collection property="postageInfoList" column="customer_id" ofType="PostageInfo" select="listPostageInfoByCustomerId"/>
+   <!-- <collection property="postageInfoList" column="customer_id" ofType="PostageInfo" select="listPostageInfoByCustomerId"/>-->
+    <collection property="sendbackInfoList" column="customer_id" ofType="SendbackInfo" select="listSendbackInfoByCustomerId"/>
   </resultMap>
 
   <select id="listComplaintDetect" parameterType="Integer" resultType="ComplaintDetectInfo">
@@ -1047,15 +1048,34 @@ and cr.relation_is_transfer = 10*/
 
   <select id="getCmRelationInfo" parameterType="CmRelation" resultType="CmRelation">
     SELECT
-      *
-     FROM
-     tb_rst_cm_relation
+    cr.*,
+    sx.sendback_status AS relationBackStatus
+    FROM
+    tb_rst_cm_relation cr
+    LEFT JOIN (
+    SELECT
+    sxx.*
+    FROM
+    (
+    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
+    GROUP BY
+    ss.relation_id
+    ) sxx
+    ) sx ON sx.customer_id = cr.customer_id
     <where>
       <if test="relationId != null and relationId != ''">
-        relation_id = #{relationId},
+        cr.relation_id = #{relationId},
       </if>
       <if test="customerId != null and customerId != ''">
-        customer_id = #{customerId}
+        cr.customer_id = #{customerId}
       </if>
     </where>
   </select>
@@ -1212,6 +1232,23 @@ and cr.relation_is_transfer = 10*/
      WHERE relation_id = #{relationId}
   </select>
 
+  <select id="listSendbackInfoByCustomerId" parameterType="Integer" resultType="SendbackInfo">
+    SELECT
+      sendback_id,
+      tb_rst_cm_sendback_info.relation_id,
+      sendback_logistics_company,
+      sendback_logistics_no,
+      sendback_name,
+      sendback_tel,
+      sendback_status,
+      sendback_sign_time,
+      sendback_create_time,
+      sendback_update_time
+     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
+      where tb_rst_cm_relation.customer_id = #{customerId}
+  </select>
+
   <select id="sendbackItemList" parameterType="Integer" resultType="SendbackItem">
       select
       *,

+ 4 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl

@@ -211,11 +211,11 @@
                             <td>${customer.customerArea!''}</td>
                             <td>进${customer.customerInTDS!'0'}PPM<br/>出${customer.customerOutTDS!'0'}PPM</td>
                             <td>
-                        <#if customer.postageInfoList?? &&  (customer.postageInfoList?size > 0) >
+                        <#if customer.sendbackInfoList?? &&  (customer.sendbackInfoList?size > 0) >
                             寄回:
-                            <#list customer.postageInfoList as postageInfo>
-                                    <a onclick="openLogistics('物流信息','${path}/admin/detect/to_view_logistics?billCode=${postageInfo.backLogisticsNo!''}&billName=${postageInfo.backLogisticsCompany!''}',300,400);">${postageInfo.backLogisticsNo!''}</a><br>
-                                </#list>
+                            <#list customer.sendbackInfoList as sendbackInfo>
+                                    <a onclick="openLogistics('物流信息','${path}/admin/detect/to_view_logistics?billCode=${sendbackInfo.sendbackLogisticsNo!''}&billName=${sendbackInfo.sendbackLogisticsCompany!''}',300,400);">${sendbackInfo.sendbackLogisticsNo!''};</a><br>
+                            </#list>
                         <#else>
                         </#if>