liujiankang 5 роки тому
батько
коміт
aa1233575f

+ 6 - 7
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java

@@ -184,6 +184,12 @@ public class CustomerInfo  implements Serializable {
     private Integer completeMaintenanceNum;//维修完成数量
     private Integer beenScrappedNum;//已报废的数量
     private Integer beenRenovatedNum;//已翻新的数量
+    private Integer stayBackNum;//待退回
+    private Integer beenReturnedNum;//已退回
+    private Integer stayQcConfirmNum;//待QC确认
+    private Integer placeOrderNum;//待下单
+    private Integer beenOrderedNum;//维修完成已下单
+
     private Integer afterState;// 1今日签收 2昨日签收 3前日签收 4.待检测 5已检测待确认 6.检测完成 7原机退回,待下单 8维修完成,待下单
     private String afterTime;// 售后搜索日期条件
     @DateTimeFormat(pattern="yyyy-MM-dd")
@@ -191,13 +197,6 @@ public class CustomerInfo  implements Serializable {
     private Date warehouseDate;// 仓库签收日期 用作列表查询
     private Integer warehouseDetectState;//状态 详情见数据库文档 用作列表查询 (1.待检测  2已检测,待确认 3待维修 4待翻新 5待报废 6维修完成 7翻新完成 8报废完成)
     private Integer detectPlaceorder;//状态 售后下单 1待发货 2已发货
-
-    private Integer stayBackNum;//待退回
-    private Integer beenReturnedNum;//已退回
-    private Integer stayQcConfirmNum;//待QC确认
-    private Integer placeOrderNum;//待下单
-    private Integer beenOrderedNum;//维修完成已下单
-
     public void setComplaintDetectList(List<ComplaintDetectInfo> complaintDetectList) {
         this.complaintDetectList = complaintDetectList;
     }

+ 27 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java

@@ -41,6 +41,8 @@ public class ComplaintDetectInfo implements Serializable {
     private Integer productTypeId;//产品类型id
     private String productTypeName;//产品类型名称
     private String questionTitle;//问题标题
+    private String describeContent;//问题回复
+    private String describeHandleDesc;//客服描述
     private String colorName;//产品颜色名称
     private String productName;//产品名称
     private String productAbbreviation;//产品简称
@@ -91,6 +93,7 @@ public class ComplaintDetectInfo implements Serializable {
     private String[] configli6;//维修配件集合
 
     private Integer adminId;//登录人id
+    private String adminName;//登录人名称
 
     private String startTime;
     private String endTime;
@@ -699,4 +702,28 @@ public class ComplaintDetectInfo implements Serializable {
     public void setScrapCompletionTime(Date scrapCompletionTime) {
         this.scrapCompletionTime = scrapCompletionTime;
     }
+
+    public String getDescribeContent() {
+        return describeContent;
+    }
+
+    public void setDescribeContent(String describeContent) {
+        this.describeContent = describeContent;
+    }
+
+    public String getDescribeHandleDesc() {
+        return describeHandleDesc;
+    }
+
+    public void setDescribeHandleDesc(String describeHandleDesc) {
+        this.describeHandleDesc = describeHandleDesc;
+    }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
 }

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

@@ -393,8 +393,8 @@
     LEFT JOIN (SELECT
       detect_id,
       customer_id,
-      sum(case when (detect_state = 37 and detect_placeorder = 1) then 1 else 0 end) as stayBackNum,
-      sum(case when (detect_state = 37 and detect_placeorder = 2) then 1 else 0 end) as beenReturnedNum,
+      sum(case when (detect_state in (33,37) and detect_placeorder = 1) then 1 else 0 end) as stayBackNum,
+      sum(case when (detect_state in (33,37) and detect_placeorder = 2) then 1 else 0 end) as beenReturnedNum,
       sum(case when (detect_state in (32,36) and maintenance_results = 2) then 1 else 0 end) as stayQcConfirmNum,
       sum(case when (detect_state in (32,36) and maintenance_results = 1 and detect_placeorder = 1) then 1 else 0 end) as placeOrderNum,
       sum(case when (detect_state in (32,36) and maintenance_results = 1 and detect_placeorder = 2) then 1 else 0 end) as beenOrderedNum,
@@ -515,7 +515,7 @@
         and cd.detect_state in(32,33,36,37)
       </if>
       <if test="afterState != null and afterState == 7">
-        and cd.detect_state = 37 and cd.detect_placeorder = 1 AND maintenance_results = 1
+        and cd.detect_state in(33,37) and cd.detect_placeorder = 1 AND maintenance_results = 1
       </if>
       <if test="afterState != null and afterState == 8">
         and cd.detect_state in(32,36) and cd.detect_placeorder = 1 AND maintenance_results = 1
@@ -547,6 +547,9 @@
       <if test="warehouseDetectState != null and warehouseDetectState == 8">
         and cd.detect_state = 23
       </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 9">
+          and cd.detect_state in(33,37)
+      </if>
       <if test="detectPlaceorder != null and detectPlaceorder != ''">
         and (cd.detect_state = 37 or cc.procTypeId = 3) AND detect_placeorder = #{detectPlaceorder}
       </if>

+ 11 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintDetectInfoMapper.xml

@@ -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>

+ 4 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -272,6 +272,10 @@ public class AdminDetectController {
         List<MaterialItem> listMaterialItem = complaintDetectInfoService.listMaterialItem(Integer.valueOf(detectId));
         List<QcInfo> listQcInfo = complaintDetectInfoService.listQcInfo(Integer.valueOf(detectId));
         List<TreatmentRecordLog> listTreatmentRecordLog = complaintDetectInfoService.listTreatmentRecordLog(Integer.valueOf(detectId));
+        if(detectinfo.getDetectSalesId() != null){
+            SalesOrder salesOrder = salesOrderService.getSalesOrderById(detectinfo.getDetectSalesId());
+            mv.addObject("salesOrder",salesOrder);
+        }
         mv.addObject("listTreatmentRecordLog",listTreatmentRecordLog);
         mv.addObject("listQcInfo",listQcInfo);
         mv.addObject("listMaterialItem",listMaterialItem);

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

@@ -139,6 +139,7 @@
                 <option value="6" <#if customerInfo.warehouseDetectState??><#if customerInfo.warehouseDetectState == 6 >selected="selected"</#if></#if>>维修完成</option>
                 <option value="7" <#if customerInfo.warehouseDetectState??><#if customerInfo.warehouseDetectState == 7 >selected="selected"</#if></#if>>翻新完成</option>
                 <option value="8" <#if customerInfo.warehouseDetectState??><#if customerInfo.warehouseDetectState == 8 >selected="selected"</#if></#if>>报废完成</option>
+                <option value="9" <#if customerInfo.warehouseDetectState??><#if customerInfo.warehouseDetectState == 9 >selected="selected"</#if></#if>>原机退回</option>
             </select>
             <select class="my-select" name="detectPlaceorder" id="detectPlaceorder" style="height: 36px;width: 132px;padding: 12px 10px 6px 15px;">
             <option value="">售后机器下单</option>
@@ -245,13 +246,13 @@
                                 <#if customer.beenReturnedNum??><#if customer.beenReturnedNum gt 0 >已退回:(<span class="c-success">${customer.beenReturnedNum}</span>)<br></#if></#if>
                                 <#if customer.stayQcConfirmNum??><#if customer.stayQcConfirmNum gt 0 >待QC确认:(<span class="c-red">${customer.stayQcConfirmNum}</span>)<br></#if></#if>
                                 <#if customer.placeOrderNum??><#if customer.placeOrderNum gt 0 >待下单:(<span class="c-red">${customer.placeOrderNum}</span>)<br></#if></#if>
-                                <#if customer.beenOrderedNum??><#if customer.beenOrderedNum gt 0 >维修完成已下单:(<span class="c-red">${customer.beenOrderedNum}</span>)<br></#if></#if>
+                                <#if customer.beenOrderedNum??><#if customer.beenOrderedNum gt 0 >已下单:(<span class="c-red">${customer.beenOrderedNum}</span>)<br></#if></#if>
                                 <#if customer.beDetected??><#if customer.beDetected gt 0 >待检测:<span class="c-red">${customer.beDetected}</span><br></#if></#if>
                                 <#if customer.beMaintenance??><#if customer.beMaintenance gt 0 >待维修:<span class="c-red">${customer.beMaintenance}</span><br></#if></#if>
                                 <#if customer.beRefurbished??><#if customer.beRefurbished gt 0 >待翻新:<span class="c-red">${customer.beRefurbished}</span><br></#if></#if>
                                 <#if customer.beScrapped??><#if customer.beScrapped gt 0 >待报废:<span class="c-red">${customer.beScrapped}</span><br></#if></#if>
                                 <#if customer.beContact??><#if customer.beContact gt 0 >待联系:<span class="c-red">${customer.beContact}</span></#if></#if>
-                                <#if customer.completeMaintenanceNum??><#if customer.completeMaintenanceNum gt 0 >维修完成:<span class="c-success">${customer.completeMaintenanceNum}</span></#if></#if>
+                                <#--<#if customer.completeMaintenanceNum??><#if customer.completeMaintenanceNum gt 0 >维修完成:<span class="c-success">${customer.completeMaintenanceNum}</span></#if></#if>-->
                                 <#if customer.beenScrappedNum??><#if customer.beenScrappedNum gt 0 >已报废:<span class="c-success">${customer.beenScrappedNum}</span></#if></#if>
                                 <#if customer.beenRenovatedNum??><#if customer.beenRenovatedNum gt 0 >已翻新:<span class="c-success">${customer.beenRenovatedNum}</span></#if></#if>
                             </td>

+ 22 - 5
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_detail.ftl

@@ -85,7 +85,7 @@
                 <th width="10">产品名称:</th>
                 <td width="10" style="font-weight: normal;"><span>${detectinfo.productName!''}(${detectinfo.colorName!''})</span></td>
             </tr>
-            <tr>
+            <#--<tr>
                 <th width="10">是否可翻新:</th>
                 <td width="10" style="font-weight: normal;">
                 <#if detectinfo.detectRenovation == 1>
@@ -103,7 +103,7 @@
                     无故障
                 </#if>
                 </span></td>
-            </tr>
+            </tr>-->
             <tr>
                 <th width="10">当前状态:</th>
                 <td width="10" style="font-weight: normal;"><span>
@@ -114,7 +114,7 @@
                             待用户确认
                         </#if>
                         <#if detectinfo.detectState == 31>
-                            <span class="c-red">待维修</span>
+                            <span class="c-red">待维修<#if detectinfo.completeCutTime??>(${detectinfo.completeCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
                         </#if>
                         <#if detectinfo.detectState == 32>
                             <span class="c-success">维修完成</span>
@@ -126,7 +126,7 @@
                             待客服确认维修
                         </#if>
                         <#if detectinfo.detectState == 35>
-                            <span class="c-red">待维修</span>
+                            <span class="c-red">待维修<#if detectinfo.completeCutTime??>(${detectinfo.completeCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
                         </#if>
                         <#if detectinfo.detectState == 36>
                             <span class="c-success">维修完成</span>
@@ -151,8 +151,25 @@
                         </#if>
                 </span></td>
                 <td width="10"></td>
+                <th width="10">签收日期:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.signclosedDate??>${(detectinfo.signclosedDate?string("yyyy-MM-dd"))!''}<#else>-</#if></span></td>
+                <#--<td width="10"></td>
                 <th width="10">维修报价:</th>
-                <td width="10" style="font-weight: normal;"><span><#if detectinfo.detectOffer??>${detectinfo.detectOffer/100}<#else>-</#if></span></td>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.detectOffer??>${detectinfo.detectOffer/100}<#else>-</#if></span></td>-->
+            </tr>
+            <tr>
+                <th width="10">寄回区域:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.signclosedAddrProvincesName??>${detectinfo.signclosedAddrProvincesName!''}</#if>-<#if detectinfo.signclosedAddrCityName??>${detectinfo.signclosedAddrCityName!''}</#if>-<#if detectinfo.signclosedAddrCityName??>${detectinfo.signclosedAddrCityName!''}</#if></span></td>
+                <td width="10"></td>
+                <th width="10">物流单号:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.logisticsNumber!''}</span></td>
+            </tr>
+            <tr>
+                <th width="10">客诉处理:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.customerId??>${detectinfo.procTypeName!''}-${detectinfo.procMethodName!''}</#if></span></td>
+                <td width="10"></td>
+                <th width="10">购买时间:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.signclosedDate??>${(detectinfo.salesTime?string("yyyy-MM-dd HH:mm:ss"))!''}<#else>-</#if></span></td>
             </tr>
             <tr>
                 <th width="10">生产月份:</th>

+ 1 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl

@@ -118,6 +118,7 @@
                 <option value="6" <#if status??><#if status == 6>selected</#if></#if>>维修完成</option>
                 <option value="7" <#if status??><#if status == 7>selected</#if></#if>>翻新完成</option>
                 <option value="8" <#if status??><#if status == 8>selected</#if></#if>>报废完成</option>
+                <option value="9" <#if status??><#if status == 9>selected</#if></#if>>原机退回</option>
             </select>
             <input class="my-input" style="width: 70px;height: 29px;" type="text" name="customerId" id="customerId" value="${customerId!}" placeholder="客诉编号"/>
             <input class="my-input" style="width: 70px;height: 29px;" type="text" name="detectNumber" id="detectNumber" value="${detectNumber!}" placeholder="维修编号"/>