浏览代码

客诉后续流程代码

liujiankang 6 年之前
父节点
当前提交
cab4639811
共有 38 个文件被更改,包括 1939 次插入1274 次删除
  1. 10 224
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectInfo.java
  2. 219 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectItem.java
  3. 38 102
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintSignclosedInfo.java
  4. 22 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java
  5. 48 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/FactoryInfo.java
  6. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/QuestionDescribe.java
  7. 57 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/WarehouseInfo.java
  8. 13 6
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintDetectInfoService.java
  9. 7 6
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedInfoService.java
  10. 6 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedProductInfoService.java
  11. 18 29
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintDetectInfoServiceImpl.java
  12. 69 66
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedInfoServiceImpl.java
  13. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedProductInfoServiceImpl.java
  14. 8 17
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
  15. 19 7
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintDetectInfoMapper.java
  16. 5 7
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedInfoMapper.java
  17. 7 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedProductInfoMapper.java
  18. 190 168
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintDetectInfoMapper.xml
  19. 59 132
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSignclosedInfoMapper.xml
  20. 22 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintSignclosedProductInfoMapper.xml
  21. 12 2
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  22. 2 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/questionDescribeMapper.xml
  23. 36 119
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  24. 120 35
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java
  25. 2 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/ComplaintMaintenanceController.java
  26. 1 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  27. 11 3
      watero-rst-web/src/main/resources/platform.properties
  28. 1 0
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  29. 118 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/customer_detail.ftl
  30. 31 61
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  31. 47 31
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl
  32. 61 44
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl
  33. 82 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/associated_customer.ftl
  34. 268 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/customer_signclosed_list.ftl
  35. 90 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/init_complaint.ftl
  36. 28 212
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl
  37. 111 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/to_quality.ftl
  38. 86 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/update_customer_remark.ftl

+ 10 - 224
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectInfo.java

@@ -17,63 +17,9 @@ public class ComplaintDetectInfo implements Serializable {
     private Integer detectId;//id
     private Integer customerId;//客诉id
     private Integer signclosedId;//签收ID
-    private Integer productId;//产品ID
-    private Integer detectProductType;//产品类型
-    private String detectProductNumber;//产品型号
-    private Integer detectState;//状态 1待仓库转入 2正在检查  3检查通过  4检查未通过
-    private String detectPhenomenon;//工厂检测现象
-    private String detectFailureClassification;//故障分类
-    private String detectFailureCause;//故障原因
-    private String detectResults;//判定结果
-    private String detectPoint;//故障指向
-    private String detectAnalysis;//原因分析
-    private Integer detectRevolutionProduced;//是否转入生产部门
-    private Integer maintenanceResults;//QC检测结果
     private String detectDesc;//备注
-    private Date signclosedCreateTime;//创建时间
-    private Date signclosedUpdateTime;//修改时间
-    private String machineNo;//机器编号
-    private Integer productColorId;//产品颜色id
-
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
-    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
-    private Date detectDate;//检测时间
-
-
-    private String questionTitle;//问题标题
-    private Integer detectIsMaintenance;//是否需要维修 1 需要 2不需要
-    private String productName;//产品名称
-    private Integer productTypeId;//产品类型id
-    private String productTypeName;//产品类型名称
-
-    /*客诉-生产维修表*/
-    private Integer maintenanceIsRepair;        //是否可返修
-    private String maintenanceContent;          //返修内容
-    private Date maintenanceContentDate;        //返修日期
-
-    public Integer getMaintenanceIsRepair() {
-        return maintenanceIsRepair;
-    }
-
-    public void setMaintenanceIsRepair(Integer maintenanceIsRepair) {
-        this.maintenanceIsRepair = maintenanceIsRepair;
-    }
-
-    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;
-    }
+    private Date detectCreateTime;//创建时间
+    private Date detectUpdateTime;//修改时间
 
     public Integer getDetectId() {
         return detectId;
@@ -99,86 +45,6 @@ public class ComplaintDetectInfo implements Serializable {
         this.signclosedId = signclosedId;
     }
 
-    public Integer getDetectProductType() {
-        return detectProductType;
-    }
-
-    public void setDetectProductType(Integer detectProductType) {
-        this.detectProductType = detectProductType;
-    }
-
-    public String getDetectProductNumber() {
-        return detectProductNumber;
-    }
-
-    public void setDetectProductNumber(String detectProductNumber) {
-        this.detectProductNumber = detectProductNumber;
-    }
-
-    public Integer getDetectState() {
-        return detectState;
-    }
-
-    public void setDetectState(Integer detectState) {
-        this.detectState = detectState;
-    }
-
-    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 String getDetectDesc() {
         return detectDesc;
     }
@@ -187,99 +53,19 @@ public class ComplaintDetectInfo implements Serializable {
         this.detectDesc = detectDesc;
     }
 
-    public Date getSignclosedCreateTime() {
-        return signclosedCreateTime;
-    }
-
-    public void setSignclosedCreateTime(Date signclosedCreateTime) {
-        this.signclosedCreateTime = signclosedCreateTime;
-    }
-
-    public Date getSignclosedUpdateTime() {
-        return signclosedUpdateTime;
-    }
-
-    public void setSignclosedUpdateTime(Date signclosedUpdateTime) {
-        this.signclosedUpdateTime = signclosedUpdateTime;
-    }
-
-    public String getQuestionTitle() {
-        return questionTitle;
-    }
-
-    public void setQuestionTitle(String questionTitle) {
-        this.questionTitle = questionTitle;
-    }
-
-    public Integer getProductId() {
-        return productId;
-    }
-
-    public void setProductId(Integer productId) {
-        this.productId = productId;
-    }
-
-    public String getMachineNo() {
-        return machineNo;
-    }
-
-    public void setMachineNo(String machineNo) {
-        this.machineNo = machineNo;
-    }
-
-    public Integer getDetectIsMaintenance() {
-        return detectIsMaintenance;
-    }
-
-    public void setDetectIsMaintenance(Integer detectIsMaintenance) {
-        this.detectIsMaintenance = detectIsMaintenance;
-    }
-
-    public Date getDetectDate() {
-        return detectDate;
-    }
-
-    public void setDetectDate(Date detectDate) {
-        this.detectDate = detectDate;
-    }
-
-    public String getProductName() {
-        return productName;
-    }
-
-    public void setProductName(String productName) {
-        this.productName = productName;
-    }
-
-    public Integer getMaintenanceResults() {
-        return maintenanceResults;
-    }
-
-    public void setMaintenanceResults(Integer maintenanceResults) {
-        this.maintenanceResults = maintenanceResults;
-    }
-
-    public Integer getProductColorId() {
-        return productColorId;
-    }
-
-    public void setProductColorId(Integer productColorId) {
-        this.productColorId = productColorId;
-    }
-
-    public Integer getProductTypeId() {
-        return productTypeId;
+    public Date getDetectCreateTime() {
+        return detectCreateTime;
     }
 
-    public void setProductTypeId(Integer productTypeId) {
-        this.productTypeId = productTypeId;
+    public void setDetectCreateTime(Date detectCreateTime) {
+        this.detectCreateTime = detectCreateTime;
     }
 
-    public String getProductTypeName() {
-        return productTypeName;
+    public Date getDetectUpdateTime() {
+        return detectUpdateTime;
     }
 
-    public void setProductTypeName(String productTypeName) {
-        this.productTypeName = productTypeName;
+    public void setDetectUpdateTime(Date detectUpdateTime) {
+        this.detectUpdateTime = detectUpdateTime;
     }
 }

+ 219 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintDetectItem.java

@@ -0,0 +1,219 @@
+package com.iamberry.rst.core.cm;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by Administrator on 2018/7/11.
+ */
+public class ComplaintDetectItem implements Serializable {
+    private static final long serialVersionUID = -3623612031356499488L;
+    private Integer detectItemId;//主键
+    private Integer detectId;//检测id
+    private Integer productId;//产品id
+    private String machineNo;//机器编号
+    private String detectProductNumber;//产品型号
+    private Integer detectItemState;//状态 1未检测 2已检测
+    private String detectItemPhenomenon;//工厂检测现象
+    private String detectItemClassification;//故障分类
+    private String detectItemFailureCause;//故障原因
+    private String detectItemResults;//判定结果
+    private String detectItemPoint;//判定结果
+    private String detectItemNalysis;//原因分析
+    private String detectItemContent;//维修内容
+    private Integer isMaintenance;//是否维修
+    private Integer maintenanceResults;//QC检测结果
+    private String detectItemDesc;//备注
+    private Date detectItemDate;//检测日期
+    private Date detectItemCreateTime;//创建时间
+    private Date detectItemUpdateTime;//修改时间
+    private Integer customerId;//客诉id
+
+    private Integer productTypeId;//产品类型id
+    private String productTypeName;//产品类型名称
+    private String questionTitle;//问题标题
+
+    public Integer getDetectItemId() {
+        return detectItemId;
+    }
+
+    public void setDetectItemId(Integer detectItemId) {
+        this.detectItemId = detectItemId;
+    }
+
+    public Integer getDetectId() {
+        return detectId;
+    }
+
+    public void setDetectId(Integer detectId) {
+        this.detectId = detectId;
+    }
+
+    public Integer getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Integer productId) {
+        this.productId = productId;
+    }
+
+    public String getMachineNo() {
+        return machineNo;
+    }
+
+    public void setMachineNo(String machineNo) {
+        this.machineNo = machineNo;
+    }
+
+    public String getDetectProductNumber() {
+        return detectProductNumber;
+    }
+
+    public void setDetectProductNumber(String detectProductNumber) {
+        this.detectProductNumber = detectProductNumber;
+    }
+
+    public Integer getDetectItemState() {
+        return detectItemState;
+    }
+
+    public void setDetectItemState(Integer detectItemState) {
+        this.detectItemState = detectItemState;
+    }
+
+    public String getDetectItemPhenomenon() {
+        return detectItemPhenomenon;
+    }
+
+    public void setDetectItemPhenomenon(String detectItemPhenomenon) {
+        this.detectItemPhenomenon = detectItemPhenomenon;
+    }
+
+    public String getDetectItemClassification() {
+        return detectItemClassification;
+    }
+
+    public void setDetectItemClassification(String detectItemClassification) {
+        this.detectItemClassification = detectItemClassification;
+    }
+
+    public String getDetectItemFailureCause() {
+        return detectItemFailureCause;
+    }
+
+    public void setDetectItemFailureCause(String detectItemFailureCause) {
+        this.detectItemFailureCause = detectItemFailureCause;
+    }
+
+    public String getDetectItemResults() {
+        return detectItemResults;
+    }
+
+    public void setDetectItemResults(String detectItemResults) {
+        this.detectItemResults = detectItemResults;
+    }
+
+    public String getDetectItemPoint() {
+        return detectItemPoint;
+    }
+
+    public void setDetectItemPoint(String detectItemPoint) {
+        this.detectItemPoint = detectItemPoint;
+    }
+
+    public String getDetectItemNalysis() {
+        return detectItemNalysis;
+    }
+
+    public void setDetectItemNalysis(String detectItemNalysis) {
+        this.detectItemNalysis = detectItemNalysis;
+    }
+
+    public String getDetectItemContent() {
+        return detectItemContent;
+    }
+
+    public void setDetectItemContent(String detectItemContent) {
+        this.detectItemContent = detectItemContent;
+    }
+
+    public Integer getIsMaintenance() {
+        return isMaintenance;
+    }
+
+    public void setIsMaintenance(Integer isMaintenance) {
+        this.isMaintenance = isMaintenance;
+    }
+
+    public Integer getMaintenanceResults() {
+        return maintenanceResults;
+    }
+
+    public void setMaintenanceResults(Integer maintenanceResults) {
+        this.maintenanceResults = maintenanceResults;
+    }
+
+    public String getDetectItemDesc() {
+        return detectItemDesc;
+    }
+
+    public void setDetectItemDesc(String detectItemDesc) {
+        this.detectItemDesc = detectItemDesc;
+    }
+
+    public Date getDetectItemDate() {
+        return detectItemDate;
+    }
+
+    public void setDetectItemDate(Date detectItemDate) {
+        this.detectItemDate = detectItemDate;
+    }
+
+    public Date getDetectItemCreateTime() {
+        return detectItemCreateTime;
+    }
+
+    public void setDetectItemCreateTime(Date detectItemCreateTime) {
+        this.detectItemCreateTime = detectItemCreateTime;
+    }
+
+    public Date getDetectItemUpdateTime() {
+        return detectItemUpdateTime;
+    }
+
+    public void setDetectItemUpdateTime(Date detectItemUpdateTime) {
+        this.detectItemUpdateTime = detectItemUpdateTime;
+    }
+
+    public Integer getCustomerId() {
+        return customerId;
+    }
+
+    public void setCustomerId(Integer customerId) {
+        this.customerId = customerId;
+    }
+
+    public Integer getProductTypeId() {
+        return productTypeId;
+    }
+
+    public void setProductTypeId(Integer productTypeId) {
+        this.productTypeId = productTypeId;
+    }
+
+    public String getProductTypeName() {
+        return productTypeName;
+    }
+
+    public void setProductTypeName(String productTypeName) {
+        this.productTypeName = productTypeName;
+    }
+
+    public String getQuestionTitle() {
+        return questionTitle;
+    }
+
+    public void setQuestionTitle(String questionTitle) {
+        this.questionTitle = questionTitle;
+    }
+}

+ 38 - 102
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/ComplaintSignclosedInfo.java

@@ -16,33 +16,25 @@ public class ComplaintSignclosedInfo implements Serializable {
     private Integer signclosedId;//id
     private Integer signclosedType;//签收类型
     private String signclosedTypeName;//签收类型名称
-
     private String signclosedLogistics;//寄回物流
     private String signclosedLogisticsNumber;//物流单号
     private String signclosedSendName;//寄件人姓名
     private String signclosedSendTel;//寄件人电话
-    private Integer signclosedAddrProvinces;//寄件地址(省)
-    private Integer signclosedAddrCity;//寄件地址(市)
-    private Integer signclosedIsFittings;//是否少配件
+    private String signclosedAddrProvinces;//寄件地址(省)
+    private String signclosedAddrCity;//寄件地址(市)
+    private String signclosedAddrArea;//寄件地址(区)
     private Date signclosedDate;//签收时间
-    private Integer signclosedIsQuality;//是否品检   1 需要品检 2不需要品检
-    private Integer signclosedIsInto;//是否已转入品检    1 已转入品检2未转入品检
-    private Integer signclosedState;//处理状态      1已签收2未签收
-    private Integer signclosedObjectsState;//物件状态 1正常签收2物件不对  3:暂未签收
     private Integer signclosedCustomerId;//客诉id
-    private Integer signclosedUrgedNum;//qc催促次数
-    private String oldEfastId;//原有Efast订单id
-    private String newEfastId;//现有Efast订单ID
-    private String signclosedCustomerDesc;//客服备注
     private String signclosedDesc;//备注
     private Date signclosedCreateTime;//创建时间
     private Date signclosedUpdateTime;//修改时间
+    private Integer signclosedState;//状态1已签收2已移交QC
+    private String signclosedCustomerDesc;//客服备注
+    private Integer isBinding;//是否绑定客诉
 
     private String customerIdDescribe;//客诉标题
     private List<AwaitingSignclosedProductInfo> awaitingSignclosedProductInfoList = new ArrayList<AwaitingSignclosedProductInfo>();	//待签收实体类
     private List<SignclosedProductInfo> signclosedProductInfoList = new ArrayList<SignclosedProductInfo>();	//签收实体类
-    private String provincesName;//寄件地址(省)
-    private String cityName;//寄件地址(市)
     private String describeHandleDesc;//处理描述
     public Integer getSignclosedId() {
         return signclosedId;
@@ -100,28 +92,28 @@ public class ComplaintSignclosedInfo implements Serializable {
         this.signclosedSendTel = signclosedSendTel;
     }
 
-    public Integer getSignclosedAddrProvinces() {
+    public String getSignclosedAddrProvinces() {
         return signclosedAddrProvinces;
     }
 
-    public void setSignclosedAddrProvinces(Integer signclosedAddrProvinces) {
+    public void setSignclosedAddrProvinces(String signclosedAddrProvinces) {
         this.signclosedAddrProvinces = signclosedAddrProvinces;
     }
 
-    public Integer getSignclosedAddrCity() {
+    public String getSignclosedAddrCity() {
         return signclosedAddrCity;
     }
 
-    public void setSignclosedAddrCity(Integer signclosedAddrCity) {
+    public void setSignclosedAddrCity(String signclosedAddrCity) {
         this.signclosedAddrCity = signclosedAddrCity;
     }
 
-    public Integer getSignclosedIsFittings() {
-        return signclosedIsFittings;
+    public String getSignclosedAddrArea() {
+        return signclosedAddrArea;
     }
 
-    public void setSignclosedIsFittings(Integer signclosedIsFittings) {
-        this.signclosedIsFittings = signclosedIsFittings;
+    public void setSignclosedAddrArea(String signclosedAddrArea) {
+        this.signclosedAddrArea = signclosedAddrArea;
     }
 
     public Date getSignclosedDate() {
@@ -132,38 +124,6 @@ public class ComplaintSignclosedInfo implements Serializable {
         this.signclosedDate = signclosedDate;
     }
 
-    public Integer getSignclosedIsQuality() {
-        return signclosedIsQuality;
-    }
-
-    public void setSignclosedIsQuality(Integer signclosedIsQuality) {
-        this.signclosedIsQuality = signclosedIsQuality;
-    }
-
-    public Integer getSignclosedIsInto() {
-        return signclosedIsInto;
-    }
-
-    public void setSignclosedIsInto(Integer signclosedIsInto) {
-        this.signclosedIsInto = signclosedIsInto;
-    }
-
-    public Integer getSignclosedState() {
-        return signclosedState;
-    }
-
-    public void setSignclosedState(Integer signclosedState) {
-        this.signclosedState = signclosedState;
-    }
-
-    public Integer getSignclosedObjectsState() {
-        return signclosedObjectsState;
-    }
-
-    public void setSignclosedObjectsState(Integer signclosedObjectsState) {
-        this.signclosedObjectsState = signclosedObjectsState;
-    }
-
     public Integer getSignclosedCustomerId() {
         return signclosedCustomerId;
     }
@@ -172,38 +132,6 @@ public class ComplaintSignclosedInfo implements Serializable {
         this.signclosedCustomerId = signclosedCustomerId;
     }
 
-    public Integer getSignclosedUrgedNum() {
-        return signclosedUrgedNum;
-    }
-
-    public void setSignclosedUrgedNum(Integer signclosedUrgedNum) {
-        this.signclosedUrgedNum = signclosedUrgedNum;
-    }
-
-    public String getOldEfastId() {
-        return oldEfastId;
-    }
-
-    public void setOldEfastId(String oldEfastId) {
-        this.oldEfastId = oldEfastId;
-    }
-
-    public String getNewEfastId() {
-        return newEfastId;
-    }
-
-    public void setNewEfastId(String newEfastId) {
-        this.newEfastId = newEfastId;
-    }
-
-    public String getSignclosedCustomerDesc() {
-        return signclosedCustomerDesc;
-    }
-
-    public void setSignclosedCustomerDesc(String signclosedCustomerDesc) {
-        this.signclosedCustomerDesc = signclosedCustomerDesc;
-    }
-
     public String getSignclosedDesc() {
         return signclosedDesc;
     }
@@ -228,6 +156,14 @@ public class ComplaintSignclosedInfo implements Serializable {
         this.signclosedUpdateTime = signclosedUpdateTime;
     }
 
+    public String getCustomerIdDescribe() {
+        return customerIdDescribe;
+    }
+
+    public void setCustomerIdDescribe(String customerIdDescribe) {
+        this.customerIdDescribe = customerIdDescribe;
+    }
+
     public List<AwaitingSignclosedProductInfo> getAwaitingSignclosedProductInfoList() {
         return awaitingSignclosedProductInfoList;
     }
@@ -244,35 +180,35 @@ public class ComplaintSignclosedInfo implements Serializable {
         this.signclosedProductInfoList = signclosedProductInfoList;
     }
 
-    public String getProvincesName() {
-        return provincesName;
+    public String getDescribeHandleDesc() {
+        return describeHandleDesc;
     }
 
-    public void setProvincesName(String provincesName) {
-        this.provincesName = provincesName;
+    public void setDescribeHandleDesc(String describeHandleDesc) {
+        this.describeHandleDesc = describeHandleDesc;
     }
 
-    public String getCityName() {
-        return cityName;
+    public Integer getSignclosedState() {
+        return signclosedState;
     }
 
-    public void setCityName(String cityName) {
-        this.cityName = cityName;
+    public void setSignclosedState(Integer signclosedState) {
+        this.signclosedState = signclosedState;
     }
 
-    public String getCustomerIdDescribe() {
-        return customerIdDescribe;
+    public String getSignclosedCustomerDesc() {
+        return signclosedCustomerDesc;
     }
 
-    public void setCustomerIdDescribe(String customerIdDescribe) {
-        this.customerIdDescribe = customerIdDescribe;
+    public void setSignclosedCustomerDesc(String signclosedCustomerDesc) {
+        this.signclosedCustomerDesc = signclosedCustomerDesc;
     }
 
-    public String getDescribeHandleDesc() {
-        return describeHandleDesc;
+    public Integer getIsBinding() {
+        return isBinding;
     }
 
-    public void setDescribeHandleDesc(String describeHandleDesc) {
-        this.describeHandleDesc = describeHandleDesc;
+    public void setIsBinding(Integer isBinding) {
+        this.isBinding = isBinding;
     }
 }

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

@@ -60,6 +60,12 @@ public class CustomerInfo  implements Serializable {
     //  是否为二次售后 1:是  2 否
     private String customerSecondaryCustomer;
 
+    //是否需要品检
+    private Integer isQuality;//1.需要品检2不需要品检
+
+    //工厂id
+    private Integer factoryId;
+
     /*客诉信息本身延伸字段*/
     //区域,用于修改客诉处理区域选择逻辑
     private String provinceName;
@@ -690,4 +696,20 @@ public class CustomerInfo  implements Serializable {
     public void setCustomerInitialId(Integer customerInitialId) {
         this.customerInitialId = customerInitialId;
     }
+
+    public Integer getIsQuality() {
+        return isQuality;
+    }
+
+    public void setIsQuality(Integer isQuality) {
+        this.isQuality = isQuality;
+    }
+
+    public Integer getFactoryId() {
+        return factoryId;
+    }
+
+    public void setFactoryId(Integer factoryId) {
+        this.factoryId = factoryId;
+    }
 }

+ 48 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/FactoryInfo.java

@@ -0,0 +1,48 @@
+package com.iamberry.rst.core.cm;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 工厂信息表
+ * Created by Administrator on 2018/7/11.
+ */
+public class FactoryInfo implements Serializable{
+    private static final long serialVersionUID = -823097103866425176L;
+    private Integer factoryId;//主键
+    private String factoryName;//工厂名称
+    private String factoryDesc;//工厂备注
+    private Date factoryCreateDate;//创建时间
+
+    public Integer getFactoryId() {
+        return factoryId;
+    }
+
+    public void setFactoryId(Integer factoryId) {
+        this.factoryId = factoryId;
+    }
+
+    public String getFactoryName() {
+        return factoryName;
+    }
+
+    public void setFactoryName(String factoryName) {
+        this.factoryName = factoryName;
+    }
+
+    public String getFactoryDesc() {
+        return factoryDesc;
+    }
+
+    public void setFactoryDesc(String factoryDesc) {
+        this.factoryDesc = factoryDesc;
+    }
+
+    public Date getFactoryCreateDate() {
+        return factoryCreateDate;
+    }
+
+    public void setFactoryCreateDate(Date factoryCreateDate) {
+        this.factoryCreateDate = factoryCreateDate;
+    }
+}

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

@@ -1,6 +1,7 @@
 package com.iamberry.rst.core.cm;
 
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * 客诉基本描述
@@ -26,6 +27,7 @@ public class QuestionDescribe implements Serializable {
 
     private String questionId;     //问题id
     private String customerDesc;     //客服备注
+    private Date customerCreateTime;     //客诉时间
 
     public String getDescribeTitle() {
         return describeTitle;
@@ -82,4 +84,12 @@ public class QuestionDescribe implements Serializable {
     public void setCustomerDesc(String customerDesc) {
         this.customerDesc = customerDesc;
     }
+
+    public Date getCustomerCreateTime() {
+        return customerCreateTime;
+    }
+
+    public void setCustomerCreateTime(Date customerCreateTime) {
+        this.customerCreateTime = customerCreateTime;
+    }
 }

+ 57 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/WarehouseInfo.java

@@ -0,0 +1,57 @@
+package com.iamberry.rst.core.cm;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 仓库表
+ * Created by Administrator on 2018/7/11.
+ */
+public class WarehouseInfo implements Serializable {
+    private static final long serialVersionUID = 8272776376340335251L;
+    private Integer warehouseId;
+    private Integer factoryId;//关联工厂id
+    private String warehouseName;//仓库名称
+    private String warehouseDesc;//仓库简介
+    private Date warehouseCreateDate;//创建时间
+
+    public Integer getWarehouseId() {
+        return warehouseId;
+    }
+
+    public void setWarehouseId(Integer warehouseId) {
+        this.warehouseId = warehouseId;
+    }
+
+    public Integer getFactoryId() {
+        return factoryId;
+    }
+
+    public void setFactoryId(Integer factoryId) {
+        this.factoryId = factoryId;
+    }
+
+    public String getWarehouseName() {
+        return warehouseName;
+    }
+
+    public void setWarehouseName(String warehouseName) {
+        this.warehouseName = warehouseName;
+    }
+
+    public String getWarehouseDesc() {
+        return warehouseDesc;
+    }
+
+    public void setWarehouseDesc(String warehouseDesc) {
+        this.warehouseDesc = warehouseDesc;
+    }
+
+    public Date getWarehouseCreateDate() {
+        return warehouseCreateDate;
+    }
+
+    public void setWarehouseCreateDate(Date warehouseCreateDate) {
+        this.warehouseCreateDate = warehouseCreateDate;
+    }
+}

+ 13 - 6
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintDetectInfoService.java

@@ -1,6 +1,7 @@
 package com.iamberry.rst.faces.cm;
 
 import com.iamberry.rst.core.cm.ComplaintDetectInfo;
+import com.iamberry.rst.core.cm.ComplaintDetectItem;
 import com.iamberry.rst.core.order.Order;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
@@ -20,22 +21,28 @@ public interface ComplaintDetectInfoService {
      * 查询单个品质检测产品
      * @return
      */
-    ComplaintDetectInfo getComplaintDetectById(Integer detectId);
+    ComplaintDetectItem getDetectItemById(Integer detectId);
     /**
      * 修改单个待品质检测产品
      * @return
      */
-    int updateComplaintDetectById(ComplaintDetectInfo record);
+    int updateDetectItemById(ComplaintDetectItem record);
+
 
     /**
-     * 修改单个待品质检测产品并生成生产数据
+     * 获取品质检测列表
      * @return
      */
-    int updateComplaintDetect(ComplaintDetectInfo record);
+    PagedResult<ComplaintDetectItem> listComplaintDetectItem(PageRequest<ComplaintDetectItem> pageRequest);
 
     /**
-     * 获取品质检测列表
+     * 根据客诉id、查询品检信息
+     * @return
+     */
+    ComplaintDetectInfo getDetectByCustomerId(Integer customerId);
+    /**
+     * 添加品检项
      * @return
      */
-    PagedResult<ComplaintDetectInfo> listComplaintDetect(PageRequest<ComplaintDetectInfo> pageRequest);
+    int insertItem(ComplaintDetectItem complaintDetectItem);
 }

+ 7 - 6
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/ComplaintSignclosedInfoService.java

@@ -2,6 +2,7 @@ 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.cm.SignclosedProductInfo;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
 
@@ -47,20 +48,20 @@ public interface ComplaintSignclosedInfoService {
     Integer updateSignclosedByCustomerId(ComplaintSignclosedInfo record);
 
     /**
-     * 增加催促次数
+     * 查询多个签收记录
      * @return
      */
-    int updateUrgedNumById(ComplaintSignclosedInfo complaintSignclosedInfo);
+    PagedResult<ComplaintSignclosedInfo> listSignclosed(PageRequest<ComplaintSignclosedInfo> pageRequest);
 
     /**
-     * 查询多个签收记录
+     * 添加品质信息
      * @return
      */
-    PagedResult<ComplaintSignclosedInfo> listSignclosed(PageRequest<ComplaintSignclosedInfo> pageRequest);
+    int addDetect(ComplaintSignclosedInfo record);
 
     /**
-     * 转入品质
+     * 查询签收产品集合
      * @return
      */
-    int intoComplaint(Integer signclosedId);
+    List<SignclosedProductInfo> listSignclosedById(Integer signclosedId);
 }

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

@@ -29,4 +29,10 @@ public interface ComplaintSignclosedProductInfoService {
      * @return
      */
     int updateSignclosedById(SignclosedProductInfo record);
+
+    /**
+     * 查询单个签收产品
+     * @return
+     */
+    SignclosedProductInfo listSignclosedProductInfoById(Integer productid);
 }

+ 18 - 29
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintDetectInfoServiceImpl.java

@@ -3,6 +3,7 @@ package com.iamberry.rst.service.cm;
 
 import com.github.pagehelper.PageHelper;
 import com.iamberry.rst.core.cm.ComplaintDetectInfo;
+import com.iamberry.rst.core.cm.ComplaintDetectItem;
 import com.iamberry.rst.core.cm.ComplaintMaintenanceInfo;
 import com.iamberry.rst.core.order.Order;
 import com.iamberry.rst.core.page.PageRequest;
@@ -31,42 +32,30 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
     }
 
     @Override
-    public ComplaintDetectInfo getComplaintDetectById(Integer detectId) {
-        return complaintDetectInfoMapper.getComplaintDetectById(detectId);
+    public ComplaintDetectItem getDetectItemById(Integer detectId) {
+        return complaintDetectInfoMapper.getDetectItemById(detectId);
     }
 
     @Override
-    public int updateComplaintDetectById(ComplaintDetectInfo record) {
-        return complaintDetectInfoMapper.updateComplaintDetectById(record);
+    public int updateDetectItemById(ComplaintDetectItem record) {
+        return complaintDetectInfoMapper.updateDetectItemById(record);
     }
 
+
     @Override
-    public int updateComplaintDetect(ComplaintDetectInfo record) {
-        Integer msg = complaintDetectInfoMapper.updateComplaintDetectById(record);
-        if (msg > 0) {
-            if(record.getDetectRevolutionProduced() == 2){ //在生产表生成记录
-                ComplaintDetectInfo detectInfo = complaintDetectInfoMapper.getComplaintDetectById(record.getDetectId());
-                ComplaintMaintenanceInfo complaintMaintenanceInfo = new ComplaintMaintenanceInfo();
-                complaintMaintenanceInfo.setDetectId(detectInfo.getDetectId());
-                complaintMaintenanceInfo.setMaintenanceEquipmentNumber(detectInfo.getMachineNo() == null ? null:detectInfo.getMachineNo());
-                complaintMaintenanceInfo.setProductId(detectInfo.getProductId());
-                complaintMaintenanceInfo.setMaintenanceProductNumber(detectInfo.getDetectProductNumber() == null ? null:detectInfo.getDetectProductNumber());
-                complaintMaintenanceInfo.setMaintenanceState(1);//默认待维修更换
-                complaintMaintenanceInfo.setMaintenanceAnalysis(record.getDetectAnalysis());
-                complaintMaintenanceInfo.setMaintenanceCustomerId(detectInfo.getCustomerId() == null ? null:detectInfo.getCustomerId());
-                complaintMaintenanceInfo.setMaintenanceIsRepair(1);//默认未评估
-                complaintMaintenanceInfo.setMaintenanceContentDate(new Date());
-                complaintMaintenanceInfo.setMaintenanceCreateTime(new Date());
-                complaintMaintenanceInfo.setMaintenanceIsWarehousing(2);//默认为已入库
-                complaintMaintenanceInfoMapper.insert(complaintMaintenanceInfo);
-            }
-        }
-        return msg;
-    }
-    @Override
-    public PagedResult<ComplaintDetectInfo> listComplaintDetect(PageRequest<ComplaintDetectInfo> pageRequest) {
+    public PagedResult<ComplaintDetectItem> listComplaintDetectItem(PageRequest<ComplaintDetectItem> pageRequest) {
         PageHelper.startPage(pageRequest.getPageNO(), pageRequest.getPageSize(), pageRequest.isPageTotal());
-        List<ComplaintDetectInfo> detedctList = complaintDetectInfoMapper.listComplaintDetect(pageRequest.getData());
+        List<ComplaintDetectItem> detedctList = complaintDetectInfoMapper.listComplaintDetectItem(pageRequest.getData());
         return PageUtil.getPage(detedctList);
     }
+
+    @Override
+    public ComplaintDetectInfo getDetectByCustomerId(Integer customerId) {
+        return complaintDetectInfoMapper.getDetectByCustomerId(customerId);
+    }
+
+    @Override
+    public int insertItem(ComplaintDetectItem complaintDetectItem) {
+        return complaintDetectInfoMapper.insertItem(complaintDetectItem);
+    }
 }

+ 69 - 66
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/ComplaintSignclosedInfoServiceImpl.java

@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -33,6 +34,8 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
     private FittingsInfoMapper fittingsInfoMapper;
     @Autowired
     private ComplaintDetectInfoMapper complaintDetectInfoMapper;
+    @Autowired
+    private CustomerInfoMapper customerInfoMapper;
 
     @Override
     @Transactional
@@ -45,42 +48,6 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
         if(num < 1){
             msg = false;
         }else{
-            /*if(colorNameMap != null || colorNameMap.size() != 0){
-                for (Map.Entry<String,Integer> entry : colorNameMap.entrySet()) {
-                    AwaitingSignclosedProductInfo awaitingSignclosedInfo = new AwaitingSignclosedProductInfo();
-                    //根据颜色id获取产品信息获取产品信息
-                    Product product = productMapper.getProductById(Integer.valueOf(entry.getKey()));
-                    if(product == null){
-                        return false;
-                    }
-                    awaitingSignclosedInfo.setSignclosedId(record.getSignclosedId());
-                    awaitingSignclosedInfo.setProductName(product.getProductName());
-                    awaitingSignclosedInfo.setProductNum(entry.getValue());
-                    awaitingSignclosedInfo.setSignclosedProductType(1);
-                    awaitingSignclosedInfo.setSignclosedProductId(product.getProductId());
-                    awaitingSignclosedInfo.setSignclosedProductColor(Integer.valueOf(entry.getKey()));
-                    awaitingSignclosedInfo.setSignclosedCreateTime(new Date());
-                    awaitingSignclosedProductMapper.insert(awaitingSignclosedInfo);
-                 }
-            }
-            if(fittingsNameMap != null || fittingsNameMap.size() != 0){
-                for (Map.Entry<String,Integer> entry : fittingsNameMap.entrySet()) {
-                    AwaitingSignclosedProductInfo awaitingSignclosedInfo = new AwaitingSignclosedProductInfo();
-                    //根据配件id获取配件信息
-                    FittingsInfo fittingsInfo = fittingsInfoMapper.getFittingsById(Integer.valueOf(entry.getKey()));
-                    if(fittingsInfo == null){
-                        return false;
-                    }
-                    awaitingSignclosedInfo.setSignclosedId(record.getSignclosedId());
-                    awaitingSignclosedInfo.setProductName(fittingsInfo.getFittingsName());
-                    awaitingSignclosedInfo.setProductNum(entry.getValue());
-                    awaitingSignclosedInfo.setSignclosedProductType(2);
-                    awaitingSignclosedInfo.setSignclosedProductId(fittingsInfo.getProductId());
-                    awaitingSignclosedInfo.setSignclosedProductColor(null);
-                    awaitingSignclosedInfo.setSignclosedCreateTime(new Date());
-                    awaitingSignclosedProductMapper.insert(awaitingSignclosedInfo);
-                }
-            }*/
             if(alreadyColorMap != null || alreadyColorMap.size() != 0){
                 for (Map.Entry<String,Integer> entry : alreadyColorMap.entrySet()) {
                     int i = 0;
@@ -90,7 +57,6 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                     if(product == null){
                         return false;
                     }
-                    String[] machinenums = machineNumberMap.get("machineNumber"+entry.getKey());
                     for (int j = 0;j<entry.getValue();j++){
                         signclosedProductInfo.setSignclosedId(record.getSignclosedId());
                         signclosedProductInfo.setProductName(product.getProductName());
@@ -98,7 +64,6 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                         signclosedProductInfo.setSignclosedProductType(1);
                         signclosedProductInfo.setSignclosedProductId(product.getProductId());
                         signclosedProductInfo.setSignclosedProductColor(Integer.valueOf(entry.getKey()));
-                        signclosedProductInfo.setMachineNo(machinenums[i]);
                         signclosedProductInfo.setSignclosedCreateTime(new Date());
                         complaintSignclosedProductInfoMapper.insert(signclosedProductInfo);
                         i++;
@@ -127,9 +92,75 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                 }
             }
         }
+        //关联客诉/判断是否生成客诉信息
+        try {
+            addDetect(record);
+        }catch (Exception e){
+            throw new RuntimeException("------------关联客诉出错------------");
+        }
+
         return msg;
     }
 
+    /*关联客诉*/
+    public int addDetect(ComplaintSignclosedInfo record){
+        CustomerInfo customerInfo = new CustomerInfo();
+        if(record.getSignclosedLogisticsNumber() != null){
+            customerInfo.setSendLogisticsNo(record.getSignclosedLogisticsNumber());
+        }
+        if(record.getSignclosedCustomerId() != null){
+            customerInfo.setCustomerId(record.getSignclosedCustomerId());
+        }
+        List<CustomerInfo> listCustomer = customerInfoMapper.listCustomer(customerInfo);
+        if(listCustomer.size() > 0){
+            customerInfo = listCustomer.get(0);
+            ComplaintSignclosedInfo signclosedInfo = new ComplaintSignclosedInfo();
+            signclosedInfo.setSignclosedCustomerId(customerInfo.getCustomerId());
+            signclosedInfo.setSignclosedId(record.getSignclosedId());
+            Integer msg = complaintSignclosedInfoMapper.updateSignclosedById(signclosedInfo);
+            if(msg != 1){
+                return 0;
+            }
+            if(customerInfo.getIsQuality() != null){
+                if(customerInfo.getIsQuality() == 1){//需要品检
+                    //根据客诉id查询是否已存在品检信息
+                    ComplaintDetectInfo complaintDetectInfo = new ComplaintDetectInfo();
+                    if(complaintDetectInfoMapper.getDetectByCustomerId(customerInfo.getCustomerId()) == null){
+                        complaintDetectInfo.setCustomerId(customerInfo.getCustomerId());
+                        complaintDetectInfo.setSignclosedId(record.getSignclosedId());
+                        complaintDetectInfo.setDetectCreateTime(new Date());
+                        Integer msg2 = complaintDetectInfoMapper.insert(complaintDetectInfo);
+                        if(msg2 != 1){
+                            return 0;
+                        }
+                    }
+                    //添加品检项
+                    /*List<SignclosedProductInfo> listProductInfo = complaintSignclosedInfoMapper.listSignclosedById(record.getSignclosedId());
+                    List<ComplaintDetectItem> listDetectItem = new ArrayList<>();
+                    for(SignclosedProductInfo productInfo : listProductInfo){
+                        ComplaintDetectItem detectItem = new ComplaintDetectItem();
+                        detectItem.setDetectId(complaintDetectInfo.getDetectId());
+                        detectItem.setDetectItemCreateTime(new Date());
+                        detectItem.setProductId(productInfo.getProductId());
+                        detectItem.setDetectProductNumber(productInfo.getProductNumber());
+                        detectItem.setDetectItemState(1);
+                        listDetectItem.add(detectItem);
+                    }
+                    Integer msg3 =  complaintDetectInfoMapper.insertItemList(listDetectItem);
+                    if(msg3 != 1){
+                        return 0;
+                    }*/
+                }
+            }
+        }
+        return 1;
+    }
+
+    @Override
+    public List<SignclosedProductInfo> listSignclosedById(Integer signclosedId) {
+        return complaintSignclosedInfoMapper.listSignclosedById(signclosedId);
+    }
+
     private Integer addSifnclosed(Map<String,Integer> Map,Integer signclosedId) {
         Integer msg = 0;
         for (Map.Entry<String, Integer> entry : Map.entrySet()) {
@@ -176,7 +207,6 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                     if(product == null){
                         return false;
                     }
-                    String[] machinenums = machineNumberMap.get("machineNumber"+entry.getKey());
                     for (int j = 0;j<entry.getValue();j++){
                         signclosedProductInfo.setSignclosedId(record.getSignclosedId());
                         signclosedProductInfo.setProductName(product.getProductName());
@@ -184,7 +214,6 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                         signclosedProductInfo.setSignclosedProductType(1);
                         signclosedProductInfo.setSignclosedProductId(product.getProductId());
                         signclosedProductInfo.setSignclosedProductColor(Integer.valueOf(entry.getKey()));
-                        signclosedProductInfo.setMachineNo(machinenums[i]);
                         signclosedProductInfo.setSignclosedCreateTime(new Date());
                         complaintSignclosedProductInfoMapper.insert(signclosedProductInfo);
                         i++;
@@ -227,11 +256,6 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
     }
 
     @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());
@@ -239,25 +263,4 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
 
     }
 
-    @Override
-    public int intoComplaint(Integer signclosedId) {
-        Integer msg = 0;
-        try {
-            ComplaintSignclosedInfo info = complaintSignclosedInfoMapper.getSignclosedById(signclosedId);
-            ComplaintDetectInfo complaintDetectInfo = new ComplaintDetectInfo();
-            complaintDetectInfo.setSignclosedId(info.getSignclosedId());
-            complaintDetectInfo.setDetectState(2);
-            msg = complaintDetectInfoMapper.updateComplaintDetectById(complaintDetectInfo);
-            if(msg != 0){
-                ComplaintSignclosedInfo complaintSignclosedInfo = new ComplaintSignclosedInfo();
-                complaintSignclosedInfo.setSignclosedId(info.getSignclosedId());
-                complaintSignclosedInfo.setSignclosedIsInto(1);
-                complaintSignclosedInfoMapper.updateSignclosedById(complaintSignclosedInfo);
-            }
-        }catch(Exception e) {
-            return msg;
-        }
-        return msg;
-    }
-
 }

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

@@ -37,4 +37,9 @@ public class ComplaintSignclosedProductInfoServiceImpl implements ComplaintSignc
     public int updateSignclosedById(SignclosedProductInfo record) {
         return complaintSignclosedProductInfoMapper.updateSignclosedById(record);
     }
+
+    @Override
+    public SignclosedProductInfo listSignclosedProductInfoById(Integer productid) {
+        return complaintSignclosedProductInfoMapper.listSignclosedProductInfoById(productid);
+    }
 }

+ 8 - 17
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -882,7 +882,7 @@ public class CustomerServiceImpl implements CustomerService {
         if(customerCommon.getIsNeedSelectOrder() == 2){
             return;
         }
-        Integer flag = 0;
+        /*Integer flag = 0;
         List<ComplaintDetectInfo> complaintDetectInfoList = new ArrayList<ComplaintDetectInfo>();
         for(int i=0 ;i< customerCommon.getClosedProdcues().size();i++){
             ClosedProdcue closedProdcue = customerCommon.getClosedProdcues().get(i);
@@ -908,7 +908,7 @@ public class CustomerServiceImpl implements CustomerService {
         }
         if(flag < 1){
             throw new RuntimeException("添加品检失败");
-        }
+        }*/
     }
 
     /**
@@ -923,18 +923,9 @@ public class CustomerServiceImpl implements CustomerService {
         }
         Integer flag;
         complaintSignclosedInfo.setSignclosedType(1); //客诉寄回
-        complaintSignclosedInfo.setSignclosedIsQuality(1); //是否平品检 1:需要品检
-        complaintSignclosedInfo.setSignclosedIsInto(2); //是否已转入品检 2:未转入品检
-        complaintSignclosedInfo.setSignclosedState(2); //处理状态  2:未签收
-        complaintSignclosedInfo.setSignclosedObjectsState(3); //物件状态  3:暂未签收
         complaintSignclosedInfo.setSignclosedCustomerId(customerCommon.getCustomerId()); //客诉id
-        complaintSignclosedInfo.setSignclosedIsFittings(2);
-
         complaintSignclosedInfo.setSignclosedSendName(customerCommon.getRelationBackName());    //签收姓名
         complaintSignclosedInfo.setSignclosedSendTel(customerCommon.getRelationBackTel());     //签收手机
-        complaintSignclosedInfo.setSignclosedAddrProvinces(customerCommon.getProvinceNumber()); //省
-        complaintSignclosedInfo.setSignclosedAddrCity(customerCommon.getCityNumber());  //市
-
         flag = complaintSignclosedInfoMapper.insert(complaintSignclosedInfo);
         if(flag < 1){
             throw new RuntimeException("添加签收失败");
@@ -1400,9 +1391,9 @@ public class CustomerServiceImpl implements CustomerService {
                 repairInfo.setCustomerId(customerInfo.getCustomerId());
                 //查询售后维修集合
                 repairInfo = repairMapper.getRepairInfo(repairInfo);
-                if (repairInfo.getComplaintDetectList() != null && repairInfo.getComplaintDetectList().size() > 0) {
+                /*if (repairInfo.getComplaintDetectList() != null && repairInfo.getComplaintDetectList().size() > 0) {
                     repairInfo.setDetectState(repairInfo.getComplaintDetectList().get(0).getDetectState());
-                }
+                }*/
                 //orderId = repairInfo.getOrderId();
                 customerCommon = CustomerCommonUtil.getCustomerCommon(4,repairInfo);
                 customerCommon = customerService.selectProdcueAndFitting(customerCommon,4);
@@ -1431,9 +1422,9 @@ public class CustomerServiceImpl implements CustomerService {
                     return null;
                 }
                 backGoodsInfo = backGoodsList.get(0);
-                if (backGoodsInfo.getComplaintDetectList() != null && backGoodsInfo.getComplaintDetectList().size() > 0) {
+                /*if (backGoodsInfo.getComplaintDetectList() != null && backGoodsInfo.getComplaintDetectList().size() > 0) {
                     backGoodsInfo.setDetectState(backGoodsInfo.getComplaintDetectList().get(0).getDetectState());
-                }
+                }*/
                 //orderId = backGoodsInfo.getOrderId();
                 customerCommon = CustomerCommonUtil.getCustomerCommon(6,backGoodsInfo);
                 customerCommon = customerService.selectProdcueAndFitting(customerCommon,6);
@@ -1448,9 +1439,9 @@ public class CustomerServiceImpl implements CustomerService {
                     return null;
                 }
                 noreasonBackInfo = noreasonBackList.get(0);
-                if (noreasonBackInfo.getComplaintDetectList() != null && noreasonBackInfo.getComplaintDetectList().size() > 0) {
+                /*if (noreasonBackInfo.getComplaintDetectList() != null && noreasonBackInfo.getComplaintDetectList().size() > 0) {
                     noreasonBackInfo.setDetectState(noreasonBackInfo.getComplaintDetectList().get(0).getDetectState());
-                }
+                }*/
                 //orderId = noreasonBackInfo.getOrderId();
                 customerCommon = CustomerCommonUtil.getCustomerCommon(7,noreasonBackInfo);
                 customerCommon = customerService.selectProdcueAndFitting(customerCommon,7);

+ 19 - 7
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintDetectInfoMapper.java

@@ -1,6 +1,7 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.ComplaintDetectInfo;
+import com.iamberry.rst.core.cm.ComplaintDetectItem;
 
 import java.util.List;
 
@@ -15,26 +16,37 @@ public interface ComplaintDetectInfoMapper {
     int insert(ComplaintDetectInfo record);
 
     /**
-     * 批量添加品检
-     * @param complaintDetectInfoList
+     * 批量添加品检项
      * @return
      */
-    int insertList(List<ComplaintDetectInfo> complaintDetectInfoList);
+    int insertItemList(List<ComplaintDetectItem> detectItemList);
 
     /**
      * 查询单个品质检测产品
      * @return
      */
-    ComplaintDetectInfo getComplaintDetectById(Integer detectId);
+    ComplaintDetectItem getDetectItemById(Integer detectId);
     /**
      * 修改单个待品质检测产品
      * @return
      */
-    int updateComplaintDetectById(ComplaintDetectInfo record);
+    int updateDetectItemById(ComplaintDetectItem record);
 
     /**
-     * 获取品质检测列表
+     * 获取品质检测列表
      * @return
      */
-    List<ComplaintDetectInfo> listComplaintDetect(ComplaintDetectInfo record);
+    List<ComplaintDetectItem> listComplaintDetectItem(ComplaintDetectItem item);
+
+    /**
+     * 根据客诉id、查询品检信息
+     * @return
+     */
+    ComplaintDetectInfo getDetectByCustomerId(Integer customerId);
+
+    /**
+     * 添加品检项
+     * @return
+     */
+    int insertItem(ComplaintDetectItem complaintDetectItem);
 }

+ 5 - 7
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ComplaintSignclosedInfoMapper.java

@@ -1,6 +1,7 @@
 package com.iamberry.rst.service.cm.mapper;
 
 import com.iamberry.rst.core.cm.ComplaintSignclosedInfo;
+import com.iamberry.rst.core.cm.SignclosedProductInfo;
 
 import java.util.List;
 
@@ -29,17 +30,14 @@ public interface ComplaintSignclosedInfoMapper {
      * @return
      */
     int updateSignclosedByCustomerId(ComplaintSignclosedInfo record);
-
     /**
-     * 增加催促次数
+     * 查询多个签收记录
      * @return
      */
-    int updateUrgedNumById(ComplaintSignclosedInfo complaintSignclosedInfo);
-
+    List<ComplaintSignclosedInfo> listSignclosed(ComplaintSignclosedInfo record);
     /**
-     * 查询多个签收记录
+     * 查询签收产品集合
      * @return
      */
-    List<ComplaintSignclosedInfo> listSignclosed(ComplaintSignclosedInfo record);
-
+    List<SignclosedProductInfo> listSignclosedById(Integer signclosedId);
 }

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

@@ -38,4 +38,11 @@ public interface ComplaintSignclosedProductInfoMapper {
      * @return
      */
     int updateSignclosedById(SignclosedProductInfo record);
+
+
+    /**
+     * 查询单个签收产品
+     * @return
+     */
+    SignclosedProductInfo listSignclosedProductInfoById(Integer productid);
 }

+ 190 - 168
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/complaintDetectInfoMapper.xml

@@ -5,102 +5,76 @@
   <id column="detect_id" property="detectId" jdbcType="INTEGER" />
   <result column="customer_id" property="customerId" jdbcType="INTEGER" />
   <result column="signclosed_id" property="signclosedId" jdbcType="INTEGER" />
-  <result column="product_id" property="productId" jdbcType="INTEGER" />
-  <result column="detect_product_number" property="detectProductNumber" jdbcType="VARCHAR" />
-  <result column="detect_state" property="detectState" jdbcType="BIT" />
-  <result column="detect_phenomenon" property="detectPhenomenon" jdbcType="VARCHAR" />
-  <result column="detect_failure_classification" property="detectFailureClassification" jdbcType="VARCHAR" />
-  <result column="detect_failure_cause" property="detectFailureCause" jdbcType="VARCHAR" />
-  <result column="detect_results" property="detectResults" jdbcType="VARCHAR" />
-  <result column="detect_point" property="detectPoint" jdbcType="VARCHAR" />
-  <result column="detect_analysis" property="detectAnalysis" jdbcType="VARCHAR" />
-  <result column="detect_revolution_produced" property="detectRevolutionProduced" jdbcType="BIT" />
   <result column="detect_desc" property="detectDesc" jdbcType="VARCHAR" />
-  <result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
-  <result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
-  <result column="machine_no" property="machineNo" jdbcType="VARCHAR" />
-  <result column="detect_is_maintenance" property="detectIsMaintenance" jdbcType="BIT" />
-  <result column="detect_date" property="detectDate" jdbcType="DATE" />
-  <result column="maintenance_results" property="maintenanceResults" jdbcType="BIT" />
-  <result column="product_color_id" property="productColorId" jdbcType="INTEGER" />
+  <result column="detect_create_time" property="detectCreateTime" jdbcType="TIMESTAMP" />
+  <result column="detect_update_time" property="detectUpdateTime" jdbcType="TIMESTAMP" />
 </resultMap>
   <sql id="Base_Column_List" >
-    detect_id, customer_id,signclosed_id,product_id,detect_product_number, detect_state,
-    detect_phenomenon, detect_failure_classification, detect_failure_cause, detect_results, 
-    detect_point, detect_analysis, detect_revolution_produced, detect_desc,
-    signclosed_create_time, signclosed_update_time,detect_is_maintenance,detect_date,maintenance_results,
-    product_color_id,detect_date
+    detect_id, customer_id,signclosed_id,detect_desc,
+    detect_create_time, detect_update_time
   </sql>
-  <select id="getComplaintDetectById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="getDetectItemById" resultType="ComplaintDetectItem" parameterType="java.lang.Integer" >
     select 
+      detect_item_id detectItemId,
+      detect_id detectId,
+      product_id productId,
+      detect_product_number detectProductNumber,
+      detect_item_state detectItemState,
+      customer_id customerId,
+      detect_item_phenomenon detectItemPhenomenon,
+      detect_item_classification detectItemClassification,
+      detect_item_failure_cause detectItemFailureCause,
+      detect_item_results detectItemResults,
+      detect_item_point detectItemPoint,
+      detect_item_nalysis detectItemNalysis,
+      detect_item_content detectItemContent,
+      customer_id customerId,
+      is_maintenance isMaintenance,
+      maintenance_results maintenanceResults,
+      detect_item_desc detectItemDesc,
+      detect_item_date detectItemDate,
+      detect_item_create_time detectItemCreateTime,
+      detect_item_update_time detectItemUpdateTime
+    from tb_rst_complaint_detect_item
+    where detect_item_id = #{detectItemId,jdbcType=INTEGER}
+  </select>
+
+  <select id="getDetectByCustomerId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select
     <include refid="Base_Column_List" />
     from tb_rst_complaint_detect
-    where detect_id = #{detectId,jdbcType=INTEGER}
+    where customer_id = #{customerId,jdbcType=INTEGER}
   </select>
-
-  <select id="listComplaintDetect" resultMap="BaseResultMap" parameterType="ComplaintDetectInfo" >
+  <select id="listComplaintDetectItem" resultType="ComplaintDetectItem" parameterType="ComplaintDetectItem" >
     select
-      cd.detect_id detectId,
-      cd.signclosed_id signclosedId,
-      cd.product_id productId,
-      cd.customer_id customerId,
-      cd.detect_product_number detectProductNumber,
-      cd.detect_state detectState,
-      cd.detect_phenomenon detectPhenomenon,
-      cd.detect_failure_classification detectFailureClassification,
-      cd.detect_failure_cause detectFailureCause,
-      cd.detect_results detectResults,
-      cd.detect_point detectPoint,
-      cd.detect_analysis detectAnalysis,
-      cd.detect_revolution_produced detectRevolutionProduced,
-      cd.detect_desc detectDesc,
-      cd.signclosed_create_time signclosedCreateTime,
-      cd.signclosed_update_time signclosedUpdateTime,
-      cd.machine_no machineNo,
-      cd.detect_is_maintenance detectIsMaintenance,
-      cd.detect_date detectDate,
-      cd.product_color_id productColorId,
-      qd.describe_title questionTitle,
-      pt.type_name productTypeName,
-      cd.maintenance_results maintenanceResults
-    from tb_rst_complaint_detect cd
-        LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
-        LEFT JOIN tb_rst_question_describe qd on cd.customer_id = qd.customer_id
-        LEFT JOIN tb_rst_product_type pt on pi.product_type = pt.type_id
+    cd.detect_item_id detectItemId,
+    cd.detect_id detectId,
+    cd.product_id productId,
+    cd.detect_product_number detectProductNumber,
+    cd.detect_item_state detectItemState,
+    cd.customer_id customerId,
+    cd.detect_item_phenomenon detectItemPhenomenon,
+    cd.detect_item_classification detectItemClassification,
+    cd.detect_item_failure_cause detectItemFailureCause,
+    cd.detect_item_results detectItemResults,
+    cd.detect_item_point detectItemPoint,
+    cd.detect_item_nalysis detectItemNalysis,
+    cd.detect_item_content detectItemContent,
+    cd.customer_id customerId,
+    cd.is_maintenance isMaintenance,
+    cd.maintenance_results maintenanceResults,
+    cd.detect_item_desc detectItemDesc,
+    cd.detect_item_date detectItemDate,
+    cd.detect_item_create_time detectItemCreateTime,
+    cd.detect_item_update_time detectItemUpdateTime,
+    qd.describe_title questionTitle,
+    pi.product_name productTypeName,
+    pt.type_name productTypeName
+    from tb_rst_complaint_detect_item cd
+    LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
+    LEFT JOIN tb_rst_question_describe qd on cd.customer_id = qd.customer_id
+    LEFT JOIN tb_rst_product_type pt on pi.product_type = pt.type_id
     <where>
-      <if test="detectProductNumber != null and detectProductNumber != ''" >
-       AND cd.detect_product_number = #{detectProductNumber,jdbcType=VARCHAR}
-      </if>
-      <if test="detectState != null and detectState != ''" >
-       AND cd.detect_state = #{detectState,jdbcType=BIT}
-      </if>
-      <if test="detectPhenomenon != null and detectPhenomenon != ''" >
-       AND cd.detect_phenomenon like CONCAT('%',#{detectPhenomenon,jdbcType=VARCHAR},'%')
-      </if>
-      <if test="detectFailureClassification != null and detectFailureClassification != ''" >
-        AND cd.detect_failure_classification like CONCAT('%',#{detectFailureClassification,jdbcType=VARCHAR},'%')
-      </if>
-      <if test="detectFailureCause != null and detectFailureCause != ''" >
-        AND cd.detect_failure_cause like CONCAT('%',#{detectFailureCause,jdbcType=VARCHAR},'%')
-      </if>
-      <if test="detectResults != null and detectResults != ''" >
-        AND cd.detect_results like CONCAT('%',#{detectResults,jdbcType=VARCHAR},'%')
-      </if>
-      <if test="detectPoint != null and detectPoint != ''" >
-        AND cd.detect_point like CONCAT('%',#{detectPoint,jdbcType=VARCHAR},'%')
-      </if>
-      <if test="detectAnalysis != null and detectAnalysis != ''" >
-        AND cd.detect_analysis like CONCAT('%',#{detectAnalysis,jdbcType=VARCHAR},'%')
-      </if>
-      <if test="detectRevolutionProduced != null and detectRevolutionProduced != ''" >
-        AND cd.detect_revolution_produced = #{detectRevolutionProduced,jdbcType=BIT}
-      </if>
-      <if test="questionTitle != null and questionTitle != ''" >
-        AND qd.describe_title like CONCAT('%',#{questionTitle},'%')
-      </if>
-      <if test="detectIsMaintenance != null and detectIsMaintenance != ''" >
-        AND cd.detect_is_maintenance = #{detectIsMaintenance,jdbcType=BIT}
-      </if>
       <if test="productTypeId != null" >
         AND pt.type_id = #{productTypeId,jdbcType=INTEGER}
       </if>
@@ -108,113 +82,161 @@
         AND cd.customer_id like CONCAT('%',#{customerId},'%')
       </if>
     </where>
-      ORDER BY cd.signclosed_create_time DESC
+      ORDER BY cd.detect_item_create_time DESC
   </select>
-  <insert id="insert" parameterType="ComplaintDetectInfo" >
-    insert into tb_rst_complaint_detect (detect_id, customer_id,signclosed_id,product_id,
-      detect_product_number, detect_state, detect_phenomenon, 
-      detect_failure_classification, detect_failure_cause, 
-      detect_results, detect_point, detect_analysis,
-      detect_revolution_produced,
-      detect_desc, signclosed_create_time, signclosed_update_time,
-      machine_no,detect_is_maintenance,detect_date,maintenance_results
-      ,product_color_id
+  <insert id="insert" parameterType="ComplaintDetectInfo"  useGeneratedKeys="true" keyProperty="detectId" >
+    insert into tb_rst_complaint_detect (
+      customer_id,
+      signclosed_id,
+      detect_desc,
+      detect_create_time
       )
-    values (#{detectId,jdbcType=INTEGER}, #{customerId,jdbcType=INTEGER},#{signclosedId,jdbcType=INTEGER},
-      #{productId,jdbcType=INTEGER},
-      #{detectProductNumber,jdbcType=VARCHAR}, #{detectState,jdbcType=BIT}, #{detectPhenomenon,jdbcType=VARCHAR}, 
-      #{detectFailureClassification,jdbcType=VARCHAR}, #{detectFailureCause,jdbcType=VARCHAR}, 
-      #{detectResults,jdbcType=VARCHAR}, #{detectPoint,jdbcType=VARCHAR}, #{detectAnalysis,jdbcType=VARCHAR}, 
-      #{detectRevolutionProduced,jdbcType=BIT},
-      #{detectDesc,jdbcType=VARCHAR}, #{signclosedCreateTime,jdbcType=TIMESTAMP}, #{signclosedUpdateTime,jdbcType=TIMESTAMP}
-      ,#{machineNo,jdbcType=VARCHAR},#{detectIsMaintenance,jdbcType=BIT},#{detectDate,jdbcType=DATE},#{maintenanceResults,jdbcType=BIT}
-      ,#{productColorId,jdbcType=INTEGER}
+    values (
+      #{customerId,jdbcType=INTEGER},
+      #{signclosedId,jdbcType=INTEGER},
+      #{detectDesc,jdbcType=VARCHAR},
+      #{detectCreateTime,jdbcType=TIMESTAMP}
       )
   </insert>
 
-  <insert id="insertList" parameterType="java.util.List" >
-    insert into tb_rst_complaint_detect
-    (
-        customer_id,signclosed_id,product_id,
-        detect_product_number, detect_state, detect_phenomenon,
-        detect_failure_classification, detect_failure_cause,
-        detect_results, detect_point, detect_analysis,
-        detect_revolution_produced,
-        detect_desc,machine_no,detect_is_maintenance,detect_date,maintenance_results
-      )
-    values
-      <foreach collection="list" item="node" index="index" separator="," open="" close="">
-        (
-          #{node.customerId},#{node.signclosedId},
-          #{node.productId},
-          #{node.detectProductNumber}, #{node.detectState}, #{node.detectPhenomenon},
-          #{node.detectFailureClassification}, #{node.detectFailureCause},
-          #{node.detectResults}, #{node.detectPoint}, #{node.detectAnalysis},
-          #{node.detectRevolutionProduced},
-          #{node.detectDesc},#{node.machineNo},#{node.detectIsMaintenance},#{node.detectDate},#{node.maintenanceResults}
-        )
-      </foreach>
-  </insert>
-
-  <update id="updateComplaintDetectById" parameterType="ComplaintDetectInfo" >
-    update tb_rst_complaint_detect
+  <update id="updateDetectItemById" parameterType="ComplaintDetectItem" >
+    update tb_rst_complaint_detect_item
     <set >
       <if test="customerId != null" >
         customer_id = #{customerId,jdbcType=INTEGER},
       </if>
-      <if test="detectProductNumber != null" >
-        detect_product_number = #{detectProductNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="detectState != null" >
-        detect_state = #{detectState,jdbcType=BIT},
-      </if>
-      <if test="detectPhenomenon != null" >
-        detect_phenomenon = #{detectPhenomenon,jdbcType=VARCHAR},
-      </if>
-      <if test="detectFailureClassification != null" >
-        detect_failure_classification = #{detectFailureClassification,jdbcType=VARCHAR},
+      <if test="detectItemState != null" >
+        detect_item_state = #{detectItemState,jdbcType=INTEGER},
       </if>
-      <if test="detectFailureCause != null" >
-        detect_failure_cause = #{detectFailureCause,jdbcType=VARCHAR},
+      <if test="detectItemPhenomenon != null" >
+        detect_item_phenomenon = #{detectItemPhenomenon,jdbcType=VARCHAR},
       </if>
-      <if test="detectResults != null" >
-        detect_results = #{detectResults,jdbcType=VARCHAR},
+      <if test="detectItemClassification != null" >
+        detect_item_classification = #{detectItemClassification,jdbcType=VARCHAR},
       </if>
-      <if test="detectPoint != null" >
-        detect_point = #{detectPoint,jdbcType=VARCHAR},
+      <if test="detectItemFailureCause != null" >
+        detect_item_failure_cause = #{detectItemFailureCause,jdbcType=VARCHAR},
       </if>
-      <if test="detectAnalysis != null" >
-        detect_analysis = #{detectAnalysis,jdbcType=VARCHAR},
+      <if test="detectItemResults != null" >
+        detect_item_results = #{detectItemResults,jdbcType=VARCHAR},
       </if>
-      <if test="detectRevolutionProduced != null" >
-        detect_revolution_produced = #{detectRevolutionProduced,jdbcType=BIT},
+      <if test="detectItemPoint != null" >
+        detect_item_point = #{detectItemPoint,jdbcType=VARCHAR},
       </if>
-      <if test="detectDesc != null" >
-        detect_desc = #{detectDesc,jdbcType=VARCHAR},
+      <if test="detectItemNalysis != null" >
+        detect_item_nalysis = #{detectItemNalysis,jdbcType=VARCHAR},
       </if>
-      <if test="signclosedUpdateTime != null" >
-        signclosed_update_time = #{signclosedUpdateTime,jdbcType=TIMESTAMP},
+      <if test="detectItemContent != null" >
+        detect_item_content = #{detectItemContent,jdbcType=VARCHAR},
       </if>
-      <if test="detectIsMaintenance != null" >
-        detect_is_maintenance = #{detectIsMaintenance,jdbcType=TIMESTAMP},
+      <if test="isMaintenance != null" >
+        is_maintenance = #{isMaintenance,jdbcType=INTEGER},
       </if>
       <if test="maintenanceResults != null" >
-        maintenance_results = #{maintenanceResults,jdbcType=BIT},
+        maintenance_results = #{maintenanceResults,jdbcType=INTEGER},
       </if>
-      <if test="productColorId != null" >
-        product_color_id = #{productColorId,jdbcType=INTEGER}
+      <if test="detectItemDesc != null" >
+        detect_item_desc = #{detectItemDesc,jdbcType=INTEGER},
       </if>
-      <if test="detectDate != null" >
-        detect_date = #{detectDate}
+      <if test="detectItemDate != null" >
+        detect_item_date = #{detectItemDate,jdbcType=INTEGER},
+      </if>
+      <if test="detectItemUpdateTime != null" >
+        detect_item_update_time = #{detectItemUpdateTime,jdbcType=TIMESTAMP}
       </if>
     </set>
     <where>
-      <if test="detectId != null and detectId != ''" >
-        AND detect_id = #{detectId,jdbcType=INTEGER}
-      </if>
-      <if test="signclosedId != null and signclosedId != ''" >
-        AND signclosed_id = #{signclosedId,jdbcType=INTEGER}
+      <if test="detectItemId != null and detectItemId != ''" >
+        AND detect_item_id = #{detectItemId,jdbcType=INTEGER}
       </if>
     </where>
   </update>
+
+  <insert id="insertItemList" parameterType="java.util.List" >
+    insert into tb_rst_complaint_detect_item
+    (
+    detect_id,
+    product_id,
+    machine_no,
+    detect_product_number,
+    detect_item_state,
+    detect_item_phenomenon,
+    detect_item_classification,
+    detect_item_failure_cause,
+    detect_item_results,
+    detect_item_point,
+    detect_item_nalysis,
+    detect_item_content,
+    is_maintenance,
+    maintenance_results,
+    detect_item_desc,
+    detect_item_date,
+    detect_item_create_time
+    )
+    values
+    <foreach collection="list" item="node" index="index" separator="," open="" close="">
+      (
+      #{node.detectId},
+      #{node.productId},
+      #{node.machineNo},
+      #{node.detectProductNumber},
+      #{node.detectItemState},
+      #{node.detectItemPhenomenon},
+      #{node.detectItemClassification},
+      #{node.detectItemFailureCause},
+      #{node.detectItemResults},
+      #{node.detectItemPoint},
+      #{node.detectItemNalysis},
+      #{node.detectItemContent},
+      #{node.isMaintenance},
+      #{node.maintenanceResults},
+      #{node.detectItemDesc},
+      #{node.detectItemDate},
+      #{node.detectItemCreateTime}
+      )
+    </foreach>
+  </insert>
+
+  <insert id="insertItem" parameterType="ComplaintDetectItem"   useGeneratedKeys="true" keyProperty="detectItemId">
+    insert into tb_rst_complaint_detect_item
+    (
+    detect_id,
+    product_id,
+    machine_no,
+    detect_product_number,
+    detect_item_state,
+    detect_item_phenomenon,
+    detect_item_classification,
+    detect_item_failure_cause,
+    detect_item_results,
+    detect_item_point,
+    detect_item_nalysis,
+    detect_item_content,
+    is_maintenance,
+    maintenance_results,
+    detect_item_desc,
+    detect_item_date,
+    detect_item_create_time
+    )
+    values
+      (
+      #{node.detectId},
+      #{node.productId},
+      #{node.machineNo},
+      #{node.detectProductNumber},
+      #{node.detectItemState},
+      #{node.detectItemPhenomenon},
+      #{node.detectItemClassification},
+      #{node.detectItemFailureCause},
+      #{node.detectItemResults},
+      #{node.detectItemPoint},
+      #{node.detectItemNalysis},
+      #{node.detectItemContent},
+      #{node.isMaintenance},
+      #{node.maintenanceResults},
+      #{node.detectItemDesc},
+      #{node.detectItemDate},
+      #{node.detectItemCreateTime}
+      )
+  </insert>
 </mapper>

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

@@ -9,30 +9,22 @@
     <result column="signclosed_logistics_number" property="signclosedLogisticsNumber" jdbcType="VARCHAR" />
     <result column="signclosed_send_name" property="signclosedSendName" jdbcType="VARCHAR" />
     <result column="signclosed_send_tel" property="signclosedSendTel" jdbcType="VARCHAR" />
-    <result column="signclosed_addr_provinces" property="signclosedAddrProvinces" jdbcType="INTEGER" />
-    <result column="signclosed_addr_city" property="signclosedAddrCity" jdbcType="INTEGER" />
-    <result column="signclosed_is_fittings" property="signclosedIsFittings" jdbcType="BIT" />
+    <result column="signclosed_addr_provinces" property="signclosedAddrProvinces" jdbcType="VARCHAR" />
+    <result column="signclosed_addr_city" property="signclosedAddrCity" jdbcType="VARCHAR" />
+    <result column="signclosed_addr_area" property="signclosedAddrCity" jdbcType="VARCHAR" />
     <result column="signclosed_date" property="signclosedDate" jdbcType="DATE" />
-    <result column="signclosed_is_quality" property="signclosedIsQuality" jdbcType="INTEGER" />
-    <result column="signclosed_is_into" property="signclosedIsInto" jdbcType="BIT" />
-    <result column="signclosed_state" property="signclosedState" jdbcType="BIT" />
-    <result column="signclosed_objects_state" property="signclosedObjectsState" jdbcType="BIT" />
     <result column="signclosed_customer_id" property="signclosedCustomerId" jdbcType="INTEGER" />
-    <result column="signclosed_urged_num" property="signclosedUrgedNum" jdbcType="INTEGER" />
-    <result column="old_efast_id" property="oldEfastId" jdbcType="VARCHAR" />
-    <result column="new_efast_id" property="newEfastId" jdbcType="VARCHAR" />
-    <result column="signclosed_customer_desc" property="signclosedCustomerDesc" jdbcType="VARCHAR" />
     <result column="signclosed_desc" property="signclosedDesc" jdbcType="VARCHAR" />
     <result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
     <result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
+    <result column="signclosed_state" property="signclosedState" jdbcType="INTEGER" />
+    <result column="signclosed_customer_desc" property="signclosedCustomerDesc" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     signclosed_id, signclosed_type, signclosed_type_name, signclosed_logistics,
     signclosed_logistics_number, signclosed_send_name, signclosed_send_tel, signclosed_addr_provinces, 
-    signclosed_addr_city, signclosed_is_fittings, signclosed_date, signclosed_is_quality, 
-    signclosed_is_into, signclosed_state, signclosed_objects_state, signclosed_customer_id, 
-    signclosed_urged_num, old_efast_id, new_efast_id, signclosed_customer_desc, signclosed_desc, 
-    signclosed_create_time, signclosed_update_time
+    signclosed_addr_city,signclosed_addr_area, signclosed_date,signclosed_customer_id,signclosed_desc,
+    signclosed_create_time, signclosed_update_time,signclosed_state,signclosed_customer_desc
   </sql>
   <select id="getSignclosedById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select
@@ -44,30 +36,25 @@
   </select>
 
   <resultMap id="complaintSignclosedInfoMap" type="ComplaintSignclosedInfo">
-    <id column="signclosed_id" property="signclosedId"/>
-    <result column="signclosed_type" property="signclosedType"/>
-    <result column="signclosed_type_name" property="signclosedTypeName"/>
-    <result column="signclosed_logistics" property="signclosedLogistics"/>
-    <result column="signclosed_logistics_number" property="signclosedLogisticsNumber"/>
-    <result column="signclosed_send_name" property="signclosedSendName"/>
-    <result column="signclosed_send_tel" property="signclosedSendTel"/>
-    <result column="signclosed_addr_provinces" property="signclosedAddrProvinces"/>
-    <result column="signclosed_addr_city" property="signclosedAddrCity"/>
-    <result column="signclosed_is_fittings" property="signclosedIsFittings"/>
-    <result column="signclosed_date" property="signclosedDate"/>
-    <result column="signclosed_is_quality" property="signclosedIsQuality"/>
-    <result column="signclosed_is_into" property="signclosedIsInto"/>
-    <result column="signclosed_state" property="signclosedState"/>
-    <result column="signclosed_objects_state" property="signclosedObjectsState"/>
-    <result column="signclosed_customer_id" property="signclosedCustomerId"/>
-    <result column="signclosed_urged_num" property="signclosedUrgedNum"/>
-    <result column="old_efast_id" property="oldEfastId"/>
-    <result column="new_efast_id" property="newEfastId"/>
-    <result column="signclosed_customer_desc" property="signclosedCustomerDesc"/>
-    <result column="signclosed_desc" property="signclosedDesc"/>
-    <result column="signclosed_create_time" property="signclosedCreateTime"/>
-    <result column="signclosed_update_time" property="signclosedUpdateTime"/>
-    <collection property="awaitingSignclosedProductInfoList" column="signclosed_id" ofType="AwaitingSignclosedProductInfo" select="listAwaitingSignclosedById"/>
+    <id column="signclosed_id" property="signclosedId" jdbcType="INTEGER" />
+    <result column="signclosed_type" property="signclosedType" jdbcType="BIT" />
+    <result column="signclosed_type_name" property="signclosedTypeName" jdbcType="VARCHAR" />
+    <result column="signclosed_logistics" property="signclosedLogistics" jdbcType="VARCHAR" />
+    <result column="signclosed_logistics_number" property="signclosedLogisticsNumber" jdbcType="VARCHAR" />
+    <result column="signclosed_send_name" property="signclosedSendName" jdbcType="VARCHAR" />
+    <result column="signclosed_send_tel" property="signclosedSendTel" jdbcType="VARCHAR" />
+    <result column="signclosed_addr_provinces" property="signclosedAddrProvinces" jdbcType="VARCHAR" />
+    <result column="signclosed_addr_city" property="signclosedAddrCity" jdbcType="VARCHAR" />
+    <result column="signclosed_addr_area" property="signclosedAddrArea" jdbcType="VARCHAR" />
+    <result column="signclosed_date" property="signclosedDate" jdbcType="DATE" />
+    <result column="signclosed_customer_id" property="signclosedCustomerId" jdbcType="INTEGER" />
+    <result column="signclosed_desc" property="signclosedDesc" jdbcType="VARCHAR" />
+    <result column="signclosed_create_time" property="signclosedCreateTime" jdbcType="TIMESTAMP" />
+    <result column="signclosed_update_time" property="signclosedUpdateTime" jdbcType="TIMESTAMP" />
+    <result column="signclosed_state" property="signclosedState" jdbcType="INTEGER" />
+    <result column="signclosed_customer_desc" property="signclosedCustomerDesc" jdbcType="VARCHAR" />
+    <result column="signclosed_customer_desc" property="signclosedCustomerDesc" jdbcType="VARCHAR" />
+    <result column="signclosed_customer_desc" property="signclosedCustomerDesc" jdbcType="VARCHAR" />
     <collection property="signclosedProductInfoList" column="signclosed_id" ofType="SignclosedProductInfo" select="listSignclosedById"/>
   </resultMap>
   <select id="listAwaitingSignclosedById" resultType="AwaitingSignclosedProductInfo" parameterType="Integer" >
@@ -121,20 +108,14 @@
     cs.signclosed_send_tel,
     cs.signclosed_addr_provinces,
     cs.signclosed_addr_city,
-    cs.signclosed_is_fittings,
+    cs.signclosed_addr_area,
     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,
+    cs.signclosed_state,
+    cs.signclosed_customer_desc,
     ap.province provincesName,
     ac.city cityName,
     qd.describe_title customerIdDescribe
@@ -156,21 +137,12 @@
       <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>
       <if test="signclosedCustomerId != null " >
         AND cs.signclosed_customer_id like CONCAT('%',#{signclosedCustomerId},'%')
       </if>
+      <if test="isBinding != null and isBinding == 1" >
+        AND cs.signclosed_customer_id is NULL
+      </if>
     </where>
     order by cs.signclosed_create_time DESC
   </select>
@@ -179,22 +151,19 @@
     insert into tb_rst_complaint_signclosed (signclosed_type, signclosed_type_name,
       signclosed_logistics, signclosed_logistics_number,
       signclosed_send_name, signclosed_send_tel, 
-      signclosed_addr_provinces, signclosed_addr_city, 
-      signclosed_is_fittings, signclosed_date, signclosed_is_quality, 
-      signclosed_is_into, signclosed_state, signclosed_objects_state, 
-      signclosed_customer_id, signclosed_urged_num, 
-      old_efast_id, new_efast_id, signclosed_customer_desc, 
-      signclosed_desc
+      signclosed_addr_provinces, signclosed_addr_city, signclosed_addr_area, signclosed_date,
+      signclosed_customer_id,
+      signclosed_desc,signclosed_state,signclosed_customer_desc
       )
     values (#{signclosedType,jdbcType=BIT}, #{signclosedTypeName,jdbcType=VARCHAR},
       #{signclosedLogistics,jdbcType=VARCHAR}, #{signclosedLogisticsNumber,jdbcType=VARCHAR},
       #{signclosedSendName,jdbcType=VARCHAR}, #{signclosedSendTel,jdbcType=VARCHAR}, 
-      #{signclosedAddrProvinces,jdbcType=INTEGER}, #{signclosedAddrCity,jdbcType=INTEGER}, 
-      #{signclosedIsFittings,jdbcType=BIT}, #{signclosedDate,jdbcType=DATE}, #{signclosedIsQuality,jdbcType=INTEGER}, 
-      #{signclosedIsInto,jdbcType=BIT}, #{signclosedState,jdbcType=BIT}, #{signclosedObjectsState,jdbcType=BIT}, 
-      #{signclosedCustomerId,jdbcType=INTEGER}, #{signclosedUrgedNum,jdbcType=INTEGER}, 
-      #{oldEfastId,jdbcType=VARCHAR}, #{newEfastId,jdbcType=VARCHAR}, #{signclosedCustomerDesc,jdbcType=VARCHAR}, 
-      #{signclosedDesc,jdbcType=VARCHAR}
+      #{signclosedAddrProvinces,jdbcType=VARCHAR}, #{signclosedAddrCity,jdbcType=VARCHAR},#{signclosedAddrArea,jdbcType=VARCHAR},
+      #{signclosedDate,jdbcType=DATE},
+      #{signclosedCustomerId,jdbcType=INTEGER},
+      #{signclosedDesc,jdbcType=VARCHAR},
+      #{signclosedState,jdbcType=INTEGER},
+      #{signclosedCustomerDesc,jdbcType=VARCHAR}
       )
   </insert>
   <update id="updateSignclosedById" parameterType="ComplaintSignclosedInfo" >
@@ -219,44 +188,20 @@
         signclosed_send_tel = #{signclosedSendTel,jdbcType=VARCHAR},
       </if>
       <if test="signclosedAddrProvinces != null" >
-        signclosed_addr_provinces = #{signclosedAddrProvinces,jdbcType=INTEGER},
+        signclosed_addr_provinces = #{signclosedAddrProvinces,jdbcType=VARCHAR},
       </if>
       <if test="signclosedAddrCity != null" >
-        signclosed_addr_city = #{signclosedAddrCity,jdbcType=INTEGER},
+        signclosed_addr_city = #{signclosedAddrCity,jdbcType=VARCHAR},
       </if>
-      <if test="signclosedIsFittings != null" >
-        signclosed_is_fittings = #{signclosedIsFittings,jdbcType=BIT},
+      <if test="signclosedAddrArea != null" >
+        signclosed_addr_area = #{signclosedAddrArea,jdbcType=VARCHAR},
       </if>
       <if test="signclosedDate != null" >
         signclosed_date = #{signclosedDate,jdbcType=DATE},
       </if>
-      <if test="signclosedIsQuality != null" >
-        signclosed_is_quality = #{signclosedIsQuality,jdbcType=INTEGER},
-      </if>
-      <if test="signclosedIsInto != null" >
-        signclosed_is_into = #{signclosedIsInto,jdbcType=BIT},
-      </if>
-      <if test="signclosedState != null" >
-        signclosed_state = #{signclosedState,jdbcType=BIT},
-      </if>
-      <if test="signclosedObjectsState != null" >
-        signclosed_objects_state = #{signclosedObjectsState,jdbcType=BIT},
-      </if>
       <if test="signclosedCustomerId != null" >
         signclosed_customer_id = #{signclosedCustomerId,jdbcType=INTEGER},
       </if>
-      <if test="signclosedUrgedNum != null" >
-        signclosed_urged_num = #{signclosedUrgedNum,jdbcType=INTEGER},
-      </if>
-      <if test="oldEfastId != null" >
-        old_efast_id = #{oldEfastId,jdbcType=VARCHAR},
-      </if>
-      <if test="newEfastId != null" >
-        new_efast_id = #{newEfastId,jdbcType=VARCHAR},
-      </if>
-      <if test="signclosedCustomerDesc != null" >
-        signclosed_customer_desc = #{signclosedCustomerDesc,jdbcType=VARCHAR},
-      </if>
       <if test="signclosedDesc != null" >
         signclosed_desc = #{signclosedDesc,jdbcType=VARCHAR},
       </if>
@@ -266,6 +211,12 @@
       <if test="signclosedUpdateTime != null" >
         signclosed_update_time = #{signclosedUpdateTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="signclosedState != null" >
+        signclosed_state = #{signclosedState,jdbcType=VARCHAR},
+      </if>
+      <if test="signclosedCustomerDesc != null" >
+        signclosed_customer_desc = #{signclosedCustomerDesc,jdbcType=VARCHAR}
+      </if>
     </set>
       where
           signclosed_id = #{signclosedId,jdbcType=INTEGER}
@@ -293,52 +244,28 @@
         signclosed_send_tel = #{signclosedSendTel,jdbcType=VARCHAR},
       </if>
       <if test="signclosedAddrProvinces != null" >
-        signclosed_addr_provinces = #{signclosedAddrProvinces,jdbcType=INTEGER},
+        signclosed_addr_provinces = #{signclosedAddrProvinces,jdbcType=VARCHAR},
       </if>
       <if test="signclosedAddrCity != null" >
-        signclosed_addr_city = #{signclosedAddrCity,jdbcType=INTEGER},
+        signclosed_addr_city = #{signclosedAddrCity,jdbcType=VARCHAR},
       </if>
-      <if test="signclosedIsFittings != null" >
-        signclosed_is_fittings = #{signclosedIsFittings,jdbcType=BIT},
+      <if test="signclosedAddrArea!= null" >
+        signclosed_addr_area = #{signclosedAddrArea,jdbcType=VARCHAR},
       </if>
       <if test="signclosedDate != null" >
         signclosed_date = #{signclosedDate,jdbcType=DATE},
       </if>
-      <if test="signclosedIsQuality != null" >
-        signclosed_is_quality = #{signclosedIsQuality,jdbcType=INTEGER},
-      </if>
-      <if test="signclosedIsInto != null" >
-        signclosed_is_into = #{signclosedIsInto,jdbcType=BIT},
+      <if test="signclosedDesc != null" >
+        signclosed_desc = #{signclosedDesc,jdbcType=VARCHAR},
       </if>
       <if test="signclosedState != null" >
-        signclosed_state = #{signclosedState,jdbcType=BIT},
-      </if>
-      <if test="signclosedObjectsState != null" >
-        signclosed_objects_state = #{signclosedObjectsState,jdbcType=BIT},
-      </if>
-      <if test="signclosedUrgedNum != null" >
-        signclosed_urged_num = #{signclosedUrgedNum,jdbcType=INTEGER},
-      </if>
-      <if test="oldEfastId != null" >
-        old_efast_id = #{oldEfastId,jdbcType=VARCHAR},
-      </if>
-      <if test="newEfastId != null" >
-        new_efast_id = #{newEfastId,jdbcType=VARCHAR},
+        signclosed_state = #{signclosedState,jdbcType=VARCHAR},
       </if>
       <if test="signclosedCustomerDesc != null" >
-        signclosed_customer_desc = #{signclosedCustomerDesc,jdbcType=VARCHAR},
-      </if>
-      <if test="signclosedDesc != null" >
-        signclosed_desc = #{signclosedDesc,jdbcType=VARCHAR},
+        signclosed_customer_desc = #{signclosedCustomerDesc,jdbcType=VARCHAR}
       </if>
     </set>
     where
         signclosed_customer_id = #{signclosedCustomerId}
   </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>

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

@@ -94,4 +94,26 @@
     </set>
     where product_id = #{productId,jdbcType=INTEGER}
   </update>
+
+  <select id="listSignclosedProductInfoById" resultType="SignclosedProductInfo" parameterType="Integer" >
+    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,
+    sp.machine_no machineNo,
+    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 product_id = #{productId,jdbcType=INTEGER}
+  </select>
+
 </mapper>

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

@@ -23,12 +23,13 @@
     <result column="customer_desc" property="customerDesc" jdbcType="VARCHAR" />
     <result column="customer_out_damaged" property="customerOutDamaged" jdbcType="INTEGER" />
     <result column="customer_secondary_customer" property="customerSecondaryCustomer" jdbcType="INTEGER" />
+    <result column="is_quality" property="isQuality" jdbcType="INTEGER" />
   </resultMap>
   <sql id="Base_Column_List" >
     customer_id, admin_id, question_id, company_id, store_id, customer_source_type, customer_source, 
     customer_counsel_type, customer_name, customer_tel,customer_wechat_name, customer_is_solve, customer_is_visit,
     customer_in_TDS, customer_out_TDS, customer_area, customer_create_time, customer_update_time,customer_desc,
-    customer_out_damaged,customer_secondary_customer
+    customer_out_damaged,customer_secondary_customer,is_quality
   </sql>
 
   <!-- 根据id获取客诉信息 -->
@@ -58,7 +59,8 @@
       t.customer_out_damaged,
       t.customer_secondary_customer,
       t.customer_last_id,
-      t.customer_initial_id
+      t.customer_initial_id,
+      t.is_quality
     from tb_rst_customer_info t
     where t.customer_id = #{customerId,jdbcType=INTEGER}
   </select>
@@ -253,6 +255,7 @@
     c.customer_wechat_name,
     c.customer_source_type,
     c.customer_source,
+    c.is_quality,
     ct.complaint_class_name,
     csc.small_class_name,
     t.type_name,
@@ -539,6 +542,7 @@
     <result column="question_profile" property="questionProfile"/>
     <result column="describe_handle_desc" property="describeHandleDesc"/>
     <result column="describe_content" property="describeContent"/>
+    <result column="is_quality" property="isQuality"/>
     <collection property="complaintDetectList" column="customer_id" ofType="ComplaintDetectInfo" select="listComplaintDetect"/>
   </resultMap>
 
@@ -641,6 +645,12 @@
       <if test="customerInitialId != null" >
         customer_initial_id = #{customerInitialId}
       </if>
+      <if test="factoryId != null" >
+        factory_id = #{factoryId}
+      </if>
+      <if test="isQuality != null" >
+        is_quality = #{isQuality}
+      </if>
     </set>
     where customer_id = #{customerId}
   </update>

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

@@ -25,7 +25,8 @@
   <select id="listQuestionDescribe" parameterType="QuestionDescribe" resultType="QuestionDescribe">
     select
     tb_rst_question_describe.*,
-    tb_rst_customer_info.customer_desc
+    tb_rst_customer_info.customer_desc,
+    tb_rst_customer_info.customer_create_time
     from tb_rst_question_describe
     LEFT JOIN tb_rst_customer_info on tb_rst_customer_info.customer_id = tb_rst_question_describe.customer_id
     <where>

+ 36 - 119
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java

@@ -83,48 +83,13 @@ public class AdminDetectController {
                                          @RequestParam(value = "pageSize", defaultValue = "5", required = false) Integer pageSize,
                                          @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
                                          @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum,
-                                         ComplaintDetectInfo detectInfo) {
+                                         ComplaintDetectItem detectItem) {
 
         ModelAndView mv = new ModelAndView("cm/inspection/detect_list");
-//        StringBuilder url = new StringBuilder("/admin/detect/select_detect_list?pageSize=" + pageSize);
-        // 请求参数
-//        if (StringUtils.isNotEmpty(detectInfo.getQuestionTitle())) {
-//            url.append("&questionTitle=").append(detectInfo.getQuestionTitle());
-//            mv.addObject("questionTitle",detectInfo.getQuestionTitle());
-//        }
-//        if (StringUtils.isNotEmpty(detectInfo.getDetectPhenomenon())) {
-//            url.append("&detectPhenomenon=").append(detectInfo.getDetectPhenomenon());
-//            mv.addObject("detectPhenomenon",detectInfo.getDetectPhenomenon());
-//        }
-//        if (StringUtils.isNotEmpty(detectInfo.getDetectFailureCause())) {
-//            url.append("&detectFailureCause=").append(detectInfo.getDetectFailureCause());
-//            mv.addObject("detectFailureCause",detectInfo.getDetectFailureCause());
-//        }
-//        if (StringUtils.isNotEmpty(detectInfo.getDetectPoint())) {
-//            url.append("&detectPoint=").append(detectInfo.getDetectPoint());
-//            mv.addObject("detectPoint",detectInfo.getDetectPoint());
-//        }
-//        if (StringUtils.isNotEmpty(detectInfo.getDetectAnalysis())) {
-//            url.append("&detectAnalysis=").append(detectInfo.getDetectAnalysis());
-//            mv.addObject("detectAnalysis",detectInfo.getDetectAnalysis());
-//        }
-//        if (detectInfo.getDetectState() != null && detectInfo.getDetectState() != -1) {
-//            url.append("&detectState=").append(detectInfo.getDetectState());
-//            mv.addObject("detectState",detectInfo.getDetectState());
-//        }
-//        if (StringUtils.isNotEmpty(detectInfo.getDetectFailureClassification())) {
-//            url.append("&detectFailureClassification=").append(detectInfo.getDetectFailureClassification());
-//            mv.addObject("detectFailureClassification",detectInfo.getDetectFailureClassification());
-//        }
-//        if (detectInfo.getProductTypeId() != null && detectInfo.getProductTypeId() != -1) {
-//            url.append("&productTypeId=").append(detectInfo.getProductTypeId());
-//            mv.addObject("productTypeId",detectInfo.getProductTypeId());
-//        }
-
         // 封装请求数据
-        PageRequest<ComplaintDetectInfo> pageRequest = new PageRequest<>(detectInfo, pageNO, pageSize, totalNum == 0);
+        PageRequest<ComplaintDetectItem> pageRequest = new PageRequest<>(detectItem, pageNO, pageSize, totalNum == 0);
         // 查询订单列表
-        PagedResult<ComplaintDetectInfo> result = complaintDetectInfoService.listComplaintDetect(pageRequest);
+        PagedResult<ComplaintDetectItem> result = complaintDetectInfoService.listComplaintDetectItem(pageRequest);
         if (totalNum != 0) {
             result.setTotal(totalNum);
         }
@@ -146,7 +111,7 @@ public class AdminDetectController {
 //        mv.addObject("page", result);
 //        mv.addObject("url", url.toString());
 
-         StitchAttrUtil.getSa().setModelAndView(detectInfo, mv, "/admin/detect/select_detect_list", result);
+         StitchAttrUtil.getSa().setModelAndView(detectItem, mv, "/admin/detect/select_detect_list", result);
         return mv;
     }
 
@@ -166,35 +131,6 @@ public class AdminDetectController {
             msg.setReturnCode(500);
             return msg;
         }
-        if(detectInfo.getProductId() == null || detectInfo.getProductId().equals("")){
-            msg.setResultCode(500);
-            msg.setReturnCode(500);
-            return msg;
-        }
-        if(detectInfo.getProductId() != null){
-            detectInfo.setProductColorId(Integer.valueOf(request.getParameter("colorId"+detectInfo.getProductId())));
-            detectInfo.setMachineNo(request.getParameter("maintenanceEquipmentNumber"+detectInfo.getProductId()));
-
-        }
-        Product product = productService.getProduce(detectInfo.getProductId());
-        detectInfo.setDetectProductNumber(product.getProductNumber());
-        String detectDate = request.getParameter("detect_date");
-        if(detectDate == null){
-            msg.setResultCode(500);
-            msg.setReturnCode(500);
-            return msg;
-        }
-        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-        detectInfo.setDetectDate(format.parse(detectDate));
-        detectInfo.setSignclosedCreateTime(new Date());
-        Integer num = complaintDetectInfoService.insert(detectInfo);
-        if (num < 1) {
-            msg.setResultCode(500);
-            msg.setReturnCode(500);
-        } else {
-            msg.setResultCode(200);
-            msg.setReturnCode(200);
-        }
         return msg;
     }
 
@@ -203,7 +139,7 @@ public class AdminDetectController {
      *
      * @return
      */
-    @RequiresPermissions("info:update:info")
+    /*@RequiresPermissions("info:update:info")
     @RequestMapping(value = "/to_add_remark")
     public ModelAndView toAddRemark(HttpServletRequest request) {
         ModelAndView mv = new ModelAndView("cm/inspection/add_remark");
@@ -217,11 +153,11 @@ public class AdminDetectController {
         return mv;
     }
 
-    /**
+    *//**
      * 跳转到添加修改转入信息页面
      *
      * @return
-     */
+     *//*
     @RequiresPermissions("remark:add:remark")
     @RequestMapping(value = "/to_produced_info")
     public ModelAndView toProducedInfo(HttpServletRequest request) {
@@ -236,14 +172,14 @@ public class AdminDetectController {
         mv.addObject("detectInfo",detectInfo);
         mv.addObject("state",state);
         return mv;
-    }
+    }*/
 
     /**
      * 跳转到检测完成页面
      *
      * @return
      */
-    @RequiresPermissions("complete:update:complete")
+    /*@RequiresPermissions("complete:update:complete")
     @RequestMapping(value = "/to_detect_complete")
     public ModelAndView toDetectComplete(HttpServletRequest request) {
         ModelAndView mv = new ModelAndView("cm/inspection/detect_complete");
@@ -255,7 +191,7 @@ public class AdminDetectController {
         mv.addObject("detectId",detectId);
         mv.addObject("detectInfo",detectInfo);
         return mv;
-    }
+    }*/
 
 
     /**
@@ -267,7 +203,7 @@ public class AdminDetectController {
     @RequiresPermissions("remark:add:remark")
     @ResponseBody
     @RequestMapping("/add_remark")
-    public ResponseJson addRemark(HttpServletRequest request, ComplaintDetectInfo detectInfo) throws Exception {
+    public ResponseJson addRemark(HttpServletRequest request, ComplaintDetectItem detectInfo) throws Exception {
         ResponseJson msg = new ResponseJson();
         if(detectInfo == null){
             msg.setResultCode(500);
@@ -279,10 +215,7 @@ public class AdminDetectController {
             msg.setReturnCode(500);
             return msg;
         }
-        if(detectInfo.getDetectIsMaintenance() == 2){ //选择不需要转入时 detect_revolution_produced 统一改为待转入
-            detectInfo.setDetectRevolutionProduced(1);
-        }
-        Integer num = complaintDetectInfoService.updateComplaintDetectById(detectInfo);
+        Integer num = complaintDetectInfoService.updateDetectItemById(detectInfo);
         if (num < 1) {
             msg.setResultCode(500);
             msg.setReturnCode(500);
@@ -304,7 +237,7 @@ public class AdminDetectController {
     @RequestMapping("/detect_complete")
     public ResponseJson detect_complete(HttpServletRequest request, ComplaintDetectInfo detectInfo) throws Exception {
         ResponseJson msg = new ResponseJson();
-        if(detectInfo == null){
+        /*if(detectInfo == null){
             msg.setResultCode(500);
             msg.setReturnCode(500);
             return msg;
@@ -336,7 +269,7 @@ public class AdminDetectController {
         } else {
             msg.setResultCode(200);
             msg.setReturnCode(200);
-        }
+        }*/
         return msg;
     }
 
@@ -359,14 +292,8 @@ public class AdminDetectController {
         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);
+        signclosedProductInfo = signclosedProductInfoService.listSignclosedById(complaintSignclosedInfo.getSignclosedId());
+        mv.addObject("signclosedProductInfo",signclosedProductInfo);
         mv.addObject("signclosedInfo",complaintSignclosedInfo);
         mv.addObject("signclosedId",signclosedId);
         return mv;
@@ -391,28 +318,6 @@ public class AdminDetectController {
     }
 
     /**
-     * 增加催促提醒
-     * @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
@@ -421,17 +326,29 @@ public class AdminDetectController {
     @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("")){
+        String detectItemId = request.getParameter("detectItemId");
+        if(detectItemId == null || detectItemId.equals("")){
             return mv;
         }
-        ComplaintDetectInfo detectInfo = complaintDetectInfoService.getComplaintDetectById(Integer.valueOf(detectId));
-        mv.addObject("detectId",detectId);
+        ComplaintDetectItem detectInfo = complaintDetectInfoService.getDetectItemById(Integer.valueOf(detectItemId));
+        mv.addObject("detectItemId",detectItemId);
         mv.addObject("detectInfo",detectInfo);
         return mv;
     }
 
     /**
+     * 跳转到查看客服录入客诉信息页面
+     *
+     * @return
+     */
+    @RequiresPermissions("complete:select:complete")
+    @RequestMapping(value = "/to_customer_detail")
+    public ModelAndView toCustomerDetail(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/customer_detail");
+        return mv;
+    }
+
+    /**
      * 检测完成
      * @param request
      * @return
@@ -440,14 +357,14 @@ public class AdminDetectController {
     @RequiresPermissions("complete:update:complete")
     @ResponseBody
     @RequestMapping("/update_complete")
-    public ResponseJson update_complete(HttpServletRequest request, ComplaintDetectInfo detectInfo) throws Exception {
+    public ResponseJson update_complete(HttpServletRequest request, ComplaintDetectItem 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("")){
+        if(detectInfo.getDetectItemId() == null || detectInfo.getDetectItemId().equals("")){
             msg.setResultCode(500);
             msg.setReturnCode(500);
             return msg;
@@ -455,9 +372,9 @@ public class AdminDetectController {
         String detectDate = request.getParameter("detect_date");
         if(detectDate != null){
             SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-            detectInfo.setDetectDate(format.parse(detectDate));
+            detectInfo.setDetectItemDate(format.parse(detectDate));
         }
-        Integer num = complaintDetectInfoService.updateComplaintDetectById(detectInfo);
+        Integer num = complaintDetectInfoService.updateDetectItemById(detectInfo);
         if (num < 1) {
             msg.setResultCode(500);
             msg.setReturnCode(500);

+ 120 - 35
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java

@@ -49,6 +49,8 @@ public class AdminSignclosedController {
     private AwaitingSignclosedProductInfoService awaitingSignclosedProductInfoService;
     @Autowired
     private MachineService machineService;
+    @Autowired
+    private ComplaintSignclosedProductInfoMapper cmplaintSignclosedProductInfoMapper;
 
     /**
      * 跳转到添加签收记录页面
@@ -81,8 +83,11 @@ public class AdminSignclosedController {
                                         @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");
+        if(signclosedInfo.getIsBinding() != null && signclosedInfo.getIsBinding() == 1){
+            mv = new ModelAndView("cm/signclosed/customer_signclosed_list");
+        }
+
         StringBuilder url = new StringBuilder("/admin/signclosed/select_signclosed_list?pageSize=" + pageSize);
         // 封装请求数据
         PageRequest<ComplaintSignclosedInfo> pageRequest = new PageRequest<>(signclosedInfo, pageNO, pageSize, pageTotal == null);
@@ -156,10 +161,6 @@ public class AdminSignclosedController {
             msg.setReturnCode(500);
             return msg;
         }
-
-        /**寄回产品**/
-        /*String[] colorName = request.getParameterValues("colorName");
-        String[] fittingsName = request.getParameterValues("fittingsName");*/
         /**签收产品**/
         String[] alreadyColorName = request.getParameterValues("alreadyColorName");
         String[] alreadyFittingsName = request.getParameterValues("alreadyFittingsName");
@@ -168,18 +169,6 @@ public class AdminSignclosedController {
             msg.setReturnCode(502);
             return msg;
         }
-        /*Map<String,Integer> colorNameMap = new HashMap<>();
-        if(colorName != null && colorName.length> 0){
-            for (int i = 0;i<colorName.length;i++){
-                colorNameMap.put(colorName[i],Integer.valueOf(request.getParameter("colorId"+colorName[i])));
-            }
-        }
-        Map<String,Integer> fittingsNameMap = new HashMap<>();
-        if(fittingsName != null && fittingsName.length> 0){
-            for (int i = 0;i<fittingsName.length;i++){
-                fittingsNameMap.put(fittingsName[i],Integer.valueOf(request.getParameter("fittingsId"+fittingsName[i])));
-            }
-        }*/
         Map<String,Integer> alreadyColorMap = new HashMap<>();
         Map<String,String[]> machineNumberMap = new HashMap<>();
         if(alreadyColorName != null && alreadyColorName.length> 0){
@@ -193,13 +182,13 @@ public class AdminSignclosedController {
                 }
                 alreadyColorMap.put(alreadyColorName[i],Integer.valueOf(number));
                 /**获取机器编号数组**/
-                String[] machineNumbers = request.getParameterValues("machineNumber"+alreadyColorName[i]);
+                /*String[] machineNumbers = request.getParameterValues("machineNumber"+alreadyColorName[i]);
                 if(machineNumbers.length != Integer.valueOf(number)){
                     msg.setResultCode(200);
                     msg.setReturnCode(501);
                     return msg;
                 }
-                machineNumberMap.put("machineNumber"+alreadyColorName[i],machineNumbers);
+                machineNumberMap.put("machineNumber"+alreadyColorName[i],machineNumbers);*/
             }
         }
         Map<String, Integer> alreadyFittingsMap = new HashMap<>();
@@ -220,10 +209,8 @@ public class AdminSignclosedController {
             SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
             signclosedInfo.setSignclosedDate(format.parse(signclosedDate));
         }
-        if(signclosedInfo.getSignclosedState() == 2){
-            signclosedInfo.setSignclosedObjectsState(3);
-        }
         signclosedInfo.setSignclosedCreateTime(new Date());
+        signclosedInfo.setSignclosedState(1);
         boolean num = complaintSignclosedInfoService.insert(signclosedInfo,alreadyColorMap,machineNumberMap,alreadyFittingsMap);
 
 
@@ -291,9 +278,6 @@ public class AdminSignclosedController {
                 /**获取机器数量**/
                 String number = request.getParameter("alreadyColorId"+alreadyColorName[i]);
                 alreadyColorMap.put(alreadyColorName[i],Integer.valueOf(number));
-                /**获取机器编号数组**/
-                String[] machineNumbers = request.getParameterValues("machineNumber"+alreadyColorName[i]);
-                machineNumberMap.put("machineNumber"+alreadyColorName[i],machineNumbers);
             }
         }
         Map<String, Integer> alreadyFittingsMap = new HashMap<>();
@@ -307,7 +291,6 @@ public class AdminSignclosedController {
             SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
             signclosedInfo.setSignclosedDate(format.parse(signclosedDate));
         }
-        signclosedInfo.setSignclosedState(1);
         boolean num = complaintSignclosedInfoService.updateSignclosedById(signclosedInfo,alreadyColorMap,machineNumberMap,alreadyFittingsMap);
 
 
@@ -336,6 +319,20 @@ public class AdminSignclosedController {
         return mv;
     }
     /**
+     * 跳转到客服修改备注页面
+     *
+     * @return
+     */
+    @RequiresPermissions("signclosed:update:signclosed")
+    @RequestMapping(value = "/to_update_customer_remark")
+    public ModelAndView toUpdateCustomerRemark(HttpServletRequest request,Integer signclosedId) {
+        ModelAndView mv = new ModelAndView("cm/signclosed/update_customer_remark");
+        ComplaintSignclosedInfo complaintSignclosedInfo = complaintSignclosedInfoService.getSignclosedById(signclosedId);
+        mv.addObject("signclosedId",signclosedId);
+        mv.addObject("complaintSignclosedInfo",complaintSignclosedInfo);
+        return mv;
+    }
+    /**
      * 修改备注
      *
      * @return
@@ -375,6 +372,21 @@ public class AdminSignclosedController {
         mv.addObject("complaintSignclosedInfo",complaintSignclosedInfo);
         return mv;
     }
+
+    /**
+     * 跳转到转入品质页面
+     *
+     * @return
+     */
+    @RequiresPermissions("signclosed:update:signclosed")
+    @RequestMapping(value = "/to_into_complaint")
+    public ModelAndView tointoComplaint(HttpServletRequest request,Integer signclosedId) {
+        ModelAndView mv = new ModelAndView("cm/signclosed/update_sender");
+        List<SignclosedProductInfo> listProductInfo = complaintSignclosedInfoService.listSignclosedById(signclosedId);
+        mv.addObject("signclosedId",signclosedId);
+        mv.addObject("listProductInfo",listProductInfo);
+        return mv;
+    }
     /**
      * 转入品质
      *
@@ -383,21 +395,48 @@ public class AdminSignclosedController {
     @ResponseBody
     @RequiresPermissions("signclosed:update:signclosed")
     @RequestMapping(value = "/into_complaint")
-    public ResponseJson intoComplaint(HttpServletRequest request,Integer signclosedId){
+    public ResponseJson intoComplaint(HttpServletRequest request,ComplaintSignclosedInfo complaintSignclosedInfo){
         ResponseJson msg = new ResponseJson();
-        if(signclosedId == null){
+        if(complaintSignclosedInfo == null){
             msg.setResultCode(500);
             msg.setReturnCode(500);
             return msg;
         }
-        Integer num = complaintSignclosedInfoService.intoComplaint(signclosedId);
-        if (num < 1) {
-            msg.setResultCode(500);
-            msg.setReturnCode(500);
-        } else {
-            msg.setResultCode(200);
-            msg.setReturnCode(200);
+        //根据客诉id查询是否已存在品检信息
+        ComplaintDetectInfo complaintDetectInfo = new ComplaintDetectInfo();
+        if(complaintDetectInfoService.getDetectByCustomerId(complaintSignclosedInfo.getSignclosedCustomerId()) == null){
+            complaintDetectInfo.setCustomerId(complaintSignclosedInfo.getSignclosedCustomerId());
+            complaintDetectInfo.setSignclosedId(complaintSignclosedInfo.getSignclosedId());
+            complaintDetectInfo.setDetectCreateTime(new Date());
+            Integer i = complaintDetectInfoService.insert(complaintDetectInfo);
+            if(i != 1){
+                msg.setResultCode(500);
+                msg.setReturnCode(500);
+                return msg;
+            }
         }
+        //签收产品id集合
+        String[] productIdList = request.getParameterValues("products");
+        //添加品检项
+        List<Integer> itemIdList = new ArrayList<>();
+        List<ComplaintDetectItem> listDetectItem = new ArrayList<>();
+        for(String productid : productIdList){
+            SignclosedProductInfo signclosedProductInfo = cmplaintSignclosedProductInfoMapper.listSignclosedProductInfoById(Integer.valueOf(productid));
+            ComplaintDetectItem detectItem = new ComplaintDetectItem();
+            detectItem.setDetectId(complaintDetectInfo.getDetectId());
+            detectItem.setDetectItemCreateTime(new Date());
+            detectItem.setProductId(signclosedProductInfo.getSignclosedProductId());
+            detectItem.setDetectProductNumber(signclosedProductInfo.getProductName());
+            detectItem.setDetectItemState(1);
+            detectItem.setCustomerId(complaintSignclosedInfo.getSignclosedCustomerId());
+            Integer msg3 =  complaintDetectInfoService.insertItem(detectItem);
+            if(msg3 != 1){
+                itemIdList.add(detectItem.getDetectItemId());
+            }
+        }
+        msg.setResultCode(200);
+        msg.setReturnCode(200);
+        msg.addResponseKeyValue("itemIdList",itemIdList);
         return msg;
     }
 
@@ -447,5 +486,51 @@ public class AdminSignclosedController {
         ComplaintSignclosedInfo complaintSignclosedInfo = complaintSignclosedInfoService.getSignclosedById(signclosedId);
         return new ResponseJson(500, "未获取到仓储信息!", 500);
     }
+
+    /**
+     * 跳转到关联客诉页面
+     *
+     * @return
+     */
+    @RequiresPermissions("signclosed:update:signclosed")
+    @RequestMapping(value = "/to_associated_customer")
+    public ModelAndView toAssociatedCustomer(HttpServletRequest request,Integer signclosedId) {
+        ModelAndView mv = new ModelAndView("cm/signclosed/associated_customer");
+        ComplaintSignclosedInfo complaintSignclosedInfo = complaintSignclosedInfoService.getSignclosedById(signclosedId);
+        mv.addObject("signclosedId",signclosedId);
+        mv.addObject("complaintSignclosedInfo",complaintSignclosedInfo);
+        return mv;
+    }
+    /**
+     * 关联客诉
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequiresPermissions("signclosed:update:signclosed")
+    @RequestMapping(value = "/associated_customer")
+    public ResponseJson associatedCustomer(HttpServletRequest request,ComplaintSignclosedInfo signclosedInfo){
+        ResponseJson msg = new ResponseJson();
+        if(signclosedInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        if(signclosedInfo.getSignclosedCustomerId() == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+
+        int num = complaintSignclosedInfoService.addDetect(signclosedInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
 }
 

+ 2 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/ComplaintMaintenanceController.java

@@ -331,12 +331,12 @@ public class ComplaintMaintenanceController {
      *
      * @return
      */
-    @RequiresPermissions("maintenance:update:maintenance")
+    /*@RequiresPermissions("maintenance:update:maintenance")
     @RequestMapping(value = "/to_view_detect")
     public ModelAndView toViewDetect(HttpServletRequest request,Integer detectId) {
         ModelAndView mv = new ModelAndView("cm/maintenance/view_detect");
         ComplaintDetectInfo complaintDetectInfo = complaintDetectInfoService.getComplaintDetectById(detectId);
         mv.addObject("detectInfo",complaintDetectInfo);
         return mv;
-    }
+    }*/
 }

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

@@ -303,6 +303,7 @@ public class AdminSalesOrderController {
             case "jd":postFirm = "京东快递";break;
             case "01":postFirm = "其他";break;
             case "02":postFirm = "上门送货";break;
+            case "dbkd":postFirm = "德班快递";break;
             default:postFirm = "申通快递";break;
         }
         return postFirm;

+ 11 - 3
watero-rst-web/src/main/resources/platform.properties

@@ -66,28 +66,36 @@ REMIND_POSTAGE_PENDING=\u3010\u7231\u8D1D\u6E90RST\u3011\u60A8\u6709{0}\u4E2A\u9
 #---SMS end---#
 #weixin
 # pubNo
-pubNo=gh_c73446c8ce91
+#pubNo=gh_c73446c8ce91
 
 # appId-watero
 #appId=wx27c9f825761a861b
+# pubNo-watero\u6C34\u65F6\u4EE3
+pubNo=gh_2674097b2442
+
 # token
 token=weixin
 
 # appSecret-watero
 #appSecret=97b2f2991e4ff0f2567fbc625f858377
 # partnerkey
+#partnerkey=cdb9075e7ecad945ba788bc5aedM212B
+# partnerkey
 partnerkey=cdb9075e7ecad945ba788bc5aedM212B
 
-
 # appId-test
-appId=wxc71b789fad06a2d7
+#appId=wxc71b789fad06a2d7
 # appId-wateroPF
 #appId=wx2abd86e7dd0c8bc3
+# appId-watero\u6C34\u65F6\u4EE3
+appId=wx27c9f825761a861b
 
 # appSecret-test
 appSecret=8a90e3ab0e2db7772f5f64e7ed2f4b98
 # appSecret-wateroPF
 #appSecret=e3b11ca050578ac8b794b510b16b2020
+# appSecret-watero\u6C34\u65F6\u4EE3
+#appSecret=97b2f2991e4ff0f2567fbc625f858377
 
 SUCCESSINFO=SUCCESS
 

+ 1 - 0
watero-rst-web/src/main/resources/watero-rst-orm.xml

@@ -107,6 +107,7 @@
 		<typeAlias type="com.iamberry.rst.core.order.DownsingleRuleInfo" alias="DownsingleRuleInfo"/>
 		<typeAlias type="com.iamberry.rst.core.order.DownsingleRuleItemInfo" alias="DownsingleRuleItemInfo"/>
 		<typeAlias type="com.iamberry.rst.core.cm.ReturnStatisticsInfo" alias="ReturnStatisticsInfo"/>
+		<typeAlias type="com.iamberry.rst.core.cm.ComplaintDetectItem" alias="ComplaintDetectItem"/>
 	</typeAliases>
 	<!-- PageHelper -->
 	<plugins>

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

@@ -0,0 +1,118 @@
+<!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">
+    <link href="${path}/common/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
+    <link href="${path}/common/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
+    <!--<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />-->
+    <link href="${path}/common/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
+    <!--<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />-->
+    <title></title>
+    <style>
+        .my-btn-submit{padding: 10px 20px;width: 150px; background-color: #32a3d8;color: #fff;border: 1px solid #32a3d8;cursor:pointer;margin: 10px 10px 0 10px;}
+    </style>
+</head>
+<body>
+<article class="cl pd-20">
+    <form action="" method="post" class="form form-horizontal" id="form-article-add">
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>客诉编号:</strong>
+            </div>
+            <div class="formControls col-8 col-sm-8">
+                <input type="text" style="" class="input-text" placeholder="客诉编号" id="signclosedCustomerId" name="signclosedCustomerId">
+                <button type="button" class="my-btn-submit" onclick="select();">查询</button>
+            </div>
+
+        </div>
+        <div id="customerDiv" style="display: none">
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>客诉时间:</strong>
+            </div>
+            <div class="formControls col-8 col-sm-8" id="customerCreateTime">
+
+            </div>
+        </div>
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>客诉标题:</strong>
+            </div>
+            <div class="formControls col-8 col-sm-8" id="txtDescribeTitle">
+
+            </div>
+        </div>
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>客诉回复:</strong>
+            </div>
+            <div class="formControls col-8 col-sm-8" id="txtDescribeContent">
+
+            </div>
+        </div>
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>客诉备注:</strong>
+            </div>
+            <div class="formControls col-8 col-sm-8" id="txtCustomerDesc">
+
+            </div>
+        </div>
+
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>客诉描述:</strong>
+            </div>
+            <div class="formControls col-8 col-sm-8" id="txtDescribeHandleDesc">
+
+            </div>
+        </div>
+        </div>
+        <#--<div class="row cl">
+            <div class="formControls col-2 col-sm-2">
+
+            </div>
+            <div class="formControls col-10 col-sm-10">
+                <img src="images/image-1.jpg" />
+            </div>
+        </div>-->
+    </form>
+    </div>
+</article>
+<#--<script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${path}/common/lib/layer/2.4/layer.js"></script>
+<script type="text/javascript" src="${path}/common/static/h-ui/js/H-ui.js"></script>
+<script type="text/javascript" src="${path}/common/static/h-ui.admin/js/H-ui.admin.js"></script>-->
+<script type="text/javascript">
+
+    function select() {
+        var signclosedCustomerId = $("#signclosedCustomerId").val();
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"customerId":signclosedCustomerId},
+            url: "${path}/admin/customer/get_describe_info",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var describe = data.returnMsg.describe;
+                    $('#customerCreateTime').html(formatDate(describe.customerCreateTime,"yyyy-MM-dd"));
+                    $('#txtDescribeTitle').html(describe.describeTitle);
+                    $('#txtDescribeContent').html(describe.describeContent);
+                    $('#txtDescribeHandleDesc').html(describe.describeHandleDesc);
+                    $('#txtCustomerDesc').html(describe.customerDesc);
+                    $("#customerDiv").show();
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    }
+</script>
+</body>
+</html>

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

@@ -43,19 +43,19 @@
             <button type="button" style="cursor:pointer;float: left;" class="my-btn-search" onclick="add_detect('添加品质检测','${path}/admin/detect/to_add_detect','670','450');">新建品检</button>
             <input class="my-input" style="width: 70px;" type="text" name="customerId" value="${customerId!}" placeholder="客诉编号"/>
             <input class="my-input" style="width: 70px;" type="text" name="questionTitle" value="${questionTitle!}" placeholder="客诉问题"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectPhenomenon" value="${detectPhenomenon!}" placeholder="工厂检测现象"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectFailureCause" value="${detectFailureCause!}" placeholder="故障原因"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectPoint" value="${detectPoint!}" placeholder="故障指向"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectAnalysis" value="${detectAnalysis!}" placeholder="原因分析"/>
-            <input class="my-input" style="width: 70px;" type="text" name="detectFailureClassification" value="${detectFailureClassification!}" placeholder="故障分类"/>
+            <input class="my-input" style="width: 70px;" type="text" name="detectItemPhenomenon" value="${detectItemPhenomenon!}" placeholder="工厂检测现象"/>
+            <input class="my-input" style="width: 70px;" type="text" name="detectItemFailureCause" value="${detectFailureCause!}" placeholder="故障原因"/>
+            <input class="my-input" style="width: 70px;" type="text" name="detectItemPoint" value="${detectItemPoint!}" placeholder="故障指向"/>
+            <input class="my-input" style="width: 70px;" type="text" name="detectItemNalysis" value="${detectItemNalysis!}" placeholder="原因分析"/>
+            <input class="my-input" style="width: 70px;" type="text" name="detectItemClassification" value="${detectItemClassification!}" placeholder="故障分类"/>
 
-            <select class="my-select" name="detectState" style="height: 30px;width: 150px">
+            <#--<select class="my-select" name="detectState" style="height: 30px;width: 150px">
                 <option value ="">选择状态</option>
                 <option value ="1" <#if detectState??><#if detectState == 1>selected="selected"</#if></#if>>待仓库转入</option>
                 <option value ="2" <#if detectState??><#if detectState == 2>selected="selected"</#if></#if>>正在检查</option>
                 <option value ="3" <#if detectState??><#if detectState == 3>selected="selected"</#if></#if>>检查通过</option>
                 <option value ="4" <#if detectState??><#if detectState == 4>selected="selected"</#if></#if>>检查未通过</option>
-            </select>
+            </select>-->
             <select class="my-select" name="productTypeId" style="height: 30px;width: 150px">
                 <option value ="">选择产品类型</option>
                 <#if (productTypeList?size > 0)>
@@ -72,7 +72,7 @@
             <thead>
             <tr class="text-c">
                 <th width="100">客诉编号</th>
-                <th width="100">产品类型</th>
+                <th width="100">产品</th>
                 <th width="100">产品型号</th>
                 <th width="100">状态</th>
                 <th width="60">工厂检测现象</th>
@@ -81,8 +81,9 @@
                 <th width="60">判定结果</th>
                 <th width="60">故障指向</th>
                 <th width="60">原因分析</th>
+                <th width="60">维修内容</th>
                 <th width="150">客诉描述</th>
-                <th width="150">是否转入生产部门</th>
+                <#--<th width="150">是否转入生产部门</th>-->
                 <th width="150">备注</th>
                 <th width="150">检测日期</th>
                 <th width="50">操作</th>
@@ -96,27 +97,22 @@
                     <td class="text-c" width="100">${detect.productTypeName!}</td>
                     <td class="text-c" width="100">${detect.detectProductNumber!}</td>
                     <td class="text-c" width="100">
-                        <#if detect.detectState == 1>
-                            待仓库转入
-                        </#if>
-                        <#if detect.detectState == 2>
-                            正在检查
+                        <#if detect.detectItemState == 1>
+                            已检测
                         </#if>
-                        <#if detect.detectState == 3>
-                            检查通过
-                        </#if>
-                        <#if detect.detectState == 4>
-                            检查通过
+                        <#if detect.detectItemState == 2>
+                            未检测
                         </#if>
                     </td>
-                    <td class="text-c" width="60"><div class="txt" title="${detect.detectPhenomenon!}">${detect.detectPhenomenon!}</div></td>
-                    <td class="text-c" width="60"><div class="txt" title="${detect.detectFailureClassification!}">${detect.detectFailureClassification!}</div></td>
-                    <td class="text-c" width="60"><div class="txt" title="${detect.detectFailureCause!}">${detect.detectFailureCause!}</div></td>
-                    <td class="text-c" width="60"><div class="txt" title="${detect.detectResults!}">${detect.detectResults!}</div></td>
-                    <td class="text-c" width="60"><div class="txt" title="${detect.detectPoint!}">${detect.detectPoint!}</div></td>
-                    <td class="text-c" width="60"><div class="txt" title="${detect.detectAnalysis!}">${detect.detectAnalysis!}</div></td>
+                    <td class="text-c" width="60"><div class="txt" title="${detect.detectItemPhenomenon!}">${detect.detectItemPhenomenon!}</div></td>
+                    <td class="text-c" width="60"><div class="txt" title="${detect.detectItemClassification!}">${detect.detectItemClassification!}</div></td>
+                    <td class="text-c" width="60"><div class="txt" title="${detect.detectItemFailureCause!}">${detect.detectItemFailureCause!}</div></td>
+                    <td class="text-c" width="60"><div class="txt" title="${detect.detectItemResults!}">${detect.detectItemResults!}</div></td>
+                    <td class="text-c" width="60"><div class="txt" title="${detect.detectItemPoint!}">${detect.detectItemPoint!}</div></td>
+                    <td class="text-c" width="60"><div class="txt" title="${detect.detectItemNalysis!}">${detect.detectItemNalysis!}</div></td>
+                    <td class="text-c" width="60"><div class="txt" title="${detect.detectItemContent!}">${detect.detectItemContent!}</div></td>
                     <td class="text-c" width="100"><span class="label txt2" title="${detect.questionTitle!}" >${detect.questionTitle!}</span><br><#if detect.questionTitle??><#if detect.questionTitle != ""><a href="#" onclick="getDescribeInfo(${detect.customerId!});" style="color : #4149FF;">查看详情</a></#if></#if></td>
-                    <td class="text-c" width="100">
+                   <#-- <td class="text-c" width="100">
                     <#if detect.detectIsMaintenance??>
                         <#if detect.detectIsMaintenance == 2>
                             不需要转入
@@ -129,54 +125,28 @@
                             </#if>
                         </#if>
                     </#if>
-                    </td>
-                    <td class="text-c" width="100">${detect.detectDesc!}</td>
-                    <td class="text-c" width="100">${(detect.detectDate?string("yyyy-MM-dd"))!''}</td>
+                    </td>-->
+                    <td class="text-c" width="100">${detect.detectItemDesc!}</td>
+                    <td class="text-c" width="100">${(detect.detectItemDate?string("yyyy-MM-dd"))!''}</td>
                     <!-- 遍历操作 -->
                     <td class="td-manage text-c">
-                        <a style="text-decoration:none" href="javascript:;" title="修改备注"
+                        <#--<a style="text-decoration:none" href="javascript:;" title="修改备注"
                            onclick="add_remark('修改备注','${path}/admin/detect/to_add_remark?detectId=${detect.detectId!''}','570','450');">
                             <i class="Hui-iconfont">&#xe6df;</i>
-                        </a>
-                    <#if detect.detectState??>
-                        <#if detect.detectState == 2>
-                           <#if detect.detectIsMaintenance??>
-                                <#if detect.detectIsMaintenance == 2>
-                                    <a style="text-decoration:none" href="javascript:;" title="需要转入生产"
-                                       onclick="update_info('需要转入生产','${path}/admin/detect/to_produced_info?detectId=${detect.detectId!''}&state=1','570','450');">
-                                        <i class="Hui-iconfont">&#xe644;</i>
-                                    </a>
-                                <#else >
-                            </#if>
-                                <#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','800','550');">
-                                        <i class="Hui-iconfont">&#xe6e1;</i>
-                                    </a>
-                                </#if>
-                            </#if>
-                        </#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!''}','800','550');">
-                                <i class="Hui-iconfont">&#xe60c;</i>
-                            </a>
-                        </#if>
-                        <#if detect.detectState == 4>
+                        </a>-->
+
                             <a style="text-decoration:none" href="javascript:;" title="修改检测信息"
-                               onclick="update_info('修改检测信息','${path}/admin/detect/to_update_complete?detectId=${detect.detectId!''}','670','450');">
+                               onclick="update_info('修改检测信息','${path}/admin/detect/to_update_complete?detectItemId=${detect.detectItemId!''}','800','550');">
                                 <i class="Hui-iconfont">&#xe60c;</i>
                             </a>
-                        </#if>
-                        <#if detect.signclosedId??>
+                        <#--<#if detect.signclosedId??>
                             <#if detect.detectState == 1>
                                 <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>
                             </#if>
-                        </#if>
+                        </#if>-->
                     </td>
                 </tr>
                 </#list>

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

@@ -35,13 +35,13 @@
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;"><span class="c-red">*</span>检测结果:</label>
             <div class=" col-xs-9 col-sm-9 skin-minimal huanhang" >
                 <div class="radio-box">
-                    <input type="radio" id="radio-3" name="detectState" value="3"
-                           <#if detectInfo.detectState == 3>checked</#if>
+                    <input type="radio" id="radio-3" name="detectItemState" value="1"
+                          <#if detectInfo.detectItemState??><#if detectInfo.detectItemState == 1>checked</#if></#if>
                     /><label for="radio-3">检测通过</label>
                 </div>
                 <div class="radio-box">
-                    <input type="radio" id="radio-4" name="detectState" value="4"
-                           <#if detectInfo.detectState == 4>checked</#if>
+                    <input type="radio" id="radio-4" name="detectItemState" value="2"
+                    <#if detectInfo.detectItemState??><#if detectInfo.detectItemState == 2>checked</#if></#if>
                     /><label for="radio-4">检测未通过</label>
                 </div>
             </div>
@@ -49,43 +49,49 @@
        <div class="input-box" >
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>工厂检测现象:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectPhenomenon" id="detectPhenomenon" class="my-textarea" placeholder="工厂检测现象">${detectInfo.detectPhenomenon!''}</textarea>
+                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectItemPhenomenon" id="detectItemPhenomenon" class="my-textarea" placeholder="工厂检测现象">${detectInfo.detectItemPhenomenon!''}</textarea>
             </div>
         </div>
         <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>故障分类:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectFailureClassification" id="detectFailureClassification" class="my-textarea" placeholder="故障分类">${detectInfo.detectFailureClassification!''}</textarea>
+                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectItemClassification" id="detectItemClassification" class="my-textarea" placeholder="故障分类">${detectInfo.detectItemClassification!''}</textarea>
             </div>
         </div>
         <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>故障原因:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectFailureCause" id="detectFailureCause" class="my-textarea" placeholder="故障原因">${detectInfo.detectFailureCause!''}</textarea>
+                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectItemFailureCause" id="detectItemFailureCause" class="my-textarea" placeholder="故障原因">${detectInfo.detectItemFailureCause!''}</textarea>
             </div>
         </div>
         <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>判定结果:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectResults" id="detectResults" class="my-textarea" placeholder="判定结果">${detectInfo.detectResults!''}</textarea>
+                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectItemResults" id="detectItemResults" class="my-textarea" placeholder="判定结果">${detectInfo.detectItemResults!''}</textarea>
             </div>
         </div>
         <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>故障指向:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectPoint" id="detectPoint" class="my-textarea" placeholder="故障指向">${detectInfo.detectPoint!''}</textarea>
+                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectItemPoint" id="detectItemPoint" class="my-textarea" placeholder="故障指向">${detectInfo.detectItemPoint!''}</textarea>
             </div>
         </div>
         <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>原因分析:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
-                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectAnalysis" id="detectAnalysis" class="my-textarea" placeholder="原因分析">${detectInfo.detectAnalysis!''}</textarea>
+                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectItemNalysis" id="detectItemNalysis" class="my-textarea" placeholder="原因分析">${detectInfo.detectItemNalysis!''}</textarea>
+            </div>
+        </div>
+        <div class="input-box">
+            <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>检测内容:</label>
+            <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
+                <textarea style="margin-left: 0%;width: 83%;" rows="3" cols="20" name="detectItemContent" id="detectItemContent" class="my-textarea" placeholder="原因分析">${detectInfo.detectItemContent!''}</textarea>
             </div>
         </div>
         <div class="input-box">
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;"><span class="c-red">*</span>检测日期:</label>
             <div class="formControls col-8 col-sm-8 text-c huanhang" style="margin-left: -4%;margin: 10px 0px;">
-                <input class="my-input-date" style="width: 94%;" type="text" value="${detectInfo.detectDate?string("yyyy-MM-dd")!''}" name="detect_date" id="detectDate" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="请选择检测日期" readonly="readonly"/>
+                <input class="my-input-date" style="width: 94%;" type="text" value="<#if detectInfo.detectItemDate??>${detectInfo.detectItemDate?string("yyyy-MM-dd")!''}</#if>" name="detect_date" id="detectItemDate" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="请选择检测日期" readonly="readonly"/>
             </div>
         </div>
         <div class="input-box">
@@ -105,12 +111,12 @@
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;">备注:</label>
             <div class="col-xs-9 col-sm-9 skin-minimal">
                 <div class="radio-box" style="padding: 0px; width: 100%;">
-                    <textarea style="height: 60px;margin: 10px 0px 10px 0px;width: 85%;" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
+                    <textarea style="height: 60px;margin: 10px 0px 10px 0px;width: 85%;" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请详细备注内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectItemDesc!''}</textarea>
                 </div>
             </div>
         </div>
         <div>
-            <input type="hidden" value="${detectId!''}" id="detectId" name="detectId">
+            <input type="hidden" value="${detectItemId!''}" id="detectItemId" name="detectItemId">
            <button type="button" style="margin-left: 35%" class="my-btn-submit" onclick="add();">确认提交</button>
         </div>
     </form>
@@ -127,63 +133,73 @@
     });
     function  add() {
 
-        var detectPhenomenon = $("#detectPhenomenon").val();
-        if( detectPhenomenon == null || detectPhenomenon == "" ){
+        var detectItemPhenomenon = $("#detectItemPhenomenon").val();
+        if( detectItemPhenomenon == null || detectItemPhenomenon == "" ){
             layer.msg('请输入工厂检测现象',{icon: 5,time:1000});
             return;
         }
-        if( detectPhenomenon.length > 300 ){
+        if( detectItemPhenomenon.length > 300 ){
             layer.msg('工厂检测现象长度不得大于150个字符',{icon: 5,time:1000});
             return;
         }
-        var detectFailureClassification = $("#detectFailureClassification").val();
-        if( detectFailureClassification == null || detectFailureClassification == "" ){
+        var detectItemClassification = $("#detectItemClassification").val();
+        if( detectItemClassification == null || detectItemClassification == "" ){
             layer.msg('请输入故障分类',{icon: 5,time:1000});
             return;
         }
-        if( detectFailureClassification.length > 50 ){
+        if( detectItemClassification.length > 50 ){
             layer.msg('故障分类长度不得大于25个字符',{icon: 5,time:1000});
             return;
         }
-        var detectFailureCause = $("#detectFailureCause").val();
-        if( detectFailureCause == null || detectFailureCause == "" ){
+        var detectItemFailureCause = $("#detectItemFailureCause").val();
+        if( detectItemFailureCause == null || detectItemFailureCause == "" ){
             layer.msg('请输入故障原因',{icon: 5,time:1000});
             return;
         }
-        if( detectFailureCause.length > 100 ){
+        if( detectItemFailureCause.length > 100 ){
             layer.msg('故障原因长度不得大于50个字符',{icon: 5,time:1000});
             return;
         }
 
-        var detectResults = $("#detectResults").val();
-        if( detectResults == null || detectResults == "" ){
+        var detectItemResults = $("#detectItemResults").val();
+        if( detectItemResults == null || detectItemResults == "" ){
             layer.msg('请输入判定结果',{icon: 5,time:1000});
             return;
         }
-        if( detectResults.length > 100 ){
+        if( detectItemResults.length > 100 ){
             layer.msg('判定结果长度不得大于50个字符',{icon: 5,time:1000});
             return;
         }
 
-        var detectPoint = $("#detectPoint").val();
-        if( detectPoint == null || detectPoint == "" ){
+        var detectItemPoint = $("#detectItemPoint").val();
+        if( detectItemPoint == null || detectItemPoint == "" ){
             layer.msg('请输入故障指向',{icon: 5,time:1000});
             return;
         }
-        if( detectPoint.length > 100 ){
+        if( detectItemPoint.length > 100 ){
             layer.msg('故障指向长度不得大于50个字符',{icon: 5,time:1000});
             return;
         }
 
-        var detectAnalysis = $("#detectAnalysis").val();
-        if( detectAnalysis == null || detectAnalysis == "" ){
+        var detectItemNalysis = $("#detectItemNalysis").val();
+        if( detectItemNalysis == null || detectItemNalysis == "" ){
             layer.msg('请输入原因分析',{icon: 5,time:1000});
             return;
         }
-        if( detectAnalysis.length > 100 ){
+        if( detectItemNalysis.length > 100 ){
             layer.msg('原因分析长度不得大于50个字符',{icon: 5,time:1000});
             return;
         }
+
+        var detectItemContent = $("#detectItemContent").val();
+        if( detectItemContent == null || detectItemContent == "" ){
+            layer.msg('请输入维修内容',{icon: 5,time:1000});
+            return;
+        }
+        if( detectItemContent.length > 300 ){
+            layer.msg('维修内容长度不得大于150个字符',{icon: 5,time:1000});
+            return;
+        }
         $.ajax({
             cache: true,
             type: "POST",

+ 61 - 44
watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl

@@ -59,7 +59,7 @@
 <article class="page-container" style="padding: 10px;">
     <div class="pd-20 cl">
         <form action="" method="post" class="form form-horizontal" id="form-signclosed-add">
-            <div class="row cl">
+            <#--<div class="row cl">
                 <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收类型:</label>
                 <div class="formControls col-7 col-sm-7  skin-minimal">
 				    <div class="radio-box">
@@ -76,9 +76,9 @@
                         <input type="text" style="width: 114px;margin-left: 10px;" class="input-text" placeholder="选择其他时有值" id="signclosedTypeName" name="signclosedTypeName">
                     </div>
                 </div>
-            </div>
+            </div>-->
             <div class="row cl">
-                <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄回物流:</label>
+                <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>快递公司:</label>
                 <div class="formControls col-2 col-sm-2 skin-minimal">
                     <span class="select-box">
                     <select id="signclosedLogistics" name="signclosedLogistics" class="select">
@@ -101,40 +101,47 @@
                     </select>
                     </span>
                 </div>
-                <div class="formControls col-2 col-sm-2 skin-minimal">
-                    <input type="text" style="" class="input-text" placeholder="物流单号" id="signclosedLogisticsNumber" name="signclosedLogisticsNumber">
-                </div>
             </div>
-
-            <div class="row cl">
-                <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄件人信息:</label>
-                <div class="formControls col-2 col-sm-2 skin-minimal">
-                    <input type="text"  class="input-text" placeholder="寄件方姓名/公司名称" id="signclosedSendName" name="signclosedSendName">
+                <div class="row cl">
+                    <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>快递单号:</label>
+                    <div class="formControls col-2 col-sm-2 skin-minimal">
+                        <input type="text" style="" class="input-text" placeholder="物流单号" id="signclosedLogisticsNumber" name="signclosedLogisticsNumber">
+                    </div>
                 </div>
-                <div class="formControls col-2 col-sm-2 skin-minimal">
-                    <input type="text" class="input-text" placeholder="寄件方联系电话" id="signclosedSendTel" name="signclosedSendTel">
+                <div class="row cl">
+                    <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收日期:</label>
+                    <div class="formControls col-2 col-sm-2 skin-minimal">
+                        <input type="text" style="" class="input-text my-input-date Wdate" placeholder="签收日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="signclosed_date" name="signclosed_date" readonly="readonly"/>
+                    </div>
                 </div>
-            </div>
 
-            <div class="row cl" style="position: relative;">
-                <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄件区域:</label>
-                <div class="formControls col-2 col-sm-2 skin-minimal">
-                    <span class="select-box">
-                    <select name="signclosedAddrProvinces" id="province" class="select">
 
-                    </select>
-                     </span>
+            <div class="row cl address_info" style="position: relative;">
+                <label class="form-label col-3 col-sm-3">寄件区域:</label>
+                <div class="formControls col-2 col-sm-2" style="">
+                    <span class="select-box">
+                        <select class="select init_province" id="provinces">
+                        </select>
+				    </span>
                 </div>
-                <div class="formControls col-2 col-sm-2 skin-minimal">
+                <div class="formControls col-2 col-sm-2">
                     <span class="select-box">
-                    <select name="signclosedAddrCity" id="city" class="select">
-
-
-                    </select>
+                        <select  class="select init_city" id="city">
+                        </select>
                     </span>
                 </div>
+                <div class="formControls col-2 col-sm-2" style="position: relative;">
+                    <span class="select-box">
+                        <select  class="select init_country" id="area">
+                        </select>
+				    </span>
+                </div>
+                <input type="hidden" name="signclosedAddrProvinces" id="signclosedAddrProvinces" >
+                <input type="hidden" name="signclosedAddrCity" id="signclosedAddrCity" >
+                <input type="hidden" name="signclosedAddrArea" id="signclosedAddrArea" >
             </div>
 
+
             <div class="row cl" id="renewedProduct">
                 <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收产品:</label>
                 <div class="formControls col-8 col-sm-8 text-c" id="produceSelect">
@@ -157,9 +164,17 @@
                 </div>
             </div>
 
+                <div class="row cl">
+                    <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>寄件人信息:</label>
+                    <div class="formControls col-2 col-sm-2 skin-minimal">
+                        <input type="text"  class="input-text" placeholder="寄件方姓名/公司名称" id="signclosedSendName" name="signclosedSendName">
+                    </div>
+                    <div class="formControls col-2 col-sm-2 skin-minimal">
+                        <input type="text" class="input-text" placeholder="寄件方联系电话" id="signclosedSendTel" name="signclosedSendTel">
+                    </div>
+                </div>
 
-
-            <div class="row cl">
+            <#--<div class="row cl">
                 <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>是否少配件:</label>
                 <div class="formControls col-5 col-sm-5 skin-minimal">
                     <div class="radio-box">
@@ -172,12 +187,7 @@
                     </div>
                 </div>
             </div>
-            <div class="row cl">
-                <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>签收日期:</label>
-                <div class="formControls col-2 col-sm-2 skin-minimal">
-                   <input type="text" style="" class="input-text my-input-date Wdate" placeholder="签收日期" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" id="signclosed_date" name="signclosed_date" readonly="readonly"/>
-                </div>
-            </div>
+
 
             <div class="row cl">
                 <label class="form-label col-3 col-sm-3"><span class="c-red">*</span>是否品检:</label>
@@ -230,7 +240,7 @@
                         <label for="tel-13">物件不对</label>
                     </div>
                 </div>
-            </div>
+            </div>-->
             <div class="row cl">
                 <label class="form-label col-3 col-sm-3">备注:</label>
                 <div class="formControls col-5 col-sm-5">
@@ -264,6 +274,8 @@
             increaseArea: '20%'
         });
     });
+    /*初始化省市区*/
+    $(".address_info").initAddress();
     function hide() {
         $("#objectsStateId").hide();
     }
@@ -340,7 +352,7 @@
 
     //填写数量后动态生成相同数量的文本框
     function generateInput(colorId){
-        var inputList = "";
+        /*var inputList = "";
         var number = $("#alreadyColorId"+colorId).val();
         var machineNumberName = "machineNumber"+colorId;
         if(!/^\d+$/.test(number)){
@@ -354,7 +366,7 @@
         }
 
 
-        $("#tdColorId"+colorId).append(inputList);
+        $("#tdColorId"+colorId).append(inputList);*/
     }
 
     //动态回显产品js end
@@ -390,14 +402,14 @@
 
     function  add() {
 
-        var signclosedType = $("#signclosedType").val();
+        /*var signclosedType = $("#signclosedType").val();
         if( signclosedType == 3){
             var signclosedTypeName = $("#signclosedTypeName").val();
             if( signclosedTypeName == null || signclosedTypeName == "" ) {
                 layer.msg('类型为其他时需填值', {icon: 5, time: 1000});
                 return;
             }
-        }
+        }*/
         var signclosedLogistics = $("#signclosedLogistics").val();
         if( signclosedLogistics == null || signclosedLogistics == "" ){
             alert(signclosedLogistics);
@@ -431,11 +443,11 @@
             layer.msg('寄件人电话长度不得大于11个字符',{icon: 5,time:1000});
             return;
         }
-        var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
+        /*var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
         if(!myreg.test(signclosedSendTel)){
             layer.msg('寄件人电话格式不正确',{icon: 5,time:1000});
             return;
-        }
+        }*/
         var signclosed_date = $("#signclosed_date").val();
         if( signclosed_date == null || signclosed_date == "" ){
             layer.msg('请选择签收日期',{icon: 5,time:1000});
@@ -449,6 +461,13 @@
                 return;
             }
         }
+        //设置省市县
+        var provinces = $("#provinces").find("option:selected").text();
+        var city = $("#city").find("option:selected").text();
+        var area = $("#area").find("option:selected").text();
+        $("#signclosedAddrProvinces").val(provinces);
+        $("#signclosedAddrCity").val(city);
+        $("#signclosedAddrArea").val(area);
         $.ajax({
             cache: true,
             type: "POST",
@@ -457,12 +476,10 @@
             async: false,
             success: function(data){
                 if (data.returnCode == 200) {
-                    layer.msg('签收成功,请及时转入品检部门!',{icon: 1,time:1000},function () {
+                    layer.msg('签收成功',{icon: 1,time:1000},function () {
                         location.replace(location.href);
                         window.location.href= "${path}/admin/signclosed/select_signclosed_list";
                     });
-                } else if(data.returnCode == 501) {
-                    layer.msg('机器编号未填写',{icon: 5,time:1000});
                 } else if(data.returnCode == 502) {
                     layer.msg('请至少选择一件已签收的产品',{icon: 5,time:1000});
                 } else if(data.returnCode == 503) {

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

@@ -0,0 +1,82 @@
+<!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(/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;}
+    </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"   style="text-align:center;">
+            <span class="input-dic spanhidth">客诉编号</span>
+            <input type="text" style="" class="input-text" placeholder="客诉编号" id="signclosedCustomerId" name="signclosedCustomerId">
+        </div>
+        <div style="text-align:center;">
+        <#if signclosedId??>
+            <input type="hidden" value="${signclosedId!''}" id="signclosedId" name="signclosedId">
+        </#if>
+           <button type="button" class="my-btn-submit" onclick="update();">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+
+    function  update() {
+        var signclosedCustomerId = $("#signclosedCustomerId").val();
+        if( signclosedCustomerId != null){
+            if( signclosedCustomerId.length > 10 ){
+                layer.msg('编号长度不得大于10个字符',{icon: 5,time:1000});
+                return;
+            }
+        }
+
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/signclosed/associated_customer",
+            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>

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

@@ -0,0 +1,268 @@
+<!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: #44C861;border: 1px solid #44C861;border-radius: 5px;color: #E5EAEA;font-weight:bold;}
+        .txt{
+            width:60px;
+            border:1px solid #ddd;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+        }
+        .txt2{
+             width:60px;
+             overflow: hidden;
+             white-space: nowrap;
+             text-overflow: ellipsis;
+         }
+
+    </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">
+            <input class="my-input" style="width: 70px;" type="text" name="signclosedCustomerId" value="${signclosedCustomerId!}" placeholder="客诉编号"/>
+            <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="快递单号"/>
+            <input class="my-input" style="width: 70px;" type="hidden" name="isBinding" value="${isBinding!}"/>
+
+            <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="120">寄件人姓名</th>
+                <th width="120">寄件人电话</th>
+                <th width="200">签收产品</th>
+                <th width="200">状态</th>
+                <th width="130">退货地区</th>
+                <th width="90">售后原因</th>
+                <th width="150">客服备注</th>
+                <th width="150">返厂日期</th>
+                <th width="100">备注</th>
+                <th width="100">操作</th>
+            </tr>
+            </thead>
+            <tbody id="listid">
+            <#if (page.dataList?size > 0)>
+                <#list page.dataList as signclosed>
+                <tr>
+                    <td class="text-c" width="100">${signclosed.signclosedCustomerId!}</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="180"><span class="fom_send_tel">${signclosed.signclosedSendTel!}</span></td>
+                    <td class="text-c" width="100">
+                        <div>
+                        <#if signclosed.signclosedProductInfoList??>
+                            <#if (signclosed.signclosedProductInfoList?size > 0)>
+                                <#list signclosed.signclosedProductInfoList as info>
+                                    <#if info.signclosedProductType == 1 >
+                                        <span class="label label-success radius txt" title="${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台">${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
+                                    <#else >
+                                        <span class="label label-success radius txt" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件>${info.productName!''} x ${info.productNum!''}件</span><br>
+                                    </#if>
+                                </#list>
+                            <#else >
+                                暂无数据!
+                            </#if>
+                        <#else >
+                            暂无数据!
+                        </#if>
+                        </div>
+                    </td>
+                    <td class="text-c" width="100"><#if signclosed.signclosedState??>
+                        <#if signclosed.signclosedState == 1>
+                            已签收
+                        <#elseif signclosed.signclosedState == 2>
+                            已移交QC
+                        </#if>
+                    </#if></td>
+                    <td class="text-c" width="100">${signclosed.signclosedAddrProvinces!}-${signclosed.signclosedAddrCity!}-${signclosed.signclosedAddrArea!}</td>
+                    <td class="text-c" width="100"><span class="label txt2" title="${signclosed.customerIdDescribe!}" >${signclosed.customerIdDescribe!}</span><br><#if signclosed.customerIdDescribe??><#if signclosed.customerIdDescribe != ""><a href="#" onclick="getDescribeInfo(${signclosed.signclosedCustomerId!});"style="color : #4149FF;">查看详情</a></#if></#if></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">${signclosed.signclosedDesc!}</td>
+                    <!-- 遍历操作 -->
+                    <td class="td-manage text-c">
+                        <a style="text-decoration:none" href="javascript:;" title="修改备注"
+                           onclick="add_remark('修改备注','${path}/admin/signclosed/to_update_customer_remark?signclosedId=${signclosed.signclosedId!''}','570','450');">
+                            <i class="Hui-iconfont">修改备注</i>
+                        </a>
+                       <#-- <a style="text-decoration:none" href="javascript:;" title="打印"
+                           onclick="print_aftermarket(${signclosed.signclosedId!''});">
+                            <i class="Hui-iconfont">&#xe652;</i>
+                        </a>-->
+                        <#if !signclosed.signclosedCustomerId??>
+                             <a style="text-decoration:none" href="javascript:;" title="关联客诉"
+                              onclick="associated_customer('关联客诉','${path}/admin/signclosed/to_associated_customer?signclosedId=${signclosed.signclosedId!''}','570','450');">
+                                 <i>关联客诉</i>
+                             </a>
+                        </#if>
+                    </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" src="${path}/common/lib/jquery.PrintArea/jquery.PrintArea.js"></script>
+<script type="text/javascript">
+
+    $(function(){
+        $("td .fom_send_tel").each(function(){
+            var tel = $(this).html();
+            var firstTel = tel.substring(0,3);
+            var lastTel = tel.substring(7,11);
+            $(this).html(firstTel + "****" +lastTel);
+        })
+    })
+
+
+    /**
+     * 打印
+     */
+    function print_aftermarket(signclosedId){
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/signclosed/select_signclosed_info",
+            data:{"signclosedId":signclosedId},
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    layer.msg('转入成功',{icon: 1,time:1000},function () {
+                        location.replace(location.href);
+                    });
+                } else {
+                    layer.msg('转入失败',{icon: 5,time:1000});
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+                layer.msg('转入错误',{icon: 5,time:1000});
+            }
+        });
+
+
+        $("#printlist").printArea();
+    }
+
+    /*添加*/
+    function add_signclosed(url){
+        window.location.href = url;
+    }
+    /*修改备注*/
+    function add_remark(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
+    /*签收*/
+    function update_info(url){
+        window.location.href = url;
+    }
+    /*关联客诉*/
+    function associated_customer(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
+    /**
+     * 进入查询问题描述信息页面
+     */
+    function getDescribeInfo(customerId) {
+        layer_show("问题描述","${path}/admin/customer/_question_describe?customerId="+customerId,"800","500");
+    }
+    /*转入品检*/
+    function into_complaint(signclosedId){
+        layer.alert('确定转入到品检部门吗?', function () {
+            $.ajax({
+                cache: true,
+                type: "POST",
+                url: "${path}/admin/signclosed/into_complaint",
+                data:{"signclosedId":signclosedId},
+                async: false,
+                success: function(data){
+                    if (data.returnCode == 200) {
+                        layer.msg('转入成功',{icon: 1,time:1000},function () {
+                            location.replace(location.href);
+                        });
+                    } else {
+                        layer.msg('转入失败',{icon: 5,time:1000});
+                    }
+                },
+                error: function(XmlHttpRequest, textStatus, errorThrown){
+                    layer.msg('转入错误',{icon: 5,time:1000});
+                }
+            });
+        });
+    }
+
+</script>
+</body>
+</html>

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

@@ -0,0 +1,90 @@
+<!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(/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;}
+    </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"   style="text-align:center;">
+            <span class="input-dic spanhidth">移交产品</span>
+            <input type="text" style="" class="input-text" placeholder="客诉编号" id="signclosedCustomerId" name="signclosedCustomerId">
+        </div>
+        <div class="input-box"   style="text-align:center;">
+            <span class="input-dic spanhidth">维修编号:</span>
+
+        </div>
+        <div class="input-box"   style="text-align:center;">
+            <span class="input-dic spanhidth">请将维修编号清晰的写到维修卡上方</span>
+
+        </div>
+        <div style="text-align:center;">
+        <#if signclosedId??>
+            <input type="hidden" value="${signclosedId!''}" id="signclosedId" name="signclosedId">
+        </#if>
+           <button type="button" class="my-btn-submit" onclick="update();">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+
+    function  update() {
+        var signclosedCustomerId = $("#signclosedCustomerId").val();
+        if( signclosedCustomerId != null){
+            if( signclosedCustomerId.length > 10 ){
+                layer.msg('编号长度不得大于10个字符',{icon: 5,time:1000});
+                return;
+            }
+        }
+
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/signclosed/associated_customer",
+            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>

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

@@ -45,12 +45,12 @@
             <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">
+            <#--<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>-->
             <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>
@@ -64,20 +64,15 @@
             <thead>
             <tr class="text-c">
                 <th width="100">客诉编号</th>
-                <th width="100">签收类型</th>
                 <th width="160">物流</th>
                 <th width="120">寄件人姓名</th>
                 <th width="120">寄件人电话</th>
-                <th width="200">退换产品</th>
                 <th width="200">签收产品</th>
+                <th width="200">状态</th>
                 <th width="130">退货地区</th>
-                <th width="100">是否少配件</th>
                 <th width="90">售后原因</th>
                 <th width="150">客服备注</th>
                 <th width="150">返厂日期</th>
-                <th width="100">处理状态</th>
-                <th width="130">是否转入QC</th>
-                <th width="130">物件状态</th>
                 <th width="100">备注</th>
                 <th width="50">操作</th>
             </tr>
@@ -87,17 +82,7 @@
                 <#list page.dataList as signclosed>
                 <tr>
                     <td class="text-c" width="100">${signclosed.signclosedCustomerId!}</td>
-                    <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">
@@ -142,25 +127,6 @@
                     <td class="text-c" width="180"><span class="fom_send_tel">${signclosed.signclosedSendTel!}</span></td>
                     <td class="text-c" width="100">
                         <div>
-                        <#if signclosed.awaitingSignclosedProductInfoList??>
-                            <#if (signclosed.awaitingSignclosedProductInfoList?size > 0)>
-                                <#list signclosed.awaitingSignclosedProductInfoList as info>
-                                    <#if info.signclosedProductType == 1 >
-                                        <span class="label label-success radius txt" title="${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台">${info.productName!''}-${info.productNumber!''}(${info.colorName!''})x ${info.productNum!''}台</span><br>
-                                    <#else >
-                                        <span class="label label-success radius txt" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件</span><br>
-                                    </#if>
-                                </#list>
-                            <#else >
-                                暂无数据!
-                            </#if>
-                        <#else >
-                            暂无数据!
-                        </#if>
-                        </div>
-                    </td>
-                    <td class="text-c" width="100">
-                        <div>
                         <#if signclosed.signclosedProductInfoList??>
                             <#if (signclosed.signclosedProductInfoList?size > 0)>
                                 <#list signclosed.signclosedProductInfoList as info>
@@ -178,50 +144,21 @@
                         </#if>
                         </div>
                     </td>
-                    <td class="text-c" width="100">${signclosed.provincesName!}-${signclosed.cityName!}</td>
-                    <td class="text-c" width="100">
-                        <#if signclosed.signclosedIsFittings == 1>
-                            缺少
-                        <#elseif  signclosed.signclosedIsFittings == 2>
-                            不缺少
+                    <td class="text-c" width="100"><#if signclosed.signclosedState??>
+                        <#if signclosed.signclosedState == 1>
+                            已签收
+                        <#elseif signclosed.signclosedState == 2>
+                            已移交QC
                         </#if>
-                    </td>
+                    </#if></td>
+                    <td class="text-c" width="100">${signclosed.signclosedAddrProvinces!}-${signclosed.signclosedAddrCity!}-${signclosed.signclosedAddrArea!}</td>
                     <td class="text-c" width="100"><span class="label txt2" title="${signclosed.customerIdDescribe!}" >${signclosed.customerIdDescribe!}</span><br><#if signclosed.customerIdDescribe??><#if signclosed.customerIdDescribe != ""><a href="#" onclick="getDescribeInfo(${signclosed.signclosedCustomerId!});"style="color : #4149FF;">查看详情</a></#if></#if></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>
-                            正常签收
 
-                        <#elseif signclosed.signclosedObjectsState == 2>
-                            物件不对
-                        <#else>
-                            待签收
-                        </#if>
-                    </td>
                     <td class="text-c" width="100">${signclosed.signclosedDesc!}</td>
                     <!-- 遍历操作 -->
                     <td class="td-manage text-c">
-                        <#if signclosed.signclosedState == 2>
-                            <a style="text-decoration:none" href="javascript:;" title="签收"
-                               onclick="update_info('${path}/admin/signclosed/to_complete_signclosed?signclosedId=${signclosed.signclosedId!''}');">
-                                <i class="Hui-iconfont">&#xe6df;</i>
-                            </a>
-                        </#if>
                         <a style="text-decoration:none" href="javascript:;" title="修改备注"
                            onclick="add_remark('修改备注','${path}/admin/signclosed/to_update_remark?signclosedId=${signclosed.signclosedId!''}','570','450');">
                             <i class="Hui-iconfont">&#xe692;</i>
@@ -230,18 +167,21 @@
                            onclick="print_aftermarket(${signclosed.signclosedId!''});">
                             <i class="Hui-iconfont">&#xe652;</i>
                         </a>-->
-                        <#if signclosed.signclosedState == 1>
+
                             <a style="text-decoration:none" href="javascript:;" title="修改寄件人信息"
                                onclick="add_remark('修改寄件人信息','${path}/admin/signclosed/to_update_sender?signclosedId=${signclosed.signclosedId!''}','570','450');">
                                 <i class="Hui-iconfont">&#xe60c;</i>
                             </a>
-                        </#if>
-                        <#if signclosed.signclosedIsInto == 2>
                             <a style="text-decoration:none" href="javascript:;" title="转入品检"
                                onclick="into_complaint('${signclosed.signclosedId!''}');">
                                 <i class="Hui-iconfont">&#xe644;</i>
                             </a>
-                        </#if>
+                            <#if !signclosed.signclosedCustomerId??>
+                                <a style="text-decoration:none" href="javascript:;" title="关联客诉"
+                                   onclick="associated_customer('关联客诉','${path}/admin/signclosed/to_associated_customer?signclosedId=${signclosed.signclosedId!''}','570','450');">
+                                    <i class="Hui-iconfont">&#xe6f1;</i>
+                                </a>
+                            </#if>
 
                     </td>
                 </tr>
@@ -254,111 +194,6 @@
     </div>
 </div>
 <div style="padding-top: 10px;"></div>
-<div  style="display:none;padding: 0px;margin: 0px;" >
-    <div id="printlist" style="">
-        <ul style=" height: 460px;margin-left: 20px;margin-right: 20px;">
-            <li style="font-size: 22px;letter-spacing:26px;border-bottom: 1px solid #000000;height: 35px;text-align: center;font-weight: bold;">东莞市优尼雅电子科技有限公司</li>
-            <li style="font-size: 30px;height: 50px;display: block;text-align: center;font-weight: bold;margin-top: 15px">退货/换货产品维修追踪卡</li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">客户名称</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">小茗</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">客户电话</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">13265476840</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">签收日期</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">2017-12-28</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">快递公司</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">申通</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">快递单号</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">2343242543234</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">退货/换货</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">换货</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">产品名称</div>
-                <div style="float:left;display:block;width:99px;line-height: 15px;height: 40px;border-right: 1px solid #000000;text-align: center;">美国watero净饮水一体机WA-2</div>
-                <div style="float:left;display:block;width:40px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">颜色</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">黑色黑色</div>
-                <div style="float:left;display:block;width:50px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">二维码</div>
-                <div style="float:left;display:block;width:89px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">xxxxxxxx</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">地区</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">北京-北京市</div>
-            </li>
-            <li style="height: 60px;display:block;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 60px;height: 60px;border-right: 1px solid #000000;text-align: center;">退/换货原因</div>
-                <div style="float:left;display:block;width:560px;height: 60px; line-height: 16px;padding: 0px 5px;">换货原因换货原因换货原因换货原因换货原因换货原因换货换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因原因换货原因换货原因换货原因</div>
-            </li>
-            <li style="height: 60px;display:block;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 60px;height: 60px;border-right: 1px solid #000000;text-align: center;">检测问题点</div>
-                <div style="float:left;display:block;width:560px;height: 60px;line-height: 16px;padding: 0px 5px;">换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因</div>
-            </li>
-            <li style="height: 60px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 60px;height: 60px;border-right: 1px solid #000000;text-align: center;">维修方案</div>
-                <div style="float:left;display:block;width:560px;height: 60px;line-height: 16px;padding: 0px 5px;">换货原因换货原因换货原因换货换货原因换货原因换货原因换换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因货原因换货原因换货原因换货原因换货原因换货原因换货原因原因换货原因换货原因换货原因换货原因换货原因换货原因</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">维修员</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">小红</div>
-                <div style="float:left;display:block;width:90px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">维修后检验确认</div>
-                <div style="float:left;display:block;width:130px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">小芳</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">日期</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">2017年11月23日</div>
-            </li>
-        </ul>
-        <div style="margin-top: 30px;margin-bottom: 30px;text-align: center">-------------------------------------------------------------------------------------------------------</div>
-        <ul style=" height: 460px;margin-left: 20px;margin-right: 20px;">
-            <li style="font-size: 22px;letter-spacing:26px;border-bottom: 1px solid #000000;height: 35px;text-align: center;font-weight: bold;">东莞市优尼雅电子科技有限公司</li>
-            <li style="font-size: 30px;height: 50px;display: block;text-align: center;font-weight: bold;margin-top: 15px">退货/换货产品维修追踪卡</li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">客户名称</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">小茗</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">客户电话</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">13265476840</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">签收日期</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">2017-12-28</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">快递公司</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">申通</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">快递单号</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">2343242543234</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">退货/换货</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">换货</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">产品名称</div>
-                <div style="float:left;display:block;width:99px;line-height: 15px;height: 40px;border-right: 1px solid #000000;text-align: center;">美国watero净饮水一体机WA-2</div>
-                <div style="float:left;display:block;width:40px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">颜色</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">黑色黑色</div>
-                <div style="float:left;display:block;width:50px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">二维码</div>
-                <div style="float:left;display:block;width:89px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">xxxxxxxx</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">地区</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">北京-北京市</div>
-            </li>
-            <li style="height: 60px;display:block;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 60px;height: 60px;border-right: 1px solid #000000;text-align: center;">退/换货原因</div>
-                <div style="float:left;display:block;width:560px;height: 60px; line-height: 16px;padding: 0px 5px;">换货原因换货原因换货原因换货原因换货原因换货原因换货换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因原因换货原因换货原因换货原因</div>
-            </li>
-            <li style="height: 60px;display:block;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 60px;height: 60px;border-right: 1px solid #000000;text-align: center;">检测问题点</div>
-                <div style="float:left;display:block;width:560px;height: 60px;line-height: 16px;padding: 0px 5px;">换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因</div>
-            </li>
-            <li style="height: 60px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 60px;height: 60px;border-right: 1px solid #000000;text-align: center;">维修方案</div>
-                <div style="float:left;display:block;width:560px;height: 60px;line-height: 16px;padding: 0px 5px;">换货原因换货原因换货原因换货换货原因换货原因换货原因换换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因换货原因货原因换货原因换货原因换货原因换货原因换货原因换货原因原因换货原因换货原因换货原因换货原因换货原因换货原因</div>
-            </li>
-            <li style="height: 40px;font-size: 12px;font-weight: normal;border-bottom: 1px solid #000000;border-left: 1px solid #000000;border-right: 1px solid #000000;">
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">维修员</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">小红</div>
-                <div style="float:left;display:block;width:90px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">维修后检验确认</div>
-                <div style="float:left;display:block;width:130px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">小芳</div>
-                <div style="float:left;display:block;width:80px;line-height: 40px;height: 40px;border-right: 1px solid #000000;text-align: center;">日期</div>
-                <div style="float:left;display:block;width:140px;line-height: 40px;height: 40px;text-align: center;">2017年11月23日</div>
-            </li>
-        </ul>
-    </div>
-</div>
 <#include "/base/page_util.ftl">
 <script type="text/javascript" src="${path}/common/lib/jquery.PrintArea/jquery.PrintArea.js"></script>
 <script type="text/javascript">
@@ -372,35 +207,6 @@
         })
     })
 
-
-    /**
-     * 打印
-     */
-    function print_aftermarket(signclosedId){
-        $.ajax({
-            cache: true,
-            type: "POST",
-            url: "${path}/admin/signclosed/select_signclosed_info",
-            data:{"signclosedId":signclosedId},
-            async: false,
-            success: function(data){
-                if (data.returnCode == 200) {
-                    layer.msg('转入成功',{icon: 1,time:1000},function () {
-                        location.replace(location.href);
-                    });
-                } else {
-                    layer.msg('转入失败',{icon: 5,time:1000});
-                }
-            },
-            error: function(XmlHttpRequest, textStatus, errorThrown){
-                layer.msg('转入错误',{icon: 5,time:1000});
-            }
-        });
-
-
-        $("#printlist").printArea();
-    }
-
     /*添加*/
     function add_signclosed(url){
         window.location.href = url;
@@ -413,6 +219,10 @@
     function update_info(url){
         window.location.href = url;
     }
+    /*关联客诉*/
+    function associated_customer(title,url,w,h){
+        layer_show(title,url,w,h);
+    }
     /**
      * 进入查询问题描述信息页面
      */
@@ -444,6 +254,12 @@
         });
     }
 
+    /**
+     * 进入转入品检页面
+     */
+    function getDescribeInfo(customerId) {
+        layer_show("问题描述","${path}/admin/customer/_question_describe?customerId="+customerId,"800","500");
+    }
 </script>
 </body>
 </html>

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

@@ -0,0 +1,111 @@
+<!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">
+    <link href="${path}/common/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
+    <link href="${path}/common/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
+    <!--<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />-->
+    <link href="${path}/common/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
+    <!--<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />-->
+    <title></title>
+</head>
+<body>
+<article class="cl pd-20">
+    <form action="" method="post" class="form form-horizontal" id="form-article-add">
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>移交产品:</strong>
+            </div>
+            <div class="formControls col-5 col-sm-5" id="txtDescribeTitle">
+                <table class="table table-border table-bordered table-bg" style="width: 450px;margin-left: 10px;">
+                    <thead>
+                    <tr class="text-c">
+                        <th width="150" >是否移交</th>
+                        <th width="150" >产品</th>
+                        <th width="150" >产品颜色</th>
+                        <th width="90">数量</th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr class="text-c">
+                        <td id="channelBank"></td>
+                        <td id="channelBankAccount"></td>
+                        <td id="channelBankName"></td>
+                        <td id="channelBankBranch"></td>
+                    </tbody>
+                </table>
+            </div>
+
+        </div>
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>维修编号:</strong>
+            </div>
+            <div class="formControls col-10 col-sm-10" id="txtDescribeContent">
+
+            </div>
+        </div>
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>问题备注:</strong>
+            </div>
+            <div class="formControls col-10 col-sm-10" id="txtCustomerDesc">
+
+            </div>
+        </div>
+
+        <div class="row cl">
+            <div class="formControls col-2 col-sm-2 text-r">
+                <strong>请将维修编号清晰的写到维修卡上方</strong>
+            </div>
+            <div class="formControls col-10 col-sm-10">
+
+            </div>
+        </div>
+        <#--<div class="row cl">
+            <div class="formControls col-2 col-sm-2">
+
+            </div>
+            <div class="formControls col-10 col-sm-10">
+                <img src="images/image-1.jpg" />
+            </div>
+        </div>-->
+    </form>
+    </div>
+</article>
+<#--<script type="text/javascript" src="${path}/common/lib/jquery/1.9.1/jquery.min.js"></script>
+<script type="text/javascript" src="${path}/common/lib/layer/2.4/layer.js"></script>
+<script type="text/javascript" src="${path}/common/static/h-ui/js/H-ui.js"></script>
+<script type="text/javascript" src="${path}/common/static/h-ui.admin/js/H-ui.admin.js"></script>-->
+<script type="text/javascript">
+
+    var customerId = ${customerId!''};
+
+    $(function(){
+        $.ajax({
+            cache: true,
+            type: "POST",
+            data: {"customerId":customerId},
+            url: "${path}/admin/customer/get_describe_info",
+            async: false,
+            success: function(data){
+                if (data.returnCode == 200) {
+                    var describe = data.returnMsg.describe;
+                    $('#txtDescribeTitle').html(describe.describeTitle);
+                    $('#txtDescribeContent').html(describe.describeContent);
+                    $('#txtDescribeHandleDesc').html(describe.describeHandleDesc);
+                    $('#txtCustomerDesc').html(describe.customerDesc);
+                }
+            },
+            error: function(XmlHttpRequest, textStatus, errorThrown){
+            }
+        })
+    });
+</script>
+</body>
+</html>

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

@@ -0,0 +1,86 @@
+<!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(/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;}
+    </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"   style="text-align:center;">
+            <span class="input-dic spanhidth">备注</span>
+            <#if complaintSignclosedInfo??>
+                <textarea rows="5" cols="20" name="signclosedCustomerDesc" id="signclosedCustomerDesc" class="my-textarea" placeholder="请详细备注">${complaintSignclosedInfo.signclosedCustomerDesc!''}</textarea>
+            <#else>
+                <textarea rows="5" cols="20" name="signclosedCustomerDesc" id="signclosedCustomerDesc" class="my-textarea" placeholder="请详细备注"></textarea>
+            </#if>
+        </div>
+        <div style="text-align:center;">
+        <#if signclosedId??>
+            <input type="hidden" value="${signclosedId!''}" id="signclosedId" name="signclosedId">
+        </#if>
+           <button type="button" class="my-btn-submit" onclick="update();">确认提交</button>
+        </div>
+    </form>
+</article>
+<script type="text/javascript" src="${path}/common/lib/My97DatePicker/4.8/WdatePicker.js"></script>
+<script type="text/javascript">
+
+
+    function  update() {
+        var signclosedDesc = $("#signclosedDesc").val();
+        if( signclosedDesc != null){
+            if( signclosedDesc.length > 200 ){
+                layer.msg('备注长度不得大于100个字符',{icon: 5,time:1000});
+                return;
+            }
+        }
+
+        $.ajax({
+            cache: true,
+            type: "POST",
+            url: "${path}/admin/signclosed/update_remark",
+            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>