Browse Source

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

wangxiaoming 7 years ago
parent
commit
2872177c69
54 changed files with 3201 additions and 643 deletions
  1. 46 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/AwaitingSignclosedProductInfo.java
  2. 22 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/BackGoods.java
  3. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ClosedFitting.java
  4. 20 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ClosedProdcue.java
  5. 42 4
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintSignclosedInfo.java
  6. 130 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Repair.java
  7. 20 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SendFitting.java
  8. 20 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SendProdcue.java
  9. 47 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SignclosedProductInfo.java
  10. 9 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/AwaitingSignclosedProductInfoService.java
  11. 17 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/BackGoodsService.java
  12. 17 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedInfoService.java
  13. 8 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedProductInfoService.java
  14. 8 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerService.java
  15. 7 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/RenewedService.java
  16. 23 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/RepairService.java
  17. 8 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/AwaitingSignclosedProductInfoServiceImpl.java
  18. 23 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/BackGoodsServiceImpl.java
  19. 21 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedInfoServiceImpl.java
  20. 7 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedProductInfoServiceImpl.java
  21. 46 5
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
  22. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/RenewedServiceImpl.java
  23. 28 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/RepairServiceImpl.java
  24. 10 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/AwaitingSignclosedProductMapper.java
  25. 6 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/BackGoodsMapper.java
  26. 9 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ClosedFittingMapper.java
  27. 9 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ClosedProdcueMapper.java
  28. 16 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedInfoMapper.java
  29. 10 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedProductInfoMapper.java
  30. 6 5
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/RenewedMapper.java
  31. 14 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/RepairMapper.java
  32. 26 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/awaitingSignclosedProductMapper.xml
  33. 11 21
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/backGoodsMapper.xml
  34. 19 49
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/closedFittingMapper.xml
  35. 17 37
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/closedProdcueMapper.xml
  36. 134 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSignclosedInfoMapper.xml
  37. 27 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSignclosedProductInfoMapper.xml
  38. 31 235
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/renewedMapper.xml
  39. 67 204
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/repairMapper.xml
  40. 165 10
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  41. 139 7
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  42. 125 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java
  43. 51 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/kuaidi/LogisticsController.java
  44. 206 0
      watero-rst-web/src/main/java/com/iamberry/rst/utils/KuaiDi100.java
  45. 68 0
      watero-rst-web/src/main/java/com/iamberry/rst/utils/ResultMsg.java
  46. 531 43
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl
  47. 7 3
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_remark.ftl
  48. 6 6
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_complete.ftl
  49. 17 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  50. 201 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl
  51. 113 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/view_progress.ftl
  52. 288 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/logistics/view_logistics.ftl
  53. 228 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl
  54. 60 0
      watero-rst-web/src/main/webapp/common/js/common/common.js

+ 46 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/AwaitingSignclosedProductInfo.java

@@ -17,6 +17,12 @@ public class AwaitingSignclosedProductInfo implements Serializable {
     private Integer productNum;//产品数量
     private Date signclosedCreateTime;//创建时间
     private Date signclosedUpdateTime;//修改时间
+    private Integer signclosedProductType;//1 产品  2配件
+    private Integer signclosedProductId;//关联产品id  (根据产品类型判断)
+    private Integer signclosedProductColor;//关联产品颜色id
+
+    private String colorName;//颜色名称
+    private String productNumber;//产品型号
 
     public Integer getProductId() {
         return productId;
@@ -65,4 +71,44 @@ public class AwaitingSignclosedProductInfo implements Serializable {
     public void setSignclosedUpdateTime(Date signclosedUpdateTime) {
         this.signclosedUpdateTime = signclosedUpdateTime;
     }
+
+    public Integer getSignclosedProductType() {
+        return signclosedProductType;
+    }
+
+    public void setSignclosedProductType(Integer signclosedProductType) {
+        this.signclosedProductType = signclosedProductType;
+    }
+
+    public Integer getSignclosedProductId() {
+        return signclosedProductId;
+    }
+
+    public void setSignclosedProductId(Integer signclosedProductId) {
+        this.signclosedProductId = signclosedProductId;
+    }
+
+    public Integer getSignclosedProductColor() {
+        return signclosedProductColor;
+    }
+
+    public void setSignclosedProductColor(Integer signclosedProductColor) {
+        this.signclosedProductColor = signclosedProductColor;
+    }
+
+    public String getColorName() {
+        return colorName;
+    }
+
+    public void setColorName(String colorName) {
+        this.colorName = colorName;
+    }
+
+    public String getProductNumber() {
+        return productNumber;
+    }
+
+    public void setProductNumber(String productNumber) {
+        this.productNumber = productNumber;
+    }
 }

+ 22 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/BackGoods.java

@@ -1,7 +1,9 @@
 package com.iamberry.rst.core.cm;
 
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 
 public class BackGoods  implements Serializable {
     private static final long serialVersionUID = -6844954322262497132L;
@@ -39,6 +41,26 @@ public class BackGoods  implements Serializable {
 
     private Date backGoodsUpdateTime;
 
+    private List<ClosedFitting> closedFittings = new ArrayList<ClosedFitting>();//寄回配件集合
+
+    private List<ClosedProdcue> closedProdcues = new ArrayList<ClosedProdcue>();//机会产品集合
+
+    public List<ClosedFitting> getClosedFittings() {
+        return closedFittings;
+    }
+
+    public void setClosedFittings(List<ClosedFitting> closedFittings) {
+        this.closedFittings = closedFittings;
+    }
+
+    public List<ClosedProdcue> getClosedProdcues() {
+        return closedProdcues;
+    }
+
+    public void setClosedProdcues(List<ClosedProdcue> closedProdcues) {
+        this.closedProdcues = closedProdcues;
+    }
+
     public Integer getBackGoodsBackStatus() {
         return backGoodsBackStatus;
     }

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ClosedFitting.java

@@ -14,8 +14,18 @@ public class ClosedFitting  implements Serializable {
 
     private Integer closedFittingNumber;
 
+    private Integer closedFittingType;  //售后类型  3:换新;4:维修;5:补发;6:退货;7:无理由退货
+
     private String fittingName;     //配件名称
 
+    public Integer getClosedFittingType() {
+        return closedFittingType;
+    }
+
+    public void setClosedFittingType(Integer closedFittingType) {
+        this.closedFittingType = closedFittingType;
+    }
+
     public String getFittingName() {
         return fittingName;
     }

+ 20 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ClosedProdcue.java

@@ -14,6 +14,26 @@ public class ClosedProdcue  implements Serializable {
 
     private Integer closedProdcueNumber;
 
+    private Integer closedProdcueType;  //售后类型  3:换新;4:维修;5:补发;6:退货;7:无理由退货
+
+    private String closedProductName; //产品名称
+
+    public String getClosedProductName() {
+        return closedProductName;
+    }
+
+    public void setClosedProductName(String closedProductName) {
+        this.closedProductName = closedProductName;
+    }
+
+    public Integer getClosedProdcueType() {
+        return closedProdcueType;
+    }
+
+    public void setClosedProdcueType(Integer closedProdcueType) {
+        this.closedProdcueType = closedProdcueType;
+    }
+
     public Integer getClosedProdcueId() {
         return closedProdcueId;
     }

+ 42 - 4
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintSignclosedInfo.java

@@ -1,7 +1,9 @@
 package com.iamberry.rst.core.cm;
 
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 1.1.57	客诉-签收表
@@ -23,10 +25,10 @@ public class ComplaintSignclosedInfo implements Serializable {
     private Integer signclosedAddrCity;//寄件地址(市)
     private Integer signclosedIsFittings;//是否少配件
     private Date signclosedDate;//签收时间
-    private Integer signclosedIsQuality;//是否品检
-    private Integer signclosedIsInto;//是否已转入品检
-    private Integer signclosedState;//处理状态
-    private Integer signclosedObjectsState;//物件状态
+    private Integer signclosedIsQuality;//是否品检   1 需要品检 2不需要品检
+    private Integer signclosedIsInto;//是否已转入品检    1 已转入品检2未转入品检
+    private Integer signclosedState;//处理状态      1已签收2未签收
+    private Integer signclosedObjectsState;//物件状态 1正常签收2物件不对
     private Integer signclosedCustomerId;//客诉id
     private Integer signclosedUrgedNum;//qc催促次数
     private String oldEfastId;//原有Efast订单id
@@ -36,6 +38,10 @@ public class ComplaintSignclosedInfo implements Serializable {
     private Date signclosedCreateTime;//创建时间
     private Date signclosedUpdateTime;//修改时间
 
+    private List<AwaitingSignclosedProductInfo> awaitingSignclosedProductInfoList = new ArrayList<AwaitingSignclosedProductInfo>();	//待签收实体类
+    private List<SignclosedProductInfo> signclosedProductInfoList = new ArrayList<SignclosedProductInfo>();	//签收实体类
+    private String provincesName;//寄件地址(省)
+    private String cityName;//寄件地址(市)
     public Integer getSignclosedId() {
         return signclosedId;
     }
@@ -227,4 +233,36 @@ public class ComplaintSignclosedInfo implements Serializable {
     public void setSignclosedUpdateTime(Date signclosedUpdateTime) {
         this.signclosedUpdateTime = signclosedUpdateTime;
     }
+
+    public List<AwaitingSignclosedProductInfo> getAwaitingSignclosedProductInfoList() {
+        return awaitingSignclosedProductInfoList;
+    }
+
+    public void setAwaitingSignclosedProductInfoList(List<AwaitingSignclosedProductInfo> awaitingSignclosedProductInfoList) {
+        this.awaitingSignclosedProductInfoList = awaitingSignclosedProductInfoList;
+    }
+
+    public List<SignclosedProductInfo> getSignclosedProductInfoList() {
+        return signclosedProductInfoList;
+    }
+
+    public void setSignclosedProductInfoList(List<SignclosedProductInfo> signclosedProductInfoList) {
+        this.signclosedProductInfoList = signclosedProductInfoList;
+    }
+
+    public String getProvincesName() {
+        return provincesName;
+    }
+
+    public void setProvincesName(String provincesName) {
+        this.provincesName = provincesName;
+    }
+
+    public String getCityName() {
+        return cityName;
+    }
+
+    public void setCityName(String cityName) {
+        this.cityName = cityName;
+    }
 }

+ 130 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/Repair.java

@@ -1,12 +1,14 @@
 package com.iamberry.rst.core.cm;
 
 import java.io.Serializable;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 售后维修表
  */
-public class Repair  implements Serializable {
+public class Repair implements Serializable {
 
     private static final long serialVersionUID = 6499911867888249040L;
 
@@ -67,6 +69,133 @@ public class Repair  implements Serializable {
     //  修改时间 ,
     private Date repairUpdateTime;
 
+    private String detectPhenomenon;            //工厂检测现象
+    private String detectFailureClassification; //故障分类
+    private String detectFailureCause;          //故障原因
+    private String detectResults;               //判定结果
+    private String detectPoint;                 //故障指向
+    private String detectAnalysis;              //原因分析
+    private Integer detectRevolutionProduced;   //是否转入生产部门
+    private Integer maintenanceIdRepair;        //是否可返修
+    private String maintenanceContent;          //返修内容
+    private Date maintenanceContentDate;        //返修日期
+    private Integer closedProdcueNumber;        //寄回产品数量
+    private String productName;                 //产品名称
+    private Integer detectState;                //品质检测状态
+    private List<ClosedFitting> closedFittings = new ArrayList<ClosedFitting>();//寄回配件集合
+
+    public List<ClosedFitting> getClosedFittings() {
+        return closedFittings;
+    }
+
+    public void setClosedFittings(List<ClosedFitting> closedFittings) {
+        this.closedFittings = closedFittings;
+    }
+
+    public String getDetectPhenomenon() {
+        return detectPhenomenon;
+    }
+
+    public void setDetectPhenomenon(String detectPhenomenon) {
+        this.detectPhenomenon = detectPhenomenon;
+    }
+
+    public String getDetectFailureClassification() {
+        return detectFailureClassification;
+    }
+
+    public void setDetectFailureClassification(String detectFailureClassification) {
+        this.detectFailureClassification = detectFailureClassification;
+    }
+
+    public String getDetectFailureCause() {
+        return detectFailureCause;
+    }
+
+    public void setDetectFailureCause(String detectFailureCause) {
+        this.detectFailureCause = detectFailureCause;
+    }
+
+    public String getDetectResults() {
+        return detectResults;
+    }
+
+    public void setDetectResults(String detectResults) {
+        this.detectResults = detectResults;
+    }
+
+    public String getDetectPoint() {
+        return detectPoint;
+    }
+
+    public void setDetectPoint(String detectPoint) {
+        this.detectPoint = detectPoint;
+    }
+
+    public String getDetectAnalysis() {
+        return detectAnalysis;
+    }
+
+    public void setDetectAnalysis(String detectAnalysis) {
+        this.detectAnalysis = detectAnalysis;
+    }
+
+    public Integer getDetectRevolutionProduced() {
+        return detectRevolutionProduced;
+    }
+
+    public void setDetectRevolutionProduced(Integer detectRevolutionProduced) {
+        this.detectRevolutionProduced = detectRevolutionProduced;
+    }
+
+    public Integer getMaintenanceIdRepair() {
+        return maintenanceIdRepair;
+    }
+
+    public void setMaintenanceIdRepair(Integer maintenanceIdRepair) {
+        this.maintenanceIdRepair = maintenanceIdRepair;
+    }
+
+    public String getMaintenanceContent() {
+        return maintenanceContent;
+    }
+
+    public void setMaintenanceContent(String maintenanceContent) {
+        this.maintenanceContent = maintenanceContent;
+    }
+
+    public Date getMaintenanceContentDate() {
+        return maintenanceContentDate;
+    }
+
+    public void setMaintenanceContentDate(Date maintenanceContentDate) {
+        this.maintenanceContentDate = maintenanceContentDate;
+    }
+
+    public Integer getClosedProdcueNumber() {
+        return closedProdcueNumber;
+    }
+
+    public void setClosedProdcueNumber(Integer closedProdcueNumber) {
+        this.closedProdcueNumber = closedProdcueNumber;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public Integer getDetectState() {
+        return detectState;
+    }
+
+    public void setDetectState(Integer detectState) {
+        this.detectState = detectState;
+    }
+
     public Integer getRepairId() {
         return repairId;
     }

+ 20 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SendFitting.java

@@ -14,6 +14,26 @@ public class SendFitting  implements Serializable {
 
     private Integer sendFittingNumber;
 
+    private Integer sendFittingType;    //售后类型  3:换新;4:维修;5:补发;6:退货;7:无理由退货
+
+    private String sendProductName; //产品名称
+
+    public String getSendProductName() {
+        return sendProductName;
+    }
+
+    public void setSendProductName(String sendProductName) {
+        this.sendProductName = sendProductName;
+    }
+
+    public Integer getSendFittingType() {
+        return sendFittingType;
+    }
+
+    public void setSendFittingType(Integer sendFittingType) {
+        this.sendFittingType = sendFittingType;
+    }
+
     public Integer getSendFittingId() {
         return sendFittingId;
     }

+ 20 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SendProdcue.java

@@ -15,6 +15,26 @@ public class SendProdcue  implements Serializable {
 
     private Integer sendProdcueNumber;
 
+    private Integer sendProduceType;    //售后类型  3:换新;4:维修;5:补发;6:退货;7:无理由退货
+
+    private String sendProduceName; //产品名称
+
+    public String getSendProduceName() {
+        return sendProduceName;
+    }
+
+    public void setSendProduceName(String sendProduceName) {
+        this.sendProduceName = sendProduceName;
+    }
+
+    public Integer getSendProduceType() {
+        return sendProduceType;
+    }
+
+    public void setSendProduceType(Integer sendProduceType) {
+        this.sendProduceType = sendProduceType;
+    }
+
     public Integer getSendProdcueId() {
         return sendProdcueId;
     }

+ 47 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SignclosedProductInfo.java

@@ -17,6 +17,13 @@ public class SignclosedProductInfo implements Serializable {
     private Integer productNum;//产品数量
     private Date signclosedCreateTime;//创建时间
     private Date signclosedUpdateTime;//修改时间
+    private Integer signclosedProductType;//1 产品  2配件
+    private Integer signclosedProductId;//关联产品id  (根据产品类型判断)
+    private Integer signclosedProductColor;//关联产品颜色id
+
+
+    private String colorName;//颜色名称
+    private String productNumber;//产品型号
 
     public Integer getProductId() {
         return productId;
@@ -65,4 +72,44 @@ public class SignclosedProductInfo implements Serializable {
     public void setSignclosedUpdateTime(Date signclosedUpdateTime) {
         this.signclosedUpdateTime = signclosedUpdateTime;
     }
+
+    public Integer getSignclosedProductType() {
+        return signclosedProductType;
+    }
+
+    public void setSignclosedProductType(Integer signclosedProductType) {
+        this.signclosedProductType = signclosedProductType;
+    }
+
+    public Integer getSignclosedProductId() {
+        return signclosedProductId;
+    }
+
+    public void setSignclosedProductId(Integer signclosedProductId) {
+        this.signclosedProductId = signclosedProductId;
+    }
+
+    public Integer getSignclosedProductColor() {
+        return signclosedProductColor;
+    }
+
+    public void setSignclosedProductColor(Integer signclosedProductColor) {
+        this.signclosedProductColor = signclosedProductColor;
+    }
+
+    public String getColorName() {
+        return colorName;
+    }
+
+    public void setColorName(String colorName) {
+        this.colorName = colorName;
+    }
+
+    public String getProductNumber() {
+        return productNumber;
+    }
+
+    public void setProductNumber(String productNumber) {
+        this.productNumber = productNumber;
+    }
 }

+ 9 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/AwaitingSignclosedProductInfoService.java

@@ -1,6 +1,9 @@
 package com.iamberry.rst.faces.cm;
 
 import com.iamberry.rst.core.cm.AwaitingSignclosedProductInfo;
+import com.iamberry.rst.core.cm.SignclosedProductInfo;
+
+import java.util.List;
 
 /**
  * 客诉-待签收产品service
@@ -15,6 +18,12 @@ public interface AwaitingSignclosedProductInfoService {
      * 获取单个待签收产品
      */
     AwaitingSignclosedProductInfo getByPrimaryId(Integer productId);
+
+    /**
+     * 查询多个签收产品记录
+     * @return
+     */
+    List<AwaitingSignclosedProductInfo> listByPrimaryId(Integer signclosedId);
     /**
      * 修改单个待签收产品
      * @return

+ 17 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/BackGoodsService.java

@@ -0,0 +1,17 @@
+package com.iamberry.rst.faces.cm;
+
+import com.iamberry.rst.core.cm.BackGoods;
+
+/**
+ * 退货service
+ * Created by liuzhiwei on 2017/11/8.
+ */
+public interface BackGoodsService {
+
+    /**
+     * 修改售后退货信息
+     * @param record
+     * @return
+     */
+    Integer updateBackGoods(BackGoods record);
+}

+ 17 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedInfoService.java

@@ -1,6 +1,11 @@
 package com.iamberry.rst.faces.cm;
 
+import com.iamberry.rst.core.cm.ComplaintDetectInfo;
 import com.iamberry.rst.core.cm.ComplaintSignclosedInfo;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+
+import java.util.List;
 
 /**
  * 客诉-签收表Service
@@ -21,4 +26,16 @@ public interface ComplaintSignclosedInfoService {
      * @return
      */
     int updateSignclosedById(ComplaintSignclosedInfo record);
+
+    /**
+     * 增加催促次数
+     * @return
+     */
+    int updateUrgedNumById(ComplaintSignclosedInfo complaintSignclosedInfo);
+
+    /**
+     * 查询多个签收记录
+     * @return
+     */
+    PagedResult<ComplaintSignclosedInfo> listSignclosed(PageRequest<ComplaintSignclosedInfo> pageRequest);
 }

+ 8 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedProductInfoService.java

@@ -2,6 +2,8 @@ package com.iamberry.rst.faces.cm;
 
 import com.iamberry.rst.core.cm.SignclosedProductInfo;
 
+import java.util.List;
+
 /**
  * 客诉-签收产品表Service
  */
@@ -16,6 +18,12 @@ public interface ComplaintSignclosedProductInfoService {
      * @return
      */
     SignclosedProductInfo getSignclosedById(Integer productId);
+
+    /**
+     * 查询多个签收产品记录
+     * @return
+     */
+    List<SignclosedProductInfo> listSignclosedById(Integer signclosedId);
     /**
      * 修改单个签收产品记录
      * @return

+ 8 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerService.java

@@ -1,5 +1,6 @@
 package com.iamberry.rst.faces.cm;
 
+import com.iamberry.rst.core.cm.BackGoods;
 import com.iamberry.rst.core.cm.CustomerInfo;
 import com.iamberry.rst.core.page.PagedResult;
 
@@ -30,4 +31,11 @@ public interface CustomerService {
      * @return
      */
     PagedResult<CustomerInfo> listCustomer(int pageNO, int pageSize, CustomerInfo customerInfo, boolean isTotalNum);
+
+    /**
+     * 获取售后退货信息
+     * @param backGoods
+     * @return
+     */
+    BackGoods getBackGoods(BackGoods backGoods);
 }

+ 7 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/RenewedService.java

@@ -24,4 +24,11 @@ public interface RenewedService {
      * @return
      */
     List<ClosedFitting> listClosedFitting(ClosedFitting closedFitting);
+
+    /**
+     * 修改换新信息
+     * @param record
+     * @return
+     */
+    Integer updateRenewedInfo(Renewed record);
 }

+ 23 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/RepairService.java

@@ -0,0 +1,23 @@
+package com.iamberry.rst.faces.cm;
+
+import com.iamberry.rst.core.cm.Repair;
+
+/**
+ * 维修Service
+ * Created by liuzhiwei on 2017/11/8.
+ */
+public interface RepairService {
+    /**
+     * 获取维修详情和品质检测信息
+     * @param repair
+     * @return
+     */
+    Repair getRepairInfo(Repair repair);
+
+    /**
+     * 修改维修信息
+     * @param repair
+     * @return
+     */
+    Integer updateRepairInfo(Repair repair);
+}

+ 8 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/AwaitingSignclosedProductInfoServiceImpl.java

@@ -6,6 +6,9 @@ import com.iamberry.rst.faces.cm.AwaitingSignclosedProductInfoService;
 import com.iamberry.rst.service.cm.mapper.AwaitingSignclosedProductMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
+import java.util.List;
+
 @Service
 public class AwaitingSignclosedProductInfoServiceImpl implements AwaitingSignclosedProductInfoService {
     @Autowired
@@ -21,6 +24,11 @@ public class AwaitingSignclosedProductInfoServiceImpl implements AwaitingSignclo
     }
 
     @Override
+    public List<AwaitingSignclosedProductInfo> listByPrimaryId(Integer signclosedId) {
+        return awaitingSignclosedProductMapper.listByPrimaryId(signclosedId);
+    }
+
+    @Override
     public int updateById(AwaitingSignclosedProductInfo record) {
         return awaitingSignclosedProductMapper.updateById(record);
     }

+ 23 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/BackGoodsServiceImpl.java

@@ -0,0 +1,23 @@
+package com.iamberry.rst.service.cm;
+
+import com.iamberry.rst.core.cm.BackGoods;
+import com.iamberry.rst.faces.cm.BackGoodsService;
+import com.iamberry.rst.service.cm.mapper.BackGoodsMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 退货service
+ * Created by liuzhiwei on 2017/11/8.
+ */
+@Service
+public class BackGoodsServiceImpl implements BackGoodsService {
+
+    @Autowired
+    private BackGoodsMapper backGoodsMapper;
+
+    @Override
+    public Integer updateBackGoods(BackGoods record) {
+        return backGoodsMapper.updateBackGoods(record);
+    }
+}

+ 21 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedInfoServiceImpl.java

@@ -1,15 +1,22 @@
 package com.iamberry.rst.service.cm;
 
 
+import com.github.pagehelper.PageHelper;
+import com.iamberry.rst.core.cm.ComplaintDetectInfo;
 import com.iamberry.rst.core.cm.ComplaintQuestionInfo;
 import com.iamberry.rst.core.cm.ComplaintSignclosedInfo;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.cm.ComplaintQuestionInfoService;
 import com.iamberry.rst.faces.cm.ComplaintSignclosedInfoService;
 import com.iamberry.rst.service.cm.mapper.ComplaintQuestionInfoMapper;
 import com.iamberry.rst.service.cm.mapper.ComplaintSignclosedInfoMapper;
+import com.iamberry.rst.util.PageUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedInfoService {
     @Autowired
@@ -30,4 +37,18 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
     public int updateSignclosedById(ComplaintSignclosedInfo record) {
         return complaintSignclosedInfoMapper.updateSignclosedById(record);
     }
+
+    @Override
+    public int updateUrgedNumById(ComplaintSignclosedInfo complaintSignclosedInfo) {
+        return complaintSignclosedInfoMapper.updateUrgedNumById(complaintSignclosedInfo);
+    }
+
+    @Override
+    public PagedResult<ComplaintSignclosedInfo> listSignclosed(PageRequest<ComplaintSignclosedInfo> pageRequest) {
+        PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());
+        List<ComplaintSignclosedInfo> signclosedList = complaintSignclosedInfoMapper.listSignclosed(pageRequest.getData());
+        return PageUtil.getPage(signclosedList);
+
+    }
+
 }

+ 7 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedProductInfoServiceImpl.java

@@ -10,6 +10,8 @@ import com.iamberry.rst.service.cm.mapper.ComplaintSignclosedProductInfoMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class ComplaintSignclosedProductInfoServiceImpl implements ComplaintSignclosedProductInfoService {
     @Autowired
@@ -27,6 +29,11 @@ public class ComplaintSignclosedProductInfoServiceImpl implements ComplaintSignc
     }
 
     @Override
+    public List<SignclosedProductInfo> listSignclosedById(Integer signclosedId) {
+        return complaintSignclosedProductInfoMapper.listSignclosedById(signclosedId);
+    }
+
+    @Override
     public int updateSignclosedById(SignclosedProductInfo record) {
         return complaintSignclosedProductInfoMapper.updateSignclosedById(record);
     }

+ 46 - 5
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -27,6 +27,10 @@ public class CustomerServiceImpl implements CustomerService {
     private ReissueMapper reissueMapper;
     @Autowired
     private RenewedMapper renewedMapper;
+    @Autowired
+    private ClosedFittingMapper closedFittingMapper;
+    @Autowired
+    private ClosedProdcueMapper closedProdcueMapper;
 
     @Override
     public CustomerInfo getCustomerInfo(Integer customerId) {
@@ -44,15 +48,25 @@ public class CustomerServiceImpl implements CustomerService {
         //查询客诉列表
         List<CustomerInfo> customerList = customerInfoMapper.listCustomer(customerInfo);
         //查询售后维修集合
-        List<Repair> repairList = repairMapper.listRepair(new Repair());
+        Repair repairInfo = new Repair();
+        repairInfo.setRepairState(1);
+        List<Repair> repairList = repairMapper.listRepair(repairInfo);
         //查询售后退货集合
-        List<BackGoods> backGoodsList = backGoodsMapper.listBackGoods(new BackGoods());
+        BackGoods backGoodsInfo = new BackGoods();
+        backGoodsInfo.setBackGoodsState(1);
+        List<BackGoods> backGoodsList = backGoodsMapper.listBackGoods(backGoodsInfo);
         //查询售后无理由退货集合
-        List<NoreasonBack> noreasonBackList = noreasonBackMapper.listNoreasonBack(new NoreasonBack());
+        NoreasonBack noreasonBackInfo = new NoreasonBack();
+        noreasonBackInfo.setNoreasonBackState(1);
+        List<NoreasonBack> noreasonBackList = noreasonBackMapper.listNoreasonBack(noreasonBackInfo);
         //查询售后补发集合
-        List<Reissue> reissueList = reissueMapper.listReissue(new Reissue());
+        Reissue reissueInfo = new Reissue();
+        reissueInfo.setReissueState(1);
+        List<Reissue> reissueList = reissueMapper.listReissue(reissueInfo);
         //查询售后换新集合
-        List<Renewed> renewedList = renewedMapper.listRenewed(new Renewed());
+        Renewed renewedInfo = new Renewed();
+        renewedInfo.setRenewedState(1);
+        List<Renewed> renewedList = renewedMapper.listRenewed(renewedInfo);
 
         if (customerList != null && customerList.size() > 0) {
             for (CustomerInfo customer : customerList) {
@@ -104,4 +118,31 @@ public class CustomerServiceImpl implements CustomerService {
         }
         return PageUtil.getPage(customerList);
     }
+
+    @Override
+    public BackGoods getBackGoods(BackGoods backGoods) {
+        //获取退货集合
+        List<BackGoods> backList = backGoodsMapper.listBackGoods(backGoods);
+        if (backList == null || backList.size() == 0) {
+            return null;
+        }
+        BackGoods goods = backList.get(0);
+        ClosedProdcue closedProdcue = new ClosedProdcue();
+        closedProdcue.setRelationId(goods.getBackGoodsId());
+        closedProdcue.setClosedProdcueType(6);
+        //查询寄回产品集合
+        List<ClosedProdcue> prodcueList = closedProdcueMapper.listclosedProdcue(closedProdcue);
+        ClosedFitting fitting = new ClosedFitting();
+        fitting.setRelationId(goods.getBackGoodsId());
+        fitting.setClosedFittingType(6);
+        //查询寄回配件集合
+        List<ClosedFitting> fittingList = closedFittingMapper.listClosedFitting(fitting);
+        if (prodcueList != null && prodcueList.size() > 0) {
+            goods.setClosedProdcues(prodcueList);
+        }
+        if (fittingList != null && fittingList.size() > 0) {
+            goods.setClosedFittings(fittingList);
+        }
+        return goods;
+    }
 }

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

@@ -28,4 +28,9 @@ public class RenewedServiceImpl implements RenewedService {
     public List<ClosedFitting> listClosedFitting(ClosedFitting closedFitting) {
         return renewedMapper.listClosedFitting(closedFitting);
     }
+
+    @Override
+    public Integer updateRenewedInfo(Renewed record) {
+        return renewedMapper.updateRenewedInfo(record);
+    }
 }

+ 28 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/RepairServiceImpl.java

@@ -0,0 +1,28 @@
+package com.iamberry.rst.service.cm;
+
+import com.iamberry.rst.core.cm.Repair;
+import com.iamberry.rst.faces.cm.RepairService;
+import com.iamberry.rst.service.cm.mapper.RepairMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 维修Service
+ * Created by liuzhiwei on 2017/11/8.
+ */
+@Service
+public class RepairServiceImpl implements RepairService {
+
+    @Autowired
+    private RepairMapper repairMapper;
+
+    @Override
+    public Repair getRepairInfo(Repair repair) {
+        return repairMapper.getRepairInfo(repair);
+    }
+
+    @Override
+    public Integer updateRepairInfo(Repair repair) {
+        return repairMapper.updateRepairInfo(repair);
+    }
+}

+ 10 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/AwaitingSignclosedProductMapper.java

@@ -1,6 +1,9 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.AwaitingSignclosedProductInfo;
+
+import java.util.List;
+
 /**
  * 客诉-待签收产品mapper
  */
@@ -14,6 +17,13 @@ public interface AwaitingSignclosedProductMapper {
      * 获取单个待签收产品
      */
     AwaitingSignclosedProductInfo getByPrimaryId(Integer productId);
+
+    /**
+     * 获取多个待签收产品
+     */
+    List<AwaitingSignclosedProductInfo> listByPrimaryId(Integer signclosedId);
+
+
     /**
      * 修改单个待签收产品
      * @return

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

@@ -14,9 +14,12 @@ public interface BackGoodsMapper {
 
     BackGoods selectByPrimaryKey(Integer backGoodsId);
 
-    int updateByPrimaryKeySelective(BackGoods record);
-
-    int updateByPrimaryKey(BackGoods record);
+    /**
+     * 修改售后退货信息
+     * @param record
+     * @return
+     */
+    Integer updateBackGoods(BackGoods record);
 
     /**
      * 查询售后退货集合

+ 9 - 3
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ClosedFittingMapper.java

@@ -2,16 +2,22 @@ package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.ClosedFitting;
 
+import java.util.List;
+
 public interface ClosedFittingMapper {
     int deleteByPrimaryKey(Integer closedFittingId);
 
     int insert(ClosedFitting record);
 
-    int insertSelective(ClosedFitting record);
-
     ClosedFitting selectByPrimaryKey(Integer closedFittingId);
 
     int updateByPrimaryKeySelective(ClosedFitting record);
 
-    int updateByPrimaryKey(ClosedFitting record);
+
+    /**
+     * 获取寄回配件集合
+     * @param record
+     * @return
+     */
+    List<ClosedFitting> listClosedFitting(ClosedFitting record);
 }

+ 9 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ClosedProdcueMapper.java

@@ -2,6 +2,8 @@ package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.ClosedProdcue;
 
+import java.util.List;
+
 public interface ClosedProdcueMapper {
     int deleteByPrimaryKey(Integer closedProdcueId);
 
@@ -14,4 +16,11 @@ public interface ClosedProdcueMapper {
     int updateByPrimaryKeySelective(ClosedProdcue record);
 
     int updateByPrimaryKey(ClosedProdcue record);
+
+    /**
+     * 查询售后寄回产品集合
+     * @param record
+     * @return
+     */
+    List<ClosedProdcue> listclosedProdcue(ClosedProdcue record);
 }

+ 16 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedInfoMapper.java

@@ -1,6 +1,9 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.ComplaintSignclosedInfo;
+
+import java.util.List;
+
 /**
  * 客诉-签收表mapper
  */
@@ -20,4 +23,17 @@ public interface ComplaintSignclosedInfoMapper {
      * @return
      */
     int updateSignclosedById(ComplaintSignclosedInfo record);
+
+    /**
+     * 增加催促次数
+     * @return
+     */
+    int updateUrgedNumById(ComplaintSignclosedInfo complaintSignclosedInfo);
+
+    /**
+     * 查询多个签收记录
+     * @return
+     */
+    List<ComplaintSignclosedInfo> listSignclosed(ComplaintSignclosedInfo record);
+
 }

+ 10 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedProductInfoMapper.java

@@ -1,6 +1,9 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.SignclosedProductInfo;
+
+import java.util.List;
+
 /**
  * 客诉-签收产品表mapper
  */
@@ -16,6 +19,13 @@ public interface ComplaintSignclosedProductInfoMapper {
      */
     SignclosedProductInfo getSignclosedById(Integer productId);
     /**
+     * 查询多个签收产品记录
+     * @return
+     */
+    List<SignclosedProductInfo> listSignclosedById(Integer signclosedId);
+
+
+    /**
      * 修改单个签收产品记录
      * @return
      */

+ 6 - 5
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/RenewedMapper.java

@@ -10,11 +10,12 @@ public interface RenewedMapper {
 
     int insert(Renewed record);
 
-    int insertSelective(Renewed record);
-
-    int updateByPrimaryKeySelective(Renewed record);
-
-    int updateByPrimaryKey(Renewed record);
+    /**
+     * 修改换新信息
+     * @param record
+     * @return
+     */
+    Integer updateRenewedInfo(Renewed record);
 
     /**
      * 查询售后换新集合

+ 14 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/RepairMapper.java

@@ -9,8 +9,6 @@ public interface RepairMapper {
 
     int insert(Repair record);
 
-    int insertSelective(Repair record);
-
     Repair selectByPrimaryKey(Integer repairId);
 
     int updateByPrimaryKeySelective(Repair record);
@@ -23,4 +21,18 @@ public interface RepairMapper {
      * @return
      */
     List<Repair> listRepair(Repair repair);
+
+    /**
+     * 获取维修详情和品质检测信息
+     * @param repair
+     * @return
+     */
+    Repair getRepairInfo(Repair repair);
+
+    /**
+     * 修改维修信息
+     * @param repair
+     * @return
+     */
+    Integer updateRepairInfo(Repair repair);
 }

+ 26 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/awaitingSignclosedProductMapper.xml

@@ -8,9 +8,13 @@
     <result column="product_num" property="productNum" jdbcType="INTEGER" />
     <result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
     <result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
+    <result column="signclosed_product_type" property="signclosedProductType" jdbcType="INTEGER" />
+    <result column="signclosed_product_id" property="signclosedProductId" jdbcType="INTEGER" />
+    <result column="signclosed_product_color" property="signclosedProductColor" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
-    product_id, signclosed_id, product_name, product_num, signclosed_create_time, signclosed_update_time
+    product_id, signclosed_id, product_name, product_num, signclosed_create_time, signclosed_update_time,
+    signclosed_product_type,signclosed_product_id,signclosed_product_color
   </sql>
   <select id="getByPrimaryId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -18,12 +22,32 @@
     from tb_rst_complaint_awaiting_signclosed_product
     where product_id = #{productId,jdbcType=INTEGER}
   </select>
+  <select id="listByPrimaryId" resultMap="BaseResultMap" parameterType="AwaitingSignclosedProductInfo" >
+    select
+    sp.product_id productId,
+	sp.signclosed_id signclosedId,
+	sp.product_name productName,
+	sp.product_num productNum,
+	sp.signclosed_create_time signclosedCreateTime,
+	sp.signclosed_update_time signclosedUpdateTime,
+	sp.signclosed_product_type signclosedProductType,
+	sp.signclosed_product_id signclosedProductId,
+	sp.signclosed_product_color signclosedProductColor,
+    pc.color_name colorName,
+    pi.product_number productNumber
+    from
+    tb_rst_complaint_awaiting_signclosed_product sp
+    LEFT JOIN tb_rst_product_color pc on sp.signclosed_product_color = pc.color_id
+    LEFT JOIN tb_rst_product_info pi on sp.signclosed_product_id = pi.product_id
+    where signclosed_id = #{signclosedId,jdbcType=INTEGER}
+  </select>
   <insert id="insert" parameterType="AwaitingSignclosedProductInfo" useGeneratedKeys="true" keyProperty="productId">
     insert into tb_rst_complaint_awaiting_signclosed_product (product_id, signclosed_id, product_name, 
-      product_num, signclosed_create_time, signclosed_update_time
+      product_num, signclosed_create_time, signclosed_update_time,signclosed_product_type,signclosed_product_id,signclosed_product_color
       )
     values (#{productId,jdbcType=INTEGER}, #{signclosedId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR}, 
       #{productNum,jdbcType=INTEGER}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
+      ,#{signclosedProductType,jdbcType=INTEGER}, #{signclosedProductId,jdbcType=INTEGER}, #{signclosedProductColor,jdbcType=INTEGER}
       )
   </insert>
 

+ 11 - 21
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/backGoodsMapper.xml

@@ -39,6 +39,14 @@
       *
     from
       tb_rst_back_goods
+    <where>
+      <if test="customerId != null and customerId != ''">
+        customer_id = #{customerId}
+      </if>
+      <if test="backGoodsState != null and backGoodsState != ''">
+        and back_goods_state = #{backGoodsState}
+      </if>
+    </where>
   </select>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
@@ -172,7 +180,9 @@
       </if>
     </trim>
   </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="BackGoods" >
+
+  <!-- 修改售后退货信息 -->
+  <update id="updateBackGoods" parameterType="BackGoods" >
     update tb_rst_back_goods
     <set >
       <if test="customerId != null" >
@@ -226,24 +236,4 @@
     </set>
     where back_goods_id = #{backGoodsId,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="BackGoods" >
-    update tb_rst_back_goods
-    set customer_id = #{customerId,jdbcType=INTEGER},
-      order_id = #{orderId,jdbcType=INTEGER},
-      signclosed_id = #{signclosedId,jdbcType=INTEGER},
-      back_goods_back_status = #{backGoodsBackStatus,jdbcType=BIT},
-      back_goods_back_name = #{backGoodsBackName,jdbcType=VARCHAR},
-      back_goods_back_tel = #{backGoodsBackTel,jdbcType=CHAR},
-      back_goods_back_logistics_company = #{backGoodsBackLogisticsCompany,jdbcType=VARCHAR},
-      back_goods_back_logistics_no = #{backGoodsBackLogisticsNo,jdbcType=VARCHAR},
-      back_goods_back_postage = #{backGoodsBackPostage,jdbcType=INTEGER},
-      back_goods_back_machine_no = #{backGoodsBackMachineNo,jdbcType=VARCHAR},
-      back_goods_desc = #{backGoodsDesc,jdbcType=VARCHAR},
-      back_goods_state = #{backGoodsState,jdbcType=BIT},
-      back_goods_alipay = #{backGoodsAlipay,jdbcType=VARCHAR},
-      back_goods_is_transfer = #{backGoodsIsTransfer,jdbcType=BIT},
-      back_goods_create_time = #{backGoodsCreateTime,jdbcType=TIMESTAMP},
-      back_goods_update_time = #{backGoodsUpdateTime,jdbcType=TIMESTAMP}
-    where back_goods_id = #{backGoodsId,jdbcType=INTEGER}
-  </update>
 </mapper>

+ 19 - 49
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/closedFittingMapper.xml

@@ -17,53 +17,31 @@
     from tb_rst_closed_fitting
     where closed_fitting_id = #{closedFittingId,jdbcType=INTEGER}
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-    delete from tb_rst_closed_fitting
-    where closed_fitting_id = #{closedFittingId,jdbcType=INTEGER}
-  </delete>
   <insert id="insert" parameterType="ClosedFitting" >
     insert into tb_rst_closed_fitting (closed_fitting_id, relation_id, product_id, 
       fittings_id, closed_fitting_number)
     values (#{closedFittingId,jdbcType=INTEGER}, #{relationId,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, 
       #{fittingsId,jdbcType=INTEGER}, #{closedFittingNumber,jdbcType=INTEGER})
   </insert>
-  <insert id="insertSelective" parameterType="ClosedFitting" >
-    insert into tb_rst_closed_fitting
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="closedFittingId != null" >
-        closed_fitting_id,
-      </if>
-      <if test="relationId != null" >
-        relation_id,
-      </if>
-      <if test="productId != null" >
-        product_id,
-      </if>
-      <if test="fittingsId != null" >
-        fittings_id,
-      </if>
-      <if test="closedFittingNumber != null" >
-        closed_fitting_number,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="closedFittingId != null" >
-        #{closedFittingId,jdbcType=INTEGER},
-      </if>
-      <if test="relationId != null" >
-        #{relationId,jdbcType=INTEGER},
-      </if>
-      <if test="productId != null" >
-        #{productId,jdbcType=INTEGER},
-      </if>
-      <if test="fittingsId != null" >
-        #{fittingsId,jdbcType=INTEGER},
-      </if>
-      <if test="closedFittingNumber != null" >
-        #{closedFittingNumber,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
+
+  <!-- 获取寄回配件集合 -->
+  <select id="listClosedFitting" parameterType="ClosedFitting" resultType="ClosedFitting">
+    select
+      cf.closed_fitting_number closedFittingNumber,
+      pf.fittings_name fittingName
+    from
+      tb_rst_closed_fitting cf
+    LEFT JOIN tb_rst_product_fittings pf ON cf.fittings_id = pf.fittings_id
+    <where>
+      <if test="relationId != null and relationId != ''">
+        relation_id = #{relationId}
+      </if>
+      <if test="closedFittingType != null and closedFittingType != ''">
+        and closed_fitting_type = #{closedFittingType}
+      </if>
+    </where>
+  </select>
+
   <update id="updateByPrimaryKeySelective" parameterType="ClosedFitting" >
     update tb_rst_closed_fitting
     <set >
@@ -82,12 +60,4 @@
     </set>
     where closed_fitting_id = #{closedFittingId,jdbcType=INTEGER}
   </update>
-  <update id="updateByPrimaryKey" parameterType="ClosedFitting" >
-    update tb_rst_closed_fitting
-    set relation_id = #{relationId,jdbcType=INTEGER},
-      product_id = #{productId,jdbcType=INTEGER},
-      fittings_id = #{fittingsId,jdbcType=INTEGER},
-      closed_fitting_number = #{closedFittingNumber,jdbcType=INTEGER}
-    where closed_fitting_id = #{closedFittingId,jdbcType=INTEGER}
-  </update>
 </mapper>

+ 17 - 37
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/closedProdcueMapper.xml

@@ -27,43 +27,6 @@
     values (#{closedProdcueId,jdbcType=INTEGER}, #{relationId,jdbcType=INTEGER}, #{productId,jdbcType=INTEGER}, 
       #{colorId,jdbcType=INTEGER}, #{closedProdcueNumber,jdbcType=INTEGER})
   </insert>
-  <insert id="insertSelective" parameterType="ClosedProdcue" >
-    insert into tb_rst_closed_prodcue
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="closedProdcueId != null" >
-        closed_prodcue_id,
-      </if>
-      <if test="relationId != null" >
-        relation_id,
-      </if>
-      <if test="productId != null" >
-        product_id,
-      </if>
-      <if test="colorId != null" >
-        color_id,
-      </if>
-      <if test="closedProdcueNumber != null" >
-        closed_prodcue_number,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="closedProdcueId != null" >
-        #{closedProdcueId,jdbcType=INTEGER},
-      </if>
-      <if test="relationId != null" >
-        #{relationId,jdbcType=INTEGER},
-      </if>
-      <if test="productId != null" >
-        #{productId,jdbcType=INTEGER},
-      </if>
-      <if test="colorId != null" >
-        #{colorId,jdbcType=INTEGER},
-      </if>
-      <if test="closedProdcueNumber != null" >
-        #{closedProdcueNumber,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
   <update id="updateByPrimaryKeySelective" parameterType="ClosedProdcue" >
     update tb_rst_closed_prodcue
     <set >
@@ -90,4 +53,21 @@
       closed_prodcue_number = #{closedProdcueNumber,jdbcType=INTEGER}
     where closed_prodcue_id = #{closedProdcueId,jdbcType=INTEGER}
   </update>
+
+  <!-- 查询售后寄回产品集合 -->
+  <select id="listclosedProdcue" parameterType="ClosedProdcue" resultType="ClosedProdcue">
+    select
+      cp.*,
+      pi.product_name closedProductName
+    from tb_rst_closed_prodcue cp
+    LEFT JOIN tb_rst_product_info pi ON cp.product_id = pi.product_id
+    <where>
+      <if test="relationId != null and relationId != ''">
+        relation_id = #{relationId}
+      </if>
+      <if test="closedProdcueType != null and closedProdcueType != ''">
+        and closed_prodcue_type = #{closedProdcueType}
+      </if>
+    </where>
+  </select>
 </mapper>

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

@@ -41,6 +41,134 @@
     from tb_rst_complaint_signclosed
     where signclosed_id = #{signclosedId,jdbcType=INTEGER}
   </select>
+
+  <resultMap id="complaintSignclosedInfoMap" type="ComplaintSignclosedInfo">
+    <id property="signclosed_id" column="signclosedId"/>
+    <result property="signclosed_type" column="signclosedType"/>
+    <result property="signclosed_type_name" column="signclosedTypeName"/>
+    <result property="machine_no" column="machineNo"/>
+    <result property="signclosed_logistics" column="signclosedLogistics"/>
+    <result property="signclosed_logistics_number" column="signclosedLogisticsNumber"/>
+    <result property="signclosed_send_name" column="signclosedSendName"/>
+    <result property="signclosed_send_tel" column="signclosedSendTel"/>
+    <result property="signclosed_addr_provinces" column="signclosedAddrProvinces"/>
+    <result property="signclosed_addr_city" column="signclosedAddrCity"/>
+    <result property="signclosed_is_fittings" column="signclosedIsFittings"/>
+    <result property="signclosed_date" column="signclosedDate"/>
+    <result property="signclosed_is_quality" column="signclosedIsQuality"/>
+    <result property="signclosed_is_into" column="signclosedIsInto"/>
+    <result property="signclosed_state" column="signclosedState"/>
+    <result property="signclosed_objects_state" column="signclosedObjectsState"/>
+    <result property="signclosed_customer_id" column="signclosedCustomerId"/>
+    <result property="signclosed_urged_num" column="signclosedUrgedNum"/>
+    <result property="old_efast_id" column="oldEfastId"/>
+    <result property="new_efast_id" column="newEfastId"/>
+    <result property="signclosed_customer_desc" column="signclosedCustomerDesc"/>
+    <result property="signclosed_desc" column="signclosedDesc"/>
+    <result property="signclosed_create_time" column="signclosedCreateTime"/>
+    <result property="signclosed_update_time" column="signclosedUpdateTime"/>
+    <collection property="awaitingSignclosedProductInfoList" column="SIGNCLOSED_ID" ofType="AwaitingSignclosedProductInfo" select="listAwaitingSignclosedById"/>
+    <collection property="signclosedProductInfoList" column="SIGNCLOSED_ID" ofType="SignclosedProductInfo" select="listSignclosedById"/>
+  </resultMap>
+  <select id="listAwaitingSignclosedById" resultType="AwaitingSignclosedProductInfo" parameterType="String" >
+    select
+    sp.product_id productId,
+    sp.signclosed_id signclosedId,
+    sp.product_name productName,
+    sp.product_num productNum,
+    sp.signclosed_create_time signclosedCreateTime,
+    sp.signclosed_update_time signclosedUpdateTime,
+    sp.signclosed_product_type signclosedProductType,
+    sp.signclosed_product_id signclosedProductId,
+    sp.signclosed_product_color signclosedProductColor,
+    pc.color_name colorName,
+    pi.product_number productNumber
+    from
+    tb_rst_complaint_awaiting_signclosed_product sp
+    LEFT JOIN tb_rst_product_color pc on sp.signclosed_product_color = pc.color_id
+    LEFT JOIN tb_rst_product_info pi on sp.signclosed_product_id = pi.product_id
+    where signclosed_id = #{signclosedId}
+  </select>
+
+  <select id="listSignclosedById" resultType="SignclosedProductInfo" parameterType="String" >
+    select
+    sp.product_id productId,
+    sp.signclosed_id signclosedId,
+    sp.product_name productName,
+    sp.product_num productNum,
+    sp.signclosed_create_time signclosedCreateTime,
+    sp.signclosed_update_time signclosedUpdateTime,
+    sp.signclosed_product_type signclosedProductType,
+    sp.signclosed_product_id signclosedProductId,
+    sp.signclosed_product_color signclosedProductColor,
+    pc.color_name colorName,
+    pi.product_number productNumber
+    from
+    tb_rst_complaint_signclosed_product sp
+    LEFT JOIN tb_rst_product_color pc on sp.signclosed_product_color = pc.color_id
+    LEFT JOIN tb_rst_product_info pi on sp.signclosed_product_id = pi.product_id
+    where signclosed_id = #{signclosedId}
+  </select>
+  <select id="listSignclosed" resultMap="complaintSignclosedInfoMap" parameterType="ComplaintSignclosedInfo" >
+    SELECT
+      cs.signclosed_id,
+      cs.signclosed_type,
+      cs.signclosed_type_name,
+      cs.machine_no,
+      cs.signclosed_logistics,
+      cs.signclosed_logistics_number,
+      cs.signclosed_send_name,
+      cs.signclosed_send_tel,
+      cs.signclosed_addr_provinces,
+      cs.signclosed_addr_city,
+      cs.signclosed_is_fittings,
+      cs.signclosed_date,
+      cs.signclosed_is_quality,
+      cs.signclosed_is_into,
+      cs.signclosed_state,
+      cs.signclosed_objects_state,
+      cs.signclosed_customer_id,
+      cs.signclosed_urged_num,
+      cs.old_efast_id,
+      cs.new_efast_id,
+      cs.signclosed_customer_desc,
+      cs.signclosed_desc,
+      cs.signclosed_create_time,
+      cs.signclosed_update_time,
+      ap.province provincesName,
+      ac.city cityName
+    FROM
+	tb_rst_complaint_signclosed cs
+	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
+    <where>
+      <if test="signclosedSendName != null and signclosedSendName != ''" >
+        cs.signclosed_send_name = #{signclosedSendName}
+      </if>
+      <if test="signclosedSendTel != null and signclosedSendTel != ''" >
+        AND cs.signclosed_send_tel = #{signclosedSendTel}
+      </if>
+      <if test="signclosedLogisticsNumber != null and signclosedLogisticsNumber != ''" >
+        AND cs.signclosed_logistics_number = #{signclosedLogisticsNumber}
+      </if>
+      <if test="signclosedType != null and signclosedType != ''" >
+        AND cs.signclosed_type = #{signclosedType}
+      </if>
+      <if test="signclosedObjectsState != null and signclosedObjectsState != ''" >
+        AND cs.signclosed_objects_state = #{signclosedObjectsState}
+      </if>
+      <if test="signclosedState != null and signclosedState != ''" >
+        AND cs.signclosed_state = #{signclosedState}
+      </if>
+      <if test="signclosedIsInto != null and signclosedIsInto != ''" >
+        AND cs.signclosed_is_into = #{signclosedIsInto}
+      </if>
+      <if test="signclosedIsQuality != null and signclosedIsQuality != ''" >
+        AND cs.signclosed_is_quality = #{signclosedIsQuality}
+      </if>
+    </where>
+  </select>
+
   <insert id="insert" parameterType="ComplaintSignclosedInfo" >
     insert into tb_rst_complaint_signclosed (signclosed_id, signclosed_type, signclosed_type_name, 
       machine_no, signclosed_logistics, signclosed_logistics_number, 
@@ -138,4 +266,10 @@
     </set>
     where signclosed_id = #{signclosedId,jdbcType=INTEGER}
   </update>
+
+  <update id="updateUrgedNumById" parameterType="ComplaintSignclosedInfo" >
+    update tb_rst_complaint_signclosed SET
+        signclosed_urged_num = signclosed_urged_num + 1
+    where signclosed_id = #{signclosedId,jdbcType=INTEGER}
+  </update>
 </mapper>

+ 27 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSignclosedProductInfoMapper.xml

@@ -8,9 +8,13 @@
     <result column="product_num" property="productNum" jdbcType="INTEGER" />
     <result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
     <result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
+    <result column="signclosed_product_type" property="signclosedProductType" jdbcType="INTEGER" />
+    <result column="signclosed_product_id" property="signclosedProductId" jdbcType="INTEGER" />
+    <result column="signclosed_product_color" property="signclosedProductColor" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
-    product_id, signclosed_id, product_name, product_num, signclosed_create_time, signclosed_update_time
+    product_id, signclosed_id, product_name, product_num, signclosed_create_time,
+    signclosed_update_time,signclosed_product_type,signclosed_product_id,signclosed_product_color
   </sql>
   <select id="getSignclosedById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -18,12 +22,33 @@
     from tb_rst_complaint_signclosed_product
     where product_id = #{productId,jdbcType=INTEGER}
   </select>
+  <select id="listSignclosedById" resultMap="BaseResultMap" parameterType="SignclosedProductInfo" >
+    select
+    sp.product_id productId,
+	sp.signclosed_id signclosedId,
+	sp.product_name productName,
+	sp.product_num productNum,
+	sp.signclosed_create_time signclosedCreateTime,
+	sp.signclosed_update_time signclosedUpdateTime,
+	sp.signclosed_product_type signclosedProductType,
+	sp.signclosed_product_id signclosedProductId,
+	sp.signclosed_product_color signclosedProductColor,
+    pc.color_name colorName,
+    pi.product_number productNumber
+    from
+    tb_rst_complaint_signclosed_product sp
+    LEFT JOIN tb_rst_product_color pc on sp.signclosed_product_color = pc.color_id
+    LEFT JOIN tb_rst_product_info pi on sp.signclosed_product_id = pi.product_id
+    where signclosed_id = #{signclosedId,jdbcType=INTEGER}
+  </select>
+
   <insert id="insert" parameterType="SignclosedProductInfo" >
     insert into tb_rst_complaint_signclosed_product (product_id, signclosed_id, product_name, 
-      product_num, signclosed_create_time, signclosed_update_time
+      product_num, signclosed_create_time, signclosed_update_time,signclosed_product_type,signclosed_product_id,signclosed_product_color
       )
     values (#{productId,jdbcType=INTEGER}, #{signclosedId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR}, 
       #{productNum,jdbcType=INTEGER}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
+      ,#{signclosedProductType,jdbcType=INTEGER}, #{signclosedProductId,jdbcType=INTEGER}, #{signclosedProductColor,jdbcType=INTEGER}
       )
   </insert>
 

+ 31 - 235
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/renewedMapper.xml

@@ -130,297 +130,93 @@
       #{renewedIsTransfer,jdbcType=BIT}, #{renewedCreateTime,jdbcType=TIMESTAMP}, #{renewedUpdateTime,jdbcType=TIMESTAMP}
       )
   </insert>
-  <insert id="insertSelective" parameterType="Renewed" >
-    insert into tb_rst_renewed
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="renewedId != null" >
-        renewed_id,
-      </if>
-      <if test="customerId != null" >
-        customer_id,
-      </if>
-      <if test="orderId != null" >
-        order_id,
-      </if>
-      <if test="signclosedId != null" >
-        signclosed_id,
-      </if>
-      <if test="renewedBackEfastOrderId != null" >
-        renewed_back_efast_order_id,
-      </if>
-      <if test="renewedBackStatus != null" >
-        renewed_back_status,
-      </if>
-      <if test="renewedBackName != null" >
-        renewed_back_name,
-      </if>
-      <if test="renewedBackTel != null" >
-        renewed_back_tel,
-      </if>
-      <if test="renewedBackLogisticsCompany != null" >
-        renewed_back_logistics_company,
-      </if>
-      <if test="renewedBackLogisticsNo != null" >
-        renewed_back_logistics_no,
-      </if>
-      <if test="renewedBackPostage != null" >
-        renewed_back_postage,
-      </if>
-      <if test="renewedBackMachineNo != null" >
-        renewed_back_machine_no,
-      </if>
-      <if test="renewedSendStatus != null" >
-        renewed_send_status,
-      </if>
-      <if test="renewedSendName != null" >
-        renewed_send_name,
-      </if>
-      <if test="renewedSendTel != null" >
-        renewed_send_tel,
-      </if>
-      <if test="provinceNumber != null" >
-        province_number,
-      </if>
-      <if test="cityNumber != null" >
-        city_number,
-      </if>
-      <if test="areaNumber != null" >
-        area_number,
-      </if>
-      <if test="renewedSendMergeAddress != null" >
-        renewed_send_merge_address,
-      </if>
-      <if test="renewedSendAddress != null" >
-        renewed_send_address,
-      </if>
-      <if test="renewedSendLogisticsCompany != null" >
-        renewed_send_logistics_company,
-      </if>
-      <if test="renewedSendLogisticsNo != null" >
-        renewed_send_logistics_no,
-      </if>
-      <if test="renewedDesc != null" >
-        renewed_desc,
-      </if>
-      <if test="renewedState != null" >
-        renewed_state,
-      </if>
-      <if test="renewedAlipay != null" >
-        renewed_alipay,
-      </if>
-      <if test="renewedIsTransfer != null" >
-        renewed_is_transfer,
-      </if>
-      <if test="renewedCreateTime != null" >
-        renewed_create_time,
-      </if>
-      <if test="renewedUpdateTime != null" >
-        renewed_update_time,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="renewedId != null" >
-        #{renewedId,jdbcType=INTEGER},
-      </if>
-      <if test="customerId != null" >
-        #{customerId,jdbcType=INTEGER},
-      </if>
-      <if test="orderId != null" >
-        #{orderId,jdbcType=INTEGER},
-      </if>
-      <if test="signclosedId != null" >
-        #{signclosedId,jdbcType=INTEGER},
-      </if>
-      <if test="renewedBackEfastOrderId != null" >
-        #{renewedBackEfastOrderId,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedBackStatus != null" >
-        #{renewedBackStatus,jdbcType=BIT},
-      </if>
-      <if test="renewedBackName != null" >
-        #{renewedBackName,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedBackTel != null" >
-        #{renewedBackTel,jdbcType=CHAR},
-      </if>
-      <if test="renewedBackLogisticsCompany != null" >
-        #{renewedBackLogisticsCompany,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedBackLogisticsNo != null" >
-        #{renewedBackLogisticsNo,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedBackPostage != null" >
-        #{renewedBackPostage,jdbcType=INTEGER},
-      </if>
-      <if test="renewedBackMachineNo != null" >
-        #{renewedBackMachineNo,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedSendStatus != null" >
-        #{renewedSendStatus,jdbcType=BIT},
-      </if>
-      <if test="renewedSendName != null" >
-        #{renewedSendName,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedSendTel != null" >
-        #{renewedSendTel,jdbcType=CHAR},
-      </if>
-      <if test="provinceNumber != null" >
-        #{provinceNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="cityNumber != null" >
-        #{cityNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="areaNumber != null" >
-        #{areaNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedSendMergeAddress != null" >
-        #{renewedSendMergeAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedSendAddress != null" >
-        #{renewedSendAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedSendLogisticsCompany != null" >
-        #{renewedSendLogisticsCompany,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedSendLogisticsNo != null" >
-        #{renewedSendLogisticsNo,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedDesc != null" >
-        #{renewedDesc,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedState != null" >
-        #{renewedState,jdbcType=BIT},
-      </if>
-      <if test="renewedAlipay != null" >
-        #{renewedAlipay,jdbcType=VARCHAR},
-      </if>
-      <if test="renewedIsTransfer != null" >
-        #{renewedIsTransfer,jdbcType=BIT},
-      </if>
-      <if test="renewedCreateTime != null" >
-        #{renewedCreateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="renewedUpdateTime != null" >
-        #{renewedUpdateTime,jdbcType=TIMESTAMP},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="Renewed" >
+
+  <!-- 修改换新信息 -->
+  <update id="updateRenewedInfo" parameterType="Renewed" >
     update tb_rst_renewed
     <set >
       <if test="customerId != null" >
-        customer_id = #{customerId,jdbcType=INTEGER},
+        customer_id = #{customerId},
       </if>
       <if test="orderId != null" >
-        order_id = #{orderId,jdbcType=INTEGER},
+        order_id = #{orderId},
       </if>
       <if test="signclosedId != null" >
-        signclosed_id = #{signclosedId,jdbcType=INTEGER},
+        signclosed_id = #{signclosedId},
       </if>
       <if test="renewedBackEfastOrderId != null" >
-        renewed_back_efast_order_id = #{renewedBackEfastOrderId,jdbcType=VARCHAR},
+        renewed_back_efast_order_id = #{renewedBackEfastOrderId},
       </if>
       <if test="renewedBackStatus != null" >
-        renewed_back_status = #{renewedBackStatus,jdbcType=BIT},
+        renewed_back_status = #{renewedBackStatus},
       </if>
       <if test="renewedBackName != null" >
-        renewed_back_name = #{renewedBackName,jdbcType=VARCHAR},
+        renewed_back_name = #{renewedBackName},
       </if>
       <if test="renewedBackTel != null" >
-        renewed_back_tel = #{renewedBackTel,jdbcType=CHAR},
+        renewed_back_tel = #{renewedBackTel},
       </if>
       <if test="renewedBackLogisticsCompany != null" >
-        renewed_back_logistics_company = #{renewedBackLogisticsCompany,jdbcType=VARCHAR},
+        renewed_back_logistics_company = #{renewedBackLogisticsCompany},
       </if>
       <if test="renewedBackLogisticsNo != null" >
-        renewed_back_logistics_no = #{renewedBackLogisticsNo,jdbcType=VARCHAR},
+        renewed_back_logistics_no = #{renewedBackLogisticsNo},
       </if>
       <if test="renewedBackPostage != null" >
-        renewed_back_postage = #{renewedBackPostage,jdbcType=INTEGER},
+        renewed_back_postage = #{renewedBackPostage},
       </if>
       <if test="renewedBackMachineNo != null" >
-        renewed_back_machine_no = #{renewedBackMachineNo,jdbcType=VARCHAR},
+        renewed_back_machine_no = #{renewedBackMachineNo},
       </if>
       <if test="renewedSendStatus != null" >
-        renewed_send_status = #{renewedSendStatus,jdbcType=BIT},
+        renewed_send_status = #{renewedSendStatus},
       </if>
       <if test="renewedSendName != null" >
-        renewed_send_name = #{renewedSendName,jdbcType=VARCHAR},
+        renewed_send_name = #{renewedSendName},
       </if>
       <if test="renewedSendTel != null" >
-        renewed_send_tel = #{renewedSendTel,jdbcType=CHAR},
+        renewed_send_tel = #{renewedSendTel},
       </if>
       <if test="provinceNumber != null" >
-        province_number = #{provinceNumber,jdbcType=VARCHAR},
+        province_number = #{provinceNumber},
       </if>
       <if test="cityNumber != null" >
-        city_number = #{cityNumber,jdbcType=VARCHAR},
+        city_number = #{cityNumber},
       </if>
       <if test="areaNumber != null" >
-        area_number = #{areaNumber,jdbcType=VARCHAR},
+        area_number = #{areaNumber},
       </if>
       <if test="renewedSendMergeAddress != null" >
-        renewed_send_merge_address = #{renewedSendMergeAddress,jdbcType=VARCHAR},
+        renewed_send_merge_address = #{renewedSendMergeAddress},
       </if>
       <if test="renewedSendAddress != null" >
-        renewed_send_address = #{renewedSendAddress,jdbcType=VARCHAR},
+        renewed_send_address = #{renewedSendAddress},
       </if>
       <if test="renewedSendLogisticsCompany != null" >
-        renewed_send_logistics_company = #{renewedSendLogisticsCompany,jdbcType=VARCHAR},
+        renewed_send_logistics_company = #{renewedSendLogisticsCompany},
       </if>
       <if test="renewedSendLogisticsNo != null" >
-        renewed_send_logistics_no = #{renewedSendLogisticsNo,jdbcType=VARCHAR},
+        renewed_send_logistics_no = #{renewedSendLogisticsNo},
       </if>
       <if test="renewedDesc != null" >
-        renewed_desc = #{renewedDesc,jdbcType=VARCHAR},
+        renewed_desc = #{renewedDesc},
       </if>
       <if test="renewedState != null" >
-        renewed_state = #{renewedState,jdbcType=BIT},
+        renewed_state = #{renewedState},
       </if>
       <if test="renewedAlipay != null" >
-        renewed_alipay = #{renewedAlipay,jdbcType=VARCHAR},
+        renewed_alipay = #{renewedAlipay},
       </if>
       <if test="renewedIsTransfer != null" >
-        renewed_is_transfer = #{renewedIsTransfer,jdbcType=BIT},
+        renewed_is_transfer = #{renewedIsTransfer},
       </if>
       <if test="renewedCreateTime != null" >
-        renewed_create_time = #{renewedCreateTime,jdbcType=TIMESTAMP},
+        renewed_create_time = #{renewedCreateTime},
       </if>
       <if test="renewedUpdateTime != null" >
-        renewed_update_time = #{renewedUpdateTime,jdbcType=TIMESTAMP},
+        renewed_update_time = #{renewedUpdateTime},
       </if>
     </set>
-    where renewed_id = #{renewedId,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="Renewed" >
-    update tb_rst_renewed
-    set customer_id = #{customerId,jdbcType=INTEGER},
-      order_id = #{orderId,jdbcType=INTEGER},
-      signclosed_id = #{signclosedId,jdbcType=INTEGER},
-      renewed_back_efast_order_id = #{renewedBackEfastOrderId,jdbcType=VARCHAR},
-      renewed_back_status = #{renewedBackStatus,jdbcType=BIT},
-      renewed_back_name = #{renewedBackName,jdbcType=VARCHAR},
-      renewed_back_tel = #{renewedBackTel,jdbcType=CHAR},
-      renewed_back_logistics_company = #{renewedBackLogisticsCompany,jdbcType=VARCHAR},
-      renewed_back_logistics_no = #{renewedBackLogisticsNo,jdbcType=VARCHAR},
-      renewed_back_postage = #{renewedBackPostage,jdbcType=INTEGER},
-      renewed_back_machine_no = #{renewedBackMachineNo,jdbcType=VARCHAR},
-      renewed_send_status = #{renewedSendStatus,jdbcType=BIT},
-      renewed_send_name = #{renewedSendName,jdbcType=VARCHAR},
-      renewed_send_tel = #{renewedSendTel,jdbcType=CHAR},
-      province_number = #{provinceNumber,jdbcType=VARCHAR},
-      city_number = #{cityNumber,jdbcType=VARCHAR},
-      area_number = #{areaNumber,jdbcType=VARCHAR},
-      renewed_send_merge_address = #{renewedSendMergeAddress,jdbcType=VARCHAR},
-      renewed_send_address = #{renewedSendAddress,jdbcType=VARCHAR},
-      renewed_send_logistics_company = #{renewedSendLogisticsCompany,jdbcType=VARCHAR},
-      renewed_send_logistics_no = #{renewedSendLogisticsNo,jdbcType=VARCHAR},
-      renewed_desc = #{renewedDesc,jdbcType=VARCHAR},
-      renewed_state = #{renewedState,jdbcType=BIT},
-      renewed_alipay = #{renewedAlipay,jdbcType=VARCHAR},
-      renewed_is_transfer = #{renewedIsTransfer,jdbcType=BIT},
-      renewed_create_time = #{renewedCreateTime,jdbcType=TIMESTAMP},
-      renewed_update_time = #{renewedUpdateTime,jdbcType=TIMESTAMP}
-    where renewed_id = #{renewedId,jdbcType=INTEGER}
+    where renewed_id = #{renewedId}
   </update>
 </mapper>

+ 67 - 204
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/repairMapper.xml

@@ -54,6 +54,42 @@
       tb_rst_repair
   </select>
 
+  <!-- 获取维修详情和品质检测信息 -->
+  <select id="getRepairInfo" parameterType="Repair" resultType="Repair">
+    select
+      r.*,
+      d.detect_state detectState,
+      d.detect_phenomenon detectPhenomenon,
+      d.detect_failure_classification detectFailureClassification,
+      d.detect_failure_cause detectFailureCause,
+      d.detect_results detectResults,
+      d.detect_point detectPoint,
+      d.detect_analysis detectAnalysis,
+      d.detect_revolution_produced detectRevolutionProduced,
+      m.maintenance_id_repair maintenanceIdRepair,
+      m.maintenance_content maintenanceContent,
+      m.maintenance_content_date maintenanceContentDate,
+      p.closed_prodcue_number closedProdcueNumber,
+      pi.product_name productName
+    from
+      tb_rst_repair r
+    LEFT JOIN tb_rst_complaint_detect d ON r.customer_id = d.customer_id
+    LEFT JOIN tb_rst_complaint_maintenance m ON d.detect_id = m.detect_id
+    LEFT JOIN tb_rst_closed_prodcue p ON p.relation_id = r.repair_id
+    LEFT JOIN tb_rst_product_info pi ON p.product_id = pi.product_id
+    <where>
+      <if test="repairId != null and repairId != ''">
+        repair_id = #{repairId}
+      </if>
+      <if test="customerId != null and customerId != ''">
+        and r.customer_id = #{customerId}
+      </if>
+      <if test="repairState != null and repairState != ''">
+        and r.repair_state = #{repairState}
+      </if>
+    </where>
+  </select>
+
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from tb_rst_repair
     where repair_id = #{repairId,jdbcType=INTEGER}
@@ -82,267 +118,94 @@
       #{repairIsTransfer,jdbcType=BIT}, #{repairCreateTime,jdbcType=TIMESTAMP}, #{repairUpdateTime,jdbcType=TIMESTAMP}
       )
   </insert>
-  <insert id="insertSelective" parameterType="Repair" >
-    insert into tb_rst_repair
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="repairId != null" >
-        repair_id,
-      </if>
-      <if test="customerId != null" >
-        customer_id,
-      </if>
-      <if test="orderId != null" >
-        order_id,
-      </if>
-      <if test="signclosedId != null" >
-        signclosed_id,
-      </if>
-      <if test="repairBackEfastOrderId != null" >
-        repair_back_efast_order_id,
-      </if>
-      <if test="repairBackStatus != null" >
-        repair_back_status,
-      </if>
-      <if test="repairBackName != null" >
-        repair_back_name,
-      </if>
-      <if test="repairBackTel != null" >
-        repair_back_tel,
-      </if>
-      <if test="repairBackLogisticsCompany != null" >
-        repair_back_logistics_company,
-      </if>
-      <if test="repairBackLogisticsNo != null" >
-        repair_back_logistics_no,
-      </if>
-      <if test="repairBackPostage != null" >
-        repair_back_postage,
-      </if>
-      <if test="repairBackMachineNo != null" >
-        repair_back_machine_no,
-      </if>
-      <if test="repairSendStatus != null" >
-        repair_send_status,
-      </if>
-      <if test="repairSendName != null" >
-        repair_send_name,
-      </if>
-      <if test="repairSendTel != null" >
-        repair_send_tel,
-      </if>
-      <if test="provinceNumber != null" >
-        province_number,
-      </if>
-      <if test="cityNumber != null" >
-        city_number,
-      </if>
-      <if test="areaNumber != null" >
-        area_number,
-      </if>
-      <if test="repairSendMergeAddress != null" >
-        repair_send_merge_address,
-      </if>
-      <if test="repairSendAddress != null" >
-        repair_send_address,
-      </if>
-      <if test="repairSendLogisticsCompany != null" >
-        repair_send_logistics_company,
-      </if>
-      <if test="repairSendLogisticsNo != null" >
-        repair_send_logistics_no,
-      </if>
-      <if test="repairDesc != null" >
-        repair_desc,
-      </if>
-      <if test="repairState != null" >
-        repair_state,
-      </if>
-      <if test="repairAlipay != null" >
-        repair_alipay,
-      </if>
-      <if test="repairIsTransfer != null" >
-        repair_is_transfer,
-      </if>
-      <if test="repairCreateTime != null" >
-        repair_create_time,
-      </if>
-      <if test="repairUpdateTime != null" >
-        repair_update_time,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="repairId != null" >
-        #{repairId,jdbcType=INTEGER},
-      </if>
-      <if test="customerId != null" >
-        #{customerId,jdbcType=INTEGER},
-      </if>
-      <if test="orderId != null" >
-        #{orderId,jdbcType=INTEGER},
-      </if>
-      <if test="signclosedId != null" >
-        #{signclosedId,jdbcType=INTEGER},
-      </if>
-      <if test="repairBackEfastOrderId != null" >
-        #{repairBackEfastOrderId,jdbcType=VARCHAR},
-      </if>
-      <if test="repairBackStatus != null" >
-        #{repairBackStatus,jdbcType=BIT},
-      </if>
-      <if test="repairBackName != null" >
-        #{repairBackName,jdbcType=VARCHAR},
-      </if>
-      <if test="repairBackTel != null" >
-        #{repairBackTel,jdbcType=CHAR},
-      </if>
-      <if test="repairBackLogisticsCompany != null" >
-        #{repairBackLogisticsCompany,jdbcType=VARCHAR},
-      </if>
-      <if test="repairBackLogisticsNo != null" >
-        #{repairBackLogisticsNo,jdbcType=VARCHAR},
-      </if>
-      <if test="repairBackPostage != null" >
-        #{repairBackPostage,jdbcType=INTEGER},
-      </if>
-      <if test="repairBackMachineNo != null" >
-        #{repairBackMachineNo,jdbcType=VARCHAR},
-      </if>
-      <if test="repairSendStatus != null" >
-        #{repairSendStatus,jdbcType=BIT},
-      </if>
-      <if test="repairSendName != null" >
-        #{repairSendName,jdbcType=VARCHAR},
-      </if>
-      <if test="repairSendTel != null" >
-        #{repairSendTel,jdbcType=CHAR},
-      </if>
-      <if test="provinceNumber != null" >
-        #{provinceNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="cityNumber != null" >
-        #{cityNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="areaNumber != null" >
-        #{areaNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="repairSendMergeAddress != null" >
-        #{repairSendMergeAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="repairSendAddress != null" >
-        #{repairSendAddress,jdbcType=VARCHAR},
-      </if>
-      <if test="repairSendLogisticsCompany != null" >
-        #{repairSendLogisticsCompany,jdbcType=VARCHAR},
-      </if>
-      <if test="repairSendLogisticsNo != null" >
-        #{repairSendLogisticsNo,jdbcType=VARCHAR},
-      </if>
-      <if test="repairDesc != null" >
-        #{repairDesc,jdbcType=VARCHAR},
-      </if>
-      <if test="repairState != null" >
-        #{repairState,jdbcType=BIT},
-      </if>
-      <if test="repairAlipay != null" >
-        #{repairAlipay,jdbcType=VARCHAR},
-      </if>
-      <if test="repairIsTransfer != null" >
-        #{repairIsTransfer,jdbcType=BIT},
-      </if>
-      <if test="repairCreateTime != null" >
-        #{repairCreateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="repairUpdateTime != null" >
-        #{repairUpdateTime,jdbcType=TIMESTAMP},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="Repair" >
+
+  <!-- 修改维修信息 -->
+  <update id="updateRepairInfo" parameterType="Repair" >
     update tb_rst_repair
     <set >
       <if test="customerId != null" >
-        customer_id = #{customerId,jdbcType=INTEGER},
+        customer_id = #{customerId},
       </if>
       <if test="orderId != null" >
-        order_id = #{orderId,jdbcType=INTEGER},
+        order_id = #{orderId},
       </if>
       <if test="signclosedId != null" >
-        signclosed_id = #{signclosedId,jdbcType=INTEGER},
+        signclosed_id = #{signclosedId},
       </if>
       <if test="repairBackEfastOrderId != null" >
-        repair_back_efast_order_id = #{repairBackEfastOrderId,jdbcType=VARCHAR},
+        repair_back_efast_order_id = #{repairBackEfastOrderId},
       </if>
       <if test="repairBackStatus != null" >
-        repair_back_status = #{repairBackStatus,jdbcType=BIT},
+        repair_back_status = #{repairBackStatus},
       </if>
       <if test="repairBackName != null" >
-        repair_back_name = #{repairBackName,jdbcType=VARCHAR},
+        repair_back_name = #{repairBackName},
       </if>
       <if test="repairBackTel != null" >
-        repair_back_tel = #{repairBackTel,jdbcType=CHAR},
+        repair_back_tel = #{repairBackTel},
       </if>
       <if test="repairBackLogisticsCompany != null" >
-        repair_back_logistics_company = #{repairBackLogisticsCompany,jdbcType=VARCHAR},
+        repair_back_logistics_company = #{repairBackLogisticsCompany},
       </if>
       <if test="repairBackLogisticsNo != null" >
-        repair_back_logistics_no = #{repairBackLogisticsNo,jdbcType=VARCHAR},
+        repair_back_logistics_no = #{repairBackLogisticsNo},
       </if>
       <if test="repairBackPostage != null" >
-        repair_back_postage = #{repairBackPostage,jdbcType=INTEGER},
+        repair_back_postage = #{repairBackPostage},
       </if>
       <if test="repairBackMachineNo != null" >
-        repair_back_machine_no = #{repairBackMachineNo,jdbcType=VARCHAR},
+        repair_back_machine_no = #{repairBackMachineNo},
       </if>
       <if test="repairSendStatus != null" >
-        repair_send_status = #{repairSendStatus,jdbcType=BIT},
+        repair_send_status = #{repairSendStatus},
       </if>
       <if test="repairSendName != null" >
-        repair_send_name = #{repairSendName,jdbcType=VARCHAR},
+        repair_send_name = #{repairSendName},
       </if>
       <if test="repairSendTel != null" >
-        repair_send_tel = #{repairSendTel,jdbcType=CHAR},
+        repair_send_tel = #{repairSendTel},
       </if>
       <if test="provinceNumber != null" >
-        province_number = #{provinceNumber,jdbcType=VARCHAR},
+        province_number = #{provinceNumber},
       </if>
       <if test="cityNumber != null" >
-        city_number = #{cityNumber,jdbcType=VARCHAR},
+        city_number = #{cityNumber},
       </if>
       <if test="areaNumber != null" >
-        area_number = #{areaNumber,jdbcType=VARCHAR},
+        area_number = #{areaNumber},
       </if>
       <if test="repairSendMergeAddress != null" >
-        repair_send_merge_address = #{repairSendMergeAddress,jdbcType=VARCHAR},
+        repair_send_merge_address = #{repairSendMergeAddress},
       </if>
       <if test="repairSendAddress != null" >
-        repair_send_address = #{repairSendAddress,jdbcType=VARCHAR},
+        repair_send_address = #{repairSendAddress},
       </if>
       <if test="repairSendLogisticsCompany != null" >
-        repair_send_logistics_company = #{repairSendLogisticsCompany,jdbcType=VARCHAR},
+        repair_send_logistics_company = #{repairSendLogisticsCompany},
       </if>
       <if test="repairSendLogisticsNo != null" >
-        repair_send_logistics_no = #{repairSendLogisticsNo,jdbcType=VARCHAR},
+        repair_send_logistics_no = #{repairSendLogisticsNo},
       </if>
       <if test="repairDesc != null" >
-        repair_desc = #{repairDesc,jdbcType=VARCHAR},
+        repair_desc = #{repairDesc},
       </if>
       <if test="repairState != null" >
-        repair_state = #{repairState,jdbcType=BIT},
+        repair_state = #{repairState},
       </if>
       <if test="repairAlipay != null" >
-        repair_alipay = #{repairAlipay,jdbcType=VARCHAR},
+        repair_alipay = #{repairAlipay},
       </if>
       <if test="repairIsTransfer != null" >
-        repair_is_transfer = #{repairIsTransfer,jdbcType=BIT},
+        repair_is_transfer = #{repairIsTransfer},
       </if>
       <if test="repairCreateTime != null" >
-        repair_create_time = #{repairCreateTime,jdbcType=TIMESTAMP},
+        repair_create_time = #{repairCreateTime},
       </if>
       <if test="repairUpdateTime != null" >
-        repair_update_time = #{repairUpdateTime,jdbcType=TIMESTAMP},
+        repair_update_time = #{repairUpdateTime},
       </if>
     </set>
-    where repair_id = #{repairId,jdbcType=INTEGER}
+    where repair_id = #{repairId}
   </update>
   <update id="updateByPrimaryKey" parameterType="Repair" >
     update tb_rst_repair

+ 165 - 10
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -56,6 +56,10 @@ public class AdminCustomerController {
     private QuestionDescribeService questionDescribeService;
     @Autowired
     private RenewedService renewedService;
+    @Autowired
+    private RepairService repairService;
+    @Autowired
+    private BackGoodsService backGoodsService;
 
     @Autowired
     private FittingsInfoService fittingsInfoService;
@@ -218,7 +222,7 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:add:visit")
     @RequestMapping("/add_visit_info")
-    public ResponseJson addVisitInfo(HttpServletRequest request,Visit visit) {
+    public ResponseJson addVisitInfo(HttpServletRequest request,Visit visit) throws Exception {
         String visitAdminId = request.getParameter("visitAdminId");
         if (!StringUtils.isNotEmpty(visitAdminId)) {
             return new ResponseJson(500, "请选择回访人!", 500);
@@ -242,7 +246,7 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:update:customerIsSolve")
     @RequestMapping("/update_customerIsSolve")
-    public ResponseJson updateCustomerIsSolve(HttpServletRequest request) {
+    public ResponseJson updateCustomerIsSolve(HttpServletRequest request) throws Exception {
         String customerId = request.getParameter("customerId");
         if (!StringUtils.isNotEmpty(customerId)) {
             return new ResponseJson(500, "该客诉信息不存在!", 500);
@@ -276,8 +280,8 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:add:customer")
     @RequestMapping("/select_sys_admin")
-    public ResponseJson selectSysAdmin(HttpServletRequest request) {
-        ResponseJson rj = new ResponseJson(200, "查询成功!", 200);
+    public ResponseJson selectSysAdmin(HttpServletRequest request) throws Exception {
+        ResponseJson rj = new ResponseJson(200, "修改成功!", 200);
         Integer adminId = AdminUtils.getLoginAdminId();
         Admin admin = new Admin();
         List<Admin> adminList = sysService.listSelectAdmin(admin);
@@ -298,8 +302,8 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:add:customer")
     @RequestMapping("/select_produce_type")
-    public ResponseJson selectProduceType(HttpServletRequest request) {
-        ResponseJson rj = new ResponseJson(200, "查询成功!", 200);
+    public ResponseJson selectProduceType(HttpServletRequest request) throws Exception {
+        ResponseJson rj = new ResponseJson(200, "修改成功!", 200);
 
         ProductType productType = new ProductType();
         List<ProductType> productTypeList = productService.listProductType(productType);
@@ -372,7 +376,7 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:update:visit")
     @RequestMapping("/update_visit_finish")
-    public ResponseJson updateVisitFinish(HttpServletRequest request,Visit visit) {
+    public ResponseJson updateVisitFinish(HttpServletRequest request,Visit visit) throws Exception {
         String customerId = request.getParameter("finish_customerId");
         if (!StringUtils.isNotEmpty(customerId)) {
             return new ResponseJson(500, "该客诉信息不存在!", 500);
@@ -396,7 +400,7 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:get:visit")
     @RequestMapping("/get_visit_info")
-    public ResponseJson getVisitInfo(HttpServletRequest request) {
+    public ResponseJson getVisitInfo(HttpServletRequest request) throws Exception {
         String customerId = request.getParameter("customerId");
         if (!StringUtils.isNotEmpty(customerId)) {
             return new ResponseJson(500, "该客诉信息不存在!", 500);
@@ -422,7 +426,7 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:get:describe")
     @RequestMapping("/get_describe_info")
-    public ResponseJson getDescribeInfo(HttpServletRequest request) {
+    public ResponseJson getDescribeInfo(HttpServletRequest request) throws Exception {
         String customerId = request.getParameter("customerId");
         if (!StringUtils.isNotEmpty(customerId)) {
             return new ResponseJson(500, "该客诉信息不存在!", 500);
@@ -448,7 +452,7 @@ public class AdminCustomerController {
     @ResponseBody
     @RequiresPermissions("customer:get:renewed")
     @RequestMapping("/get_renewed_info")
-    public ResponseJson getRenewedInfo(HttpServletRequest request) {
+    public ResponseJson getRenewedInfo(HttpServletRequest request) throws Exception {
         String customerId = request.getParameter("customerId");
         if (!StringUtils.isNotEmpty(customerId)) {
             return new ResponseJson(500, "该客诉信息不存在!", 500);
@@ -473,5 +477,156 @@ public class AdminCustomerController {
             return rj;
         }
     }
+
+    /**
+     * 修改换新信息
+     * @param request
+     * @param renewed
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:update:renewed")
+    @RequestMapping("/update_renewed_info")
+    public ResponseJson updateRenewedInfo(HttpServletRequest request, Renewed renewed) throws Exception {
+        if (!StringUtils.isNotEmpty(renewed.getRenewedId().toString())) {
+            return new ResponseJson(500, "该换新信息不能修改!", 500);
+        }
+        if (StringUtils.isNotEmpty(renewed.getRenewedBackPostage().toString())) {
+            renewed.setRenewedBackPostage(renewed.getRenewedBackPostage().intValue()*100);
+        }
+        //修改换新信息
+        int num = renewedService.updateRenewedInfo(renewed);
+        if (num > 0) {
+            return new ResponseJson(200, "修改成功!", 200);
+        } else {
+            return new ResponseJson(500, "修改失败!", 500);
+        }
+    }
+
+    /**
+     * 进入修改维修页面
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:update:repair")
+    @RequestMapping("/_update_repair")
+    public ResponseJson updateRepairUI(HttpServletRequest request) throws Exception {
+        String customerId = request.getParameter("customerId");
+        if (!StringUtils.isNotEmpty(customerId)) {
+            return new ResponseJson(500, "该客诉信息不存在!", 500);
+        }
+        Repair repair = new Repair();
+        repair.setCustomerId(Integer.parseInt(customerId));
+        repair.setRepairState(1);
+        //获取维修详情和品质检测信息
+        repair = repairService.getRepairInfo(repair);
+        if (repair == null) {
+            return new ResponseJson(500, "该客诉没有维修信息!", 500);
+        } else {
+            ClosedFitting closedFitting = new ClosedFitting();
+            closedFitting.setRelationId(repair.getRepairId());
+            //获取寄回配件集合
+            List<ClosedFitting> fittingList = renewedService.listClosedFitting(closedFitting);
+            if (fittingList != null && fittingList.size() > 0) {
+                repair.setClosedFittings(fittingList);
+            }
+            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("repair", repair);
+            return rj;
+        }
+    }
+
+    /**
+     * 修改维修处理信息
+     * @param request
+     * @param repair
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:update:repair")
+    @RequestMapping("/update_repair_info")
+    public ResponseJson updateRepairInfo(HttpServletRequest request, Repair repair) throws Exception {
+        if (!StringUtils.isNotEmpty(repair.getRepairId().toString())) {
+            return new ResponseJson(500, "该换新信息不能修改!", 500);
+        }
+        String provinceNumber = request.getParameter("repairProvinceNumber");
+        String cityNumber = request.getParameter("repairCityNumber");
+        String areaNumber = request.getParameter("repairAreaNumber");
+        if (StringUtils.isNotEmpty(provinceNumber)) {
+            repair.setProvinceNumber(Integer.parseInt(provinceNumber));
+        }
+        if (StringUtils.isNotEmpty(cityNumber)) {
+            repair.setCityNumber(Integer.parseInt(cityNumber));
+        }
+        if (StringUtils.isNotEmpty(areaNumber)) {
+            repair.setAreaNumber(Integer.parseInt(areaNumber));
+        }
+        if (StringUtils.isNotEmpty(repair.getRepairBackPostage().toString())) {
+            repair.setRepairBackPostage(repair.getRepairBackPostage().intValue()*100);
+        }
+        //修改维修信息
+        int num = repairService.updateRepairInfo(repair);
+        if (num > 0) {
+            return new ResponseJson(200, "修改成功!", 200);
+        } else {
+            return new ResponseJson(500, "修改失败!", 500);
+        }
+    }
+
+    /**
+     * 进入修改售后退货页面
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:update:BackGoods")
+    @RequestMapping("/_update_back_goods")
+    public ResponseJson updateBackGoodsUI(HttpServletRequest request) throws Exception {
+        String customerId = request.getParameter("customerId");
+        if (!StringUtils.isNotEmpty(customerId)) {
+            return new ResponseJson(500, "该客诉信息不存在!", 500);
+        }
+        BackGoods backGoods = new BackGoods();
+        backGoods.setCustomerId(Integer.parseInt(customerId));
+        //获取售后退货信息
+        backGoods = customerService.getBackGoods(backGoods);
+        if (backGoods == null) {
+            return new ResponseJson(500, "该客诉没有售后退货信息!", 500);
+        } else {
+            ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+            rj.addResponseKeyValue("backGoods", backGoods);
+            return rj;
+        }
+    }
+
+    /**
+     * 修改售后退货信息
+     * @param request
+     * @param backGoods
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequiresPermissions("customer:update:BackGoods")
+    @RequestMapping("/update_back_goods")
+    public ResponseJson updateBackGoods(HttpServletRequest request, BackGoods backGoods) throws Exception {
+        if (!StringUtils.isNotEmpty(backGoods.getBackGoodsId().toString())) {
+            return new ResponseJson(500, "该售后退货信息不能修改!", 500);
+        }
+        if (StringUtils.isNotEmpty(backGoods.getBackGoodsBackPostage().toString())) {
+            backGoods.setBackGoodsBackPostage(backGoods.getBackGoodsBackPostage().intValue()*100);
+        }
+        int num = backGoodsService.updateBackGoods(backGoods);
+        if (num > 0) {
+            return new ResponseJson(200, "修改成功!", 200);
+        } else {
+            return new ResponseJson(500, "修改失败!", 500);
+        }
+    }
 }
 

+ 139 - 7
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -1,16 +1,20 @@
 package com.iamberry.rst.controllers.cm;
 
-import com.iamberry.rst.core.cm.ComplaintDetectInfo;
-import com.iamberry.rst.core.cm.FittingsInfo;
+import com.iamberry.rst.core.cm.*;
 import com.iamberry.rst.core.order.Order;
 import com.iamberry.rst.core.order.Product;
 import com.iamberry.rst.core.order.RentType;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.pts.PtsDevice;
+import com.iamberry.rst.faces.cm.AwaitingSignclosedProductInfoService;
 import com.iamberry.rst.faces.cm.ComplaintDetectInfoService;
+import com.iamberry.rst.faces.cm.ComplaintSignclosedProductInfoService;
 import com.iamberry.rst.faces.cm.FittingsInfoService;
 import com.iamberry.rst.faces.product.ProductService;
+import com.iamberry.rst.service.cm.mapper.AwaitingSignclosedProductMapper;
+import com.iamberry.rst.service.cm.mapper.ComplaintSignclosedInfoMapper;
+import com.iamberry.rst.service.cm.mapper.ComplaintSignclosedProductInfoMapper;
 import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.wechat.tools.ResponseJson;
 import org.apache.commons.lang.StringUtils;
@@ -41,8 +45,12 @@ public class AdminDetectController {
     private ProductService productService;
     @Autowired
     private FittingsInfoService fittingsInfoService;
-
-
+    @Autowired
+    private ComplaintSignclosedInfoMapper complaintSignclosedInfoMapper;
+    @Autowired
+    private ComplaintSignclosedProductInfoService signclosedProductInfoService;
+    @Autowired
+    private AwaitingSignclosedProductInfoService awaitingSignclosedProductService;
     /**
      * 跳转到添加检测记录页面
      *
@@ -182,7 +190,7 @@ public class AdminDetectController {
         ModelAndView mv = new ModelAndView("cm/inspection/add_remark");
         String detectId = request.getParameter("detectId");
         if(detectId == null || detectId.equals("")){
-            return null;
+            return mv;
         }
         ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
         mv.addObject("detectId",detectId);
@@ -202,7 +210,7 @@ public class AdminDetectController {
         String detectId = request.getParameter("detectId");
         String state = request.getParameter("state");
         if(detectId == null || detectId.equals("")){
-            return null;
+            return mv;
         }
         ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
         mv.addObject("detectId",detectId);
@@ -222,7 +230,7 @@ public class AdminDetectController {
         ModelAndView mv = new ModelAndView("cm/inspection/detect_complete");
         String detectId = request.getParameter("detectId");
         if(detectId == null || detectId.equals("")){
-            return null;
+            return mv;
         }
         ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
         mv.addObject("detectId",detectId);
@@ -300,5 +308,129 @@ public class AdminDetectController {
         }
         return msg;
     }
+
+    /**
+     * 跳转到查看仓储进度页面
+     *
+     * @return
+     */
+    @RequiresPermissions("complete:update:complete")
+    @RequestMapping(value = "/to_view_progress")
+    public ModelAndView toViewProgress(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/view_progress");
+        String signclosedId = request.getParameter("signclosedId");
+        if(signclosedId == null || signclosedId.equals("")){
+            return mv;
+        }
+        if(Integer.valueOf(signclosedId) == 0){
+            return mv;
+        }
+        List<SignclosedProductInfo> signclosedProductInfo = null;
+        List<AwaitingSignclosedProductInfo> awaitingSignclosedProductInfo = null;
+        ComplaintSignclosedInfo complaintSignclosedInfo = complaintSignclosedInfoMapper.getSignclosedById(Integer.valueOf(signclosedId));
+
+        if(complaintSignclosedInfo.getSignclosedState() == 1){//如果已签收。查询签收表所有产品 反之查询待签收表
+            signclosedProductInfo = signclosedProductInfoService.listSignclosedById(complaintSignclosedInfo.getSignclosedId());
+        }else{
+            awaitingSignclosedProductInfo = awaitingSignclosedProductService.listByPrimaryId(complaintSignclosedInfo.getSignclosedId());
+        }
+
+        mv.addObject("signclosedProductInfo",signclosedProductInfo == null ? awaitingSignclosedProductInfo :signclosedProductInfo);
+        mv.addObject("signclosedInfo",complaintSignclosedInfo);
+        mv.addObject("signclosedId",signclosedId);
+        return mv;
+    }
+
+    /**
+     * 跳转到查看物流信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("complete:update:complete")
+    @RequestMapping(value = "/to_view_logistics")
+    public ModelAndView toViewLogistics(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/logistics/view_logistics");
+        String billCode = request.getParameter("billCode");
+        String billName = request.getParameter("billName");
+        if(billCode == null || billCode.equals("") ||billName == null || billName.equals("")){
+            return mv;
+        }
+        mv.addObject("billCode",billCode);
+        mv.addObject("billName",billName);
+        return mv;
+    }
+
+    /**
+     * 增加催促提醒
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("reminding:add:reminding")
+    @ResponseBody
+    @RequestMapping("/add_reminding")
+    public ResponseJson add_reminding(HttpServletRequest request,ComplaintSignclosedInfo complaintSignclosedInfo) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        Integer num = complaintSignclosedInfoMapper.updateUrgedNumById(complaintSignclosedInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
+
+    /**
+     * 跳转到修改检测完成信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("complete:update:complete")
+    @RequestMapping(value = "/to_update_complete")
+    public ModelAndView toUpdateComplete(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/update_complete");
+        String detectId = request.getParameter("detectId");
+        if(detectId == null || detectId.equals("")){
+            return mv;
+        }
+        ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
+        mv.addObject("detectId",detectId);
+        mv.addObject("detectInfo",detectInfo);
+        return mv;
+    }
+
+    /**
+     * 检测完成
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions("complete:update:complete")
+    @ResponseBody
+    @RequestMapping("/update_complete")
+    public ResponseJson update_complete(HttpServletRequest request, ComplaintDetectInfo detectInfo) throws Exception {
+        ResponseJson msg = new ResponseJson();
+        if(detectInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        if(detectInfo.getDetectId() == null || detectInfo.getDetectId().equals("")){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        Integer num = complaintDetectInfoService.updateComplaintDetectById(detectInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
 }
 

+ 125 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java

@@ -0,0 +1,125 @@
+package com.iamberry.rst.controllers.cm;
+
+import com.iamberry.rst.core.cm.AwaitingSignclosedProductInfo;
+import com.iamberry.rst.core.cm.ComplaintDetectInfo;
+import com.iamberry.rst.core.cm.ComplaintSignclosedInfo;
+import com.iamberry.rst.core.cm.SignclosedProductInfo;
+import com.iamberry.rst.core.order.Product;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.faces.cm.ComplaintDetectInfoService;
+import com.iamberry.rst.faces.cm.ComplaintSignclosedInfoService;
+import com.iamberry.rst.faces.cm.FittingsInfoService;
+import com.iamberry.rst.faces.product.ProductService;
+import com.iamberry.rst.service.cm.mapper.AwaitingSignclosedProductMapper;
+import com.iamberry.rst.service.cm.mapper.ComplaintSignclosedInfoMapper;
+import com.iamberry.rst.service.cm.mapper.ComplaintSignclosedProductInfoMapper;
+import com.iamberry.rst.utils.StitchAttrUtil;
+import com.iamberry.wechat.tools.ResponseJson;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * Created by wxm on 2017/8/29.
+ */
+@Controller
+@RequestMapping("/admin/signclosed")
+public class AdminSignclosedController {
+
+   // private
+    @Autowired
+    private ComplaintDetectInfoService complaintDetectInfoService;
+    @Autowired
+    private ProductService productService;
+    @Autowired
+    private FittingsInfoService fittingsInfoService;
+    @Autowired
+    private ComplaintSignclosedInfoService complaintSignclosedInfoService;
+    /**
+     * 跳转到添加检测记录页面
+     *
+     * @return
+     */
+    @RequiresPermissions("detect:add:detect")
+    @RequestMapping(value = "/to_add_detect")
+    public ModelAndView toAddDetect(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/add_detect");
+        //获取所有产品
+        List<Product> productList = productService.listProduce();
+        mv.addObject("productList",productList);
+        /*//获取所有配件
+        List<FittingsInfo> listFittings = fittingsInfoService.listFittings();
+        mv.addObject("listFittings",listFittings);*/
+        return mv;
+    }
+
+
+
+    /**
+     * 客诉 - 查询签收/仓储列表
+     * @param request
+     * @return
+     */
+    @RequiresPermissions("signclosed:select:signclosed")
+    @RequestMapping("/select_signclosed_list")
+    public ModelAndView selectDetectList(HttpServletRequest request,
+                                        @RequestParam(value = "pageNO", defaultValue = "1", required = false) int pageNO,
+                                        @RequestParam(value = "pageTotal", required = false) Integer pageTotal,
+                                        @RequestParam(value = "pageSize", defaultValue = "5", required = false) int pageSize,
+                                         ComplaintSignclosedInfo signclosedInfo) {
+
+        ModelAndView mv = new ModelAndView("cm/signclosed/signclosed_list");
+        StringBuilder url = new StringBuilder("/admin/signclosed/select_signclosed_list?pageSize=" + pageSize);
+// 请求参数
+        /*if (signclosedInfo.getSignclosedType() != null) {
+            url.append("&signclosedType=").append(signclosedInfo.getSignclosedType());
+            mv.addObject("signclosedType",signclosedInfo.getSignclosedType());
+        }
+        if (StringUtils.isNotEmpty(signclosedInfo.getSignclosedSendName())) {
+            url.append("&signclosedInfo=").append(signclosedInfo.getSignclosedSendName());
+            mv.addObject("signclosedInfo",signclosedInfo.getSignclosedSendName());
+        }
+        if (StringUtils.isNotEmpty(signclosedInfo.getSignclosedSendTel())) {
+            url.append("&signclosedSendTel=").append(signclosedInfo.getSignclosedSendTel());
+            mv.addObject("signclosedSendTel",signclosedInfo.getSignclosedSendTel());
+        }
+        if (StringUtils.isNotEmpty(signclosedInfo.getSignclosedLogisticsNumber())) {
+            url.append("&signclosedLogisticsNumber=").append(signclosedInfo.getSignclosedLogisticsNumber());
+            mv.addObject("signclosedLogisticsNumber",signclosedInfo.getSignclosedLogisticsNumber());
+        }
+        if (signclosedInfo.getSignclosedObjectsState() != null) {
+            url.append("&signclosedObjectsState=").append(signclosedInfo.getSignclosedObjectsState());
+            mv.addObject("signclosedObjectsState",signclosedInfo.getSignclosedObjectsState());
+        }*/
+        // 封装请求数据
+        PageRequest<ComplaintSignclosedInfo> pageRequest = new PageRequest<>(signclosedInfo, pageNO, pageSize, pageTotal == null);
+        // 查询订单列表
+        PagedResult<ComplaintSignclosedInfo> result = complaintSignclosedInfoService.listSignclosed(pageRequest);
+        long total = 0;
+        if (pageTotal == null) {
+            total = result.getPages();
+        } else {
+            total = pageTotal;
+            result.setPages(total);
+        }
+
+       /* url.append("&pageTotal=").append(total).append("&pageNO=");
+        mv.addObject("page", result);
+        mv.addObject("url", url.toString());*/
+        StitchAttrUtil.setModelAndView(signclosedInfo, mv, "/admin/signclosed/select_signclosed_list", result);
+        return mv;
+    }
+
+
+}
+

+ 51 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/kuaidi/LogisticsController.java

@@ -0,0 +1,51 @@
+package com.iamberry.rst.controllers.kuaidi;
+
+import com.iamberry.rst.utils.KuaiDi100;
+import com.iamberry.rst.utils.ResultMsg;
+import com.iamberry.wechat.tools.NameUtils;
+import com.iamberry.wechat.tools.ResultInfo;
+import net.sf.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Created by Administrator on 2017/8/15.
+ */
+@Controller
+@RequestMapping("/logistics")
+public class LogisticsController {
+    @Autowired
+    private KuaiDi100 kuaidi100;
+
+
+    /**
+     * 查询快递信息
+     * @param com 快递公司代码
+     * @param nu 快递单号
+     * @return
+     */
+    @RequestMapping("/getExpressInfo")
+    @ResponseBody
+    public ResultMsg getExpressInfo(@RequestParam("com") String com, @RequestParam("nu") String nu, HttpServletResponse response){
+        ResultMsg msg = new ResultMsg();
+        JSONObject rst = null;
+        if (com == null || com.equals("") || nu == null || nu.equals("")){
+            msg.setResultCode(ResultInfo.ERRORCODE);
+            msg.setMessage(NameUtils.getConfig("ERROR"));
+            msg.setData(rst);
+            msg.setStatus(false);
+            return msg;
+        }
+        rst = kuaidi100.getExpressInfo(com,nu);
+        msg.setResultCode(ResultInfo.SUCCESSCODE);
+        msg.setMessage(NameUtils.getConfig("SUCCESSINFO"));
+        msg.setData(rst);
+        msg.setStatus(true);
+        return msg;
+    }
+}

+ 206 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/KuaiDi100.java

@@ -0,0 +1,206 @@
+package com.iamberry.rst.utils;
+
+import net.sf.json.JSONObject;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+
+/**
+ * Created by Administrator on 2017/8/15.
+ */
+@Component
+public class KuaiDi100 {
+    private static String key = "29833628d495d7a5";//授权密匙key    百度的
+  /*private static String key = "06d6c2ea1bdb4ee9";//授权密匙key  自己的*/
+                    /*<option value="sto">申通快递</option>
+					<option value="yto">圆通快递</option>
+					<option value="sf">顺丰快递</option>
+					<option value="ems">邮政EMS</option>
+					<option value="zto">中通快递</option>
+					<option value="zjs">宅急送</option>
+					<option value="yunda">韵达快递</option>
+					<option value="cces">cces快递</option>
+					<option value="pick">上门提货</option>
+					<option value="htky">汇通快递</option>
+					<option value="ttkdex">天天快递</option>
+					<option value="stars">星晨急便</option>
+					<option value="jd">京东快递</option>
+					<option value="01">其他</option>
+					<option value="02">上门送货</option>*/
+
+  public String logisticsConversions(String code){
+      if(code == null || code.equals("")){
+          return null;
+      }
+      switch (code){
+          case "sto":
+              code = "shentong";
+              break;
+          case "yto":
+              code = "yuantong";
+              break;
+          case "sf":
+              code = "shunfeng";
+              break;
+          case "ems":
+              code = "ems";
+              break;
+          case "eyb":
+              code = "ems";
+              break;
+          case "zto":
+              code = "zhongtong";
+              break;
+          case "zjs":
+              code = "zhaijisong";
+              break;
+          case "yunda":
+              code = "yunda";
+              break;
+          case "cces":
+              code = "cces";
+              break;
+          case "pick":
+              code = "pick";
+              break;
+          case "htky":
+              code = "huitongkuaidi";
+              break;
+          case "ttkdex":
+              code = "tiantian";
+              break;
+          case "stars":
+              code = "xingchenjibian";
+              break;
+          case "jd":
+              code = "jd";
+              break;
+          case "01":
+              code = "01";
+              break;
+          case "02":
+              code = "01";
+              break;
+      }
+    return code;
+  }
+    /**
+     *  快递对应代码
+     *  EMS 		ems/eyb
+     * 	申通快递  	shentong
+     * 	顺丰速运 	shunfeng
+     * 	圆通速递 	yuantong
+     * 	韵达快运		yunda
+     *	中通快递		zhongtong
+     *	百世快递		huitongkuaidi
+     *	天天快递		tiantian
+     *	宅急送		zhaijisong
+     *	邮政国内包裹	youzhengguonei
+     *	邮政国际包裹	youzhengguoji
+     *	EMS国际快递	emsguoji
+     */
+    public static void main(String[] agrs){
+        KuaiDi100 kuaidi = new KuaiDi100();
+        System.out.println(kuaidi.getExpressInfo("ems","9754210807242"));
+    }
+    /**
+     * 查询快递信息
+     * @param com 快递公司代码
+     * @param nu 快递单号
+     * @return
+     */
+    public JSONObject getExpressInfo(String com , String nu){
+        JSONObject ret = null;
+        try
+        {
+            com = logisticsConversions(com);
+            StringBuilder sb = new StringBuilder();
+            sb.append("http://api.kuaidi100.com/api?id=");
+            sb.append(KuaiDi100.key);
+            sb.append("&com=").append(com);
+            sb.append("&nu=").append(nu);
+            sb.append("&show=0&muti=1&order=desc");
+            URL url= new URL(sb.toString());
+            URLConnection con=url.openConnection();
+            con.setAllowUserInteraction(false);
+            InputStream urlStream = url.openStream();
+            String type = con.guessContentTypeFromStream(urlStream);
+            String charSet=null;
+            if (type == null)
+                type = con.getContentType();
+
+            if (type == null || type.trim().length() == 0)
+                return null;
+
+            if(type.indexOf("charset=") > 0)
+                charSet = type.substring(type.indexOf("charset=") + 8);
+
+            byte b[] = new byte[10000];
+            int numRead = urlStream.read(b);
+            String content = new String(b, 0, numRead, "UTF-8");
+            while (numRead != -1) {
+                numRead = urlStream.read(b);
+                if (numRead != -1) {
+                    //String newContent = new String(b, 0, numRead);
+                    String newContent = new String(b, 0, numRead, "UTF-8");
+                    content += newContent;
+                }
+            }
+            ret = JSONObject.fromObject(content);
+            System.out.println(ret);
+            urlStream.close();
+        } catch (MalformedURLException e)
+        {
+            e.printStackTrace();
+        } catch (IOException e)
+        {
+            e.printStackTrace();
+        }
+        return ret;
+    }
+    /**
+     * 该接口使用与收费的快递公司接口查询
+     * @param com 快递公司代码
+     * @param nu 快递单号
+     * @return
+     */
+    public static String searchkuaiDiInfo(String com, String nu)
+    {
+        String content = "";
+        try
+        {
+            StringBuilder sb = new StringBuilder();
+            sb.append("http://www.kuaidi100.com/applyurl?key=").append(KuaiDi100.key);
+            sb.append("&com=").append(com);
+            sb.append("&nu=").append(nu);
+            URL url = new URL(sb.toString());
+            URLConnection con = url.openConnection();
+            con.setAllowUserInteraction(false);
+            InputStream urlStream = url.openStream();
+            byte b[] = new byte[10000];
+            int numRead = urlStream.read(b);
+            content = new String(b, 0, numRead);
+            while (numRead != -1)
+            {
+                numRead = urlStream.read(b);
+                if (numRead != -1)
+                {
+                    // String newContent = new String(b, 0, numRead);
+                    String newContent = new String(b, 0, numRead, "UTF-8");
+                    content += newContent;
+                }
+            }
+            urlStream.close();
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            System.out.println("快递查询错误");
+        }
+        return content;
+    }
+}

+ 68 - 0
watero-rst-web/src/main/java/com/iamberry/rst/utils/ResultMsg.java

@@ -0,0 +1,68 @@
+package com.iamberry.rst.utils;
+
+/**
+ * @description 作为服务影响的返回结果,常用业务错误,返回错误码和错误信息;
+ * @author 欧阳明
+ * @data 2016-4-18 14:23
+ */
+public class ResultMsg implements java.io.Serializable{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 8987614804726091566L;
+
+	private boolean status; // 状态
+	
+	private String ResultCode ; //状态码
+	
+	private String message; //返回信息
+	
+	private Object data; //返回对象
+
+	public ResultMsg(){}
+	
+	public ResultMsg(boolean status, String resultCode, String message,
+                     Object data) {
+		super();
+		this.status = status;
+		ResultCode = resultCode;
+		this.message = message;
+		this.data = data;
+	}
+
+	public boolean isStatus() {
+		return status;
+	}
+
+	public void setStatus(boolean status) {
+		this.status = status;
+	}
+
+	public String getResultCode() {
+		return ResultCode;
+	}
+
+	public void setResultCode(String resultCode) {
+		ResultCode = resultCode;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+
+	public Object getData() {
+		return data;
+	}
+
+	public void setData(Object data) {
+		this.data = data;
+	}
+	
+	
+
+}

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

@@ -208,11 +208,12 @@
         </div>
         <!-- 查看问题描述内容end -->
         <!-- 换新处理start -->
-        <div class="layui-layer layui-anim layui-layer-iframe" id="update-renewed-info" times="4" showtime="0" contype="string" style="display:none;z-index: 19891018; width: 700px; height: 700px; position: absolute; top: 100px; left: 250px;text-align: left;">
-            <form action="" name="form-visit-finish" method="post" class="form form-horizontal" id="form-visit-finish">
+        <div class="layui-layer layui-anim layui-layer-iframe" id="update-renewed-info" times="4" showtime="0" contype="string" style="display:none;z-index: 19891018; width: 700px; height: 850px; position: absolute; top: 100px; left: 250px;text-align: left;">
+            <form action="" name="form-update-renewed" method="post" class="form form-horizontal" id="form-update-renewed">
                 <div class="layui-layer-title" id="synOrder" style="cursor: move;" move="ok">换新处理</div>
                 <div style="margin-left: 10px;">
                     <div class="formControls" style="margin-top: 10px;">
+                        <input type="hidden" id="renewedId" name="renewedId" />
                         <label><span class="c-red">*</span>&nbsp;当前进度:</label>
                         <label id="renewedSchedule"></label>
                     </div>
@@ -322,7 +323,7 @@
                 <div style="margin-left: 10px;">
                     <div class="formControls" style="margin-top: 10px;">
                         <label><span class="c-red">*</span>&nbsp;备注:</label>
-                        <input type="text" id="renewedDesc" class="input-text" value="" style="width: 150px;" name="renewedDesc">
+                        <textarea id="renewedDesc" name="renewedDesc" cols="" rows="" style="width: 500px;height: 70px;" class="textarea" ></textarea>
                     </div>
                     <div class="col-4"> </div>
                 </div>
@@ -385,7 +386,7 @@
                     <div class="col-4"> </div>
                 </div>
                 <div class="col-9 col-offset-3">
-                    <input class="btn btn-primary radius" onclick="updateVisitInfo();" type="button" value="&nbsp;&nbsp;确认&nbsp;&nbsp;">
+                    <input class="btn btn-primary radius" onclick="update_renewed_info();" type="button" value="&nbsp;&nbsp;确认&nbsp;&nbsp;">
                 </div>
             </form>
             <span class="layui-layer-setwin">
@@ -393,6 +394,271 @@
 		</span>
         </div>
         <!-- 换新处理start -->
+        <!-- 维修处理start -->
+        <div class="layui-layer layui-anim layui-layer-iframe" id="update-repair-info" times="4" showtime="0" contype="string" style="display:none;z-index: 19891018; width: 700px; height: 850px; position: absolute; top: 100px; left: 250px;text-align: left;">
+            <form action="" name="form-update-repair" method="post" class="form form-horizontal" id="form-update-repair">
+                <div class="layui-layer-title" id="synOrder" style="cursor: move;" move="ok">换新处理</div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <input type="hidden" id="repairId" name="repairId" />
+                        <label><span class="c-red">*</span>&nbsp;当前进度:</label>
+                        <label id="repairSchedule"></label>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls repair_back_status">
+                        <label><span class="c-red">*</span>&nbsp;客户已寄回:</label>
+                        <input type="radio" name="repairBackStatus" value="1"/><label>未寄回&nbsp;&nbsp;</label>
+                        <input type="radio" name="repairBackStatus" value="2"/><label>已寄回&nbsp;&nbsp;</label>
+                        <input type="radio" name="repairBackStatus" value="3"/><label>已收货&nbsp;&nbsp;</label>
+                    </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄回物流:</label>
+                        <select name="repairBackLogisticsCompany" id="repairBackLogisticsCompany" style="height: 30px;width: 100px;">
+                            <option value="sto">申通快递</option>
+                            <option value="yto">圆通快递</option>
+                            <option value="sf">顺丰快递</option>
+                            <option value="ems">邮政EMS</option>
+                            <option value="zto">中通快递</option>
+                            <option value="zjs">宅急送</option>
+                            <option value="yunda">韵达快递</option>
+                            <option value="cces">cces快递</option>
+                            <option value="pick">上门提货</option>
+                            <option value="htky">汇通快递</option>
+                            <option value="ttkdex">天天快递</option>
+                            <option value="stars">星晨急便</option>
+                            <option value="jd">京东快递</option>
+                            <option value="01">其他</option>
+                            <option value="02">上门送货</option>
+                        </select>
+                        <input type="text" id="repairBackLogisticsNo" class="input-text" value="" style="width: 150px;" name="repairBackLogisticsNo">
+                        <input type="text" id="repairBackPostage" class="input-text" value="" style="width: 150px;" name="repairBackPostage">
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄回信息:</label>
+                        <input type="text" id="repairBackName" class="input-text" value="" style="width: 150px;" name="repairBackName">
+                        <input type="text" id="repairBackTel" class="input-text" value="" style="width: 150px;" name="repairBackTel">
+                        <input type="text" id="repairBackMachineNo" class="input-text" value="" style="width: 150px;" name="repairBackMachineNo">
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄送产品:</label>
+                        <div id="repairProduct" class="update-parts"></div>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <hr/>
+                <div style="margin-left: 10px;">
+                    <div class="formControls repair_send_status" style="margin-top: 10px;">
+                        <label>是否已寄送:</label>
+                        <input type="radio" name="repairSendStatus" value="1"/><label>未寄出&nbsp;&nbsp;</label>
+                        <input type="radio" name="repairSendStatus" value="2"/><label>已寄出&nbsp;&nbsp;</label>
+                        <input type="radio" name="repairSendStatus" value="3"/><label>已收货&nbsp;&nbsp;</label>
+                        <label>Efast订单号:</label>
+                        <label id="repairBackEfastOrderId"></label>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;用户地址:</label>
+                        <input type="text" id="repairSendName" class="input-text" value="" style="width: 150px;" name="repairSendName">
+                        <input type="text" id="repairSendTel" class="input-text" value="" style="width: 150px;" name="repairSendTel">
+                    </div>
+                    <div class="formControls">
+                        <select id="repairProvinceNumber" name="repairProvinceNumber" style="height: 30px;width: 100px;" onchange=""></select>
+                        <select id="repairCityNumber" name="repairCityNumber" style="height: 30px;width: 100px;" onchange=""></select>
+                        <select id="repairAreaNumber" name="repairAreaNumber" style="height: 30px;width: 100px;" onchange=""></select>
+                    </div>
+                    <div class="formControls">
+                        <textarea id="repairSendAddress" name="repairSendAddress" cols="" rows="" style="width: 500px;height: 70px;" class="textarea" ></textarea>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄出物流:</label>
+                        <select name="repairSendLogisticsCompany" id="repairSendLogisticsCompany" style="height: 30px;width: 100px;">
+                            <option value="sto">申通快递</option>
+                            <option value="yto">圆通快递</option>
+                            <option value="sf">顺丰快递</option>
+                            <option value="ems">邮政EMS</option>
+                            <option value="zto">中通快递</option>
+                            <option value="zjs">宅急送</option>
+                            <option value="yunda">韵达快递</option>
+                            <option value="cces">cces快递</option>
+                            <option value="pick">上门提货</option>
+                            <option value="htky">汇通快递</option>
+                            <option value="ttkdex">天天快递</option>
+                            <option value="stars">星晨急便</option>
+                            <option value="jd">京东快递</option>
+                            <option value="01">其他</option>
+                            <option value="02">上门送货</option>
+                        </select>
+                        <input type="text" id="repairSendLogisticsNo" class="input-text" value="" style="width: 150px;" name="repairSendLogisticsNo">
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;备注:</label>
+                        <textarea id="repairDesc" name="repairDesc" cols="" rows="" style="width: 500px;height: 70px;" class="textarea" ></textarea>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <hr/>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;QC进度:</label>
+                        <div>
+                            <table class="table table-border table-bordered table-bg table-hover table-sort">
+                                <tr>
+                                    <th>工厂检测现象</th>
+                                    <th>故障分类</th>
+                                    <th>故障原因</th>
+                                    <th>判定结果</th>
+                                    <th>故障指向</th>
+                                    <th>原因分析</th>
+                                    <th>生产维修</th>
+                                </tr>
+                                <tr>
+                                    <td id="repairDetectPhenomenon"></td>
+                                    <td id="repairDetectFailureClassification"></td>
+                                    <td id="repairDetectFailureCause"></td>
+                                    <td id="repairDetectResults"></td>
+                                    <td id="repairDetectPoint"></td>
+                                    <td id="repairDetectAnalysis"></td>
+                                    <td id="repairDetectRevolutionProduced"></td>
+                                </tr>
+                            </table>
+                        </div>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;返修进度:</label>
+                        <div>
+                            <table class="table table-border table-bordered table-bg table-hover table-sort">
+                                <tr>
+                                    <th>是否可返修</th>
+                                    <th>返修内容</th>
+                                    <th>返修日期</th>
+                                </tr>
+                                <tr>
+                                    <td id="repairMaintenanceIdRepair"></td>
+                                    <td id="repairMaintenanceContent"></td>
+                                    <td id="repairMaintenanceContentDate"></td>
+                                </tr>
+                            </table>
+                        </div>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label>
+                            寄送产品将自动推送Efast,系统自动获取物流信息,并更新。<br/>
+                            如果在Efast作废订单等操作后,无法获取物流信息,请手动填写物流信息。
+                        </label>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div class="col-9 col-offset-3">
+                    <input class="btn btn-primary radius" onclick="update_repair_info();" type="button" value="&nbsp;&nbsp;确认&nbsp;&nbsp;">
+                </div>
+            </form>
+            <span class="layui-layer-setwin">
+				<a class="layui-layer-ico layui-layer-close layui-layer-close1" onclick="hide_this(this)" href="javascript:;"></a>
+		</span>
+        </div>
+        <!-- 维修处理end -->
+        <!-- 退货处理start -->
+        <div class="layui-layer layui-anim layui-layer-iframe" id="update-back-goods" times="4" showtime="0" contype="string" style="display:none;z-index: 19891018; width: 700px; height: 400px; position: absolute; top: 100px; left: 250px;text-align: left;">
+            <form action="" name="form-update-backGoods" method="post" class="form form-horizontal" id="form-update-backGoods">
+                <div class="layui-layer-title" id="synOrder" style="cursor: move;" move="ok">退货处理</div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <input type="hidden" id="backGoodsId" name="backGoodsId" />
+                        <label><span class="c-red">*</span>&nbsp;当前进度:</label>
+                        <label id="backGoodsSchedule"></label>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls backGoods_back_status">
+                        <label><span class="c-red">*</span>&nbsp;客户已寄回:</label>
+                        <input type="radio" name="backGoodsBackStatus" value="1"/><label>未寄回&nbsp;&nbsp;</label>
+                        <input type="radio" name="backGoodsBackStatus" value="2"/><label>已寄回&nbsp;&nbsp;</label>
+                        <input type="radio" name="backGoodsBackStatus" value="3"/><label>已收货&nbsp;&nbsp;</label>
+                    </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄回物流:</label>
+                        <select name="backGoodsBackLogisticsCompany" id="backGoodsBackLogisticsCompany" style="height: 30px;width: 100px;">
+                            <option value="sto">申通快递</option>
+                            <option value="yto">圆通快递</option>
+                            <option value="sf">顺丰快递</option>
+                            <option value="ems">邮政EMS</option>
+                            <option value="zto">中通快递</option>
+                            <option value="zjs">宅急送</option>
+                            <option value="yunda">韵达快递</option>
+                            <option value="cces">cces快递</option>
+                            <option value="pick">上门提货</option>
+                            <option value="htky">汇通快递</option>
+                            <option value="ttkdex">天天快递</option>
+                            <option value="stars">星晨急便</option>
+                            <option value="jd">京东快递</option>
+                            <option value="01">其他</option>
+                            <option value="02">上门送货</option>
+                        </select>
+                        <input type="text" id="backGoodsBackLogisticsNo" class="input-text" value="" style="width: 150px;" name="backGoodsBackLogisticsNo">
+                        <input type="text" id="backGoodsBackPostage" class="input-text" value="" style="width: 150px;" name="backGoodsBackPostage">
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄回信息:</label>
+                        <input type="text" id="backGoodsBackName" class="input-text" value="" style="width: 150px;" name="backGoodsBackName">
+                        <input type="text" id="backGoodsBackTel" class="input-text" value="" style="width: 150px;" name="backGoodsBackTel">
+                        <input type="text" id="backGoodsBackMachineNo" class="input-text" value="" style="width: 150px;" name="backGoodsBackMachineNo">
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;寄回产品:</label>
+                        <div id="backGoodsProduct" class="update-parts"></div>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <div style="margin-left: 10px;">
+                    <div class="formControls" style="margin-top: 10px;">
+                        <label><span class="c-red">*</span>&nbsp;备注:</label>
+                        <textarea id="backGoodsDesc" name="backGoodsDesc" cols="" rows="" style="width: 500px;height: 70px;" class="textarea" ></textarea>
+                    </div>
+                    <div class="col-4"> </div>
+                </div>
+                <br/>
+                <div class="col-9 col-offset-3">
+                    <input class="btn btn-primary radius" onclick="update_back_goods();" type="button" value="&nbsp;&nbsp;确认修改&nbsp;&nbsp;">
+                </div>
+            </form>
+            <span class="layui-layer-setwin">
+				<a class="layui-layer-ico layui-layer-close layui-layer-close1" onclick="hide_this(this)" href="javascript:;"></a>
+		</span>
+        </div>
+        <!-- 退货处理end -->
         <form action="${path}/admin/customer/select_customer_list" method="post">
             <button type="button" style="cursor:pointer; float: left;" class="my-btn-search" onclick="toAddCustomer();">新建客诉</button>
             <input type="text" class="my-input"  style="width:100px;margin-right: 0px;" value="${customerId!}" placeholder="客户姓名" id="customerName" name="customerName">
@@ -524,29 +790,31 @@
                                     )
                                 <#elseif customer.customerIsSolve == 4>
                                     维修(
-                                    <#if customer.backStatus == 1>
-                                        未寄回
-                                    <#elseif customer.backStatus == 2>
-                                        已寄回
-                                    <#elseif customer.backStatus == 3>
-                                        已收货
-                                    </#if>,
-                                    <#if customer.sendStatus == 1>
-                                        未寄送
-                                    <#elseif customer.sendStatus == 2>
-                                        已寄送
-                                    <#elseif customer.sendStatus == 3>
-                                        已收货
-                                    </#if>,
-                                    <#if customer.detectState == 1>
-                                        待仓库转入
-                                    <#elseif customer.detectState == 2>
-                                        正在检查
-                                    <#elseif customer.detectState == 3>
-                                        检查通过
-                                    <#elseif customer.detectState == 4>
-                                        检查未通过
-                                    </#if>
+                                    <a style="text-decoration:none" href="javascript:void(0);" onclick="get_repair_info(${customer.customerId!''})">
+                                        <#if customer.backStatus == 1>
+                                            未寄回
+                                        <#elseif customer.backStatus == 2>
+                                            已寄回
+                                        <#elseif customer.backStatus == 3>
+                                            已收货
+                                        </#if>,
+                                        <#if customer.sendStatus == 1>
+                                            未寄送
+                                        <#elseif customer.sendStatus == 2>
+                                            已寄送
+                                        <#elseif customer.sendStatus == 3>
+                                            已收货
+                                        </#if>,
+                                        <#if customer.detectState == 1>
+                                            待仓库转入
+                                        <#elseif customer.detectState == 2>
+                                            正在检查
+                                        <#elseif customer.detectState == 3>
+                                            检查通过
+                                        <#elseif customer.detectState == 4>
+                                            检查未通过
+                                        </#if>
+                                    </a>
                                     )
                                 <#elseif customer.customerIsSolve == 5>
                                     补发(
@@ -575,7 +843,17 @@
                                     </#if>
                                     )
                                 <#elseif customer.customerIsSolve == 6>
-                                    退货
+                                    退货(
+                                    <a style="text-decoration:none" href="javascript:void(0);" onclick="get_book_goods_info(${customer.customerId!''})">
+                                        <#if customer.backStatus == 1>
+                                            未寄回
+                                        <#elseif customer.backStatus == 2>
+                                            已寄回
+                                        <#elseif customer.backStatus == 3>
+                                            已收货
+                                        </#if>
+                                    </a>
+                                    )
                                 <#elseif customer.customerIsSolve == 7>
                                     无理由退货
                                 </#if>
@@ -857,6 +1135,7 @@
         });
     }
 
+    /*获取换新信息*/
     function get_renewed_info(customerId) {
         $.ajax({
             cache: true,
@@ -869,9 +1148,9 @@
 
                     var renewed = data.returnMsg.renewed;
 
-                    getProvince();
-                    getCity(renewed.provinceNumber);
-                    getDistrict(renewed.cityNumber);
+                    getProvince('provinceNumber');
+                    getCity('cityNumber',renewed.provinceNumber);
+                    getDistrict('areaNumber',renewed.cityNumber);
                     console.log(renewed);
                     var renewedSchedule = '';
                     switch (renewed.renewedBackStatus) {
@@ -888,17 +1167,18 @@
                         case 1:renewedSchedule += '待仓库转入';break;
                         case 2:renewedSchedule += '正在检查';break;
                         case 3:renewedSchedule += '检查通过';break;
-                        case 3:renewedSchedule += '检查未通过';break;
+                        case 4:renewedSchedule += '检查未通过';break;
                     }
                     var renewedProduct = '';
                     if (renewed.productName != null && renewed.productName != '') {
                         renewedProduct += '<span>'+ renewed.productName + '*' + renewed.closedProdcueNumber + '</span>';
                     }
-                    if (renewed.closedFittings != null && renewed.length > 0) {
+                    if (renewed.closedFittings != null && renewed.closedFittings.length > 0) {
                         $.each(renewed.closedFittings,function(index,element){
                             renewedProduct += '<span>'+ this.fittingName + '*' + this.closedFittingNumber + '</span>';
                         })
                     }
+                    $('#renewedId').val(renewed.renewedId);
                     $(".renewed_back_status input[value='"+ renewed.renewedBackStatus +"']").attr("checked",true);
                     $(".renewed_send_status input[value='"+ renewed.renewedSendStatus +"']").attr("checked",true);
                     $('#renewedSchedule').html(renewedSchedule);
@@ -910,7 +1190,7 @@
                     $("#cityNumber option[value='" + renewed.cityNumber + "']").attr("selected","true");
                     $("#areaNumber option[value='" + renewed.areaNumber + "']").attr("selected","true");
                     $('#renewedBackLogisticsNo').val(renewed.renewedBackLogisticsNo);
-                    $('#renewedBackPostage').val(renewed.renewedBackPostage);
+                    $('#renewedBackPostage').val(renewed.renewedBackPostage/100);
                     $('#renewedBackName').val(renewed.renewedBackName);
                     $('#renewedBackTel').val(renewed.renewedBackTel);
                     $('#renewedBackMachineNo').val(renewed.renewedBackMachineNo);
@@ -938,45 +1218,126 @@
         })
     }
 
+    /*获取维修信息*/
+    function get_repair_info(customerId) {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"customerId":customerId},
+            url: "${path}/admin/customer/_update_repair",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var repair = data.returnMsg.repair;
+                    getProvince('repairProvinceNumber');
+                    getCity('repairCityNumber',repair.provinceNumber);
+                    getDistrict('repairAreaNumber',repair.cityNumber);
+                    console.log(repair);
+                    var repairSchedule = '';
+                    switch (repair.repairBackStatus) {
+                        case 1:repairSchedule += '待寄回,';break;
+                        case 2:repairSchedule += '已寄回,';break;
+                        case 3:repairSchedule += '已收货,';break;
+                    }
+                    switch (repair.repairSendStatus) {
+                        case 1:repairSchedule += '待寄送,';break;
+                        case 2:repairSchedule += '已寄送,';break;
+                        case 3:repairSchedule += '已收货,';break;
+                    }
+                    switch (repair.detectState) {
+                        case 1:repairSchedule += '待仓库转入';break;
+                        case 2:repairSchedule += '正在检查';break;
+                        case 3:repairSchedule += '检查通过';break;
+                        case 4:repairSchedule += '检查未通过';break;
+                    }
+                    var repairProduct = '';
+                    if (repair.productName != null && repair.productName != '') {
+                        repairProduct += '<span>'+ repair.productName + '*' + repair.closedProdcueNumber + '</span>';
+                    }
+                    if (repair.closedFittings != null && repair.closedFittings.length > 0) {
+                        $.each(repair.closedFittings,function(index,element){
+                            repairProduct += '<span>'+ this.fittingName + '*' + this.closedFittingNumber + '</span>';
+                        })
+                    }
+                    $('#repairId').val(repair.repairId);
+                    $(".repair_back_status input[value='"+ repair.repairBackStatus +"']").attr("checked",true);
+                    $(".repair_send_status input[value='"+ repair.repairSendStatus +"']").attr("checked",true);
+                    $('#repairSchedule').html(repairSchedule);
+                    $('#repairProduct').html(repairProduct);
+                    $("#repairBackLogisticsCompany option[value='" + repair.repairBackLogisticsCompany + "']").attr("selected","true");
+                    $("#repairSendLogisticsCompany option[value='" + repair.repairSendLogisticsCompany + "']").attr("selected","true");
+
+                    $("#repairProvinceNumber option[value='" + repair.provinceNumber + "']").attr("selected","true");
+                    $("#repairCityNumber option[value='" + repair.cityNumber + "']").attr("selected","true");
+                    $("#repairAreaNumber option[value='" + repair.areaNumber + "']").attr("selected","true");
+                    $('#repairBackLogisticsNo').val(repair.repairBackLogisticsNo);
+                    $('#repairBackPostage').val(repair.repairBackPostage/100);
+                    $('#repairBackName').val(repair.repairBackName);
+                    $('#repairBackTel').val(repair.repairBackTel);
+                    $('#repairBackMachineNo').val(repair.repairBackMachineNo);
+                    $('#repairBackEfastOrderId').html(repair.repairBackEfastOrderId);
+                    $('#repairSendName').val(repair.repairSendName);
+                    $('#repairSendTel').val(repair.repairSendTel);
+                    $('#repairSendAddress').val(repair.repairSendAddress);
+                    $('#repairSendLogisticsNo').val(repair.repairSendLogisticsNo);
+                    $('#repairDesc').val(repair.repairDesc);
+                    $('#detectPhenomenon').val(repair.detectPhenomenon);
+                    $('#detectFailureClassification').val(repair.detectFailureClassification);
+                    $('#detectFailureCause').val(repair.detectFailureCause);
+                    $('#detectResults').val(repair.detectResults);
+                    $('#detectPoint').val(repair.detectPoint);
+                    $('#detectAnalysis').val(repair.detectAnalysis);
+                    $('#detectRevolutionProduced').val(repair.detectRevolutionProduced);
+                    $('#maintenanceIdRepair').val(repair.maintenanceIdRepair);
+                    $('#maintenanceContent').val(repair.maintenanceContent);
+                    $('#maintenanceContentDate').val(repair.maintenanceContentDate);
+                    $('#update-repair-info').show();
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
     /**
      * 获取省
      */
-    function getProvince() {
+    function getProvince(provinceNum) {
         var province = listProvince();
         if(province!=null){
             var provinceHtml = '';
             for(var i=0;i<province.length;i++){
                 provinceHtml += '<option value="'+ province[i].provinceId +'">'+ province[i].province +'</option>';
             }
-            $('#provinceNumber').append(provinceHtml);
+            $('#'+provinceNum).append(provinceHtml);
         }
     }
 
     /**
      * 获取市
      */
-    function getCity(provineceId) {
+    function getCity(cityNum,provineceId) {
         var city = listCity(provineceId,'');
         if(city!=null){
             var cityHtml = '';
             for(var i=0;i<city.length;i++){
                 cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
             }
-            $('#cityNumber').append(cityHtml);
+            $('#'+cityNum).append(cityHtml);
         }
     }
 
     /**
      * 获取区
      */
-    function getDistrict(cityId) {
+    function getDistrict(districtNum,cityId) {
         var district = listDistrict(cityId,'');
         if(district!=null){
             var districtHtml = '';
             for(var i=0;i<district.length;i++){
                 districtHtml += '<option value="'+ district[i].districtId +'">'+ district[i].district +'</option>';
             }
-            $('#areaNumber').append(districtHtml);
+            $('#'+districtNum).append(districtHtml);
         }
     }
 
@@ -984,19 +1345,146 @@
     $(document).on('change', '#provinceNumber', function() {
         var proId = $("#provinceNumber").val();
         $('#cityNumber option').remove();
-        getCity(proId);
+        getCity('cityNumber',proId);
         var cityId = $("#cityNumber").val();
         $('#areaNumber option').remove();
-        getDistrict(cityId);
+        getDistrict('areaNumber',cityId);
     });
 
     /*监听市选择事件*/
     $(document).on('change', '#cityNumber', function() {
         var city = $("#cityNumber").val();
         $('#areaNumber option').remove();
-        getDistrict(city);
+        getDistrict('areaNumber',city);
     });
 
+    /*监听省选择事件*/
+    $(document).on('change', '#repairProvinceNumber', function() {
+        var proId = $("#repairProvinceNumber").val();
+        $('#repairCityNumber option').remove();
+        getCity('repairCityNumber',proId);
+        var cityId = $("#cityNumber").val();
+        $('#repairAreaNumber option').remove();
+        getDistrict('repairAreaNumber',cityId);
+    });
+
+    /*监听市选择事件*/
+    $(document).on('change', '#repairCityNumber', function() {
+        var city = $("#repairCityNumber").val();
+        $('#repairAreaNumber option').remove();
+        getDistrict('repairAreaNumber',city);
+    });
+
+    /*修改换新信息*/
+    function update_renewed_info() {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: $('#form-update-renewed').serialize(),
+            url: "${path}/admin/customer/update_renewed_info",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg(data.resultMsg,{icon: 1,time:1000});
+                } else {
+                    layer.msg(data.resultMsg,{icon: 5,time:1000});
+                }
+                $('#update-renewed-info').hide();
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
+    /*修改维修信息*/
+    function update_repair_info() {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: $('#form-update-repair').serialize(),
+            url: "${path}/admin/customer/update_repair_info",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg(data.resultMsg,{icon: 1,time:1000});
+                } else {
+                    layer.msg(data.resultMsg,{icon: 5,time:1000});
+                }
+                $('#update-repair-info').hide();
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
+    /*获取售后退货信息*/
+    function get_book_goods_info(customerId) {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"customerId":customerId},
+            url: "${path}/admin/customer/_update_back_goods",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var backGoods = data.returnMsg.backGoods;
+                    console.log(backGoods);
+                    $('#backGoodsId').val(backGoods.backGoodsId);
+                    $('#backGoodsBackName').val(backGoods.backGoodsBackName);
+                    $('#backGoodsBackTel').val(backGoods.backGoodsBackTel);
+                    $('#backGoodsBackLogisticsCompany').val(backGoods.backGoodsBackLogisticsCompany);
+                    $('#backGoodsBackLogisticsNo').val(backGoods.backGoodsBackLogisticsNo);
+                    $('#backGoodsBackPostage').val(backGoods.backGoodsBackPostage/100);
+                    $('#backGoodsBackMachineNo').val(backGoods.backGoodsBackMachineNo);
+                    $('#backGoodsDesc').val(backGoods.backGoodsDesc);
+                    var backGoodsSchedule = '';
+                    switch (backGoods.backGoodsBackStatus) {
+                        case 1:backGoodsSchedule += '未寄回';break;
+                        case 2:backGoodsSchedule += '已寄回';break;
+                        case 3:backGoodsSchedule += '已收货';break;
+                    }
+                    $('#backGoodsSchedule').html(backGoodsSchedule);
+                    $(".backGoods_back_status input[value='"+ backGoods.backGoodsBackStatus +"']").attr("checked",true);
+                    var backProduct = '';
+                    if (backGoods.closedProdcues != null && backGoods.closedProdcues.length > 0) {
+                        $.each(backGoods.closedProdcues,function(index,element){
+                            backProduct += '<span>'+ this.closedProductName + '*' + this.closedProdcueNumber + '</span>';
+                        })
+                    }
+                    if (backGoods.closedFittings != null && backGoods.closedFittings.length > 0) {
+                        $.each(backGoods.closedFittings,function(index,element){
+                            backProduct += '<span>'+ this.fittingName + '*' + this.closedFittingNumber + '</span>';
+                        })
+                    }
+                    $('#update-back-goods').show();
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
+    /*修改售后退货信息*/
+    function update_back_goods() {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: $('#form-update-backGoods').serialize(),
+            url: "${path}/admin/customer/update_back_goods",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg(data.resultMsg,{icon: 1,time:1000});
+                } else {
+                    layer.msg(data.resultMsg,{icon: 5,time:1000});
+                }
+                $('#update-back-goods').hide();
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+
 
 </script>
 </body>

+ 7 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_remark.ftl

@@ -32,15 +32,19 @@
     <form class="form form-horizontal" id="form-admin-add">
         <div class="input-box"   style="text-align:center;">
             <span class="input-dic spanhidth">备注</span>
-            <textarea rows="5" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
-
+            <#if detectInfo??>
+                <textarea rows="5" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
+            <#else>
+                <textarea rows="5" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!"></textarea>
+            </#if>
         </div>
         <div style="text-align:center;">
             <span>如果转入生产,则生产部门同事可查看!</span>
         </div>
         <div style="text-align:center;">
-
+        <#if detectId??>
             <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+        </#if>
            <button type="button" class="my-btn-submit" onclick="add();">确认提交</button>
         </div>
     </form>

+ 6 - 6
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_complete.ftl

@@ -42,27 +42,27 @@
 
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon" ${detectInfo.detectPhenomenon!''} class="my-textarea" placeholder="工厂检测现象"></textarea>
+            <textarea rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon"  class="my-textarea" placeholder="工厂检测现象">${detectInfo.detectPhenomenon!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification" ${detectInfo.detectFailureClassification!''} class="my-textarea" placeholder="故障分类"></textarea>
+            <textarea rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification"  class="my-textarea" placeholder="故障分类">${detectInfo.detectFailureClassification!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectFailureCause" id="detectFailureCause" ${detectInfo.detectFailureCause!''} class="my-textarea" placeholder="故障原因"></textarea>
+            <textarea rows="3" cols="20" name="detectFailureCause" id="detectFailureCause"  class="my-textarea" placeholder="故障原因">${detectInfo.detectFailureCause!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectResults" id="detectResults" ${detectInfo.detectResults!''} class="my-textarea" placeholder="判定结果"></textarea>
+            <textarea rows="3" cols="20" name="detectResults" id="detectResults"  class="my-textarea" placeholder="判定结果">${detectInfo.detectResults!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectPoint" id="detectPoint" ${detectInfo.detectPoint!''} class="my-textarea" placeholder="故障指向"></textarea>
+            <textarea rows="3" cols="20" name="detectPoint" id="detectPoint"  class="my-textarea" placeholder="故障指向">${detectInfo.detectPoint!''}</textarea>
         </div>
         <div class="input-box">
             <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
-            <textarea rows="3" cols="20" name="detectAnalysis" id="detectAnalysis" ${detectInfo.detectAnalysis!''} class="my-textarea" placeholder="原因分析"></textarea>
+            <textarea rows="3" cols="20" name="detectAnalysis" id="detectAnalysis"  class="my-textarea" placeholder="原因分析">${detectInfo.detectAnalysis!''}</textarea>
         </div>
 
         <div class="input-box">

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

@@ -124,10 +124,26 @@
                             <#if detect.detectRevolutionProduced == 1>
                                 <a style="text-decoration:none" href="javascript:;" title="转入生产"
                                    onclick="update_info('转入生产','${path}/admin/detect/to_detect_complete?detectId=${detect.detectId!''}&state=2','570','450');">
-                                    <i class="Hui-iconfont">&#xe645;</i>
+                                    <i class="Hui-iconfont">&#xe6e1;</i>
                                 </a>
                             </#if>
                         </#if>
+                        <#if detect.detectState == 3>
+                            <a style="text-decoration:none" href="javascript:;" title="修改检测信息"
+                               onclick="update_info('修改检测信息','${path}/admin/detect/to_update_complete?detectId=${detect.detectId!''}','570','450');">
+                                <i class="Hui-iconfont">&#xe60c;</i>
+                            </a>
+                        </#if>
+                        <#if detect.detectState == 4>
+                            <a style="text-decoration:none" href="javascript:;" title="修改检测信息"
+                               onclick="update_info('修改检测信息','${path}/admin/detect/to_update_complete?detectId=${detect.detectId!''}','570','450');">
+                                <i class="Hui-iconfont">&#xe60c;</i>
+                            </a>
+                        </#if>
+                        <a style="text-decoration:none" href="javascript:;" title="查看仓储进度"
+                           onclick="add_remark('查看仓储进度','${path}/admin/detect/to_view_progress?signclosedId=${detect.signclosedId!''}','570','450');">
+                            <i class="Hui-iconfont">&#xe6cd;</i>
+                        </a>
                     </td>
                 </tr>
                 </#list>

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

@@ -0,0 +1,201 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>修改检测内容</title>
+    <style>
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">检测结果</span>
+            <label for="radio-3">
+                <input type="radio" id="radio-3" name="detectState" value="3"
+                       <#if detectInfo.detectState == 3>checked</#if>
+                       />检测通过
+            </label>
+            <label for="radio-4" style="margin-left: 50px;">
+                <input type="radio" id="radio-4" name="detectState" value="4"
+                       <#if detectInfo.detectState == 4>checked</#if>
+                />检测未通过
+            </label>
+        </div>
+
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon"  class="my-textarea" placeholder="工厂检测现象">${detectInfo.detectPhenomenon!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification"  class="my-textarea" placeholder="故障分类">${detectInfo.detectFailureClassification!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectFailureCause" id="detectFailureCause"  class="my-textarea" placeholder="故障原因">${detectInfo.detectFailureCause!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectResults" id="detectResults"  class="my-textarea" placeholder="判定结果">${detectInfo.detectResults!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectPoint" id="detectPoint"  class="my-textarea" placeholder="故障指向">${detectInfo.detectPoint!''}</textarea>
+        </div>
+        <div class="input-box">
+            <span class="input-dic ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
+            <textarea rows="3" cols="20" name="detectAnalysis" id="detectAnalysis"  class="my-textarea" placeholder="原因分析">${detectInfo.detectAnalysis!''}</textarea>
+        </div>
+
+        <#--<div class="input-box">
+            <span class="input-dic" style="margin-top: 0">是否需要转入生产部门</span>
+            <label for="radio-5">
+                <input type="radio" id="radio-5" name="detectIsMaintenance" onclick="show()" value="1" checked/>需要转入生产部门
+            </label>
+            <label for="radio-6" style="margin-left: 50px;">
+                <input type="radio" id="radio-6" name="detectIsMaintenance" onclick="hide()" value="2"/>不需要转入生产部门
+            </label>
+        </div>
+        <div class="input-box" id="revolutionProducedId">
+            <span class="input-dic" style="margin-top: 0">立即转入生产部门</span>
+            <label for="radio-7">
+                <input type="radio" id="radio-7" name="detectRevolutionProduced" value="2" checked/>立即转入
+            </label>
+            <label for="radio-8" style="margin-left: 50px;">
+                <input type="radio" id="radio-8" name="detectRevolutionProduced" value="1"/>以后转入
+            </label>
+        </div>-->
+        <div class="input-box">
+            <span class="input-dic" style="margin-top: 0">QC检查状态</span>
+            <label for="radio-7">
+                <input type="radio" id="radio-9" name="maintenanceResults" value="1" checked/>通过
+            </label>
+            <label for="radio-8" style="margin-left: 50px;">
+                <input type="radio" id="radio-10" name="maintenanceResults" value="2"/>不通过
+            </label>
+        </div>
+        <div class="input-box">
+            <span class="input-dic spanhidth">备注</span>
+            <textarea rows="3" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
+        </div>
+        <div>
+            <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+           <button type="button" class="my-btn-submit" onclick="add();">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+    function hide() {
+        $("#revolutionProducedId").hide();
+    }
+    function show() {
+        $("#revolutionProducedId").show();
+    }
+
+    function  add() {
+
+        var detectPhenomenon = $("#detectPhenomenon").val();
+        if( detectPhenomenon == null || detectPhenomenon == "" ){
+            layer.msg('请输入工厂检测现象',{icon: 5,time:1000});
+            return;
+        }
+        if( detectPhenomenon.length > 300 ){
+            layer.msg('工厂检测现象长度不得大于150个字符',{icon: 5,time:1000});
+            return;
+        }
+        var detectFailureClassification = $("#detectFailureClassification").val();
+        if( detectFailureClassification == null || detectFailureClassification == "" ){
+            layer.msg('请输入故障分类',{icon: 5,time:1000});
+            return;
+        }
+        if( detectFailureClassification.length > 50 ){
+            layer.msg('故障分类长度不得大于25个字符',{icon: 5,time:1000});
+            return;
+        }
+        var detectFailureCause = $("#detectFailureCause").val();
+        if( detectFailureCause == null || detectFailureCause == "" ){
+            layer.msg('请输入故障原因',{icon: 5,time:1000});
+            return;
+        }
+        if( detectFailureCause.length > 100 ){
+            layer.msg('故障原因长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+
+        var detectResults = $("#detectResults").val();
+        if( detectResults == null || detectResults == "" ){
+            layer.msg('请输入判定结果',{icon: 5,time:1000});
+            return;
+        }
+        if( detectResults.length > 100 ){
+            layer.msg('判定结果长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+
+        var detectPoint = $("#detectPoint").val();
+        if( detectPoint == null || detectPoint == "" ){
+            layer.msg('请输入故障指向',{icon: 5,time:1000});
+            return;
+        }
+        if( detectPoint.length > 100 ){
+            layer.msg('故障指向长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+
+        var detectAnalysis = $("#detectAnalysis").val();
+        if( detectAnalysis == null || detectAnalysis == "" ){
+            layer.msg('请输入原因分析',{icon: 5,time:1000});
+            return;
+        }
+        if( detectAnalysis.length > 100 ){
+            layer.msg('原因分析长度不得大于50个字符',{icon: 5,time:1000});
+            return;
+        }
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/update_complete",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('检测完成',{icon: 1,time:1000},function () {
+                        window.parent.location.reload();
+                        var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index)
+                    });
+                } else {
+                    layer.msg('检测完成失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('检测错误',{icon: 5,time:1000});
+            }
+        });
+    }
+</script>
+</body>
+</html>

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

@@ -0,0 +1,113 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+<#include "/base/add_base.ftl">
+    <title>修改备注 - H-ui.filter v2.4</title>
+    <style>
+        .my-title{font-weight: 500;padding-left: 15px;position: relative;}
+        .my-title:after{content: '';position: absolute;left: 0;top:12%;width: 3px;height: 80%;background: #32a3d8;}
+        .my-input{padding: 8px 5px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-input-date{padding: 8px 10px;border:1px solid rgba(0,0,0,.1);width: 80%;background: url(http://s.iamberry.com/images/rili-1.png) 98.5% center no-repeat; background-size:auto 50%;}
+        .input-box{margin: 18px 0;}
+        .input-dic{float: left;margin:5px 10px 0 0;font-size: 12px;}
+        .add-list{list-style-type: none;padding: 10px;background-color: #f5f5f5;width: 60%;float: left;margin: 0;}
+        .add-list>li{margin: 10px 0;}
+        .my-textarea{padding: 5px 10px;width: 80%;border:1px solid rgba(0,0,0,.1);}
+        .my-btn-reset{padding: 10px 20px;width: 150px; background-color: #fff;color: #32a3d8;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;width: 60%; height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(http://s.iamberry.com/images/select-1.png) right center no-repeat #fff;background-size:auto 100%;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+    </style>
+    <meta name="keywords" content="${path}">
+    <meta name="description" content="H-ui.admin v3.0,是一款由国人开发的轻量级扁平化网站后台模板,完全免费开源的网站后台管理系统模版,适合中小型CMS后台系统。">
+</head>
+<body>
+<article class="page-container">
+    <form class="form form-horizontal" id="form-admin-add">
+        <div class="input-box">
+            <span>签收日期:</span>
+            <#if signclosedInfo??>
+                ${signclosedInfo.signclosedDate?string("yyyy-MM-dd")!'暂无签收日期'}日
+            <#else >
+                暂无签收日期
+            </#if>
+        </div>
+
+        <div class="row cl">
+            <label class="form-label col-1 col-sm-1"></label>
+            <div class="formControls col-7 col-sm-7">
+                签收产品:
+                <div class="update-parts">
+            <#if signclosedProductInfo??>
+                <#if (signclosedProductInfo?size > 0)>
+                    <#list signclosedProductInfo as info>
+                        <#if info.signclosedProductType == 1 >
+                            <span>${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
+                        <#else >
+                            <span>${info.productName!''} x ${info.productNum!''}件</span><br>
+                        </#if>
+                    </#list>
+                <#else >
+                    暂无数据!
+                </#if>
+            <#else >
+                暂无数据!
+            </#if>
+                </div>
+            </div>
+        </div>
+        <div style="text-align:center;">
+        <#if signclosedId??>
+           <input type="hidden" value="${signclosedId!''}" id="signclosedId" name="signclosedId">
+            <#if signclosedInfo.signclosedState == 1>
+                <button type="button" class="my-btn-submit" onclick="add();">催促仓库转入QC</button>
+            </#if>
+            <#if signclosedInfo.signclosedState == 2>
+                <button type="button" class="my-btn-submit" onclick="openLogistics('物流信息','${path}/admin/detect/to_view_logistics?billCode=${signclosedInfo.signclosedLogisticsNumber}&billName=${signclosedInfo.signclosedLogistics  }',375,400);">查看物流</button>
+            </#if>
+        <#else >
+            <button type="button" class="my-btn-submit" onclick="add();">催促仓库转入QC</button>
+        </#if>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+    function  add() {
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/detect/add_reminding",
+            data:$('#form-admin-add').serialize(),// 你的formid
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('催促成功',{icon: 1,time:1000},function () {
+                        window.parent.location.reload();
+                        var index = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(index)
+                    });
+                } else {
+                    layer.msg('催促失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('催促失败',{icon: 5,time:1000});
+            }
+        });
+    }
+
+    function openLogistics(title, url, w, h) {
+        layer_show(title,url,w,h);
+    }
+</script>
+</body>
+</html>

+ 288 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/logistics/view_logistics.ftl

@@ -0,0 +1,288 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title>查看物流</title>
+<#include "/base/add_base.ftl">
+    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <link rel="stylesheet" type="text/css" href="//css.iamberry.com/wateroPF/css/mui.min.css">
+    <style>
+        body{ text-align:center}
+        article, section, time, aside {
+            display: block;
+        }
+        .point-time {
+            content: "";
+            position: absolute;
+            width: 13px;
+            height: 13px;
+            top: 12px;
+            left: 30%;
+            background: #1c87bf;
+            margin-left: -4px;
+            border-radius: 50%;
+            box-shadow: 0 0 0 2px #fff;
+        }
+
+        .text-red {
+            color: #ff5b5b;
+        }
+
+        .text-blue {
+            color: #1c87bf;
+        }
+
+        .text-green {
+            color: #95c91e;
+        }
+
+        .text-yellow {
+            color: #ffb902;
+        }
+
+        .text-purple {
+            color: #d32d93;
+        }
+
+        .point-red {
+            background-color: #ff5b5b;
+        }
+
+        .point-blue {
+            background-color: #38d1f7;
+        }
+
+        .point-green {
+            background-color: #95c91e;
+        }
+
+        .point-yellow {
+            background-color: #ffb902;
+        }
+
+        .point-purple {
+            background-color: #d32d93;
+        }
+
+        .content {
+            width: 100%;
+            margin: 0 auto;
+        }
+        .content article {
+            position: relative;
+        }
+        .content article > h3 {
+            width: 100%;
+            height: 20px;
+            line-height: 20px;
+            text-align: left;
+            text-indent: 3%;
+            font-size: 1.4em;
+            color: #fff;
+            padding: 10px 0 20px;
+            background-color: #dd6d01;
+        }
+        .content article section {
+            padding: 0 10px 10px;
+            position: relative;
+        }
+        .content article section:before {
+            content: "";
+            width: 2px;
+            top: 17px;
+            bottom: -17px;
+            left: 30.54%;
+            background: #73dff9;
+            position: absolute;
+            -webkit-transform: scaleX(.5);
+        }
+        .content article section:last-child:before {
+            display: none;
+        }
+        .content article section time {
+            width: 25%;
+            display: block;
+            position: absolute;
+            padding: 8px 0;
+        }
+        .content article section time > span {
+            display: block;
+            text-align: center;
+        }
+        .content article section aside {
+            color: #3a3a38;
+            margin-left: 42%;
+            padding-bottom: 15px;
+            text-align: left;
+        }
+        .content article section .brief {
+            color: #9f9f9f;
+        }
+
+        .my-box-w{position: absolute;left: 50%;top: 50%;background: rgba(255,255,255,.1);width: 100px;height: 100px;border-radius: 50%;margin-left: -50px;margin-top: -60px;padding: 8px;}
+        .my-box-n{background: rgba(255,255,255,.2);position: relative;height: 100%;width: 100%;border-radius: 50%;}
+        .my-box-machine{position: absolute;left: 50%;top: 50%;width: auto;color: #fff;-webkit-transform:translateX(-50%) translateY(-20%);}
+        .machine-num{position: absolute;left: 50%;top: 50%;margin-top:40px;-webkit-transform: translateX(-50%);color: #fff;}
+    </style>
+    <script>
+        // 屏蔽分享
+        window.hiddenAllWechatMenu = true;
+    </script>
+</head>
+<body style="background: #fff;">
+<!-- <div class="loading-bg">
+        <div class="mui-loading">
+            <div class="mui-spinner">
+            </div>
+            &nbsp;&nbsp;加载中...
+        </div>
+</div> -->
+<div class="mui-content" style="background: #fff;">
+    <div style="position: relative;height: 100px;padding:20px 15px;background: #6bc5e3;">
+        <img style="float: left;" width="60px" src="//s.iamberry.com/wateroPF/new/images/logistics.png">
+        <ul style="display: inline-block;float: left;text-align: left;color: #fff;line-height: 30px;padding: 0 0 0 10px;">
+            <li id="billName"></li>
+            <li>单号:<span id="billCode"></span></li>
+        </ul>
+    </div>
+
+    <div id="pullrefresh" class="content">
+        <article class="my-tab-view-pull">
+        </article>
+    </div>
+    <div id="orderlist" class="content" style="display:none;padding: 10px 0;">
+        暂无物流信息
+    </div>
+</div>
+<script src="/common/lib/mui/js/mui.min.js"></script>
+<#--<script src="//s.iamberry.com/wateroPF/js/jquery-2.1.1.min.js"></script>
+<script src="//s.iamberry.com/wateroPF/js/shop/main.js"></script>-->
+<!-- <script src="//s.iamberry.com/wateroPF/js/shop/wechat-utils-1.0.js"></script> -->
+<script type="text/javascript">
+    function pullupRefresh() {
+        var billCode = ${billCode!''};
+        var billName = "${billName!''}";
+        mui.ajax('${path}/logistics/getExpressInfo?dates=' + new Date().getTime(), {
+            data: {
+                "com": billName,
+                "nu": billCode
+            },
+            dataType: 'json',
+            type: 'post',
+            timeout: 15000,
+            success: function(dt) {
+                console.log(dt);
+                if(dt.status) {
+                    var name='';
+                    switch (billName){
+                        case "sto":
+                            name= "申通快递";
+                            break;
+                        case "yto":
+                            name= "圆通快递";
+                            break;
+                        case "zto":
+                            name= "中通速递";
+                            break;
+                        case "sf":
+                            name= "顺丰快递";
+                            break;
+                        case "ems":
+                            name= "邮政EMS";
+                            break;
+                        case "eyb":
+                            name= "E邮宝";
+                            break;
+                        case "zjs":
+                            name= "宅急送";
+                            break;
+                        case "yunda":
+                            name= "韵达快递";
+                            break;
+                        case "cces":
+                            name= "cces快递";
+                            break;
+                        case "pick":
+                            name= "上门提货";
+                            break;
+                        case "htky":
+                            name= "汇通快递";
+                            break;
+                        case "ttkdex":
+                            name= "天天快递";
+                            break;
+                        case "stars":
+                            name= "星晨急便";
+                            break;
+                        case "jd":
+                            name= "京东快递";
+                            break;
+                        case "01":
+                            name= "其他";
+                            break;
+                        case "02":
+                            name= "上门送货";
+                            break;
+                        case "longbanwuliu":
+                            name= "龙邦快递";
+                            break;
+                        default:
+                            break;
+                    }
+                    $("#billName").text(name);
+                    $("#billCode").text(billCode);
+                    if(dt.data.status=="1"){
+
+
+                    var renewal_data = [];
+                    renewal_data = dt.data.data;
+                    var table = document.body.querySelector('.my-tab-view-pull');
+                    mui(renewal_data).each(function(index) {
+                        var li = document.createElement('section');
+                        var color='point-blue',text='';
+                        if(index==0){
+                            color='point-red';
+                            //text="text-red";
+                        }
+                        li.innerHTML = ' <span class="point-time '+color+'"></span><time class="'+text+'">'+this.time+'</time><aside><p class="things">'+this.location+'</p><p class="brief" style="padding-top: 4%;">'+this.context+'</p></aside>';
+                        table.appendChild(li);
+
+                    })
+                    }else{
+                        $("#orderlist").show();
+					}
+                }else{
+                    $("#pullrefresh").hide();
+                    $("#orderlist").show();
+                }
+            },
+            error: function(xhr, type, errorThrown) {
+                console.log(xhr)
+            }
+        });
+    }
+    mui.ready(function(){
+        //页面首次加载时拉取一次数据
+        pullupRefresh();
+    });
+    function   format(now)   {
+        now = new Date(now);
+        var   year=now.getFullYear();
+        var   month=now.getMonth()+1;
+        var   date=now.getDate();
+        var   hour=now.getHours();
+        var   minute=now.getMinutes();
+        var   second=now.getSeconds();
+        if(month <10 && month > 0){
+            month = "0"+month;
+        }
+        if(date <10 && date > 0){
+            date = "0"+date;
+        }
+        return   year+"-"+month+"-"+date;
+    }
+</script>
+</body>
+</html>

+ 228 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl

@@ -0,0 +1,228 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <title></title>
+<#include "/base/list_base.ftl">
+    <style>
+        *{padding: 0;margin: 0;}
+        .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 25px;margin-right: 5px;}
+        /*.my-input::-webkit-input-placeholder,.my-select{color: #dcdcdc;}*/
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:6px 50px 6px 15px;height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
+        .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+        .barcodeImg{margin:10px 0px}
+        .table-bg thead th{background-color: #e2f6ff;}
+        input[type=radio]{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+    </style>
+</head>
+<body>
+<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+    <span class="c-gray en">&gt;</span> RST管理
+    <span class="c-gray en">&gt;</span> 仓储列表
+    <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
+</nav>
+<div class="page-container">
+    <div class="text-c">
+        <form name="form1" action="${path}/admin/signclosed/select_signclosed_list" method="post">
+            <button type="button" style="cursor:pointer;float: left;" class="my-btn-search" onclick="add_detect('添加品质检测','${path}/admin/detect/to_add_detect','570','450');">新建签收</button>
+            <input class="my-input" style="width: 70px;" type="text" name="signclosedSendName" value="${signclosedSendName!}" placeholder="寄件人姓名"/>
+            <input class="my-input" style="width: 70px;" type="text" name="signclosedSendTel" value="${signclosedSendTel!}" placeholder="寄件人电话号码"/>
+            <input class="my-input" style="width: 70px;" type="text" name="signclosedLogisticsNumber" value="${signclosedLogisticsNumber!}" placeholder="快递单号"/>
+            <select class="my-select" name="signclosedType" style="height: 30px;width: 150px">
+                <option value ="">签收类型</option>
+                <option value ="1" <#if signclosedType??><#if signclosedType == 1>selected="selected"</#if></#if>>客诉寄回</option>
+                <option value ="2" <#if signclosedType??><#if signclosedType == 2>selected="selected"</#if></#if>>代理商退货</option>
+                <option value ="3" <#if signclosedType??><#if signclosedType == 3>selected="selected"</#if></#if>>其它</option>
+            </select>
+            <select class="my-select" name="signclosedObjectsState" style="height: 30px;width: 150px">
+                <option value ="">物件状态</option>
+                <option value ="1" <#if signclosedObjectsState??><#if signclosedObjectsState == 1>selected="selected"</#if></#if>>正常签收</option>
+                <option value ="2" <#if signclosedObjectsState??><#if signclosedObjectsState == 2>selected="selected"</#if></#if>>物件不对</option>
+            </select>
+            <button style="cursor:pointer;" type="submit" class="my-btn-search">搜索</button>
+        </form>
+    </div>
+    <div class="mt-20">
+        <table class="table table-border table-bordered table-bg table-hover table-sort">
+            <thead>
+            <tr class="text-c">
+                <th width="100">签收类型</th>
+                <th width="160">物流</th>
+                <th width="90">寄件人姓名</th>
+                <th width="100">寄件人电话</th>
+                <th width="400">退换产品</th>
+                <th width="400">签收产品</th>
+                <th width="130">退货地区</th>
+                <th width="100">是否少配件</th>
+                <th width="150">售后原因</th>
+                <th width="150">客服备注</th>
+                <th width="150">返厂日期</th>
+                <th width="100">处理状态</th>
+                <th width="120">是否转入QC</th>
+                <th width="130">物件状态</th>
+                <th width="100">备注</th>
+                <th width="50">操作</th>
+            </tr>
+            </thead>
+            <tbody id="listid">
+            <#if (page.dataList?size > 0)>
+                <#list page.dataList as signclosed>
+                <tr>
+                    <td class="text-c" width="100">
+                        <#if signclosed.signclosedType == 1>
+                            客诉寄回
+                        </#if>
+                        <#if signclosed.signclosedType == 2>
+                            代理商退货
+                        </#if>
+                        <#if signclosed.signclosedType == 3>
+                            其它
+                        </#if>
+                    </td>
+                    <td class="text-c" width="160">
+                        <#if signclosed.signclosedLogistics??>
+                            <#if signclosed.signclosedLogistics == "sto">
+                                申通快递
+                            <#elseif signclosed.signclosedLogistics == "yto">
+                                圆通快递
+                            <#elseif signclosed.signclosedLogistics == "zto">
+                                中通速递
+                            <#elseif signclosed.signclosedLogistics == "sf">
+                                顺丰快递
+                            <#elseif signclosed.signclosedLogistics == "ems">
+                                邮政EMS
+                            <#elseif signclosed.signclosedLogistics == "eyb">
+                                E邮宝
+                            <#elseif signclosed.signclosedLogistics == "zjs">
+                                宅急送
+                            <#elseif signclosed.signclosedLogistics == "yunda">
+                                韵达快递
+                            <#elseif signclosed.signclosedLogistics == "cces">
+                                cces快递
+                            <#elseif signclosed.signclosedLogistics == "pick">
+                                上门提货
+                            <#elseif signclosed.signclosedLogistics == "htky">
+                                汇通快递
+                            <#elseif signclosed.signclosedLogistics == "ttkdex">
+                                天天快递
+                            <#elseif signclosed.signclosedLogistics == "stars">
+                                星晨急便
+                            <#elseif signclosed.signclosedLogistics == "jd">
+                                京东快递
+                            <#elseif signclosed.signclosedLogistics == "01">
+                                其他
+                            <#elseif signclosed.signclosedLogistics == "02">
+                                上门送货
+                            <#elseif signclosed.signclosedLogistics == "longbanwuliu">
+                                龙邦快递
+                            </#if>
+                            -
+                        </#if>
+                    ${signclosed.signclosedLogisticsNumber!}</td>
+                    <td class="text-c" width="100">${signclosed.signclosedSendName!}</td>
+                    <td class="text-c" width="100">${signclosed.signclosedSendTel!}</td>
+                    <td class="text-c" width="100">
+                        <div class="update-parts">
+                        <#if signclosed.awaitingSignclosedProductInfoList??>
+                            <#if (signclosed.awaitingSignclosedProductInfoList?size > 0)>
+                                <#list signclosed.awaitingSignclosedProductInfoList as info>
+                                    <#if info.signclosedProductType == 1 >
+                                        <span>${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
+                                    <#else >
+                                        <span>${info.productName!''} x ${info.productNum!''}件</span><br>
+                                    </#if>
+                                </#list>
+                            <#else >
+                                暂无数据!
+                            </#if>
+                        <#else >
+                            暂无数据!
+                        </#if>
+                        </div>
+                    </td>
+                    <td class="text-c" width="100">
+                        <div class="update-parts">
+                        <#if signclosed.signclosedProductInfoList??>
+                            <#if (signclosed.signclosedProductInfoList?size > 0)>
+                                <#list signclosed.signclosedProductInfoList as info>
+                                    <#if info.signclosedProductType == 1 >
+                                        <span>${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
+                                    <#else >
+                                        <span>${info.productName!''} x ${info.productNum!''}件</span><br>
+                                    </#if>
+                                </#list>
+                            <#else >
+                                暂无数据!
+                            </#if>
+                        <#else >
+                            暂无数据!
+                        </#if>
+                        </div>
+                    </td>
+                    <td class="text-c" width="100">${signclosed.provincesName!}-${signclosed.cityName!}</td>
+                    <td class="text-c" width="100">
+                        <#if signclosed.signclosedIsFittings == 1>
+                            缺少
+                        <#else>
+                            不缺少
+                        </#if>
+                    </td>
+                    <td class="text-c" width="100">售后原因暂无</td>
+                    <td class="text-c" width="100">${signclosed.signclosedCustomerDesc!}</td>
+                    <td class="text-c" width="100">${(signclosed.signclosedDate?string("yyyy-MM-dd"))!''}</td>
+                    <td class="text-c" width="100">
+                        <#if signclosed.signclosedState == 1>
+                            已签收
+                        <#else>
+                            未签收
+                        </#if>
+                    </td>
+                    <td class="text-c" width="100">
+                        <#if signclosed.signclosedIsInto == 1>
+                            已转入品检
+                        <#else>
+                            未转入品检
+                        </#if>
+                    </td>
+                    <td class="text-c" width="100">
+                        <#if signclosed.signclosedObjectsState == 1>
+                            正常签收
+                        <#else>
+                            物件不对
+                        </#if>
+                    </td>
+                    <td class="text-c" width="100">${signclosed.signclosedDesc!}</td>
+                    <!-- 遍历操作 -->
+                    <td class="td-manage text-c">
+
+                    </td>
+                </tr>
+                </#list>
+            <#else >
+            <tr><td class="td-manage text-c" colspan = "16">暂时没有仓储信息</td></tr>
+            </#if>
+            </tbody>
+        </table>
+    </div>
+</div>
+<div style="padding-top: 10px;"></div>
+<#include "/base/page_util.ftl">
+
+<script type="text/javascript">
+    /*添加*/
+    function add_detect(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
+    /*修改备注*/
+    function add_remark(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
+    /*转入生产*/
+    function update_info(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
+</script>
+</body>
+</html>

+ 60 - 0
watero-rst-web/src/main/webapp/common/js/common/common.js

@@ -140,3 +140,63 @@ function listDistrict(cityId,districtName){
     });
     return district;
 }
+/**物流名称替换**/
+function replace(code) {
+    var name = null;
+    switch (billName){
+        case "sto":
+            name= "申通快递";
+            break;
+        case "yto":
+            name= "圆通快递";
+            break;
+        case "zto":
+            name= "中通速递";
+            break;
+        case "sf":
+            name= "顺丰快递";
+            break;
+        case "ems":
+            name= "邮政EMS";
+            break;
+        case "eyb":
+            name= "E邮宝";
+            break;
+        case "zjs":
+            name= "宅急送";
+            break;
+        case "yunda":
+            name= "韵达快递";
+            break;
+        case "cces":
+            name= "cces快递";
+            break;
+        case "pick":
+            name= "上门提货";
+            break;
+        case "htky":
+            name= "汇通快递";
+            break;
+        case "ttkdex":
+            name= "天天快递";
+            break;
+        case "stars":
+            name= "星晨急便";
+            break;
+        case "jd":
+            name= "京东快递";
+            break;
+        case "01":
+            name= "其他";
+            break;
+        case "02":
+            name= "上门送货";
+            break;
+        case "longbanwuliu":
+            name= "龙邦快递";
+            break;
+        default:
+            break;
+    }
+    return name;
+}