Explorar o código

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent into develop

wangxiaoming %!s(int64=5) %!d(string=hai) anos
pai
achega
747bdc7859
Modificáronse 17 ficheiros con 536 adicións e 277 borrados
  1. 56 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintAfterSalesNum.java
  2. 24 5
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java
  3. 5 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java
  4. 6 1
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java
  5. 22 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  6. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java
  7. 154 170
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  8. 20 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  9. 6 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java
  10. 7 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java
  11. 58 15
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintDetectInfoMapper.xml
  12. 6 8
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  13. 1 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  14. 2 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java
  15. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl
  16. 149 69
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl
  17. 14 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl

+ 56 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintAfterSalesNum.java

@@ -16,6 +16,14 @@ public class ComplaintAfterSalesNum implements Serializable{
     private Integer maintenanceCutTimeNum;//超过最晚完成检测时间
     private Integer completeCutTimeNum;//超过最晚完成维修时间
 
+    //维修列表统计字段
+    private Integer beDetectedNum;//待检测数量
+    private Integer forMaintenanceNum;//待维修数量
+    private Integer beScrappedNum;//待报废数量
+    private Integer stayBackNum;//待退回数量
+    private Integer beRefurbishedNum;//待翻新数量
+    private Integer forQCNum;//待QC检测数量
+
     public Integer getTodaysignNum() {
         return todaysignNum;
     }
@@ -103,4 +111,52 @@ public class ComplaintAfterSalesNum implements Serializable{
     public void setCompleteCutTimeNum(Integer completeCutTimeNum) {
         this.completeCutTimeNum = completeCutTimeNum;
     }
+
+    public Integer getBeDetectedNum() {
+        return beDetectedNum;
+    }
+
+    public void setBeDetectedNum(Integer beDetectedNum) {
+        this.beDetectedNum = beDetectedNum;
+    }
+
+    public Integer getForMaintenanceNum() {
+        return forMaintenanceNum;
+    }
+
+    public void setForMaintenanceNum(Integer forMaintenanceNum) {
+        this.forMaintenanceNum = forMaintenanceNum;
+    }
+
+    public Integer getBeScrappedNum() {
+        return beScrappedNum;
+    }
+
+    public void setBeScrappedNum(Integer beScrappedNum) {
+        this.beScrappedNum = beScrappedNum;
+    }
+
+    public Integer getStayBackNum() {
+        return stayBackNum;
+    }
+
+    public void setStayBackNum(Integer stayBackNum) {
+        this.stayBackNum = stayBackNum;
+    }
+
+    public Integer getBeRefurbishedNum() {
+        return beRefurbishedNum;
+    }
+
+    public void setBeRefurbishedNum(Integer beRefurbishedNum) {
+        this.beRefurbishedNum = beRefurbishedNum;
+    }
+
+    public Integer getForQCNum() {
+        return forQCNum;
+    }
+
+    public void setForQCNum(Integer forQCNum) {
+        this.forQCNum = forQCNum;
+    }
 }

+ 24 - 5
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java

@@ -104,7 +104,7 @@ public class ComplaintDetectInfo implements Serializable {
     private Date detectPrintTime;//首次打印时间
     private String signclosedName;//签收人姓名
     private Integer detectPlaceorder;//是否下单 1否 2是
-    private Integer detectSalesId;//订单号
+    private String salesOrderId;//订单号
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date detectCompletionTime;//检测完成时间
@@ -118,6 +118,9 @@ public class ComplaintDetectInfo implements Serializable {
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date scrapCompletionTime;//报废完成时间
 
+    private Integer state;//查询各状态条数
+    private Integer detectIsWhetherLess;//是否少件 1是 2否
+
 
     public Integer getDetectId() {
         return detectId;
@@ -663,12 +666,12 @@ public class ComplaintDetectInfo implements Serializable {
         this.detectPlaceorder = detectPlaceorder;
     }
 
-    public Integer getDetectSalesId() {
-        return detectSalesId;
+    public String getSalesOrderId() {
+        return salesOrderId;
     }
 
-    public void setDetectSalesId(Integer detectSalesId) {
-        this.detectSalesId = detectSalesId;
+    public void setSalesOrderId(String salesOrderId) {
+        this.salesOrderId = salesOrderId;
     }
 
     public Date getDetectCompletionTime() {
@@ -726,4 +729,20 @@ public class ComplaintDetectInfo implements Serializable {
     public void setAdminName(String adminName) {
         this.adminName = adminName;
     }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public Integer getDetectIsWhetherLess() {
+        return detectIsWhetherLess;
+    }
+
+    public void setDetectIsWhetherLess(Integer detectIsWhetherLess) {
+        this.detectIsWhetherLess = detectIsWhetherLess;
+    }
 }

+ 5 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java

@@ -464,4 +464,9 @@ public interface SalesOrderService {
      * 查询订单各个状态数量
      */
     SalesOrder getStatusNum();
+
+    /**
+     * 根据订单号查询订单
+     */
+    SalesOrder getSalesOrderByOrderId(String salesOrderId);
 }

+ 6 - 1
watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java

@@ -189,5 +189,10 @@ public interface ComplaintDetectInfoService {
      * 查询订单关联的维修
      * @return
      */
-    List<ComplaintDetectInfo> listComplaintDetectBySalesId(Integer detectSalesId);
+    List<ComplaintDetectInfo> listComplaintDetectBySalesId(String detectSalesId);
+    /**
+     * 查询各状态条数
+     * @return
+     */
+    ComplaintAfterSalesNum getDetectCount();
 }

+ 22 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -475,7 +475,8 @@ public class SalesOrderServiceImpl implements SalesOrderService {
                     ComplaintDetectInfo detectInfo = new ComplaintDetectInfo();
                     detectInfo.setDetectId(Integer.valueOf(detectId));
                     detectInfo.setDetectPlaceorder(2);
-                    detectInfo.setDetectSalesId(mainOrder.getSalesId());
+                    detectInfo.setSalesOrderId(mainOrder.getSalesOrderId());
+                    /*detectInfo.setDetectSalesId(mainOrder.getSalesId());*/
                     complaintDetectInfoMapper.updateDetectById(detectInfo);
                 }
             }
@@ -926,6 +927,21 @@ public class SalesOrderServiceImpl implements SalesOrderService {
         if(so.getSalesDeliver() == 2){
             returnInventory(id,so.getSalesWarehouseId());
         }
+        //判断是否绑定维修信息,并解除绑定
+        if(so != null){
+            //查询封装售后维修编号
+            List<ComplaintDetectInfo> listDetect  = complaintDetectInfoMapper.listComplaintDetectBySalesId(so.getSalesOrderId());
+            if(listDetect != null && listDetect.size() > 0){
+                for (ComplaintDetectInfo info: listDetect){
+                    ComplaintDetectInfo detectInfo = new ComplaintDetectInfo();
+                    detectInfo.setDetectId(info.getDetectId());
+                    detectInfo.setDetectPlaceorder(1);
+                    detectInfo.setSalesOrderId("");
+                    complaintDetectInfoMapper.updateDetectById(detectInfo);
+                }
+            }
+        }
+
         // 检查客诉是否使用订单,如果有使用订单,无法删除
         salesOrderMapper.delOrderItem(id);
         salesOrderMapper.delSalesOrder(id);
@@ -1462,4 +1478,9 @@ public class SalesOrderServiceImpl implements SalesOrderService {
         return salesOrderMapper.getStatusNum();
     }
 
+    @Override
+    public SalesOrder getSalesOrderByOrderId(String salesOrderId) {
+        return salesOrderMapper.getSalesOrderByOrderId(salesOrderId);
+    }
+
 }

+ 5 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java

@@ -376,4 +376,9 @@ public interface SalesOrderMapper {
      * 查询订单各个状态数量
      */
     SalesOrder getStatusNum();
+
+    /**
+     * 根据订单号查询订单
+     */
+    SalesOrder getSalesOrderByOrderId(String salesOrderId);
 }

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

@@ -237,160 +237,144 @@
   </select>-->
 
   <select id="listCustomer" parameterType="CustomerInfo" resultMap="customerMap">
-    SELECT
-    c.customer_id,
-    c.customer_counsel_type,
-    c.question_id,
-    c.store_id,
-    c.company_id,
-    c.customer_area,
-    c.customer_in_TDS,
-    c.customer_out_TDS,
-    c.customer_is_solve,
-    c.customer_is_visit,
-    c.customer_create_time,
-    c.customer_desc,
-    c.customer_out_damaged,
-    c.customer_secondary_customer,
-    c.customer_last_id,
-    c.customer_initial_id,
-    c.customer_name,
-    c.customer_tel,
-    c.customer_wechat_name,
-    c.customer_source_type,
-    c.customer_source,
-    c.customer_province_id as customerProvinceId,
-    c.customer_city_id as customerCityId,
-    c.customer_district_id as customerDistrictId,
-    ct.complaint_class_name,
-    csc.small_class_name,
-    t.type_name,
-    a.admin_name,
-    qd.describe_title,
-    qd.describe_handle_desc,
-    qd.describe_content,
-    sc.company_name,
-    si.store_name,
-    v.visit_status,
-    v.visit_complete_date,
-    v.visit_name,
-    v.visit_tel,
-    v.visit_date,
-    v.visit_time_select,
-    v.visit_complete_name,
-    v.visit_complete_tel,
-    sa.admin_name AS visitDesignatedAdminName,
-    cq.question_profile,
-    sx.sendback_status AS backStatus,
-    cc.relationSendLogisticsNo AS sendLogisticsNo,
-    cc.relationSendLogisticsCompany AS sendLogisticsCompany,
-    cc.relationBackLogisticsNo AS backLogisticsNo,
-    cc.relationBackLogisticsCompany AS backLogisticsCompany,
-    oi.sales_pay_time AS salesTime,
-    cc.procMethodId as procMethodId,
-    cc.procMethodName as procMethodName,
-    cc.procTypeId as procTypeId,
-    cc.procTypeName as procTypeName,
-    cc.customerIsSolve as customerIsSolve,
-    cc.procMethodIsBack as procMethodIsBack,
-    cc.procMethodIsSend as procMethodIsSend,
-    cc.relationSendAddress as customerSendAddress,
-    cc.relationId as relationId,
-    ri.receivingOne as receivingOne,
-    ri.receivingTwo as receivingTwo,
-    cs.stayBackNum as stayBackNum,
-    cs.beenReturnedNum as beenReturnedNum,
-    cs.stayQcConfirmNum as stayQcConfirmNum,
-    cs.placeOrderNum as placeOrderNum,
-    cs.beenOrderedNum as beenOrderedNum,
-    cs.beDetected as beDetected,
-    cs.beMaintenance as beMaintenance,
-    cs.beRefurbished as beRefurbished,
-    cs.beScrapped as beScrapped,
-    cs.beContact as beContact,
-    cs.completeMaintenanceNum as completeMaintenanceNum,
-    cs.beenScrappedNum as beenScrappedNum,
-    cs.beenRenovatedNum as beenRenovatedNum
-    FROM
-    tb_rst_cm_customer_info c
-    LEFT JOIN (
-    SELECT
-    xx.*
-    FROM
-    (
-    SELECT
-    tb_rst_cm_proc_method.proc_type_id AS customerIsSolve,
-    tb_rst_cm_relation.relation_id AS relationId,
-    customer_id AS customerId,
-    tb_rst_cm_relation_order.sales_id AS orderId,
-    signclosed_id AS signclosedId,
-    relation_back_status AS relationBackStatus,
-    relation_send_status AS relationSendStatus,
-    relation_send_logistics_no AS relationSendLogisticsNo,
-    relation_send_logistics_company AS relationSendLogisticsCompany,
-    relation_back_logistics_no AS relationBackLogisticsNo,
-    relation_back_logistics_company AS relationBackLogisticsCompany,
-    tb_rst_cm_proc_method.proc_method_id AS procMethodId,
-    tb_rst_cm_proc_method.proc_method_name AS procMethodName,
-    tb_rst_cm_proc_type.proc_type_id AS procTypeId,
-    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_send AS procMethodIsSend,
-    tb_rst_cm_relation.province_number AS provinceNumber,
-    tb_rst_cm_relation.city_number AS cityNumber,
-    tb_rst_cm_relation.area_number AS areaNumber,
-    tb_rst_cm_relation.relation_send_address AS relationSendAddress
-    FROM
-    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_type ON tb_rst_cm_proc_type.proc_type_id = tb_rst_cm_proc_method.proc_type_id
-    LEFT JOIN tb_rst_cm_relation_order ON tb_rst_cm_relation_order.relation_id = tb_rst_cm_relation.relation_id
-    ) xx
-    ) cc ON cc.customerId = c.customer_id
-    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 = 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
-    signclosed_id,
-    signclosed_customer_id,
-    COUNT(
-    CASE signclosed_is_receiving
-    WHEN 1 THEN
-    1
-    END
-    ) AS receivingOne,
-    COUNT(
-    CASE signclosed_is_receiving
-    WHEN 2 THEN
-    2
-    END
-    ) AS receivingTwo
-    FROM
-    tb_rst_complaint_signclosed
-    GROUP BY
-    signclosed_customer_id) ri ON ri.signclosed_customer_id = c.customer_id
-    LEFT JOIN (SELECT
+      SELECT
+      c.customer_id,
+      c.customer_counsel_type,
+      c.question_id,
+      c.store_id,
+      c.company_id,
+      c.customer_area,
+      c.customer_in_TDS,
+      c.customer_out_TDS,
+      c.customer_is_solve,
+      c.customer_is_visit,
+      c.customer_create_time,
+      c.customer_desc,
+      c.customer_out_damaged,
+      c.customer_secondary_customer,
+      c.customer_last_id,
+      c.customer_initial_id,
+      c.customer_name,
+      c.customer_tel,
+      c.customer_wechat_name,
+      c.customer_source_type,
+      c.customer_source,
+      c.customer_province_id as customerProvinceId,
+      c.customer_city_id as customerCityId,
+      c.customer_district_id as customerDistrictId,
+      ct.complaint_class_name,
+      csc.small_class_name,
+      t.type_name,
+      a.admin_name,
+      qd.describe_title,
+      qd.describe_handle_desc,
+      qd.describe_content,
+      sc.company_name,
+      si.store_name,
+      v.visit_status,
+      v.visit_complete_date,
+      v.visit_name,
+      v.visit_tel,
+      v.visit_date,
+      v.visit_time_select,
+      v.visit_complete_name,
+      v.visit_complete_tel,
+      sa.admin_name AS visitDesignatedAdminName,
+      cq.question_profile,
+      sx.sendback_status AS backStatus,
+      cc.relationSendLogisticsNo AS sendLogisticsNo,
+      cc.relationSendLogisticsCompany AS sendLogisticsCompany,
+      cc.relationBackLogisticsNo AS backLogisticsNo,
+      cc.relationBackLogisticsCompany AS backLogisticsCompany,
+      oi.sales_pay_time AS salesTime,
+      cc.procMethodId as procMethodId,
+      cc.procMethodName as procMethodName,
+      cc.procTypeId as procTypeId,
+      cc.procTypeName as procTypeName,
+      cc.customerIsSolve as customerIsSolve,
+      cc.procMethodIsBack as procMethodIsBack,
+      cc.procMethodIsSend as procMethodIsSend,
+      cc.relationSendAddress as customerSendAddress,
+      cc.relationId as relationId,
+      ri.receivingOne as receivingOne,
+      ri.receivingTwo as receivingTwo,
+      cs.stayBackNum as stayBackNum,
+      cs.beenReturnedNum as beenReturnedNum,
+      cs.stayQcConfirmNum as stayQcConfirmNum,
+      cs.placeOrderNum as placeOrderNum,
+      cs.beenOrderedNum as beenOrderedNum,
+      cs.beDetected as beDetected,
+      cs.beMaintenance as beMaintenance,
+      cs.beRefurbished as beRefurbished,
+      cs.beScrapped as beScrapped,
+      cs.beContact as beContact,
+      cs.completeMaintenanceNum as completeMaintenanceNum,
+      cs.beenScrappedNum as beenScrappedNum,
+      cs.beenRenovatedNum as beenRenovatedNum
+      FROM
+      tb_rst_cm_customer_info c
+      LEFT JOIN (
+      SELECT
+      xx.*
+      FROM
+      (
+      SELECT
+      tb_rst_cm_proc_method.proc_type_id AS customerIsSolve,
+      tb_rst_cm_relation.relation_id AS relationId,
+      customer_id AS customerId,
+      tb_rst_cm_relation_order.sales_id AS orderId,
+      relation_send_logistics_no AS relationSendLogisticsNo,
+      relation_send_logistics_company AS relationSendLogisticsCompany,
+      relation_back_logistics_no AS relationBackLogisticsNo,
+      relation_back_logistics_company AS relationBackLogisticsCompany,
+      tb_rst_cm_proc_method.proc_method_id AS procMethodId,
+      tb_rst_cm_proc_method.proc_method_name AS procMethodName,
+      tb_rst_cm_proc_type.proc_type_id AS procTypeId,
+      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_send AS procMethodIsSend,
+      tb_rst_cm_relation.relation_send_address AS relationSendAddress
+      FROM
+      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_type ON tb_rst_cm_proc_type.proc_type_id = tb_rst_cm_proc_method.proc_type_id
+      LEFT JOIN tb_rst_cm_relation_order ON tb_rst_cm_relation_order.relation_id = tb_rst_cm_relation.relation_id
+      ) xx
+      ) cc ON cc.customerId = c.customer_id
+      LEFT JOIN (
+      SELECT
+      sxx.sendback_status,sxx.customer_id
+      FROM
+      (
+      SELECT ss.sendback_status,ss.customer_id from (
+      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
+      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 = c.customer_id
+      LEFT JOIN (SELECT
+      signclosed_id,
+      signclosed_customer_id,
+      COUNT(
+      CASE signclosed_is_receiving
+      WHEN 1 THEN
+      1
+      END
+      ) AS receivingOne,
+      COUNT(
+      CASE signclosed_is_receiving
+      WHEN 2 THEN
+      2
+      END
+      ) AS receivingTwo
+      FROM
+      tb_rst_complaint_signclosed
+      GROUP BY
+      signclosed_customer_id) ri ON ri.signclosed_customer_id = c.customer_id
+      LEFT JOIN (SELECT
       detect_id,
       customer_id,
       sum(case when (detect_state in (33,37) and detect_placeorder = 1) then 1 else 0 end) as stayBackNum,
@@ -410,20 +394,20 @@
       tb_rst_complaint_detect
       GROUP BY
       customer_id) cs ON cs.customer_id = c.customer_id
-    LEFT JOIN tb_rst_cm_visit v ON v.customer_id = c.customer_id
-    LEFT JOIN tb_rst_sales_order_info oi ON cc.orderId = oi.sales_id
-    LEFT JOIN tb_rst_cm_question_describe qd ON c.customer_id = qd.customer_id
-    LEFT JOIN tb_rst_cm_complaint_question cq ON c.question_id = cq.question_id
-    LEFT JOIN tb_rst_cm_complaint_small_class csc ON csc.small_class_id = cq.small_class_id
-    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_product_type t ON c.type_id = t.type_id
-    LEFT JOIN tb_rst_sys_admin a ON c.admin_id = a.admin_id
-    LEFT JOIN tb_rst_sys_admin sa ON v.designated_admin_id = sa.admin_id
-    LEFT JOIN tb_rst_sales_order_info soi ON soi.sales_customer_id = c.customer_id
-    LEFT JOIN tb_rst_complaint_signclosed cs ON cs.signclosed_customer_id = c.customer_id
-    LEFT JOIN tb_rst_complaint_detect cd ON c.customer_id = cd.customer_id
+      LEFT JOIN tb_rst_cm_visit v ON v.customer_id = c.customer_id
+      LEFT JOIN tb_rst_sales_order_info oi ON cc.orderId = oi.sales_id
+      LEFT JOIN tb_rst_cm_question_describe qd ON c.customer_id = qd.customer_id
+      LEFT JOIN tb_rst_cm_complaint_question cq ON c.question_id = cq.question_id
+      LEFT JOIN tb_rst_cm_complaint_small_class csc ON csc.small_class_id = cq.small_class_id
+      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_product_type t ON c.type_id = t.type_id
+      LEFT JOIN tb_rst_sys_admin a ON c.admin_id = a.admin_id
+      LEFT JOIN tb_rst_sys_admin sa ON v.designated_admin_id = sa.admin_id
+      LEFT JOIN tb_rst_sales_order_info soi ON soi.sales_customer_id = c.customer_id
+      LEFT JOIN tb_rst_complaint_signclosed cs ON cs.signclosed_customer_id = c.customer_id
+      LEFT JOIN tb_rst_complaint_detect cd ON c.customer_id = cd.customer_id
     <where>
       <if test="customerName != null and customerName != ''">
         c.customer_name like CONCAT('%',#{customerName},'%')
@@ -521,10 +505,10 @@
         and cd.detect_state in(32,36) and cd.detect_placeorder = 1 AND maintenance_results = 1
       </if>
       <if test="afterState != null and afterState == 9">
-        and cd.maintenance_cut_time &lt; now()  AND cc.procTypeId = 3 and cd.detect_placeorder = 1
+        and cd.maintenance_cut_time &lt; now()  AND cc.procTypeId = 3 and cd.detect_placeorder = 1  and cd.detect_state = 1
       </if>
       <if test="afterState != null and afterState == 10">
-        and cd.complete_cut_time &lt; now()   AND cc.procTypeId = 3 and cd.detect_placeorder = 1
+        and cd.complete_cut_time &lt; now()   AND cc.procTypeId = 3 and cd.detect_placeorder = 1 and detect_state in(32,36)
       </if>
       <if test="warehouseDate != null">
         and cs.signclosed_date = #{warehouseDate}

+ 20 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml

@@ -1749,4 +1749,24 @@
             sales_status != 3
         AND sales_batch_id != 'KS00000000000001'
     </select>
+
+
+    <!-- 根据订单号查询订单信息 -->
+    <select id="getSalesOrderByOrderId" resultType="SalesOrder" parameterType="java.lang.String" >
+    select
+    t.*,
+    trsc.company_name companyName,
+    trsi.store_efast  storeEfast,
+    trsi.store_name  storeName,
+    ci.customer_is_solve customerIsSolve,
+    od.batch_create_time  batchCreateTime,
+    li.logistics_name  salesPostFirmName
+    from tb_rst_sales_order_info t
+    LEFT JOIN tb_rst_sales_company trsc ON t.sales_company_id = trsc.company_id
+    LEFT JOIN tb_rst_store_info trsi ON t.sales_store_id = trsi.store_id
+    LEFT JOIN tb_rst_order_batch od ON t.sales_batch_id = od.batch_id
+    LEFT JOIN tb_rst_cm_customer_info ci ON t.sales_customer_id = ci.customer_id
+    LEFT JOIN tb_rst_logistics_info li ON t.sales_post_firm = li.logistics_rst_code
+    where sales_orderId = #{salesOrderId}
+    </select>
 </mapper>

+ 6 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java

@@ -597,9 +597,14 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     }
 
     @Override
-    public List<ComplaintDetectInfo> listComplaintDetectBySalesId(Integer detectSalesId) {
+    public List<ComplaintDetectInfo> listComplaintDetectBySalesId(String detectSalesId) {
         return complaintDetectInfoMapper.listComplaintDetectBySalesId(detectSalesId);
     }
 
+    @Override
+    public ComplaintAfterSalesNum getDetectCount() {
+        return complaintDetectInfoMapper.getDetectCount();
+    }
+
 
 }

+ 7 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java

@@ -168,7 +168,13 @@ public interface ComplaintDetectInfoMapper {
      * 查询订单关联的维修
      * @return
      */
-    List<ComplaintDetectInfo> listComplaintDetectBySalesId(Integer detectSalesId);
+    List<ComplaintDetectInfo> listComplaintDetectBySalesId(String detectSalesId);
+
+    /**
+     * 查询各状态条数
+     * @return
+     */
+    ComplaintAfterSalesNum getDetectCount();
 
 
 }

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

@@ -59,7 +59,8 @@
       cd.scrap_completion_time scrapCompletionTime,
       qd.describe_content describeContent,
       qd.describe_handle_desc describeHandleDesc,
-      sa.admin_name adminName
+      sa.admin_name adminName,
+      cd.detect_is_whetherLess detectIsWhetherLess
     from tb_rst_complaint_detect cd
     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
@@ -168,7 +169,8 @@
     cd.scrap_completion_time scrapCompletionTime,
     qd.describe_content describeContent,
     qd.describe_handle_desc describeHandleDesc,
-    sa.admin_name adminName
+    sa.admin_name adminName,
+    cd.detect_is_whetherLess detectIsWhetherLess
     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
@@ -285,12 +287,36 @@
       <if test="detectPlaceorder != null and detectPlaceorder != ''">
         and cd.detect_placeorder  = #{detectPlaceorder}
       </if>
-      <if test="detectSalesId != null and detectSalesId != ''">
-        and cd.detect_sales_id  = #{detectSalesId}
+      <if test="salesOrderId != null and salesOrderId != ''">
+        and cd.sales_orderId  = #{salesOrderId}
       </if>
       <if test="procTypeId != null and procTypeId != ''">
         and cpt.proc_type_id  = #{procTypeId}
       </if>
+      <if test="state != null and state == 1">
+        and cd.detect_state = 1
+      </if>
+      <if test="state != null and state == 2">
+        and cd.detect_state in(31,35)
+      </if>
+      <if test="state != null and state == 3">
+        and cd.detect_state = 22
+      </if>
+      <if test="state != null and state == 4">
+        and cd.detect_state in(33,37)  and detect_placeorder = 1
+      </if>
+      <if test="state != null and state == 5">
+        and cd.detect_state = 20
+      </if>
+      <if test="state != null and state == 6">
+        and cd.detect_state in(32,36,21) and (cd.maintenance_results is NULL or cd.maintenance_results = 2)
+      </if>
+      <if test="maintenanceResults != null and maintenanceResults != ''">
+        and cd.maintenance_results = #{maintenanceResults}
+      </if>
+      <if test="detectIsWhetherLess != null and detectIsWhetherLess != ''">
+        and cd.detect_is_whetherLess  = #{detectIsWhetherLess}
+      </if>
     </where>
       GROUP BY cd.detect_id
       ORDER BY cd.detect_create_time DESC
@@ -386,8 +412,8 @@
       <if test="detectPlaceorder != null and detectPlaceorder != ''" >
         detect_placeorder = #{detectPlaceorder,jdbcType=INTEGER},
       </if>
-      <if test="detectSalesId != null and detectSalesId != ''" >
-        detect_sales_id = #{detectSalesId,jdbcType=INTEGER},
+      <if test="salesOrderId != null" >
+        sales_orderId = #{salesOrderId,jdbcType=INTEGER},
       </if>
       <if test="detectCompletionTime != null and detectCompletionTime != ''" >
         detect_completion_time = #{detectCompletionTime},
@@ -399,7 +425,10 @@
         renovation_completion_time = #{renovationCompletionTime},
       </if>
       <if test="scrapCompletionTime != null and scrapCompletionTime != ''" >
-        scrap_completion_time = #{scrapCompletionTime}
+        scrap_completion_time = #{scrapCompletionTime},
+      </if>
+      <if test="detectIsWhetherLess != null and detectIsWhetherLess != ''">
+        detect_is_whetherLess  = #{detectIsWhetherLess}
       </if>
     </set>
     where
@@ -438,7 +467,8 @@
     detect_is_refurbishing,
     maintenance_results,
     detect_number,
-    maintenance_cut_time
+    maintenance_cut_time,
+    detect_is_whetherLess
     )
     values
       (
@@ -471,7 +501,8 @@
       #{detectIsRefurbishing},
       #{maintenanceResults},
       #{detectNumber},
-      #{maintenanceCutTime}
+      #{maintenanceCutTime},
+      #{detectIsWhetherLess}
       )
   </insert>
 
@@ -627,10 +658,10 @@
       sum(CASE WHEN (detect_state = 1 AND cpt.proc_type_id = 3) then 1 else 0 end) AS beDetected,
       sum(CASE WHEN detect_state in(30,34,38) then 1 else 0 end) AS beConfirmed,
       sum(CASE WHEN detect_state in(32,33,36,37) then 1 else 0 end) AS completeProcessing,
-      sum(CASE WHEN (detect_state = 37 and detect_placeorder = 1) then 1 else 0 end) AS placeOrderNum,
+      sum(CASE WHEN (detect_state in(33,37) and detect_placeorder = 1) then 1 else 0 end) AS placeOrderNum,
       sum(CASE WHEN (detect_state in(32,36) and detect_placeorder = 1 AND maintenance_results = 1) then 1 else 0 end) AS detectplaceOrderNum,
-      sum(CASE WHEN (maintenance_cut_time &lt; now() AND cpt.proc_type_id = 3 and detect_placeorder = 1) then 1 else 0 end) AS maintenanceCutTimeNum,
-      sum(CASE WHEN (complete_cut_time &lt; now() AND cpt.proc_type_id = 3 and detect_placeorder = 1) then 1 else 0 end) AS completeCutTimeNum
+      sum(CASE WHEN (maintenance_cut_time &lt; now() AND cpt.proc_type_id = 3 and detect_placeorder = 1 and detect_state = 1) then 1 else 0 end) AS maintenanceCutTimeNum,
+      sum(CASE WHEN (complete_cut_time &lt; now() AND cpt.proc_type_id = 3 and detect_placeorder = 1 and detect_state in(32,36)) then 1 else 0 end) AS completeCutTimeNum
       FROM
       tb_rst_complaint_detect cd
       LEFT JOIN tb_rst_cm_customer_info ci ON ci.customer_id = cd.customer_id
@@ -716,11 +747,11 @@
         LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
         WHERE
             cd.customer_id = #{customerId}
-        AND detect_state in (32,36,37) AND maintenance_results = 1 AND detect_placeorder = 1
+        AND detect_state in (32,33,36,37)  AND detect_placeorder = 1
   </select>
 
 
-  <select id="listComplaintDetectBySalesId" resultType="ComplaintDetectInfo" parameterType="Integer" >
+  <select id="listComplaintDetectBySalesId" resultType="ComplaintDetectInfo" parameterType="String" >
     select
     cd.detect_id detectId,
     cd.product_id productId,
@@ -755,6 +786,18 @@
     cd.detect_number detectNumber,
     cd.complete_cut_time completeCutTime
     from tb_rst_complaint_detect cd
-    where  cd.detect_sales_id  = #{detectSalesId}
+    where  cd.sales_orderId  = #{detectSalesId}
+  </select>
+
+  <select id="getDetectCount" resultType="ComplaintAfterSalesNum" parameterType="Integer" >
+    SELECT
+    sum(CASE WHEN (detect_state = 1) then 1 else 0 end) AS beDetectedNum,
+    sum(CASE WHEN (detect_state in(31,35)) then 1 else 0 end) AS forMaintenanceNum,
+    sum(CASE WHEN (detect_state = 22) then 1 else 0 end) AS beScrappedNum,
+    sum(CASE WHEN (detect_state in(33,37) and detect_placeorder = 1 ) then 1 else 0 end) AS stayBackNum,
+    sum(CASE WHEN (detect_state = 20) then 1 else 0 end) AS beRefurbishedNum,
+    sum(CASE WHEN (detect_state in(32,36,21) and (maintenance_results is NULL or maintenance_results = 2)) then 1 else 0 end) AS forQCNum
+    FROM
+    tb_rst_complaint_detect
   </select>
 </mapper>

+ 6 - 8
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -117,12 +117,6 @@ public class AdminDetectController {
         if (totalNum != 0) {
             result.setTotal(totalNum);
         }
-        /*Calendar date = Calendar.getInstance();
-        for (ComplaintDetectInfo info : result.getDataList()){
-            date.setTime(info.getDetectCreateTime());
-            date.set(Calendar.DATE, date.get(Calendar.DATE) + 6);
-            info.setMaintenanceCutTime(date.getTime());
-        }*/
         //获取所有产品类型
         ProductType productType = new ProductType();
         List<ProductType> productTypeList = productService.listProductType(productType);
@@ -130,6 +124,10 @@ public class AdminDetectController {
         Product product = new Product();
         List<Product> productList = productService.listProductAndColorAndfittings(product);
         mv.addObject("productList",productList);
+        //查询各个状态数量
+        ComplaintAfterSalesNum complaintAfterSalesNum = complaintDetectInfoService.getDetectCount();
+        mv.addObject("complaintAfterSalesNum",complaintAfterSalesNum);
+
          StitchAttrUtil.getSa().setModelAndView(detect, mv, "/admin/detect/select_detect_list", result);
         return mv;
     }
@@ -291,8 +289,8 @@ 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());
+        if(detectinfo.getSalesOrderId() != null){
+            SalesOrder salesOrder = salesOrderService.getSalesOrderByOrderId(detectinfo.getSalesOrderId());
             mv.addObject("salesOrder",salesOrder);
         }
         DetectionItem detectionItem = new DetectionItem();

+ 1 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -802,6 +802,7 @@ public class AdminSalesOrderController {
         salesOrder.setSalesStatus(0);   //确认状态 未确认
         salesOrder.setSalesSendType(2); //2:物流发货
         salesOrder.setSalesCreateTime(new Date());
+        salesOrder.setSalesOrderId(dealCode);  //订单号
         salesOrder.setSalesDealCode(dealCode);  //交易号
         salesOrder.setSalesType(1); //订单类型  1:购买2:租赁
         salesOrder.setSalesOrderStatus(1);   //订单状态 订单状态:1:正常 2:换货 3:退货  4:维修  5:补发

+ 2 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java

@@ -111,7 +111,7 @@ public class AwaitSendController {
                 item.setItemOrderId(temp.getSalesId());
                 temp.setSalesOrderItemList(salesOrderService.listSalesOrderItem(item));
                 //查询封装维修编号
-                List<ComplaintDetectInfo> listDetect  = complaintDetectInfoService.listComplaintDetectBySalesId(temp.getSalesId());
+                List<ComplaintDetectInfo> listDetect  = complaintDetectInfoService.listComplaintDetectBySalesId(temp.getSalesOrderId());
                 temp.setComplaintDetectInfoList(listDetect);
             }
         }
@@ -236,7 +236,7 @@ public class AwaitSendController {
         SalesOrder salesOrderInfo = salesOrderService.getSalesOrderById(salesId);
         if(salesOrderInfo != null){
             //查询封装售后维修编号
-            List<ComplaintDetectInfo> listDetect  = complaintDetectInfoService.listComplaintDetectBySalesId(salesId);
+            List<ComplaintDetectInfo> listDetect  = complaintDetectInfoService.listComplaintDetectBySalesId(salesOrderInfo.getSalesOrderId());
             salesOrderInfo.setComplaintDetectInfoList(listDetect);
         }
 

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

@@ -252,7 +252,7 @@
                                 <#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>

+ 149 - 69
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl

@@ -2935,77 +2935,157 @@
         }
         var detectCustomerDesc = $("#detectCustomerDesc").val();
         var detectId = $("#detectId").val();
-        $.ajax({
-            cache: true,
-            type: "POST",
-            data: {"detectProcessingResults" : detectProcessingResults,
-                "detectCustomerDesc" : detectCustomerDesc,
-                "procMethodId" : procMethodId,
-                "detectId" : detectId,
-                "customerId" : ${customerId},
-                "detectState" : detectState},
-            url: "${path}/admin/detect/customer_confirm",
-            async: false,
-            success: function(data){
-                if (data.returnCode == 200) {
-                    layer.msg("操作成功!",{icon: 1,time:1000});
-                    var detectInfo = data.returnMsg.detectInfo;
-                    var detectStateName;
-                    switch (detectInfo.detectState){
-                        case 1:
-                            detectStateName = "待检测机器";
-                            break
-                        case 30:
-                            detectStateName = "待用户确认";
-                            break
-                        case 31:
-                            detectStateName = "用户同意维修(待维修)";
-                            break
-                        case 32:
-                            detectStateName = "维修完成";
-                            break
-                        case 33:
-                            detectStateName = "用户不维修(原机退回)";
-                            break
-                        case 34:
-                            detectStateName = "待客服确认维修";
-                            break
-                        case 35:
-                            detectStateName = "客服确认维修,(待维修)";
-                            break
-                        case 36:
-                            detectStateName = "维修完成";
-                            break
-                        case 37:
-                            detectStateName = "机器无故障,原机退回";
-                            break
-                        case 38:
-                            detectStateName = "机器故障,待用户确认";
-                            break
-                        case 20:
-                            detectStateName = "待翻新入库";
-                            break
-                        case 21:
-                            detectStateName = "已翻新入库";
-                            break
-                        case 22:
-                            detectStateName = "不能翻新,待报废";
-                            break
-                        case 23:
-                            detectStateName = "已报废回收";
-                            break
+        if(procMethodId != null){
+            layer.confirm('请确认是否已经正确选择客诉的处理方式', {
+                btn: ['确定','取消'] //按钮
+            }, function(){
+                $.ajax({
+                    cache: true,
+                    type: "POST",
+                    data: {"detectProcessingResults" : detectProcessingResults,
+                        "detectCustomerDesc" : detectCustomerDesc,
+                        "procMethodId" : procMethodId,
+                        "detectId" : detectId,
+                        "customerId" : ${customerId},
+                        "detectState" : detectState},
+                    url: "${path}/admin/detect/customer_confirm",
+                    async: false,
+                    success: function(data){
+                        if (data.returnCode == 200) {
+                            layer.msg("操作成功!",{icon: 1,time:1000});
+                            var detectInfo = data.returnMsg.detectInfo;
+                            var detectStateName;
+                            switch (detectInfo.detectState){
+                                case 1:
+                                    detectStateName = "待检测机器";
+                                    break
+                                case 30:
+                                    detectStateName = "待用户确认";
+                                    break
+                                case 31:
+                                    detectStateName = "用户同意维修(待维修)";
+                                    break
+                                case 32:
+                                    detectStateName = "维修完成";
+                                    break
+                                case 33:
+                                    detectStateName = "用户不维修(原机退回)";
+                                    break
+                                case 34:
+                                    detectStateName = "待客服确认维修";
+                                    break
+                                case 35:
+                                    detectStateName = "客服确认维修,(待维修)";
+                                    break
+                                case 36:
+                                    detectStateName = "维修完成";
+                                    break
+                                case 37:
+                                    detectStateName = "机器无故障,原机退回";
+                                    break
+                                case 38:
+                                    detectStateName = "机器故障,待用户确认";
+                                    break
+                                case 20:
+                                    detectStateName = "待翻新入库";
+                                    break
+                                case 21:
+                                    detectStateName = "已翻新入库";
+                                    break
+                                case 22:
+                                    detectStateName = "不能翻新,待报废";
+                                    break
+                                case 23:
+                                    detectStateName = "已报废回收";
+                                    break
+                            }
+                            /*alert(detectStateName);*/
+                            $("#detectState"+detectInfo.detectId).html(detectStateName);
+                            $("#updateDetect").hide();
+                        } else {
+                            layer.msg("操作失败!",{icon: 5,time:1000});
+                        }
+                    },
+                    error: function(XmlHttpRequest, textStatus, errorThrown){
+                        window.parent.admin_result("操作失败!",5);
                     }
-                    /*alert(detectStateName);*/
-                    $("#detectState"+detectInfo.detectId).html(detectStateName);
-                    $("#updateDetect").hide();
-                } else {
-                    layer.msg("操作失败!",{icon: 5,time:1000});
+                })
+            }, function(){
+
+            });
+        }else{
+            $.ajax({
+                cache: true,
+                type: "POST",
+                data: {"detectProcessingResults" : detectProcessingResults,
+                    "detectCustomerDesc" : detectCustomerDesc,
+                    "procMethodId" : procMethodId,
+                    "detectId" : detectId,
+                    "customerId" : ${customerId},
+                    "detectState" : detectState},
+                url: "${path}/admin/detect/customer_confirm",
+                async: false,
+                success: function(data){
+                    if (data.returnCode == 200) {
+                        layer.msg("操作成功!",{icon: 1,time:1000});
+                        var detectInfo = data.returnMsg.detectInfo;
+                        var detectStateName;
+                        switch (detectInfo.detectState){
+                            case 1:
+                                detectStateName = "待检测机器";
+                                break
+                            case 30:
+                                detectStateName = "待用户确认";
+                                break
+                            case 31:
+                                detectStateName = "用户同意维修(待维修)";
+                                break
+                            case 32:
+                                detectStateName = "维修完成";
+                                break
+                            case 33:
+                                detectStateName = "用户不维修(原机退回)";
+                                break
+                            case 34:
+                                detectStateName = "待客服确认维修";
+                                break
+                            case 35:
+                                detectStateName = "客服确认维修,(待维修)";
+                                break
+                            case 36:
+                                detectStateName = "维修完成";
+                                break
+                            case 37:
+                                detectStateName = "机器无故障,原机退回";
+                                break
+                            case 38:
+                                detectStateName = "机器故障,待用户确认";
+                                break
+                            case 20:
+                                detectStateName = "待翻新入库";
+                                break
+                            case 21:
+                                detectStateName = "已翻新入库";
+                                break
+                            case 22:
+                                detectStateName = "不能翻新,待报废";
+                                break
+                            case 23:
+                                detectStateName = "已报废回收";
+                                break
+                        }
+                        /*alert(detectStateName);*/
+                        $("#detectState"+detectInfo.detectId).html(detectStateName);
+                        $("#updateDetect").hide();
+                    } else {
+                        layer.msg("操作失败!",{icon: 5,time:1000});
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                    window.parent.admin_result("操作失败!",5);
                 }
-            },
-            error: function(XmlHttpRequest, textStatus, errorThrown){
-                window.parent.admin_result("操作失败!",5);
-            }
-        })
+            })
+        }
     }
 
     $("#tel-001").click(function (){

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 14 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl