Browse Source

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

wangxiaoming 5 years ago
parent
commit
7b050f3d99
55 changed files with 3718 additions and 406 deletions
  1. 93 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java
  2. 56 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java
  3. 88 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintAfterSalesNum.java
  4. 192 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintDetectInfo.java
  5. 21 1
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintSignclosedInfo.java
  6. 9 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/fm/QcInfo.java
  7. 5 1
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/SalesOrderService.java
  8. 21 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java
  9. 8 2
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintSignclosedInfoService.java
  10. 14 4
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java
  11. 23 3
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java
  12. 5 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/SalesOrderMapper.java
  13. 83 29
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml
  14. 14 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml
  15. 69 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java
  16. 99 41
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintSignclosedInfoServiceImpl.java
  17. 18 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java
  18. 6 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintSignclosedInfoMapper.java
  19. 245 45
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintDetectInfoMapper.xml
  20. 21 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintSignclosedInfoMapper.xml
  21. 12 0
      watero-rst-service/src/main/java/com/iamberry/rst/util/SmsConfig.java
  22. 116 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java
  23. 238 6
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminDetectController.java
  24. 4 13
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java
  25. 0 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/log/LogAopHandler.java
  26. 1 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminOrderController.java
  27. 9 1
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  28. 28 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java
  29. 5 1
      watero-rst-web/src/main/resources/platform.properties
  30. 1 0
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  31. 2 0
      watero-rst-web/src/main/webapp/WEB-INF/views/base/add_base.ftl
  32. 110 18
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl
  33. 4 4
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_relation.ftl
  34. 6 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_QC.ftl
  35. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_detect.ftl
  36. 2 2
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/add_remark.ftl
  37. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_complete.ftl
  38. 30 7
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_detail.ftl
  39. 80 45
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl
  40. 64 0
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/download_detection.ftl
  41. 94 59
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_complete.ftl
  42. 93 57
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_detect.ftl
  43. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_produced_info.ftl
  44. 16 8
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/add_signclosed.ftl
  45. 3 2
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/complete_signclosed.ftl
  46. 2 2
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/customer_signclosed_list.ftl
  47. 11 40
      watero-rst-web/src/main/webapp/WEB-INF/views/cm/signclosed/signclosed_list.ftl
  48. 19 0
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl
  49. 11 1
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/list_wait_send_order.ftl
  50. 4 3
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl
  51. 25 0
      watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js
  52. BIN
      watero-rst-web/src/main/webapp/common/static/chosen/css/chosen-sprite.png
  53. BIN
      watero-rst-web/src/main/webapp/common/static/chosen/css/chosen-sprite@2x.png
  54. 423 0
      watero-rst-web/src/main/webapp/common/static/chosen/css/chosen.css
  55. 1212 0
      watero-rst-web/src/main/webapp/common/static/chosen/js/chosen.jquery.js

+ 93 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerInfo.java

@@ -184,7 +184,19 @@ public class CustomerInfo  implements Serializable {
     private Integer completeMaintenanceNum;//维修完成数量
     private Integer beenScrappedNum;//已报废的数量
     private Integer beenRenovatedNum;//已翻新的数量
-
+    private Integer stayBackNum;//待退回
+    private Integer beenReturnedNum;//已退回
+    private Integer stayQcConfirmNum;//待QC确认
+    private Integer placeOrderNum;//待下单
+    private Integer beenOrderedNum;//维修完成已下单
+
+    private Integer afterState;// 1今日签收 2昨日签收 3前日签收 4.待检测 5已检测待确认 6.检测完成 7原机退回,待下单 8维修完成,待下单
+    private String afterTime;// 售后搜索日期条件
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
+    private Date warehouseDate;// 仓库签收日期 用作列表查询
+    private Integer warehouseDetectState;//状态 详情见数据库文档 用作列表查询 (1.待检测  2已检测,待确认 3待维修 4待翻新 5待报废 6维修完成 7翻新完成 8报废完成)
+    private Integer detectPlaceorder;//状态 售后下单 1待发货 2已发货
     public void setComplaintDetectList(List<ComplaintDetectInfo> complaintDetectList) {
         this.complaintDetectList = complaintDetectList;
     }
@@ -982,4 +994,84 @@ public class CustomerInfo  implements Serializable {
     public void setBeenRenovatedNum(Integer beenRenovatedNum) {
         this.beenRenovatedNum = beenRenovatedNum;
     }
+
+    public Integer getAfterState() {
+        return afterState;
+    }
+
+    public void setAfterState(Integer afterState) {
+        this.afterState = afterState;
+    }
+
+    public String getAfterTime() {
+        return afterTime;
+    }
+
+    public void setAfterTime(String afterTime) {
+        this.afterTime = afterTime;
+    }
+
+    public Date getWarehouseDate() {
+        return warehouseDate;
+    }
+
+    public void setWarehouseDate(Date warehouseDate) {
+        this.warehouseDate = warehouseDate;
+    }
+
+    public Integer getWarehouseDetectState() {
+        return warehouseDetectState;
+    }
+
+    public void setWarehouseDetectState(Integer warehouseDetectState) {
+        this.warehouseDetectState = warehouseDetectState;
+    }
+
+    public Integer getDetectPlaceorder() {
+        return detectPlaceorder;
+    }
+
+    public void setDetectPlaceorder(Integer detectPlaceorder) {
+        this.detectPlaceorder = detectPlaceorder;
+    }
+
+    public Integer getStayBackNum() {
+        return stayBackNum;
+    }
+
+    public void setStayBackNum(Integer stayBackNum) {
+        this.stayBackNum = stayBackNum;
+    }
+
+    public Integer getBeenReturnedNum() {
+        return beenReturnedNum;
+    }
+
+    public void setBeenReturnedNum(Integer beenReturnedNum) {
+        this.beenReturnedNum = beenReturnedNum;
+    }
+
+    public Integer getStayQcConfirmNum() {
+        return stayQcConfirmNum;
+    }
+
+    public void setStayQcConfirmNum(Integer stayQcConfirmNum) {
+        this.stayQcConfirmNum = stayQcConfirmNum;
+    }
+
+    public Integer getPlaceOrderNum() {
+        return placeOrderNum;
+    }
+
+    public void setPlaceOrderNum(Integer placeOrderNum) {
+        this.placeOrderNum = placeOrderNum;
+    }
+
+    public Integer getBeenOrderedNum() {
+        return beenOrderedNum;
+    }
+
+    public void setBeenOrderedNum(Integer beenOrderedNum) {
+        this.beenOrderedNum = beenOrderedNum;
+    }
 }

+ 56 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java

@@ -1,6 +1,7 @@
 package com.iamberry.rst.core.cm;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.iamberry.rst.core.fm.ComplaintDetectInfo;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
@@ -142,6 +143,13 @@ public class SalesOrder implements Serializable {
     private Integer itemReturnNum;   //退货数量
     private Integer salesOldOrderStatus;
 
+    private Integer beConfirmedNum;//待确认数量
+    private Integer distributionLogisticsNum;//待分配物流数量
+    private Integer sendTheGoods;//待发货数量
+    private Integer playSingle;//待打单数量
+    private Integer outbound;//待出库数量
+
+    private List<ComplaintDetectInfo> complaintDetectInfoList;
     public Integer getSalesOldOrderStatus() {
         return salesOldOrderStatus;
     }
@@ -820,4 +828,52 @@ public class SalesOrder implements Serializable {
     public void setItemReturnNum(Integer itemReturnNum) {
         this.itemReturnNum = itemReturnNum;
     }
+
+    public Integer getBeConfirmedNum() {
+        return beConfirmedNum;
+    }
+
+    public void setBeConfirmedNum(Integer beConfirmedNum) {
+        this.beConfirmedNum = beConfirmedNum;
+    }
+
+    public Integer getDistributionLogisticsNum() {
+        return distributionLogisticsNum;
+    }
+
+    public void setDistributionLogisticsNum(Integer distributionLogisticsNum) {
+        this.distributionLogisticsNum = distributionLogisticsNum;
+    }
+
+    public Integer getSendTheGoods() {
+        return sendTheGoods;
+    }
+
+    public void setSendTheGoods(Integer sendTheGoods) {
+        this.sendTheGoods = sendTheGoods;
+    }
+
+    public Integer getPlaySingle() {
+        return playSingle;
+    }
+
+    public void setPlaySingle(Integer playSingle) {
+        this.playSingle = playSingle;
+    }
+
+    public Integer getOutbound() {
+        return outbound;
+    }
+
+    public void setOutbound(Integer outbound) {
+        this.outbound = outbound;
+    }
+
+    public List<ComplaintDetectInfo> getComplaintDetectInfoList() {
+        return complaintDetectInfoList;
+    }
+
+    public void setComplaintDetectInfoList(List<ComplaintDetectInfo> complaintDetectInfoList) {
+        this.complaintDetectInfoList = complaintDetectInfoList;
+    }
 }

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

@@ -0,0 +1,88 @@
+package com.iamberry.rst.core.fm;
+
+import java.io.Serializable;
+
+public class ComplaintAfterSalesNum implements Serializable{
+    private static final long serialVersionUID = 2487120927050982799L;
+    private Integer todaysignNum;//今日签收
+    private Integer yesterdaysignNum;//昨日签收
+    private Integer beforedaysignNum;//前日签收
+    private Integer contactNum;//待联系数量
+    private Integer beDetected;//待检测
+    private Integer beConfirmed;//已检测待确认
+    private Integer completeProcessing;//完成处理
+    private Integer placeOrderNum;//原机退回,待下单
+    private Integer detectplaceOrderNum;//维修完成,待下单
+
+    public Integer getTodaysignNum() {
+        return todaysignNum;
+    }
+
+    public void setTodaysignNum(Integer todaysignNum) {
+        this.todaysignNum = todaysignNum;
+    }
+
+    public Integer getYesterdaysignNum() {
+        return yesterdaysignNum;
+    }
+
+    public void setYesterdaysignNum(Integer yesterdaysignNum) {
+        this.yesterdaysignNum = yesterdaysignNum;
+    }
+
+    public Integer getBeforedaysignNum() {
+        return beforedaysignNum;
+    }
+
+    public void setBeforedaysignNum(Integer beforedaysignNum) {
+        this.beforedaysignNum = beforedaysignNum;
+    }
+
+    public Integer getContactNum() {
+        return contactNum;
+    }
+
+    public void setContactNum(Integer contactNum) {
+        this.contactNum = contactNum;
+    }
+
+    public Integer getBeDetected() {
+        return beDetected;
+    }
+
+    public void setBeDetected(Integer beDetected) {
+        this.beDetected = beDetected;
+    }
+
+    public Integer getBeConfirmed() {
+        return beConfirmed;
+    }
+
+    public void setBeConfirmed(Integer beConfirmed) {
+        this.beConfirmed = beConfirmed;
+    }
+
+    public Integer getCompleteProcessing() {
+        return completeProcessing;
+    }
+
+    public void setCompleteProcessing(Integer completeProcessing) {
+        this.completeProcessing = completeProcessing;
+    }
+
+    public Integer getPlaceOrderNum() {
+        return placeOrderNum;
+    }
+
+    public void setPlaceOrderNum(Integer placeOrderNum) {
+        this.placeOrderNum = placeOrderNum;
+    }
+
+    public Integer getDetectplaceOrderNum() {
+        return detectplaceOrderNum;
+    }
+
+    public void setDetectplaceOrderNum(Integer detectplaceOrderNum) {
+        this.detectplaceOrderNum = detectplaceOrderNum;
+    }
+}

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

@@ -32,6 +32,7 @@ public class ComplaintDetectInfo implements Serializable {
     @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date detectDate;//检测日期
+    private String qcDesc;//检测备注
     private Date detectCreateTime;//创建时间
     private Date detectUpdateTime;//修改时间
     private Integer customerId;//客诉id
@@ -40,8 +41,11 @@ public class ComplaintDetectInfo implements Serializable {
     private Integer productTypeId;//产品类型id
     private String productTypeName;//产品类型名称
     private String questionTitle;//问题标题
+    private String describeContent;//问题回复
+    private String describeHandleDesc;//客服描述
     private String colorName;//产品颜色名称
     private String productName;//产品名称
+    private String productAbbreviation;//产品简称
 
     private Integer detectOffer;//维修报价
     private Integer detectRenovation;//是否可翻新 1可翻新 2不可翻新
@@ -79,6 +83,7 @@ public class ComplaintDetectInfo implements Serializable {
     private String signclosedAddrProvincesName;//省
     private String signclosedAddrCityName;//市
     private String signclosedAddrAreaName;//区
+    private String logisticsNumber;//物流单号
 
     private String[] configli1;//检测现象集合
     private String[] configli2;//故障原因集合
@@ -87,6 +92,33 @@ public class ComplaintDetectInfo implements Serializable {
     private String[] configli5;//原因分析集合
     private String[] configli6;//维修配件集合
 
+    private Integer adminId;//登录人id
+    private String adminName;//登录人名称
+
+    private String startTime;
+    private String endTime;
+    private String todayTime;
+    private Integer status;//维修列表状态搜索
+
+    private Integer detectIsPrint;// 是否打印 1未打印 2已打印
+    private Date detectPrintTime;//首次打印时间
+    private String signclosedName;//签收人姓名
+    private Integer detectPlaceorder;//是否下单 1否 2是
+    private Integer detectSalesId;//订单号
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date detectCompletionTime;//检测完成时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date maintenanceCompletionTime;//维修完成时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date renovationCompletionTime;//翻新完成时间
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date scrapCompletionTime;//报废完成时间
+
+
     public Integer getDetectId() {
         return detectId;
     }
@@ -534,4 +566,164 @@ public class ComplaintDetectInfo implements Serializable {
     public void setConfigli6(String[] configli6) {
         this.configli6 = configli6;
     }
+
+    public String getQcDesc() {
+        return qcDesc;
+    }
+
+    public void setQcDesc(String qcDesc) {
+        this.qcDesc = qcDesc;
+    }
+
+    public String getLogisticsNumber() {
+        return logisticsNumber;
+    }
+
+    public void setLogisticsNumber(String logisticsNumber) {
+        this.logisticsNumber = logisticsNumber;
+    }
+
+    public Integer getAdminId() {
+        return adminId;
+    }
+
+    public void setAdminId(Integer adminId) {
+        this.adminId = adminId;
+    }
+
+    public String getProductAbbreviation() {
+        return productAbbreviation;
+    }
+
+    public void setProductAbbreviation(String productAbbreviation) {
+        this.productAbbreviation = productAbbreviation;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getTodayTime() {
+        return todayTime;
+    }
+
+    public void setTodayTime(String todayTime) {
+        this.todayTime = todayTime;
+    }
+
+    public Integer getDetectIsPrint() {
+        return detectIsPrint;
+    }
+
+    public void setDetectIsPrint(Integer detectIsPrint) {
+        this.detectIsPrint = detectIsPrint;
+    }
+
+    public Date getDetectPrintTime() {
+        return detectPrintTime;
+    }
+
+    public void setDetectPrintTime(Date detectPrintTime) {
+        this.detectPrintTime = detectPrintTime;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getSignclosedName() {
+        return signclosedName;
+    }
+
+    public void setSignclosedName(String signclosedName) {
+        this.signclosedName = signclosedName;
+    }
+
+    public Integer getDetectPlaceorder() {
+        return detectPlaceorder;
+    }
+
+    public void setDetectPlaceorder(Integer detectPlaceorder) {
+        this.detectPlaceorder = detectPlaceorder;
+    }
+
+    public Integer getDetectSalesId() {
+        return detectSalesId;
+    }
+
+    public void setDetectSalesId(Integer detectSalesId) {
+        this.detectSalesId = detectSalesId;
+    }
+
+    public Date getDetectCompletionTime() {
+        return detectCompletionTime;
+    }
+
+    public void setDetectCompletionTime(Date detectCompletionTime) {
+        this.detectCompletionTime = detectCompletionTime;
+    }
+
+    public Date getMaintenanceCompletionTime() {
+        return maintenanceCompletionTime;
+    }
+
+    public void setMaintenanceCompletionTime(Date maintenanceCompletionTime) {
+        this.maintenanceCompletionTime = maintenanceCompletionTime;
+    }
+
+    public Date getRenovationCompletionTime() {
+        return renovationCompletionTime;
+    }
+
+    public void setRenovationCompletionTime(Date renovationCompletionTime) {
+        this.renovationCompletionTime = renovationCompletionTime;
+    }
+
+    public Date getScrapCompletionTime() {
+        return scrapCompletionTime;
+    }
+
+    public void setScrapCompletionTime(Date scrapCompletionTime) {
+        this.scrapCompletionTime = scrapCompletionTime;
+    }
+
+    public String getDescribeContent() {
+        return describeContent;
+    }
+
+    public void setDescribeContent(String describeContent) {
+        this.describeContent = describeContent;
+    }
+
+    public String getDescribeHandleDesc() {
+        return describeHandleDesc;
+    }
+
+    public void setDescribeHandleDesc(String describeHandleDesc) {
+        this.describeHandleDesc = describeHandleDesc;
+    }
+
+    public String getAdminName() {
+        return adminName;
+    }
+
+    public void setAdminName(String adminName) {
+        this.adminName = adminName;
+    }
 }

+ 21 - 1
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/ComplaintSignclosedInfo.java

@@ -45,6 +45,10 @@ public class ComplaintSignclosedInfo implements Serializable {
     private String signclosedAddrAreaName;//寄件地址(区)
     private Integer sendbackId;//客诉寄回id
     private String signclosedLogisticsName;//物流公司名称
+    private String date;//日期查询
+
+    private Integer adminId;//登录人id
+
     public Integer getSignclosedId() {
         return signclosedId;
     }
@@ -66,7 +70,7 @@ public class ComplaintSignclosedInfo implements Serializable {
     }
 
     public void setSignclosedLogisticsNumber(String signclosedLogisticsNumber) {
-        this.signclosedLogisticsNumber = signclosedLogisticsNumber;
+        this.signclosedLogisticsNumber = signclosedLogisticsNumber.toUpperCase();
     }
 
     public String getSignclosedSendName() {
@@ -260,4 +264,20 @@ public class ComplaintSignclosedInfo implements Serializable {
     public void setSignclosedLogisticsName(String signclosedLogisticsName) {
         this.signclosedLogisticsName = signclosedLogisticsName;
     }
+
+    public Integer getAdminId() {
+        return adminId;
+    }
+
+    public void setAdminId(Integer adminId) {
+        this.adminId = adminId;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
 }

+ 9 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/fm/QcInfo.java

@@ -14,6 +14,7 @@ public class QcInfo implements Serializable {
     @DateTimeFormat(pattern="yyyy-MM-dd")
     @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private Date qcCreateTime;
+    private String qcInfoDesc;
 
     public Integer getQcInfoId() {
         return qcInfoId;
@@ -46,4 +47,12 @@ public class QcInfo implements Serializable {
     public void setQcCreateTime(Date qcCreateTime) {
         this.qcCreateTime = qcCreateTime;
     }
+
+    public String getQcInfoDesc() {
+        return qcInfoDesc;
+    }
+
+    public void setQcInfoDesc(String qcInfoDesc) {
+        this.qcInfoDesc = qcInfoDesc;
+    }
 }

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

@@ -226,7 +226,7 @@ public interface SalesOrderService {
      */
     Integer getIsMachine(String colorBar);
 
-    boolean addRstOrderinfo(SalesOrder mainOrder,List<SalesOrder> listSalesOrder);
+    boolean addRstOrderinfo(SalesOrder mainOrder,List<SalesOrder> listSalesOrder,String[] detectIds);
 
     /**
      *查询拥有该交易号的数量
@@ -460,4 +460,8 @@ public interface SalesOrderService {
      * 查询售后短信模板
      */
     List<SmsTemplateInfo> listSmsTemplateInfo(SmsTemplateInfo smsTemplateInfo);
+    /**
+     * 查询订单各个状态数量
+     */
+    SalesOrder getStatusNum();
 }

+ 21 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintDetectInfoService.java

@@ -168,4 +168,25 @@ public interface ComplaintDetectInfoService {
      * @return
      */
     List<TreatmentRecordLog> listTreatmentRecordLog(Integer detectId);
+    /**
+     * 查询检测数量
+     * @return
+     */
+    ComplaintAfterSalesNum getCustomerDetectNum(ComplaintDetectInfo detect);
+    /**
+     * 修改打印状态
+     * @return
+     */
+    Integer updatePrint(ComplaintDetectInfo detectInfo);
+    /**
+     * 已完成维修、原机退货,并且发货状态为待下单的维修记录,则需要查询当前客诉对应的维修机器
+     * @return
+     */
+    List<ComplaintDetectInfo> listDetectByCustomerId(Integer customerId);
+
+    /**
+     * 查询订单关联的维修
+     * @return
+     */
+    List<ComplaintDetectInfo> listComplaintDetectBySalesId(Integer detectSalesId);
 }

+ 8 - 2
watero-rst-interface/src/main/java/com/iamberry/rst/faces/fm/ComplaintSignclosedInfoService.java

@@ -6,6 +6,7 @@ import com.iamberry.rst.core.fm.SignclosedProductInfo;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -17,7 +18,7 @@ public interface ComplaintSignclosedInfoService {
      * 添加单个签收记录
      * @return
      */
-    boolean insert(ComplaintSignclosedInfo record,String orderItemString,String[] componentsImgs);
+    Integer insert(ComplaintSignclosedInfo record,String orderItemString,String[] componentsImgs);
     /**
      * 查询单个签收记录
      * @return
@@ -65,7 +66,7 @@ public interface ComplaintSignclosedInfoService {
      * 添加品质信息
      * @return
      */
-    int addDetect(ComplaintSignclosedInfo record);
+    int addDetect(ComplaintSignclosedInfo record,Integer type);
 
     /**
      * 查询签收产品集合
@@ -93,4 +94,9 @@ public interface ComplaintSignclosedInfoService {
      * @return
      */
     Integer delSignclosedBySendbackId(Integer sendbackId);
+    /**
+     * 查询某一天的签收数据
+     * @return
+     */
+    Integer getSignclosedDay(ComplaintSignclosedInfo complaintSignclosedInfo);
 }

+ 14 - 4
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -1731,6 +1731,7 @@ public class CustomerServiceImpl implements CustomerService {
         //查询所属公司
         CmRelation cmRelation = cmRelationMapper.getCmRelationById(sendbackInfo.getRelationId());
         /*添加待签收记录 2019年4月11日18:09:34 state*/
+
         ComplaintSignclosedInfo signclosedInfo = new ComplaintSignclosedInfo();
         signclosedInfo.setSignclosedLogistics(sendbackInfo.getSendbackLogisticsCompany());
         signclosedInfo.setSignclosedLogisticsNumber(sendbackInfo.getSendbackLogisticsNo());
@@ -1740,9 +1741,19 @@ public class CustomerServiceImpl implements CustomerService {
         signclosedInfo.setSignclosedIsReceiving(1); //未签收
         signclosedInfo.setSignclosedCompanyId(cmRelation.getCompanyId());
         signclosedInfo.setSignclosedCustomerId(cmRelation.getCustomerId());
-        if(complaintSignclosedInfoMapper.insert(signclosedInfo) < 1){
-            throw new RuntimeException("添加签收记录失败");
+        //查询是否已存在相同单号
+        if(sendbackInfo.getSendbackLogisticsNo() != null){
+            ComplaintSignclosedInfo sinfo = new ComplaintSignclosedInfo();
+            sinfo.setSignclosedLogisticsNumber(sendbackInfo.getSendbackLogisticsNo());
+            if(complaintSignclosedInfoMapper.listSignclosed(sinfo).size() <= 0){
+                if(complaintSignclosedInfoMapper.insert(signclosedInfo) < 1){
+                    throw new RuntimeException("添加签收记录失败");
+                }
+            }else{
+                throw new RuntimeException("添加签收记录失败,已存在相同物流单号的签收记录!");
+            }
         }
+
         for (SendbackItem info : sendbackItemList){
             info.setSendbackId(sendbackInfo.getSendbackId());
             if(info.getSendbackProdcueNumber() > 0){
@@ -1760,9 +1771,8 @@ public class CustomerServiceImpl implements CustomerService {
             signclosedProductInfo.setSignclosedProductType(productColor.getProductType());
             signclosedProductInfo.setSignclosedId(signclosedInfo.getSignclosedId());
                 complaintSignclosedProductInfoMapper.insert(signclosedProductInfo);
-            /*添加待签收记录 2019年4月11日18:09:34 end*/
-
         }
+        /*添加待签收记录 2019年4月11日18:09:34 end*/
         if(sendbackItemLists.size() > 0){
             Integer msgs = customerService.addSendbackItemList(sendbackItemLists);
             if(msgs < 1){

+ 23 - 3
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/SalesOrderServiceImpl.java

@@ -7,6 +7,7 @@ import com.iamberry.rst.core.cm.FittingsInfo;
 import com.iamberry.rst.core.cm.SalesOrder;
 import com.iamberry.rst.core.cm.SalesOrderItem;
 import com.iamberry.rst.core.cm.StoreInfo;
+import com.iamberry.rst.core.fm.ComplaintDetectInfo;
 import com.iamberry.rst.core.fm.InventoryInfo;
 import com.iamberry.rst.core.fm.InventoryLog;
 import com.iamberry.rst.core.order.*;
@@ -21,6 +22,7 @@ import com.iamberry.rst.faces.order.EfastOrderService;
 import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.service.cm.mapper.FittingsInfoMapper;
 import com.iamberry.rst.service.cm.mapper.SalesOrderMapper;
+import com.iamberry.rst.service.fm.mapper.ComplaintDetectInfoMapper;
 import com.iamberry.rst.service.fm.mapper.InventoryLogMapper;
 import com.iamberry.rst.service.fm.mapper.InventoryMapper;
 import com.iamberry.rst.service.order.mapper.LogisticsInfoMapper;
@@ -76,7 +78,8 @@ public class SalesOrderServiceImpl implements SalesOrderService {
     private InventoryMapper inventoryMapper;
     @Autowired
     private InventoryLogMapper inventoryLogMapper;
-
+    @Autowired
+    private ComplaintDetectInfoMapper complaintDetectInfoMapper;
 
     @Override
     public Integer addSalesOrder(SalesOrder salesOrder) {
@@ -412,14 +415,14 @@ public class SalesOrderServiceImpl implements SalesOrderService {
             }
             //判断主从订单--------------------end
 
-             msg = salesOrderService.addRstOrderinfo(mainOrder,listSalesOrder);
+             msg = salesOrderService.addRstOrderinfo(mainOrder,listSalesOrder,null);
         }
         return msg;
     }
 
     @Override
     @Transactional
-    public boolean addRstOrderinfo(SalesOrder mainOrder,List<SalesOrder> listSalesOrder) {
+    public boolean addRstOrderinfo(SalesOrder mainOrder,List<SalesOrder> listSalesOrder,String[] detectIds) {
          Integer flag = salesOrderMapper.getOrderBySalesDealCodeNum(mainOrder.getSalesDealCode());
         if(flag > 0){
             throw  new RuntimeException("交易号("+ mainOrder.getSalesDealCode() +")重复,请重新生成交易号!");
@@ -462,6 +465,18 @@ public class SalesOrderServiceImpl implements SalesOrderService {
                 }
             }
         }
+        //修为维修记录为已下单
+        if(detectIds != null){
+            if(detectIds.length > 0){
+                for(String detectId : detectIds){
+                    ComplaintDetectInfo detectInfo = new ComplaintDetectInfo();
+                    detectInfo.setDetectId(Integer.valueOf(detectId));
+                    detectInfo.setDetectPlaceorder(2);
+                    detectInfo.setDetectSalesId(mainOrder.getSalesId());
+                    complaintDetectInfoMapper.updateDetectById(detectInfo);
+                }
+            }
+        }
         return true;
     }
 
@@ -1425,4 +1440,9 @@ public class SalesOrderServiceImpl implements SalesOrderService {
         return salesOrderMapper.listSmsTemplateInfo(smsTemplateInfo);
     }
 
+    @Override
+    public SalesOrder getStatusNum() {
+        return salesOrderMapper.getStatusNum();
+    }
+
 }

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

@@ -371,4 +371,9 @@ public interface SalesOrderMapper {
      * 查询售后短信模板
      */
     List<SmsTemplateInfo> listSmsTemplateInfo(SmsTemplateInfo smsTemplateInfo);
+
+    /**
+     * 查询订单各个状态数量
+     */
+    SalesOrder getStatusNum();
 }

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

@@ -298,6 +298,11 @@
     cc.relationId as relationId,
     ri.receivingOne as receivingOne,
     ri.receivingTwo as receivingTwo,
+    cs.stayBackNum as stayBackNum,
+    cs.beenReturnedNum as beenReturnedNum,
+    cs.stayQcConfirmNum as stayQcConfirmNum,
+    cs.placeOrderNum as placeOrderNum,
+    cs.beenOrderedNum as beenOrderedNum,
     cs.beDetected as beDetected,
     cs.beMaintenance as beMaintenance,
     cs.beRefurbished as beRefurbished,
@@ -386,35 +391,25 @@
     GROUP BY
     signclosed_customer_id) ri ON ri.signclosed_customer_id = c.customer_id
     LEFT JOIN (SELECT
-    detect_id,
-    customer_id,
-    COUNT(
-    CASE detect_state
-    WHEN 1 THEN
-    1
-    END
-    ) AS beDetected,
-    COUNT(case detect_state when 31 then 1
-    when 35 then 1
-    end) as beMaintenance,
-    COUNT(case detect_state when 20 then 1
-    end) as beRefurbished,
-    COUNT(case detect_state when 22 then 1
-    end) as beScrapped,
-    COUNT(case detect_state when 30 then 1
-    when 34 then 1 WHEN 38 then 1
-    end) as beContact,
-    COUNT(case detect_state when 32 then 1
-    when 36 then 1
-    end) as completeMaintenanceNum,
-    COUNT(case detect_state when 23 then 1
-    end) as beenScrappedNum,
-    COUNT(case detect_state when 21 then 1
-    end) as beenRenovatedNum
-    FROM
-    tb_rst_complaint_detect
-    GROUP BY
-    customer_id) cs ON cs.customer_id = c.customer_id
+      detect_id,
+      customer_id,
+      sum(case when (detect_state in (33,37) and detect_placeorder = 1) then 1 else 0 end) as stayBackNum,
+      sum(case when (detect_state in (33,37) and detect_placeorder = 2) then 1 else 0 end) as beenReturnedNum,
+      sum(case when (detect_state in (32,36) and maintenance_results = 2) then 1 else 0 end) as stayQcConfirmNum,
+      sum(case when (detect_state in (32,36) and maintenance_results = 1 and detect_placeorder = 1) then 1 else 0 end) as placeOrderNum,
+      sum(case when (detect_state in (32,36) and maintenance_results = 1 and detect_placeorder = 2) then 1 else 0 end) as beenOrderedNum,
+      COUNT(CASE detect_state WHEN 1 THEN 1 END) AS beDetected,
+      COUNT(case detect_state when 31 then 1 when 35 then 1 end) as beMaintenance,
+      COUNT(case detect_state when 20 then 1 end) as beRefurbished,
+      COUNT(case detect_state when 22 then 1 end) as beScrapped,
+      COUNT(case detect_state when 30 then 1 when 34 then 1 WHEN 38 then 1 end) as beContact,
+      COUNT(case detect_state when 32 then 1 when 36 then 1 end) as completeMaintenanceNum,
+      COUNT(case detect_state when 23 then 1 end) as beenScrappedNum,
+      COUNT(case detect_state when 21 then 1 end) as beenRenovatedNum
+      FROM
+      tb_rst_complaint_detect
+      GROUP BY
+      customer_id) cs ON cs.customer_id = c.customer_id
     LEFT JOIN tb_rst_cm_visit v ON v.customer_id = c.customer_id
     LEFT JOIN tb_rst_sales_order_info oi ON cc.orderId = oi.sales_id
     LEFT JOIN tb_rst_cm_question_describe qd ON c.customer_id = qd.customer_id
@@ -427,6 +422,8 @@
     LEFT JOIN tb_rst_sys_admin a ON c.admin_id = a.admin_id
     LEFT JOIN tb_rst_sys_admin sa ON v.designated_admin_id = sa.admin_id
     LEFT JOIN tb_rst_sales_order_info soi ON soi.sales_customer_id = c.customer_id
+    LEFT JOIN tb_rst_complaint_signclosed cs ON cs.signclosed_customer_id = c.customer_id
+    LEFT JOIN tb_rst_complaint_detect cd ON c.customer_id = cd.customer_id
     <where>
       <if test="customerName != null and customerName != ''">
         c.customer_name like CONCAT('%',#{customerName},'%')
@@ -499,6 +496,63 @@
         WHERE DATEDIFF(NOW(), relation_create_time) &gt; 3
         )
       </if>
+      <if test="afterState != null and afterTime != null and afterState == 1">
+        and cs.signclosed_date = #{afterTime}
+      </if>
+      <if test="afterState != null and afterTime != null and afterState == 2">
+        and cs.signclosed_date = #{afterTime}
+      </if>
+      <if test="afterState != null and afterTime != null and afterState == 3">
+        and cs.signclosed_date = #{afterTime}
+      </if>
+      <if test="afterState != null and afterState == 4">
+        and cd.detect_state = 1
+      </if>
+      <if test="afterState != null and afterState == 5">
+        and cd.detect_state in(30,34,38)
+      </if>
+      <if test="afterState != null and afterState == 6">
+        and cd.detect_state in(32,33,36,37)
+      </if>
+      <if test="afterState != null and afterState == 7">
+        and cd.detect_state in(33,37) and cd.detect_placeorder = 1 AND maintenance_results = 1
+      </if>
+      <if test="afterState != null and afterState == 8">
+        and cd.detect_state in(32,36) and cd.detect_placeorder = 1 AND maintenance_results = 1
+      </if>
+      <if test="warehouseDate != null">
+        and cs.signclosed_date = #{warehouseDate}
+      </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 1">
+        and cd.detect_state = 1
+      </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 2">
+        and cd.detect_state in(30,34,38)
+      </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 3">
+        and cd.detect_state in(31,35)
+      </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 4">
+        and cd.detect_state  = 20
+      </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 5">
+        and cd.detect_state  = 22
+      </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 6">
+        and cd.detect_state in(32,36)
+      </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 7">
+        and cd.detect_state = 21
+      </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 8">
+        and cd.detect_state = 23
+      </if>
+      <if test="warehouseDetectState != null and warehouseDetectState == 9">
+          and cd.detect_state in(33,37)
+      </if>
+      <if test="detectPlaceorder != null and detectPlaceorder != ''">
+        and (cd.detect_state = 37 or cc.procTypeId = 3) AND detect_placeorder = #{detectPlaceorder}
+      </if>
     </where>
     GROUP BY c.customer_id
     ORDER BY c.customer_id desc

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

@@ -314,7 +314,7 @@
                 AND sales_company_id = #{salesCompanyId}
             </if>
             <if test="salesId !=null">
-                AND sales_id = #{salesId}
+                    AND sales_id = #{salesId}
             </if>
             <if test="salesOrderId !=null and salesOrderId !=''">
                 AND sales_orderId = #{salesOrderId}
@@ -1733,4 +1733,17 @@
             </if>
         </where>
     </select>
+    <select id="getStatusNum" resultType="SalesOrder">
+        SELECT
+            sum(CASE WHEN sales_status = 0 then 1 else 0 end) AS beConfirmedNum,
+            sum(CASE WHEN sales_post_firm IS NULL then 1 else 0 end) AS distributionLogisticsNum,
+            sum(CASE WHEN sales_shipping_status = 0 then 1 else 0 end) AS sendTheGoods,
+            sum(CASE WHEN sales_shipping_status = 11 then 1 else 0 end) AS playSingle,
+            sum(CASE WHEN sales_deliver = 1 then 1 else 0 end) AS outbound
+        FROM
+            tb_rst_sales_order_info
+        WHERE
+            sales_status != 3
+        AND sales_batch_id != 'KS00000000000001'
+    </select>
 </mapper>

+ 69 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintDetectInfoServiceImpl.java

@@ -9,28 +9,37 @@ import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.sys.Admin;
 import com.iamberry.rst.faces.fm.ComplaintDetectInfoService;
+import com.iamberry.rst.faces.sms.SmsService;
 import com.iamberry.rst.service.cm.mapper.CustomerInfoMapper;
 import com.iamberry.rst.service.cm.mapper.ProcMethodMapper;
 import com.iamberry.rst.service.fm.mapper.ComplaintDetectInfoMapper;
 import com.iamberry.rst.service.fm.mapper.ComplaintMaintenanceInfoMapper;
 import com.iamberry.rst.util.PageUtil;
+import com.iamberry.rst.util.SmsConfig;
 import com.iamberry.wechat.core.entity.AdminUtils;
+import com.iamberry.wechat.tools.ResponseJson;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.text.MessageFormat;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
 @Service
 public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoService {
+    private Logger logger = LoggerFactory.getLogger(ComplaintDetectInfoServiceImpl.class);
     @Autowired
     private ComplaintDetectInfoMapper complaintDetectInfoMapper;
     @Autowired
     private CustomerInfoMapper customerInfoMapper;
     @Autowired
     private ProcMethodMapper procMethodMapper;
+    @Autowired
+    private SmsService smsService;
 
     @Override
     public ComplaintDetectInfo getDetectById(Integer detectId) {
@@ -139,6 +148,7 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
         QcInfo qcInfo = new  QcInfo();
         qcInfo.setDetectId(record.getDetectId());
         qcInfo.setQcIsThrough(record.getMaintenanceResults());
+        qcInfo.setQcInfoDesc(record.getQcDesc());
         complaintDetectInfoMapper.addQcInfo(qcInfo);
         return complaintDetectInfoMapper.updateDetectById(record);
     }
@@ -173,10 +183,27 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
                     }
                     break;
                 default:
+                    String processingResults = "";
+                    String text = "";
                     if(record.getDetectRenovation() == 1){//是否可翻新 1可翻新 2不可翻新
                         record.setDetectState(20);//待翻新入库
+                        processingResults = "维修";
                     }else if(record.getDetectRenovation() == 2){
                         record.setDetectState(22);//不能翻新,待报废
+                        processingResults = "报废";
+                    }
+                    //查询维修编号
+                    ComplaintDetectInfo info = complaintDetectInfoMapper.getDetectById(record.getDetectId());
+                    //客诉状态为换货或退货时完成检测需要短信通知维修人员
+                    if(cmRelation.getProcTypeId() == 2){//换货
+                        text = MessageFormat.format(SmsConfig.CUSTOMER_EXCHANGE, info.getDetectNumber(),processingResults);
+                    }
+                    if(cmRelation.getProcTypeId() == 4){//退货
+                        text = MessageFormat.format(SmsConfig.CUSTOMER_RETURN, info.getDetectNumber(),processingResults);
+                    }
+                    if(cmRelation.getProcTypeId() == 2 || cmRelation.getProcTypeId() == 4){
+                        String result = smsService.sendOtherCMS(SmsConfig.CUSTOMER_PHONE, text);
+                        logger.info("给 " + SmsConfig.CUSTOMER_PHONE + " 手机用户发送短信:" + text+"发送完成检测结果("+processingResults+"):"+result);
                     }
             }
         }
@@ -359,6 +386,28 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
                 log.setRecordDesc(detectInfo.getDetectCustomerDesc());
                 log.setRecordProcessingResults(detectInfo.getDetectProcessingResults());
                 complaintDetectInfoMapper.addTreatmentRecordLog(log);
+                //发送确认短信
+                String results = "";
+                switch (detectInfo.getDetectProcessingResults()){
+                    case 1:
+                        results = "付费维修";
+                        break;
+                    case 2:
+                        results = "免费维修";
+                        break;
+                    case 3:
+                        results = "退货";
+                        break;
+                    case 4:
+                        results = "换货";
+                        break;
+                    case 5:
+                        results = "原机退回";
+                        break;
+                }
+                String text = MessageFormat.format(SmsConfig.CUSTOMER_CONFIRM, detect.getDetectNumber(),results);
+                String result = smsService.sendOtherCMS(SmsConfig.CUSTOMER_PHONE, text);
+                logger.info("给 " + SmsConfig.CUSTOMER_PHONE + " 手机用户发送短信:" + text+"发送结果:"+result);
              return true;
             }
         }catch (Exception e){
@@ -447,5 +496,25 @@ public class ComplaintDetectInfoServiceImpl implements ComplaintDetectInfoServic
         return complaintDetectInfoMapper.listTreatmentRecordLog(detectId);
     }
 
+    @Override
+    public ComplaintAfterSalesNum getCustomerDetectNum(ComplaintDetectInfo detect) {
+        return complaintDetectInfoMapper.getCustomerDetectNum(detect);
+    }
+
+    @Override
+    public Integer updatePrint(ComplaintDetectInfo detectInfo) {
+        return complaintDetectInfoMapper.updateDetectById(detectInfo);
+    }
+
+    @Override
+    public List<ComplaintDetectInfo> listDetectByCustomerId(Integer customerId) {
+        return complaintDetectInfoMapper.listDetectByCustomerId(customerId);
+    }
+
+    @Override
+    public List<ComplaintDetectInfo> listComplaintDetectBySalesId(Integer detectSalesId) {
+        return complaintDetectInfoMapper.listComplaintDetectBySalesId(detectSalesId);
+    }
+
 
 }

+ 99 - 41
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/ComplaintSignclosedInfoServiceImpl.java

@@ -1,6 +1,7 @@
 package com.iamberry.rst.service.fm;
 
 
+import com.auth0.jwt.internal.org.apache.commons.lang3.StringUtils;
 import com.github.pagehelper.PageHelper;
 import com.iamberry.redis.RedisUtils;
 import com.iamberry.rst.core.cm.*;
@@ -10,6 +11,7 @@ import com.iamberry.rst.core.order.ProductColor;
 import com.iamberry.rst.core.page.PageRequest;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.fm.ComplaintSignclosedInfoService;
+import com.iamberry.rst.faces.sms.SmsService;
 import com.iamberry.rst.service.cm.mapper.*;
 import com.iamberry.rst.service.fm.mapper.AwaitingSignclosedProductMapper;
 import com.iamberry.rst.service.fm.mapper.ComplaintDetectInfoMapper;
@@ -18,11 +20,15 @@ import com.iamberry.rst.service.fm.mapper.ComplaintSignclosedProductInfoMapper;
 import com.iamberry.rst.service.product.mapper.ProductMapper;
 import com.iamberry.rst.util.PageUtil;
 import com.iamberry.rst.util.ProduceNoUtil;
+import com.iamberry.rst.util.SmsConfig;
 import net.sf.json.JSONArray;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.text.MessageFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -31,6 +37,7 @@ import java.util.Map;
 
 @Service
 public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedInfoService {
+    private Logger logger = LoggerFactory.getLogger(ComplaintSignclosedInfoServiceImpl.class);
     @Autowired
     private ComplaintSignclosedInfoMapper complaintSignclosedInfoMapper;
     @Autowired
@@ -45,15 +52,39 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
     private ComplaintDetectInfoMapper complaintDetectInfoMapper;
     @Autowired
     private CustomerInfoMapper customerInfoMapper;
+    @Autowired
+    private SmsService smsService;
 
     @Override
     @Transactional
-    public boolean insert(ComplaintSignclosedInfo record,
+    public Integer insert(ComplaintSignclosedInfo record,
                           String orderItemString,String[] componentsImgs) {
-        boolean msg = true;
-        int num = complaintSignclosedInfoMapper.insert(record);
+        Integer msg = 0;
+        int num = 0;
+        //查询是否已存在相同单号
+        if(record.getSignclosedLogisticsNumber() != null){
+            ComplaintSignclosedInfo info = new ComplaintSignclosedInfo();
+            info.setSignclosedLogisticsNumber(record.getSignclosedLogisticsNumber());
+            List<ComplaintSignclosedInfo> sinfoList = complaintSignclosedInfoMapper.listSignclosed(info);
+            if(sinfoList.size() <= 0){
+                num = complaintSignclosedInfoMapper.insert(record);
+                msg = 1;//添加成功
+            }else{
+                //将签收记录改为已签收
+                ComplaintSignclosedInfo complaintSignclosedInfo = sinfoList.get(0);
+                if(complaintSignclosedInfo.getSignclosedIsReceiving() == 1){
+                    complaintSignclosedInfo.setSignclosedIsReceiving(2);
+                    complaintSignclosedInfo.setSignclosedDate(new Date());
+                    complaintSignclosedInfoMapper.updateSignclosedById(complaintSignclosedInfo);
+                    msg = 3;//已存在相同单号的签收信息并修改状态为已签收
+                }else{
+                    msg = 4;//已存在相同单号的已签收信息
+                }
+
+            }
+        }
         if(num < 1){
-            msg = false;
+            return msg;//新增签收失败
         }else{
             if(orderItemString != null){
                 JSONArray jsonArray = JSONArray.fromObject(orderItemString);
@@ -66,7 +97,7 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                             ProductColor productColor = productMapper.getProduceColor(salesOrderItem.getItemColorId());
                             Product product = productMapper.getProduce(productColor.getColorProductId());
                             if(productColor == null){
-                                msg = false;
+                                msg = 2;
                             }
                             signclosedProductInfo.setSignclosedId(record.getSignclosedId());
                             signclosedProductInfo.setProductName(productColor.getProductName());
@@ -117,32 +148,44 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                     }
                 }
             }
+            //关联客诉/判断是否生成客诉信息
+            try {
+                addDetect(record,2);
+            }catch (Exception e){
+                throw new RuntimeException("------------关联客诉出错------------");
+            }
         }
-        //关联客诉/判断是否生成客诉信息
-        try {
-            addDetect(record);
-        }catch (Exception e){
-            throw new RuntimeException("------------关联客诉出错------------");
-        }
-
         return msg;
     }
 
     /**
      * 关联客诉
      * @param record
+     * type 1新增签收 2客服关联客诉
      * @return
      */
-    public int addDetect(ComplaintSignclosedInfo record){
+    public int addDetect(ComplaintSignclosedInfo record,Integer type){
             CustomerInfo customerInfo = new CustomerInfo();
-            if(record.getSignclosedLogisticsNumber() != null){
-                customerInfo.setSendLogisticsNo(record.getSignclosedLogisticsNumber());
-            }
+            List<CustomerInfo> listCustomer = new ArrayList<>();
             if(record.getSignclosedCustomerId() != null){
                 customerInfo.setCustomerId(record.getSignclosedCustomerId());
+                listCustomer = customerInfoMapper.listCustomer(customerInfo);
+            }else if(record.getSignclosedLogisticsNumber() != null){
+                //判断是否是京东
+                if (record.getSignclosedLogisticsNumber().contains("-")){
+                        //截取-前的内容搜索一次
+                    customerInfo.setSendLogisticsNo(StringUtils.substringBefore(record.getSignclosedLogisticsNumber(), "-"));
+                    listCustomer = customerInfoMapper.listCustomer(customerInfo);
+                    if(listCustomer.size() <= 0){//如果没有搜索到数据,则用完整单号搜索
+                        customerInfo.setSendLogisticsNo(record.getSignclosedLogisticsNumber());
+                        listCustomer = customerInfoMapper.listCustomer(customerInfo);
+                    }
+                }else{
+                    customerInfo.setSendLogisticsNo(record.getSignclosedLogisticsNumber());
+                    listCustomer = customerInfoMapper.listCustomer(customerInfo);
+                }
             }
             ComplaintSignclosedInfo sigInfo = complaintSignclosedInfoMapper.getSignclosedById(record.getSignclosedId());
-            List<CustomerInfo> listCustomer = customerInfoMapper.listCustomer(customerInfo);
             boolean m = false;
             if(listCustomer.size() > 0){
                 customerInfo = listCustomer.get(0);
@@ -193,37 +236,47 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
                 Integer msg = complaintSignclosedInfoMapper.updateSignclosedById(signclosedInfo);
 
             if(msg == 1){
-                addDet(record.getSignclosedId());
+                ComplaintSignclosedInfo infos = complaintSignclosedInfoMapper.getSignclosedById(record.getSignclosedId());
                 //判断是否需要生成维修记录
-                /*if(sigInfo.getSignclosedProductInfoList().size() > 0){
-                    for(SignclosedProductInfo productInfo : sigInfo.getSignclosedProductInfoList()){
+                if(infos.getSignclosedProductInfoList().size() > 0) {
+                    for (SignclosedProductInfo productInfo : infos.getSignclosedProductInfoList()) {
                         ProductColor productColor = productMapper.getProduceColor(productInfo.getSignclosedProductColor());
                         Product product = productMapper.getProduce(productColor.getColorProductId());
-                        if(product.getProductIsDetection() == 1){
-                            for (int j = 0;j<productInfo.getProductNum();j++){
-                                //添加待检测信息
-                                //查询签收信息
-                                ComplaintDetectInfo detectInfo = new ComplaintDetectInfo();
-                                detectInfo.setProductId(productColor.getColorProductId());
-                                detectInfo.setProductColorId(productInfo.getSignclosedProductColor());
-                                detectInfo.setDetectProductNumber(product.getProductNumber());
-                                detectInfo.setDetectState(1);
-                                detectInfo.setCustomerId(signclosedInfo.getSignclosedCustomerId());
-                                detectInfo.setIsMaintenance(0);
-                                detectInfo.setDetectRenovation(0);
-                                detectInfo.setDetectProcessingResults(0);
-                                try {
-                                    complaintDetectInfoMapper.insert(detectInfo);
-                                }catch (Exception e){
-                                    throw new RuntimeException("------------生成检测信息出错------------");
+                        if(product.getProductIsDetection() != null){
+                            if (product.getProductIsDetection() == 1) {
+                                for (int j = 0; j < productInfo.getProductNum(); j++) {
+                                    //添加待检测信息
+                                    //查询签收信息
+                                    ComplaintDetectInfo detectInfo = new ComplaintDetectInfo();
+                                    //生成维修编号
+                                    String number = detectNumber();
+                                    detectInfo.setDetectNumber(number);
+                                    detectInfo.setProductId(productColor.getColorProductId());
+                                    detectInfo.setProductColorId(productInfo.getSignclosedProductColor());
+                                    detectInfo.setDetectProductNumber(product.getProductNumber());
+                                    detectInfo.setDetectState(1);
+                                    detectInfo.setCustomerId(infos.getSignclosedCustomerId());
+                                    detectInfo.setIsMaintenance(0);
+                                    detectInfo.setDetectRenovation(0);
+                                    detectInfo.setDetectProcessingResults(0);
+                                    detectInfo.setSignclosedId(infos.getSignclosedId());
+                                    try {
+                                        complaintDetectInfoMapper.insert(detectInfo);
+                                        if(type == 1){//客服关联客诉才发送通知短信
+                                            //发送短信通知维修检测人员
+                                            String text = MessageFormat.format(SmsConfig.CUSTOMER_CONTACT, sigInfo.getSignclosedLogisticsNumber(),number);
+                                            String result = smsService.sendOtherCMS(SmsConfig.CUSTOMER_PHONE, text);
+                                            logger.info("给 " + SmsConfig.CUSTOMER_PHONE + " 手机用户发送短信:" + text+"发送关联客诉通知维修人员:"+result);
+                                        }
+
+                                    } catch (Exception e) {
+                                        throw new RuntimeException("------------生成检测信息出错------------");
+                                    }
                                 }
                             }
                         }
-
                     }
-
-                }*/
-
+                }
             }
         }
         return 1;
@@ -326,6 +379,11 @@ public class ComplaintSignclosedInfoServiceImpl implements ComplaintSignclosedIn
         return complaintSignclosedInfoMapper.delSignclosedBySendbackId(sendbackId);
     }
 
+    @Override
+    public Integer getSignclosedDay(ComplaintSignclosedInfo complaintSignclosedInfo) {
+        return complaintSignclosedInfoMapper.getSignclosedDay(complaintSignclosedInfo);
+    }
+
     private Integer addSifnclosed(Map<String,Integer> Map,Integer signclosedId) {
         Integer msg = 0;
         for (Map.Entry<String, Integer> entry : Map.entrySet()) {

+ 18 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintDetectInfoMapper.java

@@ -146,5 +146,23 @@ public interface ComplaintDetectInfoMapper {
      */
     List<TreatmentRecordLog> listTreatmentRecordLog(Integer detectId);
 
+    /**
+     * 查询检测数量
+     * @return
+     */
+    ComplaintAfterSalesNum getCustomerDetectNum(ComplaintDetectInfo detect);
+
+    /**
+     * 已完成维修、原机退货,并且发货状态为待下单的维修记录,则需要查询当前客诉对应的维修机器
+     * @return
+     */
+    List<ComplaintDetectInfo> listDetectByCustomerId(Integer customerId);
+
+    /**
+     * 查询订单关联的维修
+     * @return
+     */
+    List<ComplaintDetectInfo> listComplaintDetectBySalesId(Integer detectSalesId);
+
 
 }

+ 6 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/ComplaintSignclosedInfoMapper.java

@@ -4,6 +4,7 @@ import com.iamberry.rst.core.fm.ComplaintSignclosedImg;
 import com.iamberry.rst.core.fm.ComplaintSignclosedInfo;
 import com.iamberry.rst.core.fm.SignclosedProductInfo;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -61,4 +62,9 @@ public interface ComplaintSignclosedInfoMapper {
      * @return
      */
     Integer delSignclosedBySendbackId(Integer sendbackId);
+    /**
+     * 查询某一天的签收数据
+     * @return
+     */
+    Integer getSignclosedDay(ComplaintSignclosedInfo complaintSignclosedInfo);
 }

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

@@ -38,48 +38,41 @@
       cd.signclosed_id signclosedId,
       pi.product_name productName,
       ci.color_name colorName,
-      cci.customer_create_time customerCreateTime,
+      c.customer_create_time customerCreateTime,
 	  oi.sales_pay_time salesPayTime,
 	  cpm.proc_method_name procMethodName,
       cpt.proc_type_name procTypeName,
+      cpt.proc_type_id procTypeId,
       oi.sales_pay_time AS salesTime,
       ap.province signclosedAddrProvincesName,
       ac.city signclosedAddrCityName,
       ad.district signclosedAddrAreaName,
-      cs.signclosed_date signclosedDate
+      cs.signclosed_date signclosedDate,
+      cs.signclosed_logistics_number logisticsNumber,
+      cd.detect_is_print detectIsPrint,
+      cd.detect_print_time detectPrintTime,
+      cd.detect_placeorder detectPlaceorder,
+      cd.detect_completion_time detectCompletionTime,
+      cd.maintenance_completion_time maintenanceCompletionTime,
+      cd.renovation_completion_time renovationCompletionTime,
+      cd.scrap_completion_time scrapCompletionTime
     from tb_rst_complaint_detect cd
     LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
     LEFT JOIN tb_rst_product_color ci on cd.product_color_id = ci.color_id
-    LEFT JOIN tb_rst_cm_customer_info cci on cci.customer_id = cd.customer_id
     LEFT JOIN tb_rst_cm_relation cr ON cd.customer_id = cr.customer_id
     LEFT JOIN tb_rst_cm_proc_method cpm ON cr.proc_method_id = cpm.proc_method_id
     LEFT JOIN tb_rst_cm_proc_type cpt ON cpm.proc_type_id = cpt.proc_type_id
     LEFT JOIN tb_rst_cm_customer_info c ON cd.customer_id = c.customer_id
     LEFT JOIN tb_rst_complaint_signclosed cs ON cs.signclosed_id = cd.signclosed_id
-    LEFT JOIN (
-    SELECT
-    xx.*
-    FROM
-    (
-    SELECT
-    tb_rst_cm_proc_method.proc_type_id AS customerIsSolve,
-    tb_rst_cm_relation.relation_id AS relationId,
-    customer_id AS customerIds,
-    tb_rst_cm_relation_order.sales_id AS orderId
-    FROM
-    tb_rst_cm_relation
-    LEFT JOIN tb_rst_cm_proc_method ON tb_rst_cm_proc_method.proc_method_id = tb_rst_cm_relation.proc_method_id
-    LEFT JOIN tb_rst_cm_proc_type ON tb_rst_cm_proc_type.proc_type_id = tb_rst_cm_proc_method.proc_type_id
-    LEFT JOIN tb_rst_cm_relation_order ON tb_rst_cm_relation_order.relation_id = tb_rst_cm_relation.relation_id
-    ) xx
-    ) cc ON cc.customerIds = c.customer_id
-    LEFT JOIN tb_rst_sales_order_info oi ON cc.orderId = oi.sales_id
+    LEFT JOIN tb_rst_cm_relation_order ro ON ro.relation_customer_id = c.customer_id
+    LEFT JOIN tb_rst_sales_order_info oi ON ro.sales_id = oi.sales_id
     LEFT JOIN tb_rst_address_province ap ON cs.signclosed_addr_provinces = ap.province_id
     LEFT JOIN tb_rst_address_city ac ON cs.signclosed_addr_city = ac.city_id
     LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
+    LEFT JOIN tb_rst_sys_admin sa on c.admin_id = sa.admin_id
     where detect_id = #{detectId,jdbcType=INTEGER}
-    GROUP BY cci.customer_id
+    GROUP BY c.customer_id
   </select>
   <select id="listComplaintDetect" resultType="ComplaintDetectInfo" parameterType="ComplaintDetectInfo" >
     select
@@ -117,6 +110,7 @@
     cd.complete_cut_time completeCutTime,
     qd.describe_title questionTitle,
     pi.product_name productName,
+    pi.product_abbreviation productAbbreviation,
     pt.type_name productTypeName,
     ci.color_name colorName,
     cpm.proc_method_name procMethodName,
@@ -126,7 +120,19 @@
     ac.city signclosedAddrCityName,
     ad.district signclosedAddrAreaName,
     cs.signclosed_date signclosedDate,
-    c.customer_create_time customerCreateTime
+    c.customer_create_time customerCreateTime,
+    cs.signclosed_logistics_number logisticsNumber,
+    cd.detect_is_print detectIsPrint,
+    cd.detect_print_time detectPrintTime,
+    cs.signclosed_send_name signclosedName,
+    cd.detect_placeorder detectPlaceorder,
+    cd.detect_completion_time detectCompletionTime,
+    cd.maintenance_completion_time maintenanceCompletionTime,
+    cd.renovation_completion_time renovationCompletionTime,
+    cd.scrap_completion_time scrapCompletionTime,
+    qd.describe_content describeContent,
+    qd.describe_handle_desc describeHandleDesc,
+    sa.admin_name adminName
     from tb_rst_complaint_detect cd
     LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
     LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
@@ -137,27 +143,12 @@
     LEFT JOIN tb_rst_cm_proc_type cpt ON cpm.proc_type_id = cpt.proc_type_id
     LEFT JOIN tb_rst_cm_customer_info c ON cd.customer_id = c.customer_id
     LEFT JOIN tb_rst_complaint_signclosed cs ON cs.signclosed_id = cd.signclosed_id
-    LEFT JOIN (
-    SELECT
-    xx.*
-    FROM
-    (
-    SELECT
-    tb_rst_cm_proc_method.proc_type_id AS customerIsSolve,
-    tb_rst_cm_relation.relation_id AS relationId,
-    customer_id AS customerIds,
-    tb_rst_cm_relation_order.sales_id AS orderId
-    FROM
-    tb_rst_cm_relation
-    LEFT JOIN tb_rst_cm_proc_method ON tb_rst_cm_proc_method.proc_method_id = tb_rst_cm_relation.proc_method_id
-    LEFT JOIN tb_rst_cm_proc_type ON tb_rst_cm_proc_type.proc_type_id = tb_rst_cm_proc_method.proc_type_id
-    LEFT JOIN tb_rst_cm_relation_order ON tb_rst_cm_relation_order.relation_id = tb_rst_cm_relation.relation_id
-    ) xx
-    ) cc ON cc.customerIds = c.customer_id
-    LEFT JOIN tb_rst_sales_order_info oi ON cc.orderId = oi.sales_id
+    LEFT JOIN tb_rst_cm_relation_order ro ON ro.relation_customer_id = c.customer_id
+    LEFT JOIN tb_rst_sales_order_info oi ON ro.sales_id = oi.sales_id
     LEFT JOIN tb_rst_address_province ap ON cs.signclosed_addr_provinces = ap.province_id
     LEFT JOIN tb_rst_address_city ac ON cs.signclosed_addr_city = ac.city_id
     LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
+    LEFT JOIN tb_rst_sys_admin sa on c.admin_id = sa.admin_id
     <where>
       <if test="productTypeId != null" >
         AND pt.type_id = #{productTypeId,jdbcType=INTEGER}
@@ -205,7 +196,61 @@
         AND cd.detect_processing_results = #{detectProcessingResults}
       </if>
       <if test="detectNumber != null and detectNumber != ''" >
-        AND cd.detect_number = #{detectNumber}
+        AND cd.detect_number like CONCAT('%',#{detectNumber},'%')
+      </if>
+      <if test="logisticsNumber != null and logisticsNumber != ''" >
+        AND cs.signclosed_logistics_number = #{logisticsNumber}
+      </if>
+      <if test="signclosedDate != null and signclosedDate != ''" >
+        AND cs.signclosed_date = #{signclosedDate}
+      </if>
+      <if test="startTime != null and startTime != ''" >
+        AND cd.detect_create_time &gt; #{startTime}
+      </if>
+      <if test="endTime != null and endTime != ''" >
+        AND cd.detect_create_time  &lt; #{endTime}
+      </if>
+      <if test="todayTime != null and todayTime != ''" >
+        AND to_days(cd.detect_create_time) = to_days(now())
+      </if>
+      <if test="detectIsPrint != null and detectIsPrint != ''" >
+        AND cd.detect_is_print  = #{detectIsPrint}
+      </if>
+      <if test="status != null and status == 1">
+        and cd.detect_state = 1
+      </if>
+      <if test="status != null and status == 2">
+        and cd.detect_state in(30,34,38)
+      </if>
+      <if test="status != null and status == 3">
+        and cd.detect_state in(31,35)
+      </if>
+      <if test="status != null and status == 4">
+        and cd.detect_state  = 20
+      </if>
+      <if test="status != null and status == 5">
+        and cd.detect_state  = 22
+      </if>
+      <if test="status != null and status == 6">
+        and cd.detect_state in(32,36)
+      </if>
+      <if test="status != null and status == 7">
+        and cd.detect_state = 21
+      </if>
+      <if test="status != null and status == 8">
+        and cd.detect_state = 23
+      </if>
+      <if test="status != null and status == 9">
+          and cd.detect_state in(33,37)
+      </if>
+      <if test="signclosedName != null and signclosedName != ''">
+        and cs.signclosed_send_name  like CONCAT('%',#{signclosedName},'%')
+      </if>
+      <if test="detectPlaceorder != null and detectPlaceorder != ''">
+        and cd.detect_placeorder  = #{detectPlaceorder}
+      </if>
+      <if test="detectSalesId != null and detectSalesId != ''">
+        and cd.detect_sales_id  = #{detectSalesId}
       </if>
     </where>
       GROUP BY cd.detect_id
@@ -291,7 +336,31 @@
           detect_number = #{detectNumber,jdbcType=VARCHAR},
       </if>
       <if test="completeCutTime != null and completeCutTime != ''" >
-        complete_cut_time = #{completeCutTime,jdbcType=VARCHAR}
+        complete_cut_time = #{completeCutTime,jdbcType=VARCHAR},
+      </if>
+      <if test="detectIsPrint != null and detectIsPrint != ''" >
+        detect_is_print = #{detectIsPrint,jdbcType=INTEGER},
+      </if>
+      <if test="detectPrintTime != null and detectPrintTime != ''" >
+        detect_print_time = #{detectPrintTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="detectPlaceorder != null and detectPlaceorder != ''" >
+        detect_placeorder = #{detectPlaceorder,jdbcType=INTEGER},
+      </if>
+      <if test="detectSalesId != null and detectSalesId != ''" >
+        detect_sales_id = #{detectSalesId,jdbcType=INTEGER},
+      </if>
+      <if test="detectCompletionTime != null and detectCompletionTime != ''" >
+        detect_completion_time = #{detectCompletionTime},
+      </if>
+      <if test="maintenanceCompletionTime != null and maintenanceCompletionTime != ''" >
+        maintenance_completion_time = #{maintenanceCompletionTime},
+      </if>
+      <if test="renovationCompletionTime != null and renovationCompletionTime != ''" >
+        renovation_completion_time = #{renovationCompletionTime},
+      </if>
+      <if test="scrapCompletionTime != null and scrapCompletionTime != ''" >
+        scrap_completion_time = #{scrapCompletionTime}
       </if>
     </set>
     where
@@ -473,11 +542,12 @@
     INSERT INTO tb_rst_fm_qc_info (
         qc_is_through,
         detect_id,
-        qc_create_time
+        qc_create_time,
+        qc_info_desc
     )
     VALUES
         (
-            #{qcIsThrough},#{detectId},NOW())
+            #{qcIsThrough},#{detectId},NOW(),#{qcInfoDesc})
   </insert>
   <select id="listQcInfo" parameterType="Integer" resultType="QcInfo">
     SELECT
@@ -510,4 +580,134 @@
     WHERE
     rl.detect_id = #{detectId}
   </select>
+
+    <select id="getCustomerDetectNum" parameterType="ComplaintDetectInfo" resultType="ComplaintAfterSalesNum">
+        SELECT
+            sum(CASE WHEN detect_state = 1 then 1 else 0 end) AS beDetected,
+            sum(CASE WHEN detect_state in(30,34,38) then 1 else 0 end) AS beConfirmed,
+            sum(CASE WHEN detect_state in(32,33,36,37) then 1 else 0 end) AS completeProcessing,
+            sum(CASE WHEN (detect_state = 37 and detect_placeorder = 1 AND maintenance_results = 1) then 1 else 0 end) AS placeOrderNum,
+            sum(CASE WHEN (detect_state in(32,36) and detect_placeorder = 1 AND maintenance_results = 1) then 1 else 0 end) AS detectplaceOrderNum
+        FROM
+            tb_rst_complaint_detect cd
+        LEFT JOIN tb_rst_cm_customer_info ci ON ci.customer_id = cd.customer_id
+        <where>
+            <if test="adminId != null and adminId != ''" >
+                AND ci.admin_id = #{adminId}
+            </if>
+        </where>
+    </select>
+
+
+  <!--已完成维修、原机退货,并且发货状态为待下单的维修记录,则需要查询当前客诉对应的维修机器-->
+  <select id="listDetectByCustomerId" parameterType="Integer" resultType="ComplaintDetectInfo">
+        select
+        cd.detect_id detectId,
+        cd.product_id productId,
+        cd.product_color_id productColorId,
+        cd.detect_product_number detectProductNumber,
+        cd.detect_state detectState,
+        cd.detect_phenomenon detectPhenomenon,
+        cd.detect_classification detectClassification,
+        cd.detect_failure_cause detectFailureCause,
+        cd.signclosed_id signclosedId,
+        cd.detect_results detectResults,
+        cd.detect_point detectPoint,
+        cd.detect_nalysis detectNalysis,
+        cd.detect_content detectContent,
+        cd.customer_id customerId,
+        cd.is_maintenance isMaintenance,
+        cd.detect_desc detectDesc,
+        cd.detect_date detectDate,
+        cd.detect_create_time detectCreateTime,
+        cd.detect_update_time detectUpdateTime,
+        cd.detect_offer detectOffer,
+        cd.detect_renovation detectRenovation,
+        cd.detect_processing_results detectProcessingResults,
+        cd.detect_customer_desc detectCustomerDesc,
+        cd.detect_production detectProduction,
+        cd.detect_fuselage_barcode detectFuselageBarcode,
+        cd.detect_film_type detectFilmType,
+        cd.detect_float_type detectFloatType,
+        cd.detect_version_number detectVersionNumber,
+        cd.detect_is_refurbishing detectIsRefurbishing,
+        cd.maintenance_results maintenanceResults,
+        cd.detect_number detectNumber,
+        cd.complete_cut_time completeCutTime,
+        qd.describe_title questionTitle,
+        pi.product_name productName,
+        pi.product_abbreviation productAbbreviation,
+        pt.type_name productTypeName,
+        ci.color_name colorName,
+        cpm.proc_method_name procMethodName,
+        cpt.proc_type_name procTypeName,
+        oi.sales_pay_time AS salesTime,
+        ap.province signclosedAddrProvincesName,
+        ac.city signclosedAddrCityName,
+        ad.district signclosedAddrAreaName,
+        cs.signclosed_date signclosedDate,
+        c.customer_create_time customerCreateTime,
+        cs.signclosed_logistics_number logisticsNumber,
+        cd.detect_is_print detectIsPrint,
+        cd.detect_print_time detectPrintTime,
+        cs.signclosed_send_name signclosedName,
+        cd.detect_placeorder detectPlaceorder
+        from tb_rst_complaint_detect cd
+        LEFT JOIN tb_rst_product_info pi ON cd.product_id = pi.product_id
+        LEFT JOIN tb_rst_cm_question_describe qd on cd.customer_id = qd.customer_id
+        LEFT JOIN tb_rst_product_type pt on pi.product_type = pt.type_id
+        LEFT JOIN tb_rst_product_color ci on cd.product_color_id = ci.color_id
+        LEFT JOIN tb_rst_cm_relation cr ON cd.customer_id = cr.customer_id
+        LEFT JOIN tb_rst_cm_proc_method cpm ON cr.proc_method_id = cpm.proc_method_id
+        LEFT JOIN tb_rst_cm_proc_type cpt ON cpm.proc_type_id = cpt.proc_type_id
+        LEFT JOIN tb_rst_cm_customer_info c ON cd.customer_id = c.customer_id
+        LEFT JOIN tb_rst_complaint_signclosed cs ON cs.signclosed_id = cd.signclosed_id
+        LEFT JOIN tb_rst_cm_relation_order ro ON ro.relation_customer_id = c.customer_id
+        LEFT JOIN tb_rst_sales_order_info oi ON ro.sales_id = oi.sales_id
+        LEFT JOIN tb_rst_address_province ap ON cs.signclosed_addr_provinces = ap.province_id
+        LEFT JOIN tb_rst_address_city ac ON cs.signclosed_addr_city = ac.city_id
+        LEFT JOIN tb_rst_address_district ad on ad.district_id = cs.signclosed_addr_area
+        WHERE
+            cd.customer_id = #{customerId}
+        AND detect_state in (32,36,37) AND maintenance_results = 1 AND detect_placeorder = 1
+  </select>
+
+
+  <select id="listComplaintDetectBySalesId" resultType="ComplaintDetectInfo" parameterType="Integer" >
+    select
+    cd.detect_id detectId,
+    cd.product_id productId,
+    cd.product_color_id productColorId,
+    cd.detect_product_number detectProductNumber,
+    cd.detect_state detectState,
+    cd.detect_phenomenon detectPhenomenon,
+    cd.detect_classification detectClassification,
+    cd.detect_failure_cause detectFailureCause,
+    cd.signclosed_id signclosedId,
+    cd.detect_results detectResults,
+    cd.detect_point detectPoint,
+    cd.detect_nalysis detectNalysis,
+    cd.detect_content detectContent,
+    cd.customer_id customerId,
+    cd.is_maintenance isMaintenance,
+    cd.detect_desc detectDesc,
+    cd.detect_date detectDate,
+    cd.detect_create_time detectCreateTime,
+    cd.detect_update_time detectUpdateTime,
+    cd.detect_offer detectOffer,
+    cd.detect_renovation detectRenovation,
+    cd.detect_processing_results detectProcessingResults,
+    cd.detect_customer_desc detectCustomerDesc,
+    cd.detect_production detectProduction,
+    cd.detect_fuselage_barcode detectFuselageBarcode,
+    cd.detect_film_type detectFilmType,
+    cd.detect_float_type detectFloatType,
+    cd.detect_version_number detectVersionNumber,
+    cd.detect_is_refurbishing detectIsRefurbishing,
+    cd.maintenance_results maintenanceResults,
+    cd.detect_number detectNumber,
+    cd.complete_cut_time completeCutTime
+    from tb_rst_complaint_detect cd
+    where  cd.detect_sales_id  = #{detectSalesId}
+  </select>
 </mapper>

+ 21 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/fm/mapper/complaintSignclosedInfoMapper.xml

@@ -150,7 +150,7 @@
         AND cs.signclosed_send_tel like CONCAT('%',#{signclosedSendTel},'%')
       </if>
       <if test="signclosedLogisticsNumber != null and signclosedLogisticsNumber != ''" >
-        AND cs.signclosed_logistics_number = #{signclosedLogisticsNumber}
+        AND cs.signclosed_logistics_number like CONCAT('%',#{signclosedLogisticsNumber},'%')
       </if>
       <if test="signclosedCustomerId != null " >
         AND cs.signclosed_customer_id = #{signclosedCustomerId}
@@ -161,6 +161,9 @@
       <if test="signclosedIsReceiving != null and signclosedIsReceiving != ''" >
         AND cs.signclosed_is_receiving = #{signclosedIsReceiving}
       </if>
+      <if test="signclosedDate != null and signclosedDate != ''" >
+        AND cs.signclosed_date = #{signclosedDate}
+      </if>
     </where>
     order by cs.signclosed_create_time DESC
   </select>
@@ -297,4 +300,21 @@
   <delete id="delSignclosedBySendbackId" parameterType="Integer">
     DELETE FROM tb_rst_complaint_signclosed WHERE sendback_id = #{sendbackId}
   </delete>
+
+  <select id="getSignclosedDay" parameterType="ComplaintSignclosedInfo" resultType="Integer">
+      SELECT count(*) from tb_rst_complaint_signclosed cs
+      LEFT JOIN tb_rst_cm_customer_info ci ON cs.signclosed_customer_id = ci.customer_id
+      <where>
+          signclosed_is_receiving = 2
+          <if test="date != null and date != ''" >
+              AND cs.signclosed_date = #{date}
+          </if>
+          <if test="adminId != null and adminId != ''" >
+              AND ci.admin_id = #{adminId}
+          </if>
+        <if test="isBinding != null and isBinding == 1" >
+          AND cs.signclosed_customer_id is NULL
+        </if>
+      </where>
+  </select>
 </mapper>

+ 12 - 0
watero-rst-service/src/main/java/com/iamberry/rst/util/SmsConfig.java

@@ -72,6 +72,13 @@ public class SmsConfig {
     /* 扫描牙刷二维码访问地址 */
     public static String scanningQrCode="";
 
+    /* 客服确认售后处理结果短信模板及手机号 */
+    public static String CUSTOMER_CONFIRM="";
+    public static String CUSTOMER_PHONE="";
+    public static String CUSTOMER_EXCHANGE="";
+    public static String CUSTOMER_RETURN="";
+    public static String CUSTOMER_CONTACT="";
+
 
 
 
@@ -120,6 +127,11 @@ public class SmsConfig {
             REMIND_POSTAGE_PENDING=pro.getProperty("REMIND_POSTAGE_PENDING");
 
             scanningQrCode=pro.getProperty("scanningQrCode");
+            CUSTOMER_CONFIRM=pro.getProperty("CUSTOMER_CONFIRM");
+            CUSTOMER_PHONE=pro.getProperty("CUSTOMER_PHONE");
+            CUSTOMER_EXCHANGE=pro.getProperty("CUSTOMER_EXCHANGE");
+            CUSTOMER_RETURN=pro.getProperty("CUSTOMER_RETURN");
+            CUSTOMER_CONTACT=pro.getProperty("CUSTOMER_CONTACT");
         } catch (Exception e) {
             e.printStackTrace();
         }

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

@@ -1,9 +1,11 @@
 package com.iamberry.rst.controllers.cm;
 
+import com.iamberry.redis.RedisUtils;
 import com.iamberry.rst.core.address.City;
 import com.iamberry.rst.core.address.District;
 import com.iamberry.rst.core.address.Province;
 import com.iamberry.rst.core.cm.*;
+import com.iamberry.rst.core.fm.ComplaintAfterSalesNum;
 import com.iamberry.rst.core.fm.ComplaintDetectInfo;
 import com.iamberry.rst.core.fm.ComplaintSignclosedInfo;
 import com.iamberry.rst.core.fm.ComplaintSmallClassInfo;
@@ -479,6 +481,39 @@ public class AdminCustomerController {
             Integer adminId = AdminUtils.getLoginAdminId();
             customerInfo.setAdminId(adminId);
         }*/
+        //获取登录人id
+        Integer loginAdminId = AdminUtils.getLoginAdminId();
+        if(customerInfo != null){
+            if(customerInfo.getAfterState() != null) {
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+                Calendar date = Calendar.getInstance();
+                date.setTime(new Date());
+                switch (customerInfo.getAfterState()) {
+                    case 1:
+                        //今日签收
+                        customerInfo.setAfterTime(sdf.format(date.getTime()));
+                        break;
+                    case 2:
+                        //昨日签收
+                        date.set(Calendar.DATE, date.get(Calendar.DATE) - 1);
+                        customerInfo.setAfterTime(sdf.format(date.getTime()));
+                        break;
+                    case 3:
+                        //前日签收
+                        date.set(Calendar.DATE, date.get(Calendar.DATE) - 2);
+                        customerInfo.setAfterTime(sdf.format(date.getTime()));
+                        break;
+                    }
+                    String isOneself = request.getParameter("isOneself");
+                    if(isOneself != null){
+                        if(isOneself.equals("2")){
+                            customerInfo.setAdminId(loginAdminId);
+                        }
+                    }
+                }
+
+         }
+
         PagedResult<CustomerInfo> pagedResult = customerService.listCustomer(pageNO, pageSize, customerInfo, totalNum == 0);
         if (totalNum != 0) {
             pagedResult.setTotal(totalNum);
@@ -512,8 +547,7 @@ public class AdminCustomerController {
         admin.setAdminStatus(1);
         List<Admin> adminList = sysService.listSelectAdmin(admin);
 
-        //获取登录人id
-        Integer loginAdminId = AdminUtils.getLoginAdminId();
+
         mv.addObject("complaintSmallClassInfoList", complaintSmallClassInfoList);
         mv.addObject("loginAdminId", loginAdminId);
         mv.addObject("typeList", typeList);
@@ -624,6 +658,9 @@ public class AdminCustomerController {
                 ci.setCustomerDistrictName("");
             }
         }
+        //已完成维修、原机退货,并且发货状态为待下单的维修记录,则需要查询当前客诉对应的维修机器
+        List<ComplaintDetectInfo> listDetet = complaintDetectInfoService.listDetectByCustomerId(Integer.valueOf(customerId));
+        rj.addResponseKeyValue("listDetet", listDetet);
         rj.addResponseKeyValue("cmRelation", cmRelation);
         rj.addResponseKeyValue("procMethod", procMethod);
         rj.addResponseKeyValue("customerCommon", map.get("customerCommon"));
@@ -2527,5 +2564,82 @@ public class AdminCustomerController {
         rj.addResponseKeyValue("informationInfo",informationInfo);
         return rj;
     }
+
+    /**
+     * 查询签收/检测数量
+     * @param request
+     * @param isOneself 1全部  2只看自己
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping("/get_afterSalesNum")
+    public ResponseJson getAfterSalesNum(HttpServletRequest request,Integer isOneself){
+        ResponseJson rj = new ResponseJson(200, "查询成功", 200);
+        ComplaintAfterSalesNum complaintAfterSalesNum = new ComplaintAfterSalesNum();
+        //获取登录人id
+        Integer loginAdminId = AdminUtils.getLoginAdminId();
+        if(isOneself == null){
+            //查询缓存数据
+            String redisIsOneself = RedisUtils.get("CUSTOMER"+loginAdminId);
+            if(redisIsOneself == null){
+                RedisUtils.put("CUSTOMER"+loginAdminId,1);//新增缓存为查询全部
+                isOneself = 1;
+            }else{
+                isOneself = Integer.valueOf(redisIsOneself);
+            }
+        }else if(isOneself == 1){
+            RedisUtils.put("CUSTOMER"+loginAdminId,1);//更新缓存
+        }else if(isOneself == 2){
+            RedisUtils.put("CUSTOMER"+loginAdminId,2);//更新缓存
+        }
+
+        ComplaintDetectInfo detect = new ComplaintDetectInfo();
+        ComplaintSignclosedInfo signclosed = new ComplaintSignclosedInfo();
+        if (isOneself == 2) {
+            detect.setAdminId(loginAdminId);
+            signclosed.setAdminId(loginAdminId);
+        }
+        /*查询维修数据 state*/
+        ComplaintAfterSalesNum afterSalesNum = complaintDetectInfoService.getCustomerDetectNum(detect);
+        if(afterSalesNum == null){
+            complaintAfterSalesNum.setBeDetected(0);
+            complaintAfterSalesNum.setBeConfirmed(0);
+            complaintAfterSalesNum.setCompleteProcessing(0);
+            complaintAfterSalesNum.setPlaceOrderNum(0);
+            complaintAfterSalesNum.setDetectplaceOrderNum(0);
+        }else{
+            complaintAfterSalesNum.setBeDetected(afterSalesNum.getBeDetected());
+            complaintAfterSalesNum.setBeConfirmed(afterSalesNum.getBeConfirmed());
+            complaintAfterSalesNum.setCompleteProcessing(afterSalesNum.getCompleteProcessing());
+            complaintAfterSalesNum.setPlaceOrderNum(afterSalesNum.getPlaceOrderNum());
+            complaintAfterSalesNum.setDetectplaceOrderNum(afterSalesNum.getDetectplaceOrderNum());
+        }
+        /*查询维修数据 end*/
+        /*查询签收数据 state*/
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Calendar date = Calendar.getInstance();
+        date.setTime(new Date());
+        //今日签收
+        signclosed.setDate(sdf.format(date.getTime()));
+        Integer s1 = complaintSignclosedInfoService.getSignclosedDay(signclosed);
+        complaintAfterSalesNum.setTodaysignNum(complaintSignclosedInfoService.getSignclosedDay(signclosed));
+
+        //昨日签收
+        date.set(Calendar.DATE, date.get(Calendar.DATE) - 1);
+        signclosed.setDate(sdf.format(date.getTime()));
+        complaintAfterSalesNum.setYesterdaysignNum(complaintSignclosedInfoService.getSignclosedDay(signclosed));
+        //前日签收
+        date.set(Calendar.DATE, date.get(Calendar.DATE) - 1);
+        signclosed.setDate(sdf.format(date.getTime()));
+        complaintAfterSalesNum.setBeforedaysignNum(complaintSignclosedInfoService.getSignclosedDay(signclosed));
+        //待联系
+        signclosed.setIsBinding(1);
+        signclosed.setDate(null);
+        complaintAfterSalesNum.setContactNum(complaintSignclosedInfoService.getSignclosedDay(signclosed));
+        /*查询签收数据 end*/
+        rj.addResponseKeyValue("complaintAfterSalesNum",complaintAfterSalesNum);
+        rj.addResponseKeyValue("isOneself",isOneself);
+        return rj;
+    }
 }
 

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

@@ -37,6 +37,7 @@ import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
@@ -101,12 +102,14 @@ public class AdminDetectController {
     @RequiresPermissions("detect:select:detect")
     @RequestMapping("/select_detect_list")
     public ModelAndView selectDetectList(HttpServletRequest request,
-                                         @RequestParam(value = "pageSize", defaultValue = "5", required = false) Integer pageSize,
+                                         @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
                                          @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
                                          @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum,
-                                         ComplaintDetectInfo detect) {
+                                         ComplaintDetectInfo detect) throws ParseException {
 
         ModelAndView mv = new ModelAndView("cm/inspection/detect_list");
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         // 封装请求数据
         PageRequest<ComplaintDetectInfo> pageRequest = new PageRequest<>(detect, pageNO, pageSize, totalNum == 0);
         // 查询订单列表
@@ -269,6 +272,10 @@ public class AdminDetectController {
         List<MaterialItem> listMaterialItem = complaintDetectInfoService.listMaterialItem(Integer.valueOf(detectId));
         List<QcInfo> listQcInfo = complaintDetectInfoService.listQcInfo(Integer.valueOf(detectId));
         List<TreatmentRecordLog> listTreatmentRecordLog = complaintDetectInfoService.listTreatmentRecordLog(Integer.valueOf(detectId));
+        if(detectinfo.getDetectSalesId() != null){
+            SalesOrder salesOrder = salesOrderService.getSalesOrderById(detectinfo.getDetectSalesId());
+            mv.addObject("salesOrder",salesOrder);
+        }
         mv.addObject("listTreatmentRecordLog",listTreatmentRecordLog);
         mv.addObject("listQcInfo",listQcInfo);
         mv.addObject("listMaterialItem",listMaterialItem);
@@ -470,6 +477,14 @@ public class AdminDetectController {
         }
         String[] configli6 = request.getParameterValues("configli6");
         detectInfo.setConfigli6(configli6);
+        if(detectInfo.getDetectState() != null){
+            if(detectInfo.getDetectState() == 32 || detectInfo.getDetectState() == 36 ){
+                detectInfo.setMaintenanceCompletionTime(new Date());
+            }
+            if(detectInfo.getDetectState() == 21 ){
+                detectInfo.setRenovationCompletionTime(new Date());
+            }
+        }
         Integer num = complaintDetectInfoService.updateDetectContent(detectInfo);
 
         if (num < 1) {
@@ -652,6 +667,7 @@ public class AdminDetectController {
         detectInfo.setConfigli3(configli3);
         detectInfo.setConfigli4(configli4);
         detectInfo.setConfigli5(configli5);
+        detectInfo.setDetectCompletionTime(new Date());
         Integer num = complaintDetectInfoService.updateDetectById(detectInfo,componentsImgs);
         if (num < 1) {
             msg.setResultCode(500);
@@ -886,20 +902,21 @@ public class AdminDetectController {
                 area.append("-"+detect.getSignclosedAddrCityName());
             }
             row.createCell(5).setCellValue(area.toString());
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
             if(detect.getSignclosedDate()==null){
                 row.createCell(6).setCellValue( "");
             }else{
-                row.createCell(6).setCellValue(detect.getSignclosedDate());
+                row.createCell(6).setCellValue(sdf.format(detect.getSignclosedDate()));
             }
             if(detect.getSalesTime()==null){
-                row.createCell(7).setCellValue( "");
+                row.createCell(7).setCellValue("");
             }else{
-                row.createCell(7).setCellValue(detect.getSalesTime());
+                row.createCell(7).setCellValue(sdf.format(detect.getSalesTime()));
             }
             if(detect.getCustomerCreateTime()==null){
                 row.createCell(8).setCellValue("");
             }else{
-                row.createCell(8).setCellValue(detect.getCustomerCreateTime());
+                row.createCell(8).setCellValue(sdf.format(detect.getCustomerCreateTime()));
             }
 
             row.createCell(9).setCellValue(detect.getProcTypeName()==null?"":detect.getProcTypeName());
@@ -960,5 +977,220 @@ public class AdminDetectController {
                 bos.close();
         }
     }
+
+    /**
+     * 进入导出每日检测页面
+     */
+    @RequestMapping(value = "/to_download_detection")
+    public ModelAndView toDownloadDetection(HttpServletRequest request) {
+        ModelAndView mv = new ModelAndView("cm/inspection/download_detection");
+        return mv;
+    }
+
+    /**
+     * 导出维修信息
+     * @param request
+     * @param res
+     * @param detectInfo
+     * @throws Exception
+     */
+    @RequestMapping("/download_detection")
+    public void downloadDetection(HttpServletRequest request,HttpServletResponse res
+            , ComplaintDetectInfo detectInfo) throws Exception{
+        //根据id查询订单数据
+        if((detectInfo.getStartTime() == null || detectInfo.getStartTime().equals("")) && (detectInfo.getEndTime() == null  || detectInfo.getEndTime().equals(""))){
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            Calendar date = Calendar.getInstance();
+            date.setTime(new Date());
+            detectInfo.setTodayTime(sdf.format(date.getTime()));
+        }
+        List<ComplaintDetectInfo> detectList = complaintDetectInfoService.listComplaintDetect(detectInfo);
+        /*if (detectList == null || detectList.size() == 0) {
+            return;
+        }*/
+        String[] cells = {
+                "维修编号","快递单号","产品简称","产品颜色","生产月份","机身条码",
+                "退货地区","返厂日期","售后处理类型","工厂检测现象","是否翻新机","厚膜类型","浮子类型","版本号","检测日期"
+        };
+        exportExcel2(request,res,cells,detectList);
+    }
+    /**
+     * 导出订单Excel并下载
+     * @param request
+     * @param res
+     * @param cells
+     * @param detectList
+     * @throws Exception
+     */
+    public void exportExcel2(HttpServletRequest request,HttpServletResponse res,
+                            String[] cells,List<ComplaintDetectInfo> detectList) throws Exception {
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        //创建一个workbook,对应一个Excel文件
+        HSSFWorkbook wb = new HSSFWorkbook();
+        //在workbook中添加一个sheet,对应Excel中的一个sheet
+        HSSFSheet sheet = wb.createSheet("导出维修");
+        //在sheet中添加表头第0行,老版本poi对excel行数列数有限制short
+        HSSFRow row = sheet.createRow((int) 0);
+        //创建单元格,设置值表头,设置表头居中
+        HSSFCellStyle style = wb.createCellStyle();
+        //居中格式
+        style.setAlignment(HSSFCellStyle.ALIGN_CENTER);
+        //设置表头
+
+        if (cells == null || cells.length == 0) {
+            return;
+        }
+        //循环设置表头
+        HSSFCell cell = null;
+        for (int i = 0;i < cells.length;i++) {
+            String name = cells[i];
+            cell = row.createCell(i);
+            cell.setCellValue(name);
+            cell.setCellStyle(style);
+        }
+        for (int i = 0; i < detectList.size(); i++) {
+            row = sheet.createRow((int) i + 1);
+            ComplaintDetectInfo detect = detectList.get(i);
+            String detectFilmType = "";
+            if(detect.getDetectFilmType() != null){
+                switch (detect.getDetectFilmType()) {
+                    case 1:detectFilmType = "圆";break;
+                    case 2:detectFilmType = "扁";break;
+                }
+            }
+            String detectIsRefurbishing = "";
+            if(detect.getDetectIsRefurbishing() != null){
+                switch (detect.getDetectIsRefurbishing()) {
+                    case 1:detectIsRefurbishing = "是";break;
+                    case 2:detectIsRefurbishing = "否";break;
+                }
+            }
+            String detectFloatType = "";
+            if(detect.getDetectFloatType() != null){
+                switch (detect.getDetectFloatType()) {
+                    case 1:detectFloatType = "长";break;
+                    case 2:detectFloatType = "短";break;
+                }
+            }
+            // 创建单元格,设置值
+            row.createCell(0).setCellValue(detect.getDetectNumber()==null?"":detect.getDetectNumber());
+            row.createCell(1).setCellValue(detect.getLogisticsNumber()==null?"":detect.getLogisticsNumber());
+            row.createCell(2).setCellValue(detect.getProductAbbreviation()==null?"":detect.getProductAbbreviation());
+            row.createCell(3).setCellValue(detect.getColorName()==null?"":detect.getColorName());
+            row.createCell(4).setCellValue(detect.getDetectProduction()==null?"":detect.getDetectProduction());
+            row.createCell(5).setCellValue(detect.getDetectFuselageBarcode()==null?"":detect.getDetectFuselageBarcode());
+            StringBuffer area = new StringBuffer(" ");
+            if(detect.getSignclosedAddrProvincesName() == null || detect.getSignclosedAddrProvincesName().equals("")){
+                area.append("");
+            }else{
+                area.append(detect.getSignclosedAddrProvincesName());
+            }
+            if(detect.getSignclosedAddrCityName() == null || detect.getSignclosedAddrCityName().equals("")){
+                area.append("");
+            }else{
+                area.append("-"+detect.getSignclosedAddrCityName());
+            }
+            row.createCell(6).setCellValue(area.toString());
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            if(detect.getSignclosedDate()==null){
+                row.createCell(7).setCellValue( "");
+            }else{
+                row.createCell(7).setCellValue(sdf.format(detect.getSignclosedDate()));
+            }
+            /*row.createCell(9).setCellValue(detect.getProcTypeName()==null?"":detect.getProcTypeName());*/
+            row.createCell(8).setCellValue(detect.getProcMethodName()==null?"":detect.getProcMethodName());
+            row.createCell(9).setCellValue(detect.getDetectPhenomenon()==null?"":detect.getDetectPhenomenon());
+            row.createCell(10).setCellValue(detectIsRefurbishing);
+            row.createCell(11).setCellValue(detectFilmType);
+            row.createCell(12).setCellValue(detectFloatType);
+            row.createCell(13).setCellValue(detect.getDetectVersionNumber()==null?"":detect.getDetectVersionNumber());
+            if(detect.getDetectPrintTime()==null){
+                row.createCell(14).setCellValue( "");
+            }else{
+                row.createCell(14).setCellValue(sdf.format(detect.getDetectPrintTime()));
+            }
+        }
+        //下载导出订单Excel
+        downloadOrderExcel(res,wb);
+    }
+
+    /**
+     * 修改打印状态
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/update_print")
+    public ResponseJson updatePrint(HttpServletRequest request,ComplaintDetectInfo complaintDetectInfo){
+        ResponseJson msg = new ResponseJson();
+        if(complaintDetectInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        complaintDetectInfo.setDetectIsPrint(2);
+        complaintDetectInfo.setDetectPrintTime(new Date());
+        Integer num = complaintDetectInfoService.updatePrint(complaintDetectInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
+
+    /**
+     * 修改报废状态
+     *
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "/update_scrap")
+    public ResponseJson updateScrap(HttpServletRequest request,ComplaintDetectInfo complaintDetectInfo){
+        ResponseJson msg = new ResponseJson();
+        if(complaintDetectInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        complaintDetectInfo.setScrapCompletionTime(new Date());
+        Integer num = complaintDetectInfoService.updatePrint(complaintDetectInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }
+
+    /**
+     * 修改是否下单状态
+     *
+     * @return
+     */
+    /*@ResponseBody
+    @RequestMapping(value = "/update_placeorder")
+    public ResponseJson updatePlaceorder(HttpServletRequest request,ComplaintDetectInfo complaintDetectInfo){
+        ResponseJson msg = new ResponseJson();
+        if(complaintDetectInfo == null){
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+            return msg;
+        }
+        Integer num = complaintDetectInfoService.updatePrint(complaintDetectInfo);
+        if (num < 1) {
+            msg.setResultCode(500);
+            msg.setReturnCode(500);
+        } else {
+            msg.setResultCode(200);
+            msg.setReturnCode(200);
+        }
+        return msg;
+    }*/
+
 }
 

+ 4 - 13
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminSignclosedController.java

@@ -52,8 +52,6 @@ public class AdminSignclosedController {
     private LogisticsInfoService logisticsInfoService;
     @Autowired
     private CompanyInfoService companyInfoService;
-    @Autowired
-    private ComplaintSignclosedProductInfoService complaintSignclosedProductInfoService;
 
     /**
      * 跳转到添加签收记录页面
@@ -189,16 +187,9 @@ public class AdminSignclosedController {
         }
         signclosedInfo.setSignclosedCreateTime(new Date());
         signclosedInfo.setSignclosedIsReceiving(2);
-        boolean num = complaintSignclosedInfoService.insert(signclosedInfo,orderItemString,componentsImgs);
-
-
-        if (!num) {
-            msg.setResultCode(200);
-            msg.setReturnCode(500);
-        } else {
-            msg.setResultCode(200);
-            msg.setReturnCode(200);
-        }
+        Integer num = complaintSignclosedInfoService.insert(signclosedInfo,orderItemString,componentsImgs);
+        msg.setResultCode(200);
+        msg.setReturnCode(num);
         return msg;
     }
 
@@ -449,7 +440,7 @@ public class AdminSignclosedController {
             return msg;
         }
 
-        int num = complaintSignclosedInfoService.addDetect(signclosedInfo);
+        int num = complaintSignclosedInfoService.addDetect(signclosedInfo,1);
         if (num < 1) {
             msg.setResultCode(500);
             msg.setReturnCode(500);

+ 0 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/log/LogAopHandler.java

@@ -39,8 +39,6 @@ public class LogAopHandler {
      */
     public Object doSaveLog(ProceedingJoinPoint joinPoint) throws Throwable {
 
-        System.out.println("日日日日-----------------------------");
-
         // 获取Reqest
         RequestAttributes requestAttributes = RequestContextHolder.currentRequestAttributes();
         if (requestAttributes == null) {

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

@@ -1054,7 +1054,7 @@ public class AdminOrderController {
 //                        }
 //                        sb.append(salesDealCode+"\r\n");
 //                    }
-                    bl = salesOrderService.addRstOrderinfo(salesOrders,new ArrayList<SalesOrder>());
+                    bl = salesOrderService.addRstOrderinfo(salesOrders,new ArrayList<SalesOrder>(),null);
                 }catch (RuntimeException e){
                     logger.info("插入订单失败;错误信息" + e.getMessage());
                     for(EfastOrder efastOrderStyle:orderEfasts){

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

@@ -1,6 +1,7 @@
 package com.iamberry.rst.controllers.order;
 
 import com.iamberry.rst.core.cm.*;
+import com.iamberry.rst.core.fm.ComplaintDetectInfo;
 import com.iamberry.rst.core.fm.InventoryInfo;
 import com.iamberry.rst.core.fm.InventoryLog;
 import com.iamberry.rst.core.order.*;
@@ -10,6 +11,7 @@ import com.iamberry.rst.core.tools.LogisticsInfo;
 import com.iamberry.rst.faces.cm.CompanyInfoService;
 import com.iamberry.rst.faces.cm.SalesOrderService;
 import com.iamberry.rst.faces.cm.StoreInfoService;
+import com.iamberry.rst.faces.fm.ComplaintDetectInfoService;
 import com.iamberry.rst.faces.order.EfastOrderService;
 import com.iamberry.rst.faces.order.LogisticsInfoService;
 import com.iamberry.rst.faces.order.OrderBatchService;
@@ -113,10 +115,12 @@ public class AdminSalesOrderController {
         List<LogisticsInfo> logisticsInfoList = logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
         salesOrder.setSalesOrderItemList(null);
         List<ProductColor> productColorList = productService.listproductAndColor(productColor);
+        SalesOrder orderNum = salesOrderService.getStatusNum();//查询订单各个状态数量
         StitchAttrUtil.getSa()
                 .addDatePro("yyyy-MM-dd HH:mm:ss","startDate","endDate")
                 .setModelAndView(salesOrder, mv, "/admin/salesOrder/list_order_page", pagedResult);
 
+        mv.addObject("orderNum",orderNum);
         mv.addObject("listStoreInfo",listStoreInfo);
         mv.addObject("logisticsInfoList",logisticsInfoList);
         mv.addObject("identity",identity);
@@ -756,6 +760,8 @@ public class AdminSalesOrderController {
         if(salesOrder.getSalesAddressTel() != null && !"".equals(salesOrder.getSalesAddressTel())){
             salesOrder.setSalesAddressTel(salesOrder.getSalesAddressTel().trim());
         }
+        //获取选中的售后维修记录
+        String[] detectIds = request.getParameterValues("detectId");
 
         Admin admin = AdminUtils.getLoginAdmin();
         ResponseJson rj = new ResponseJson();
@@ -830,7 +836,7 @@ public class AdminSalesOrderController {
         String errorMsg = "";
         try {
            // bl = salesOrderService.addRstOrderAndIteminfo(salesOrder);
-            bl = salesOrderService.addRstOrderinfo(salesOrder,new ArrayList<SalesOrder>());
+            bl = salesOrderService.addRstOrderinfo(salesOrder,new ArrayList<SalesOrder>(),detectIds);
         }catch (Exception e){
             errorMsg = e.getMessage();
             e.printStackTrace();
@@ -838,6 +844,8 @@ public class AdminSalesOrderController {
         }
         if(bl){
             return new ResponseJson(200, "添加订单成功,订单交易号为:"+ salesOrder.getSalesDealCode(), 200);
+
+
         }else{
             return  new ResponseJson(500, "添加订单失败,失败原因:"+errorMsg, 500);
         }

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

@@ -2,6 +2,7 @@ package com.iamberry.rst.controllers.order;
 
 import com.alibaba.fastjson.JSONObject;
 import com.iamberry.rst.core.cm.*;
+import com.iamberry.rst.core.fm.ComplaintDetectInfo;
 import com.iamberry.rst.core.fm.InventoryInfo;
 import com.iamberry.rst.core.fm.InventoryLog;
 import com.iamberry.rst.core.order.*;
@@ -10,6 +11,7 @@ import com.iamberry.rst.core.pts.PtsBatch;
 import com.iamberry.rst.core.sys.Admin;
 import com.iamberry.rst.core.tools.LogisticsInfo;
 import com.iamberry.rst.faces.cm.*;
+import com.iamberry.rst.faces.fm.ComplaintDetectInfoService;
 import com.iamberry.rst.faces.order.LogisticsInfoService;
 import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.utils.AdminUtils;
@@ -65,6 +67,8 @@ public class AwaitSendController {
     private InventoryService inventoryService;
     @Autowired
     private InventoryLogService inventoryLogService;
+    @Autowired
+    private ComplaintDetectInfoService complaintDetectInfoService;
     private static final Logger LOGGER = LoggerFactory.getLogger(AwaitSendController.class);
 
 
@@ -106,6 +110,9 @@ public class AwaitSendController {
                 SalesOrderItem item = new SalesOrderItem();
                 item.setItemOrderId(temp.getSalesId());
                 temp.setSalesOrderItemList(salesOrderService.listSalesOrderItem(item));
+                //查询封装维修编号
+                List<ComplaintDetectInfo> listDetect  = complaintDetectInfoService.listComplaintDetectBySalesId(temp.getSalesId());
+                temp.setComplaintDetectInfoList(listDetect);
             }
         }
         int errorOrderNum = 0;
@@ -227,6 +234,13 @@ public class AwaitSendController {
                                    HttpServletRequest request) {
         // 检查订单状态
         SalesOrder salesOrderInfo = salesOrderService.getSalesOrderById(salesId);
+        if(salesOrderInfo != null){
+            //查询封装售后维修编号
+            List<ComplaintDetectInfo> listDetect  = complaintDetectInfoService.listComplaintDetectBySalesId(salesId);
+            salesOrderInfo.setComplaintDetectInfoList(listDetect);
+        }
+
+
         if (salesOrderInfo.getSalesShippingStatus() != 11) {
             return ResponseJson.getFAILURE().addResponseKeyValue("error","订单状态非通知配货,无法打印");
         }
@@ -332,6 +346,20 @@ public class AwaitSendController {
             }
             Goodsquantity += temp.getItemNum();
         }
+        // 20190603增加需求:产品名称后面增加售后维修编号
+        if(salesOrderInfo.getComplaintDetectInfoList() != null && salesOrderInfo.getComplaintDetectInfoList().size() > 0){
+            goodName.append("<br>【维修编号:");
+           for(int i = 0; i< salesOrderInfo.getComplaintDetectInfoList().size();i++ ){
+               ComplaintDetectInfo detectInfo = salesOrderInfo.getComplaintDetectInfoList().get(i);
+               if( i == 0){
+                   goodName.append(detectInfo.getDetectNumber());
+               }else{
+                   goodName.append(","+detectInfo.getDetectNumber());
+               }
+           }
+           goodName.append("】");
+        }
+
         // 20181113增加需求:产品名称后面增加打印订单日期
         goodName.append("【D").append(DateTimeUtil.format(new Date(), "MMdd")).append("】");
         String uuid = UUIDGenerator.getUUID().substring(0, 8);

+ 5 - 1
watero-rst-web/src/main/resources/platform.properties

@@ -62,7 +62,11 @@ ADD_CUSTOMER_SUCCESS_YULIA=\u3010YULIA\u51C0\u6C34\u673A\u3011\u5C0A\u656C\u7684
 ADD_CUSTOMER_SUCCESS_AIBERLE=\u3010\u7231\u8D1D\u6E90\u3011\u5C0A\u656C\u7684\u5BA2\u6237\u60A8\u597D\uFF0C\u5DF2\u6536\u5230\u60A8\u7684\u552E\u540E\u7533\u8BF7\uFF0C\u6211\u4EEC\u6B63\u79EF\u6781\u5904\u7406\uFF0C\u5904\u7406\u65B9\u5F0F\u4E3A\uFF1A{0}\uFF0C\u795D\u60A8\u751F\u6D3B\u6109\u5FEB\uFF08{1}\uFF09
 
 REMIND_POSTAGE_PENDING=\u3010\u7231\u8D1D\u6E90RST\u3011\u60A8\u6709{0}\u4E2A\u90AE\u8D39\u7533\u8BF7\u5F85\u5904\u7406\uFF0C\u8BF7\u5C3D\u5FEB\u524D\u5F80RST\u7CFB\u7EDF\u5904\u7406
-
+CUSTOMER_CONFIRM=\u3010\u7231\u8d1d\u6e90RST\u3011{0}\u5ba2\u670d\u5df2\u7ecf\u786e\u8ba4\uff0c\u6b64\u673a\u5668\u5df2\u7ecf\u786e\u8ba4{1}
+CUSTOMER_PHONE=15207170059
+CUSTOMER_EXCHANGE=\u3010\u7231\u8d1d\u6e90RST\u3011{0}\u8bf7\u5f00\u59cb{1}\uff0c\u6b64\u4e3a\u6362\u8d27\u673a\u5668\uff0c\u8bf7\u5f00\u59cb\u5904\u7406\uff1b
+CUSTOMER_RETURN=\u3010\u7231\u8d1d\u6e90RST\u3011{0}\u8bf7\u5f00\u59cb{1}\uff0c\u6b64\u4e3a\u9000\u8d27\u673a\u5668\uff0c\u8bf7\u5f00\u59cb\u5904\u7406\uff1b
+CUSTOMER_CONTACT=\u3010\u7231\u8d1d\u6e90RST\u3011{0}\u5ba2\u670d\u5df2\u7ecf\u786e\u8ba4\uff0c\u7ef4\u4fee\u7f16\u53f7\u4e3a{1}\uff0c\u8bf7\u6253\u5370\u6b64\u673a\u5668\u7ef4\u4fee\u5361\u5e76\u5f00\u59cb\u68c0\u6d4b\uff1b
 #---SMS end---#
 
 # token

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

@@ -119,6 +119,7 @@
 		<typeAlias type="com.iamberry.rst.core.fm.MaterialItem" alias="MaterialItem"/>
 		<typeAlias type="com.iamberry.rst.core.fm.QcInfo" alias="QcInfo"/>
 		<typeAlias type="com.iamberry.rst.core.fm.TreatmentRecordLog" alias="TreatmentRecordLog"/>
+		<typeAlias type="com.iamberry.rst.core.fm.ComplaintAfterSalesNum" alias="ComplaintAfterSalesNum"/>
 
 		<typeAlias type="com.iamberry.rst.core.sys.SysConfig" alias="SysConfig"/>
 		<typeAlias type="com.iamberry.rst.core.sys.SystemLogs" alias="SystemLogs"/>

+ 2 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/base/add_base.ftl

@@ -13,6 +13,7 @@
 <link rel="stylesheet" type="text/css" href="${path}/common/static/h-ui.admin/css/style.css" />
 <link rel="stylesheet" type="text/css" href="${path}/common/lib/Validform/Validform.css" />
 <link rel="stylesheet" type="text/css" href="${path}/common/css/iconfont/iconfont.css" />
+<link rel="stylesheet" type="text/css" href="${path}/common/static/chosen/css/chosen.css" />
 <!--[if IE 6]>
 <script type="text/javascript" src="${path}/common/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
 <script>DD_belatedPNG.fix('*');</script>
@@ -25,6 +26,7 @@
 <script type="text/javascript" src="${path}/common/lib/jquery.validation/1.14.0/validate-methods.js"></script>
 <script type="text/javascript" src="${path}/common/lib/jquery.validation/1.14.0/messages_zh.js"></script>
 <script type="text/javascript" src="${path}/common/lib/Validform/Validform_v5.3.2.js"></script>
+<script type="text/javascript" src="${path}/common/static/chosen/js/chosen.jquery.js"></script>
 
 <script type="text/javascript">
     var root_path = "${path}";

File diff suppressed because it is too large
+ 110 - 18
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_list.ftl


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

@@ -833,7 +833,7 @@
                                                     <#--<#if info.signclosedProductType == 1 >
                                                         <span class="label label-success radius" 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" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件</span><br>
+                                                        <span class="label label-success radius" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''}-${info.colorName!''} x ${info.productNum!''}件</span><br>
                                                     <#--</#if>-->
                                                     </#list>
                                                 <#else >
@@ -901,7 +901,7 @@
                         <table class="table table-border table-bg table-bordered" >
                             <thead>
                             <tr>
-                                <th>检测id</th>
+                                <th>维修编号</th>
                                 <th>当前状态</th>
                                 <th>产品</th>
                                 <th>是否有故障</th>
@@ -917,7 +917,7 @@
                                 <#list detectList as detect>
                                 <tr>
                                 <#--<td class="text-c" width="100">${detect.customerId!}</td>-->
-                                    <td class="text-c" width="100">${detect.detectId!''}</td>
+                                    <td class="text-c" width="100">${detect.detectNumber!''}</td>
                                     <td class="text-c" width="100" id="detectState${(detect.detectId)!}">
                                         <#if detect.detectState == 1>
                                             待检测机器
@@ -1364,7 +1364,7 @@
                             layer.msg("添加成功!",{icon: 1,time:1000});
 
                     } else {
-                        layer.msg("添加失败!",{icon: 5,time:1000});
+                        layer.msg("添加失败,核查快递单号是否重复!",{icon: 5,time:1000});
                     }
                 },
                 error: function(XmlHttpRequest, textStatus, errorThrown){

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

@@ -42,6 +42,12 @@
                     <label for="tel-b2">不通过</label>
                 </div>
             </div>
+            <div class="formControls col-12 col-sm-12">
+                <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;备注</strong>
+                <div class="radio-box">
+                    <textarea style="height: 60px;margin: 10px 0px 10px 0px;width: 100%;" name="qcDesc" id="qcDesc" class="my-textarea" placeholder="请填写QC备注信息!"></textarea>
+                </div>
+            </div>
         </div>
         <#--<div style="text-align:center;">
             <span>如果转入生产,则生产部门同事可查看!</span>

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

@@ -200,7 +200,7 @@
             <label class="form-label col-3 col-sm-3 huanhang"  style="text-align: right;">备注信息:</label>
             <div class="formControls col-xs-9 col-sm-9">
                 <div class="radio-box">
-                    <textarea rows="3" style="width: 500px;margin-left: -15px;margin-top: 8px;" cols="20" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!"></textarea>
+                    <textarea rows="3" style="width: 500px;margin-left: -15px;margin-top: 8px;" cols="20" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请输入备注!"></textarea>
                 </div>
             </div>
         </div>

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

@@ -33,9 +33,9 @@
         <div class="input-box"   style="text-align:center;">
             <span class="input-dic spanhidth">备注</span>
             <#if detectItem??>
-                <textarea rows="5" cols="20" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectItem.detectItemDesc!''}</textarea>
+                <textarea rows="5" cols="20" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请输入备注!">${detectItem.detectItemDesc!''}</textarea>
             <#else>
-                <textarea rows="5" cols="20" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!"></textarea>
+                <textarea rows="5" cols="20" name="detectItemDesc" id="detectItemDesc" class="my-textarea" placeholder="请输入备注!"></textarea>
             </#if>
         </div>
         <#--<div style="text-align:center;">

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

@@ -130,7 +130,7 @@
                 <label class="form-label col-3 col-sm-3 huanhang"  style="text-align: right;">备注:</label>
                 <div class="formControls col-xs-9 col-sm-9">
                     <div class="radio-box" style="padding: 0px; width: 100%;">
-                        <textarea  style="height: 60px;"  name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!">${detectInfo.detectDesc!''}</textarea>
+                        <textarea  style="height: 60px;"  name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请输入备注">${detectInfo.detectDesc!''}</textarea>
                     </div>
                 </div>
             </div>

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

@@ -85,7 +85,7 @@
                 <th width="10">产品名称:</th>
                 <td width="10" style="font-weight: normal;"><span>${detectinfo.productName!''}(${detectinfo.colorName!''})</span></td>
             </tr>
-            <tr>
+            <#--<tr>
                 <th width="10">是否可翻新:</th>
                 <td width="10" style="font-weight: normal;">
                 <#if detectinfo.detectRenovation == 1>
@@ -103,7 +103,7 @@
                     无故障
                 </#if>
                 </span></td>
-            </tr>
+            </tr>-->
             <tr>
                 <th width="10">当前状态:</th>
                 <td width="10" style="font-weight: normal;"><span>
@@ -114,7 +114,7 @@
                             待用户确认
                         </#if>
                         <#if detectinfo.detectState == 31>
-                            <span class="c-red">待维修</span>
+                            <span class="c-red">待维修<#if detectinfo.completeCutTime??>(${detectinfo.completeCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
                         </#if>
                         <#if detectinfo.detectState == 32>
                             <span class="c-success">维修完成</span>
@@ -126,7 +126,7 @@
                             待客服确认维修
                         </#if>
                         <#if detectinfo.detectState == 35>
-                            <span class="c-red">待维修</span>
+                            <span class="c-red">待维修<#if detectinfo.completeCutTime??>(${detectinfo.completeCutTime?string("yyyy/MM/dd")}前完成)</#if></span>
                         </#if>
                         <#if detectinfo.detectState == 36>
                             <span class="c-success">维修完成</span>
@@ -151,8 +151,25 @@
                         </#if>
                 </span></td>
                 <td width="10"></td>
+                <th width="10">签收日期:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.signclosedDate??>${(detectinfo.signclosedDate?string("yyyy-MM-dd"))!''}<#else>-</#if></span></td>
+                <#--<td width="10"></td>
                 <th width="10">维修报价:</th>
-                <td width="10" style="font-weight: normal;"><span><#if detectinfo.detectOffer??>${detectinfo.detectOffer/100}<#else>-</#if></span></td>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.detectOffer??>${detectinfo.detectOffer/100}<#else>-</#if></span></td>-->
+            </tr>
+            <tr>
+                <th width="10">寄回区域:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.signclosedAddrProvincesName??>${detectinfo.signclosedAddrProvincesName!''}</#if>-<#if detectinfo.signclosedAddrCityName??>${detectinfo.signclosedAddrCityName!''}</#if>-<#if detectinfo.signclosedAddrCityName??>${detectinfo.signclosedAddrCityName!''}</#if></span></td>
+                <td width="10"></td>
+                <th width="10">物流单号:</th>
+                <td width="10" style="font-weight: normal;"><span>${detectinfo.logisticsNumber!''}</span></td>
+            </tr>
+            <tr>
+                <th width="10">客诉处理:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.customerId??>${detectinfo.procTypeName!''}-${detectinfo.procMethodName!''}</#if></span></td>
+                <td width="10"></td>
+                <th width="10">购买时间:</th>
+                <td width="10" style="font-weight: normal;"><span><#if detectinfo.signclosedDate??>${(detectinfo.salesTime?string("yyyy-MM-dd HH:mm:ss"))!''}<#else>-</#if></span></td>
             </tr>
             <tr>
                 <th width="10">生产月份:</th>
@@ -237,8 +254,12 @@
                 <th width="10">客服备注:</th>
                 <td width="10" style="font-weight: normal;"><span>${detectinfo.detectCustomerDesc!''}</span></td>
                 <td width="10"></td>
-                <th width="10"></th>
-                <td width="10" style="font-weight: normal;"><span></span></td>
+                <th width="10">是否下单:</th>
+                <td width="10" style="font-weight: normal;"><span>
+                <#if detectinfo.procTypeId??><#if detectinfo.procTypeId == 3 || detectinfo.detectState == 37><#if detectinfo.detectPlaceorder??>
+                    <#if detectinfo.detectPlaceorder == 1>未下单</#if>
+                    <#if detectinfo.detectPlaceorder == 2>已下单</#if>
+                </#if></#if></#if></span></td>
             </tr>
             </thead>
         </table>
@@ -327,12 +348,14 @@
         <table class="table table-border table-bg table-bordered" style="margin-top: 10px;">
             <tr class="text-c">
                 <th>是否通过</th>
+                <th>QC备注</th>
                 <th>操作时间</th>
             </tr>
                     <#if listQcInfo?? &&  (listQcInfo?size > 0) >
                         <#list listQcInfo as item>
                             <tr class="text-c">
                                 <td><#if item.qcIsThrough == 1>通过</#if><#if item.qcIsThrough == 2>不通过</#if></td>
+                                <td><#if item.qcInfoDesc??>${item.qcInfoDesc!''}</#if></td>
                                 <td>${item.qcCreateTime?string("yyyy/MM/dd HH:mm:ss")}</td>
                             </tr>
                         </#list>

File diff suppressed because it is too large
+ 80 - 45
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/detect_list.ftl


File diff suppressed because it is too large
+ 64 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/download_detection.ftl


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

@@ -122,7 +122,8 @@
         <div class="input-box">
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">检测现象:</label>
             <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                <select id="configSelect1" name="configSelect1" class="my-select" style="width: 93%;">
+                <select id="configSelect1" name="configSelect1" class="chosen" style="width: 93%;">
+                    <option value="">请选择检测现象</option>
                     <#if (config1?size > 0)>
                             <#list config1 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -153,7 +154,8 @@
         <div class="input-box">
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">故障原因:</label>
             <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                <select id="configSelect2" name="configSelect2" class="my-select" style="width: 93%;">
+                <select id="configSelect2" name="configSelect2" class="chosen" style="width: 93%;">
+                    <option value="">请选择故障原因</option>
                     <#if (config2?size > 0)>
                             <#list config2 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -187,7 +189,8 @@
         <div class="input-box">
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">判定结果:</label>
             <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                <select id="configSelect3" name="configSelect3" class="my-select" style="width: 93%;">
+                <select id="configSelect3" name="configSelect3" class="chosen" style="width: 93%;">
+                    <option value="">请选择判定结果</option>
                     <#if (config3?size > 0)>
                             <#list config3 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -221,7 +224,8 @@
         <div class="input-box">
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">故障指向:</label>
             <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                <select id="configSelect4" name="configSelect4" class="my-select" style="width: 93%;">
+                <select id="configSelect4" name="configSelect4" class="chosen" style="width: 93%;">
+                    <option value="">请选择故障指向</option>
                     <#if (config4?size > 0)>
                             <#list config4 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -255,7 +259,8 @@
         <div class="input-box">
             <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">原因分析:</label>
             <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                <select id="configSelect5" name="configSelect5" class="my-select" style="width: 93%;">
+                <select id="configSelect5" name="configSelect5" class="chosen" style="width: 93%;">
+                    <option value="">请选择原因分析</option>
                     <#if (config5?size > 0)>
                             <#list config5 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -285,13 +290,13 @@
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectNalysis!''}" name="detectNalysis" id="detectNalysis"  placeholder="请输入原因分析"/>
             </div>
         </div>-->
-        <div class="input-box">
+        <#--<div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">故障分类:</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="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>-->
+            &lt;#&ndash;<textarea style="margin-left: 0%;width: 83%;" rows="2" cols="20" name="detectClassification" id="detectClassification" class="my-textarea" placeholder="请输入故障分类">${detectInfo.detectClassification!''}</textarea>&ndash;&gt;
                 <input class="my-input" style="width: 90%;" type="text" value="${detectInfo.detectClassification!''}" name="detectClassification" id="detectClassification"  placeholder="请输入故障分类"/>
             </div>
-        </div>
+        </div>-->
     <#--    <div class="input-box">
             <label class="col-3 col-sm-3 huanhang" style="text-align: right;margin: 10px 0px;">检测内容:</label>
             <div class="formControls col-xs-9 col-sm-9 skin-minimal huanhang" style="margin: 10px 0px;">
@@ -317,7 +322,7 @@
             <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="detectDesc" id="detectDesc" class="my-textarea" placeholder="请填写备注信息!">${detectInfo.detectDesc!''}</textarea>
                 </div>
             </div>
         </div>
@@ -361,17 +366,19 @@
         var name = $("#configSelect1 option:selected").text();
         var id = $('#configSelect1').val();
         var bl = true;
-        $("input[name='configli1']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != "") {
+            $("input[name='configli1']").each(function (j, item) {
+                var s = $(item).val();
+                if (s === id) {
+                    bl = false;
+                }
+            });
+            if (bl) {
+                $("#configui1").append('<li class="b-close" id="configDetele1">' +
+                        ' <input type="hidden" value="' + id + '" name="configli1">' + name +
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl){
-            $("#configui1").append('<li class="b-close" id="configDetele1">' +
-                    ' <input type="hidden" value="'+id+'" name="configli1">' +name+
-                    '<span class="my-close" onclick="deleteli(this)"></span>' +
-                    '</li>');
         }
 
     });
@@ -380,17 +387,19 @@
         var name = $("#configSelect2 option:selected").text();
         var id = $('#configSelect2').val();
         var bl = true;
-        $("input[name='configli2']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != "") {
+            $("input[name='configli2']").each(function (j, item) {
+                var s = $(item).val();
+                if (s === id) {
+                    bl = false;
+                }
+            });
+            if (bl) {
+                $("#configui2").append('<li class="b-close" id="configDetele2">' +
+                        ' <input type="hidden" value="' + id + '" name="configli2">' + name +
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl){
-        $("#configui2").append('<li class="b-close" id="configDetele2">' +
-                ' <input type="hidden" value="'+id+'" name="configli2">' +name+
-                '<span class="my-close" onclick="deleteli(this)"></span>' +
-                '</li>');
         }
     });
 
@@ -398,17 +407,19 @@
         var name = $("#configSelect3 option:selected").text();
         var id = $('#configSelect3').val();
         var bl = true;
-        $("input[name='configli3']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != "") {
+            $("input[name='configli3']").each(function (j, item) {
+                var s = $(item).val();
+                if (s === id) {
+                    bl = false;
+                }
+            });
+            if (bl) {
+                $("#configui3").append('<li class="b-close" id="configDetele3">' +
+                        ' <input type="hidden" value="' + id + '" name="configli3">' + name +
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl) {
-            $("#configui3").append('<li class="b-close" id="configDetele3">' +
-                    ' <input type="hidden" value="' + id + '" name="configli3">' + name +
-                    '<span class="my-close" onclick="deleteli(this)"></span>' +
-                    '</li>');
         }
     });
 
@@ -416,17 +427,19 @@
         var name = $("#configSelect4 option:selected").text();
         var id = $('#configSelect4').val();
         var bl = true;
-        $("input[name='configli4']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != "") {
+            $("input[name='configli4']").each(function (j, item) {
+                var s = $(item).val();
+                if (s === id) {
+                    bl = false;
+                }
+            });
+            if (bl) {
+                $("#configui4").append('<li class="b-close" id="configDetele4">' +
+                        ' <input type="hidden" value="' + id + '" name="configli4">' + name +
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl) {
-            $("#configui4").append('<li class="b-close" id="configDetele4">' +
-                    ' <input type="hidden" value="' + id + '" name="configli4">' + name +
-                    '<span class="my-close" onclick="deleteli(this)"></span>' +
-                    '</li>');
         }
     });
 
@@ -434,17 +447,19 @@
         var name = $("#configSelect5 option:selected").text();
         var id = $('#configSelect5').val();
         var bl = true;
-        $("input[name='configli5']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != "") {
+            $("input[name='configli5']").each(function (j, item) {
+                var s = $(item).val();
+                if (s === id) {
+                    bl = false;
+                }
+            });
+            if (bl) {
+                $("#configui5").append('<li class="b-close" id="configDetele5">' +
+                        ' <input type="hidden" value="' + id + '" name="configli5">' + name +
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl) {
-            $("#configui5").append('<li class="b-close" id="configDetele5">' +
-                    ' <input type="hidden" value="' + id + '" name="configli5">' + name +
-                    '<span class="my-close" onclick="deleteli(this)"></span>' +
-                    '</li>');
         }
     });
 
@@ -582,6 +597,26 @@
             }
         });
     }
+    $('.chosen').chosen({
+        no_results_text: "没有找到结果!",//搜索无结果时显示的提示
+        search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+        allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
+        disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
+        disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
+        inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
+        placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+        width: '467px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+        max_shown_results: 1000, //下拉框最大显示选项数量
+        display_disabled_options: false,
+        single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
+        case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
+        group_search: false, //选项组是否可搜。此处搜索不可搜
+        include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
+    });
+    $('.chosen2').chosen({
+        search_contains:false,
+        enable_split_word_search: true //分词搜索,选项词可通过空格或'[]'分隔。search_contains为false时才能看出效果
+    });
 </script>
 </body>
 </html>

+ 93 - 57
watero-rst-web/src/main/webapp/WEB-INF/views/cm/inspection/update_detect.ftl

@@ -122,7 +122,8 @@
             <div class="input-box">
                 <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">检测现象:</label>
                 <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                    <select id="configSelect1" name="configSelect1" class="my-select" style="width: 93%;">
+                    <select id="configSelect1" name="configSelect1" class="chosen" style="width: 93%;">
+                        <option value="">请选择检测现象</option>
                     <#if (config1?size > 0)>
                             <#list config1 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -156,7 +157,8 @@
             <div class="input-box">
                 <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">故障原因:</label>
                 <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                    <select id="configSelect2" name="configSelect2" class="my-select" style="width: 93%;">
+                    <select id="configSelect2" name="configSelect2" class="chosen" style="width: 93%;">
+                        <option value="">请选择故障原因</option>
                     <#if (config2?size > 0)>
                             <#list config2 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -169,7 +171,7 @@
 
             <div class="input-box">
                 <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;"></label>
-                <div class="formControls col-9 col-sm-9 huanhang" id="config2" style="margin: 10px 0px;">
+                <div class="formControls col-9 col-sm-9 huanhang" id="chosen" style="margin: 10px 0px;">
                     <div class="row">
                         <ul class="close-box" id="configui2">
                             <#if detectFailureCauseList??>
@@ -192,7 +194,8 @@
             <div class="input-box">
                 <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">判定结果:</label>
                 <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                    <select id="configSelect3" name="configSelect3" class="my-select" style="width: 93%;">
+                    <select id="configSelect3" name="configSelect3" class="chosen" style="width: 93%;">
+                        <option value="">请选择判定结果</option>
                     <#if (config3?size > 0)>
                             <#list config3 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -228,7 +231,8 @@
             <div class="input-box">
                 <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">故障指向:</label>
                 <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                    <select id="configSelect4" name="configSelect4" class="my-select" style="width: 93%;">
+                    <select id="configSelect4" name="configSelect4" class="chosen" style="width: 93%;">
+                        <option value="">请选择故障指向</option>
                     <#if (config4?size > 0)>
                             <#list config4 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -262,7 +266,8 @@
             <div class="input-box">
                 <label class="form-label col-3 col-sm-3 huanhang" style="text-align: right;margin-top: 14px;">原因分析:</label>
                 <div class="formControls col-9 col-sm-9 huanhang" style="margin: 10px 0px;">
-                    <select id="configSelect5" name="configSelect5" class="my-select" style="width: 93%;">
+                    <select id="configSelect5" name="configSelect5" class="chosen" style="width: 93%;">
+                        <option value="">请选择原因分析</option>
                     <#if (config5?size > 0)>
                             <#list config5 as config>
                                 <option value="${config.configId!""}">${config.configDetectContent!""}</option>
@@ -359,7 +364,7 @@
             <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="detectDesc" id="detectDesc" class="my-textarea" placeholder="请填写备注信息!">${detectInfo.detectDesc!''}</textarea>
                 </div>
             </div>
         </div>
@@ -411,17 +416,19 @@
         var name = $("#configSelect1 option:selected").text();
         var id = $('#configSelect1').val();
         var bl = true;
-        $("input[name='configli1']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != "") {
+            $("input[name='configli1']").each(function (j, item) {
+                var s = $(item).val();
+                if (s === id) {
+                    bl = false;
+                }
+            });
+            if (bl) {
+                $("#configui1").append('<li class="b-close" id="configDetele1">' +
+                        ' <input type="hidden" value="' + id + '" name="configli1">' + name +
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl){
-            $("#configui1").append('<li class="b-close" id="configDetele1">' +
-                    ' <input type="hidden" value="'+id+'" name="configli1">' +name+
-                    '<span class="my-close" onclick="deleteli(this)"></span>' +
-                    '</li>');
         }
 
     });
@@ -430,17 +437,19 @@
         var name = $("#configSelect2 option:selected").text();
         var id = $('#configSelect2').val();
         var bl = true;
-        $("input[name='configli2']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != ""){
+            $("input[name='configli2']").each(function(j,item){
+                var s = $(item).val();
+                if(s === id){
+                    bl = false;
+                }
+            });
+            if(bl){
+                $("#configui2").append('<li class="b-close" id="configDetele2">' +
+                        ' <input type="hidden" value="'+id+'" name="configli2">' +name+
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl){
-            $("#configui2").append('<li class="b-close" id="configDetele2">' +
-                    ' <input type="hidden" value="'+id+'" name="configli2">' +name+
-                    '<span class="my-close" onclick="deleteli(this)"></span>' +
-                    '</li>');
         }
     });
 
@@ -448,17 +457,19 @@
         var name = $("#configSelect3 option:selected").text();
         var id = $('#configSelect3').val();
         var bl = true;
-        $("input[name='configli3']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != "") {
+            $("input[name='configli3']").each(function (j, item) {
+                var s = $(item).val();
+                if (s === id) {
+                    bl = false;
+                }
+            });
+            if (bl) {
+                $("#configui3").append('<li class="b-close" id="configDetele3">' +
+                        ' <input type="hidden" value="' + id + '" name="configli3">' + name +
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl) {
-            $("#configui3").append('<li class="b-close" id="configDetele3">' +
-                    ' <input type="hidden" value="' + id + '" name="configli3">' + name +
-                    '<span class="my-close" onclick="deleteli(this)"></span>' +
-                    '</li>');
         }
     });
 
@@ -466,17 +477,19 @@
         var name = $("#configSelect4 option:selected").text();
         var id = $('#configSelect4').val();
         var bl = true;
-        $("input[name='configli4']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != "") {
+            $("input[name='configli4']").each(function (j, item) {
+                var s = $(item).val();
+                if (s === id) {
+                    bl = false;
+                }
+            });
+            if (bl) {
+                $("#configui4").append('<li class="b-close" id="configDetele4">' +
+                        ' <input type="hidden" value="' + id + '" name="configli4">' + name +
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl) {
-            $("#configui4").append('<li class="b-close" id="configDetele4">' +
-                    ' <input type="hidden" value="' + id + '" name="configli4">' + name +
-                    '<span class="my-close" onclick="deleteli(this)"></span>' +
-                    '</li>');
         }
     });
 
@@ -484,17 +497,19 @@
         var name = $("#configSelect5 option:selected").text();
         var id = $('#configSelect5').val();
         var bl = true;
-        $("input[name='configli5']").each(function(j,item){
-            var s = $(item).val();
-            if(s === id){
-                bl = false;
+        if(id != "") {
+            $("input[name='configli5']").each(function (j, item) {
+                var s = $(item).val();
+                if (s === id) {
+                    bl = false;
+                }
+            });
+            if (bl) {
+                $("#configui5").append('<li class="b-close" id="configDetele5">' +
+                        ' <input type="hidden" value="' + id + '" name="configli5">' + name +
+                        '<span class="my-close" onclick="deleteli(this)"></span>' +
+                        '</li>');
             }
-        });
-        if(bl) {
-            $("#configui5").append('<li class="b-close" id="configDetele5">' +
-                    ' <input type="hidden" value="' + id + '" name="configli5">' + name +
-                    '<span class="my-close" onclick="deleteli(this)"></span>' +
-                    '</li>');
         }
     });
 
@@ -562,6 +577,27 @@
             }
         });
     }
+
+    $('.chosen').chosen({
+        no_results_text: "没有找到结果!",//搜索无结果时显示的提示
+        search_contains:true,   //关键字模糊搜索。设置为true,只要选项包含搜索词就会显示;设置为false,则要求从选项开头开始匹配
+        allow_single_deselect:true, //单选下拉框是否允许取消选择。如果允许,选中选项会有一个x号可以删除选项
+        disable_search: false, //禁用搜索。设置为true,则无法搜索选项。
+        disable_search_threshold: 0, //当选项少等于于指定个数时禁用搜索。
+        inherit_select_classes: true, //是否继承原下拉框的样式类,此处设为继承
+        placeholder_text_single: '选择国家', //单选选择框的默认提示信息,当选项为空时会显示。如果原下拉框设置了data-placeholder,会覆盖这里的值。
+        width: '467px', //设置chosen下拉框的宽度。即使原下拉框本身设置了宽度,也会被width覆盖。
+        max_shown_results: 1000, //下拉框最大显示选项数量
+        display_disabled_options: false,
+        single_backstroke_delete: false, //false表示按两次删除键才能删除选项,true表示按一次删除键即可删除
+        case_sensitive_search: false, //搜索大小写敏感。此处设为不敏感
+        group_search: false, //选项组是否可搜。此处搜索不可搜
+        include_group_label_in_selected: true //选中选项是否显示选项分组。false不显示,true显示。默认false。
+    });
+    $('.chosen2').chosen({
+        search_contains:false,
+        enable_split_word_search: true //分词搜索,选项词可通过空格或'[]'分隔。search_contains为false时才能看出效果
+    });
 </script>
 </body>
 </html>

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

@@ -93,7 +93,7 @@
             <label class="form-label col-3 col-sm-3 huanhang"  style="text-align: right;">备注:</label>
             <div class="formControls col-xs-9 col-sm-9 huanhang">
                 <div class="radio-box">
-                    <textarea rows="3" style="width: 180%;margin-left: -15%;margin-top: 5%;" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请详细备注签收的内容,便于以后复查。如果转入生产,则生产部门同事可查看!"></textarea>
+                    <textarea rows="3" style="width: 180%;margin-left: -15%;margin-top: 5%;" cols="20" name="detectDesc" id="detectDesc" class="my-textarea" placeholder="请输入备注!"></textarea>
                 </div>
             </div>
         </div>

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

@@ -456,21 +456,29 @@
             data:$('#form-signclosed-add').serialize(),// 你的formid
             async: false,
             success: function(data){
-                if (data.returnCode == 200) {
+                if (data.returnCode === 1) {
                     layer.msg('签收成功',{icon: 1,time:1000},function () {
                         location.replace(location.href);
                         window.location.href= "${path}/admin/signclosed/select_signclosed_list";
                     });
-                } else if(data.returnCode == 502) {
-                    layer.msg('请至少选择一件已签收的产品',{icon: 5,time:1000});
-                } else if(data.returnCode == 503) {
-                    layer.msg('有产品数量未填写,如本次签收没有此产品,请删除',{icon: 5,time:1000});
-                }else{
-                    layer.msg('添加失败',{icon: 5,time:1000});
+                } else if(data.returnCode === 0) {
+                    layer.msg('添加失败',{icon: 5,time:2000});
+                } else if(data.returnCode === 2) {
+                    layer.msg('添加失败,缺少产品颜色信息',{icon: 5,time:4000});
+                } else if(data.returnCode === 3) {
+                    layer.msg('已存在相同单号的签收信息并已将签收状态改为已签收',{icon: 5,time:5000},function () {
+                        location.replace(location.href);
+                        window.location.href= "${path}/admin/signclosed/select_signclosed_list";
+                    });
+                } else if(data.returnCode === 4) {
+                    layer.msg('已存在相同单号的已签收信息',{icon: 5,time:5000},function () {
+                        location.replace(location.href);
+                        window.location.href= "${path}/admin/signclosed/select_signclosed_list";
+                    });
                 }
             },
             error: function(XmlHttpRequest, textStatus, errorThrown){
-                layer.msg('添加错误',{icon: 5,time:1000});
+                layer.msg('添加错误',{icon: 5,time:2000});
             }
         });
     }

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

@@ -93,7 +93,7 @@
                         <tr class="text-c" id="table1">
                             <th style="text-align: center;" width="30" >产品名称</th>
                             <th style="text-align: center;" width="25" >产品颜色</th>
-                            <th style="text-align: center;" width="10">售价</th>
+                            <#--<th style="text-align: center;" width="10">售价</th>-->
                             <th style="text-align: center;" width="10">数量</th>
                             <th style="text-align: center;" width="10">操作</th>
                         </tr>
@@ -106,7 +106,7 @@
                                         <input type="hidden" class="color_id" id="" value="${info.signclosedProductColor!''}" >
                                          <td>${info.productName!''}</td>
                                          <td>${info.colorName!''}</td>
-                                         <td>${info.colorPrice!''}</td>
+                                         <#--<td>${info.colorPrice!''}</td>-->
                                          <td><input type="text" class="input-text input-number item-num"  style="width: 100%;border: none;text-align: center;" name="" id="" placeholder="产品数量" value="${info.productNum!''}" onkeyup="keyFun($(this),999,1)" onpaste="keyFun($(this),999,1)"></td>
                                          <td><a href="javascript:void(0)" class="del_product all_down" onclick="delProduct($(this))" >删除</a></td>
                                          </tr>
@@ -336,6 +336,7 @@
                 cityHtml += '<option value="'+ city[i].cityId +'">'+ city[i].city +'</option>';
             }
             $("#city").html(cityHtml);
+            setAddressDis(city[0].cityId);
         });
         /*监听市选择事件*/
         $(document).on('change', '#city', function() {

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

@@ -110,9 +110,9 @@
                     </td>
                     <td class="text-c" width="100"><#if signclosed.signclosedIsReceiving??>
                         <#if signclosed.signclosedIsReceiving == 1>
-                            <span class="c-success">已签收</span>
+                            <span class="c-red">待签收</span>
                         <#elseif signclosed.signclosedIsReceiving == 2>
-                            <span class="c-red">未签收</span>
+                            <span class="c-success">已签收</span>
                         </#if>
                     </#if></td>
                     <td class="text-c" width="100">${signclosed.signclosedAddrProvincesName!}-${signclosed.signclosedAddrCityName!}-${signclosed.signclosedAddrAreaName!}</td>

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

@@ -8,7 +8,7 @@
         *{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; -webkit-appearance:none;appearance:none;background: url(/common/images/pts/select-11.png) right center no-repeat;background-size:auto 100%;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);padding:3px 50px 6px 15px;height: 34px; -webkit-appearance:none;appearance:none;background: url(/common/images/pts/select-11.png) right center no-repeat;background-size:auto 100%;}
         .my-btn-search{border: 1px solid #50a2ea;padding: 1px 25px;height: 32px;background-color: #fff;color: #50a2ea;}
         .barcodeImg{margin:10px 0px}
         .table-bg thead th{background-color: #f7fafd;height: 40px;}
@@ -42,10 +42,16 @@
     <div class="text-c">
         <form name="form1" action="${path}/admin/signclosed/select_signclosed_list" method="post">
             <button type="button" style="cursor:pointer;float: left;" class="my-btn-search" onclick="add_signclosed('${path}/admin/signclosed/to_add_signclosed');">新建签收</button>
-            <input class="my-input" style="width: 120px;text-indent: 1em;" type="text" name="signclosedCustomerId" value="${signclosedCustomerId!}" placeholder="客诉编号"/>
+            <select class="my-select" name="signclosedIsReceiving" id="signclosedIsReceiving" style="height: 29px;width: 132px;margin-bottom: 10px;">
+                <option value="">签收状态</option>
+                <option value="1" <#if signclosedIsReceiving??><#if signclosedIsReceiving == 1 >selected="selected"</#if></#if>>待签收</option>
+                <option value="2" <#if signclosedIsReceiving??><#if signclosedIsReceiving == 2 >selected="selected"</#if></#if>>已签收</option>
+            </select>
+            <#--<input class="my-input" style="width: 120px;text-indent: 1em;" type="text" name="signclosedCustomerId" value="${signclosedCustomerId!}" placeholder="客诉编号"/>-->
             <input class="my-input" style="width: 120px;text-indent: 1em;" type="text" name="signclosedSendName" value="${signclosedSendName!}" placeholder="寄件人姓名"/>
             <input class="my-input" style="width: 120px;text-indent: 1em;" type="text" name="signclosedSendTel" value="${signclosedSendTel!}" placeholder="寄件人电话号码"/>
             <input class="my-input" style="width: 120px;text-indent: 1em;" type="text" name="signclosedLogisticsNumber" value="${signclosedLogisticsNumber!}" placeholder="快递单号"/>
+            <input class="my-input" style="width: 70px;" type="text" value="<#if signclosedDate??>${signclosedDate?string("yyyy-MM-dd")!''}</#if>" name="signclosedDate" id="signclosedDate" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-%d'})" placeholder="签收日期" readonly="readonly"/>
             <#--<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>
@@ -65,7 +71,7 @@
             <thead>
             <tr class="text-c">
                 <th width="50">签收ID</th>
-                <th width="50">客诉编号</th>
+                <#--<th width="50">客诉编号</th>-->
                 <th width="90">售后原因</th>
                 <th width="90">物流状态</th>
                 <th width="160">物流</th>
@@ -86,7 +92,7 @@
                 <#list page.dataList as signclosed>
                 <tr>
                     <td class="text-c" width="70" style="color: #50a2ea;">${signclosed.signclosedId!}</td>
-                    <td class="text-c" width="70">${signclosed.signclosedCustomerId!}</td>
+                    <#--<td class="text-c" width="70">${signclosed.signclosedCustomerId!}</td>-->
                     <td class="text-c" width="100">${signclosed.customerIdDescribe!}</td>
                     <td class="text-c" width="100">
                         <#if signclosed.signclosedIsReceiving??>
@@ -99,41 +105,6 @@
                     </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>-->
                         ${signclosed.signclosedLogisticsName!}
                             -
                         </#if>
@@ -148,7 +119,7 @@
                                     <#--<#if info.signclosedProductType == 1 >
                                         <span class="label label-default radius" 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-default radius" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''} x ${info.productNum!''}件</span><br>
+                                        <span class="label label-default radius" title="${info.productName!''} x ${info.productNum!''}件">${info.productName!''}-${info.colorName!''} x ${info.productNum!''}件</span><br>
                                     <#--</#if>-->
                                 </#list>
                             <#else >

+ 19 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/add_order.ftl

@@ -81,6 +81,25 @@
                     <span id="salesCustomerIdHtml"></span>
                     <input type="hidden" id="salesCustomerId" name="salesCustomerId" value="">
                 </div>
+
+                <div class="row cl" id="" style="">
+                    <label class="form-label col-1 col-sm-1"></label>
+                    <div class="formControls col-7 col-sm-7">
+                        <table class="table table-border table-bg table-bordered" style="margin-top: 10px;margin-left: 14px;display: none;" id="all_detect_product">
+                            <thead>
+                            <tr class="text-c">
+                                <th style="text-align: center;" width="30" >请选择要发货的机器</th>
+                                <th style="text-align: center;" width="25" >维修编号</th>
+                                <th style="text-align: center;" width="10">维修状态</th>
+                                <th style="text-align: center;" width="10">维修机器</th>
+                                <th style="text-align: center;" width="10">维修颜色</th>
+                            </tr>
+                            </thead>
+                            <tbody id="detect_product">
+                            </tbody>
+                        </table>
+                    </div>
+                </div>
             </div>
 
             <div class="row cl">

+ 11 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/list_wait_send_order.ftl

@@ -109,8 +109,9 @@
             <th width="40">配送方式</th>
         <#--<th width="40">客户备注</th>-->
             <th width="40">后台备注</th>
+            <th width="40">维修编号</th>
             <th width="40">下单时间</th>
-            <th width="40">通知配货时间</th>
+            <th width="40">通知配货</th>
             <th width="60">操作</th>
         </tr>
         </thead>
@@ -184,6 +185,15 @@
 
             <#--<td>${(o.salesUserRemark)!}</td>-->
                 <td>${(o.salesAdminRemark)!}</td>
+                <td>
+                    <#if o.complaintDetectInfoList ??>
+                        <#list o.complaintDetectInfoList as d>
+                            <span class="label label-success radius" style="cursor: pointer;" onclick="distribution_postFirm('维修详情','${path}/admin/detect/to_detail?detectId=${d.detectId!''}','770','650');">${(d.detectNumber)!}</span>
+                        </#list>
+
+
+                </#if>
+                </td>
                 <td>${(o.salesCreateTime?string("yyyy-MM-dd"))!}</td>
                 <td><#if (o.salesPostFirm)??>${(o.salesDistributionTime?string("yyyy-MM-dd"))!}</#if></td>
                 <td class="td-manage">

+ 4 - 3
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl

@@ -38,14 +38,15 @@
     </style>
 </head>
 <body>
-<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
+<#--<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
     <span class="c-gray en">/</span> 订单管理
     <span class="c-gray en">/</span> 订单列表
     <a class="btn radius r" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
-</nav>
+</nav>-->
 
 <!--  录入订单 -->
 <div class="page-container">
+    <#if orderNum??><pre style="font-size: 14px;margin-top: -1%;">待确认:${orderNum.beConfirmedNum!'0'}&nbsp;&nbsp;待分配物流:${orderNum.distributionLogisticsNum!'0'} &nbsp;&nbsp;待发货:${orderNum.sendTheGoods!'0'}&nbsp;&nbsp; 待打单:${orderNum.playSingle!'0'} &nbsp;&nbsp;待出库:${orderNum.outbound!'0'} </pre></#if>
     <div class="text-c" id="form-download">
         <form action="${path}/admin/salesOrder/list_order_page" method="post">
 
@@ -113,7 +114,7 @@
             </div>
             <#--Efast add end-->
             <div style="width: 90%;margin-left: 10%;">
-                <input type="text" class="my-input trim_input"  style="margin-top: -3px;text-indent: 1em;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesOrderId!}" placeholder="订单号" name="salesOrderId" id="salesOrderId">
+                <input type="text" class="my-input trim_input"  style="margin-top: -3px;text-indent: 1em;width:118px;margin-right: 0px;height: 28px;padding: 0px;margin-left: -77px;" value="${salesOrder.salesOrderId!}" placeholder="订单号" name="salesOrderId" id="salesOrderId">
                 <input type="text" class="my-input trim_input"  style="margin-top: -3px;text-indent: 1em;width:118px;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesDealCode!}" placeholder="交易号" name="salesDealCode" id="salesDealCode">
                 <input type="text" class="my-input trim_input"  style="margin-top: -3px;width:118px;text-indent: 1em;margin-right: 0px;height: 28px;padding: 0px;" value="${salesOrder.salesBatchId!}" placeholder="订单批次号" name="salesBatchId" id="salesBatchId">
 

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

@@ -167,6 +167,31 @@ function setSelectCustomer(customerId){
                 if(data.returnMsg.colorIds != null){
                     setSelectProduct(data.returnMsg.colorIds);
                 }
+                //回显售后数据
+                var listDetet = data.returnMsg.listDetet;
+                if(listDetet.length > 0){
+                    var html = "";
+                    $("#all_detect_product").show();
+                    for(var i=0;i<listDetet.length;i++){
+                        var detet = listDetet[i];
+                        var detectStateName = "";
+                        if(detet.detectState === 32 || detet.detectState === 36 ){
+                            detectStateName = "维修完成,待发货";
+                        }
+                        if(detet.detectState === 37 ){
+                            detectStateName = "原机退回,待发货";
+                        }
+                        html += '<tr class="text-c">' +
+                            ' <td><input type="checkbox" name="detectId" value="'+detet.detectId+'"><label></td>' +
+                            ' <td>'+ cufte(detet.detectNumber) +'</td>' +
+                            ' <td>'+ detectStateName +'</td>' +
+                            ' <td>'+ cufte(detet.productName) +'</td>' +
+                            ' <td>'+ cufte(detet.colorName) +'</td>' +
+                            ' </tr>';
+                    }
+                    $("#detect_product").html(html);
+                }
+
             }else{
             }
             $("#salesCustomer").show();

BIN
watero-rst-web/src/main/webapp/common/static/chosen/css/chosen-sprite.png


BIN
watero-rst-web/src/main/webapp/common/static/chosen/css/chosen-sprite@2x.png


+ 423 - 0
watero-rst-web/src/main/webapp/common/static/chosen/css/chosen.css

@@ -0,0 +1,423 @@
+/*!
+Chosen, a Select Box Enhancer for jQuery and Prototype
+by Patrick Filler for Harvest, http://getharvest.com
+
+Version 1.1.0
+Full source at https://github.com/harvesthq/chosen
+Copyright (c) 2011 Harvest http://getharvest.com
+
+MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
+This file is generated by `grunt build`, do not edit it by hand.
+*/
+
+/* @group Base */
+.chosen-container {
+    position: relative;
+    display: inline-block;
+    vertical-align: middle;
+    font-size: 13px;
+    zoom: 1;
+    *display: inline;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    user-select: none;
+}
+.chosen-container .chosen-drop {
+    position: absolute;
+    top: 100%;
+    left: -9999px;
+    z-index: 1010;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    width: 100%;
+    border: 1px solid #aaa;
+    border-top: 0;
+    background: #fff;
+    box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
+}
+.chosen-container.chosen-with-drop .chosen-drop {
+    left: 0;
+}
+.chosen-container a {
+    cursor: pointer;
+}
+
+/* @end */
+/* @group Single Chosen */
+.chosen-container-single .chosen-single {
+    position: relative;
+    display: block;
+    overflow: hidden;
+    padding: 0 0 0 8px;
+    height: 23px;
+    border: 1px solid #aaa;
+    border-radius: 5px;
+    background-color: #fff;
+    background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
+    background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+    background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+    background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+    background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+    background-clip: padding-box;
+    box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
+    color: #444;
+    text-decoration: none;
+    white-space: nowrap;
+    line-height: 24px;
+}
+.chosen-container-single .chosen-default {
+    color: #999;
+}
+.chosen-container-single .chosen-single span {
+    display: block;
+    overflow: hidden;
+    margin-right: 26px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+}
+.chosen-container-single .chosen-single-with-deselect span {
+    margin-right: 38px;
+}
+.chosen-container-single .chosen-single abbr {
+    position: absolute;
+    top: 6px;
+    right: 26px;
+    display: block;
+    width: 12px;
+    height: 12px;
+    background: url('css/chosen-sprite.png') -42px 1px no-repeat;
+    font-size: 1px;
+}
+.chosen-container-single .chosen-single abbr:hover {
+    background-position: -42px -10px;
+}
+.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
+    background-position: -42px -10px;
+}
+.chosen-container-single .chosen-single div {
+    position: absolute;
+    top: 0;
+    right: 0;
+    display: block;
+    width: 18px;
+    height: 100%;
+}
+.chosen-container-single .chosen-single div b {
+    display: block;
+    width: 100%;
+    height: 100%;
+    background: url('css/chosen-sprite.png') no-repeat 0px 7px;
+}
+.chosen-container-single .chosen-search {
+    position: relative;
+    z-index: 1010;
+    margin: 0;
+    padding: 3px 4px;
+    white-space: nowrap;
+}
+.chosen-container-single .chosen-search input[type="text"] {
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    margin: 1px 0;
+    padding: 4px 20px 4px 5px;
+    width: 100%;
+    height: auto;
+    outline: 0;
+    border: 1px solid #aaa;
+    background: white url('css/chosen-sprite.png') no-repeat 100% -20px;
+    background: url('css/chosen-sprite.png') no-repeat 100% -20px;
+    font-size: 1em;
+    font-family: sans-serif;
+    line-height: normal;
+    border-radius: 0;
+}
+.chosen-container-single .chosen-drop {
+    margin-top: -1px;
+    border-radius: 0 0 4px 4px;
+    background-clip: padding-box;
+}
+.chosen-container-single.chosen-container-single-nosearch .chosen-search {
+    position: absolute;
+    left: -9999px;
+}
+
+/* @end */
+/* @group Results */
+.chosen-container .chosen-results {
+    position: relative;
+    overflow-x: hidden;
+    overflow-y: auto;
+    margin: 0 4px 4px 0;
+    padding: 0 0 0 4px;
+    max-height: 240px;
+    -webkit-overflow-scrolling: touch;
+}
+.chosen-container .chosen-results li {
+    display: none;
+    margin: 0;
+    padding: 5px 6px;
+    list-style: none;
+    line-height: 15px;
+    -webkit-touch-callout: none;
+}
+.chosen-container .chosen-results li.active-result {
+    display: list-item;
+    cursor: pointer;
+}
+.chosen-container .chosen-results li.disabled-result {
+    display: list-item;
+    color: #ccc;
+    cursor: default;
+}
+.chosen-container .chosen-results li.highlighted {
+    background-color: #3875d7;
+    background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
+    background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
+    background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
+    background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
+    background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
+    color: #fff;
+}
+.chosen-container .chosen-results li.no-results {
+    display: list-item;
+    background: #f4f4f4;
+}
+.chosen-container .chosen-results li.group-result {
+    display: list-item;
+    font-weight: bold;
+    cursor: default;
+}
+.chosen-container .chosen-results li.group-option {
+    padding-left: 15px;
+}
+.chosen-container .chosen-results li em {
+    font-style: normal;
+    text-decoration: underline;
+}
+
+/* @end */
+/* @group Multi Chosen */
+.chosen-container-multi .chosen-choices {
+    -moz-box-sizing: border-box;
+    background-color: #FFFFFF;
+    border: 1px solid #CBD5DD;
+    border-radius: 2px;
+    cursor: text;
+    height: auto !important;
+    margin: 0;
+    min-height: 30px;
+    overflow: hidden;
+    padding: 2px;
+    position: relative;
+    width: 100%;
+}
+.chosen-container-multi .chosen-choices li {
+    float: left;
+    list-style: none;
+}
+.chosen-container-multi .chosen-choices li.search-field {
+    margin: 0;
+    padding: 0;
+    white-space: nowrap;
+}
+.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
+    margin: 1px 0;
+    padding: 5px;
+    height: 25px;
+    outline: 0;
+    border: 0 !important;
+    background: transparent !important;
+    box-shadow: none;
+    color: #666;
+    font-size: 100%;
+    font-family: sans-serif;
+    line-height: normal;
+    border-radius: 0;
+}
+.chosen-container-multi .chosen-choices li.search-field .default {
+    color: #999;
+}
+.chosen-container-multi .chosen-choices li.search-choice {
+    position: relative;
+    margin: 3px 0 3px 5px;
+    padding: 3px 20px 3px 5px;
+    border: 1px solid #aaa;
+    border-radius: 3px;
+    background-color: #e4e4e4;
+    background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
+    background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+    background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+    background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+    background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+    background-clip: padding-box;
+    box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
+    color: #333;
+    line-height: 13px;
+    cursor: default;
+}
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
+    position: absolute;
+    top: 4px;
+    right: 3px;
+    display: block;
+    width: 12px;
+    height: 12px;
+    background: url('css/chosen-sprite.png') -42px 1px no-repeat;
+    font-size: 1px;
+}
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
+    background-position: -42px -10px;
+}
+.chosen-container-multi .chosen-choices li.search-choice-disabled {
+    padding-right: 5px;
+    border: 1px solid #ccc;
+    background-color: #e4e4e4;
+    background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
+    background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+    background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+    background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+    background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+    color: #666;
+}
+.chosen-container-multi .chosen-choices li.search-choice-focus {
+    background: #d4d4d4;
+}
+.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
+    background-position: -42px -10px;
+}
+.chosen-container-multi .chosen-results {
+    margin: 0;
+    padding: 0;
+}
+.chosen-container-multi .chosen-drop .result-selected {
+    display: list-item;
+    color: #ccc;
+    cursor: default;
+}
+
+/* @end */
+/* @group Active  */
+.chosen-container-active .chosen-single {
+    border: 1px solid #5897fb;
+    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+}
+.chosen-container-active.chosen-with-drop .chosen-single {
+    border: 1px solid #aaa;
+    -moz-border-radius-bottomright: 0;
+    border-bottom-right-radius: 0;
+    -moz-border-radius-bottomleft: 0;
+    border-bottom-left-radius: 0;
+}
+.chosen-container-active.chosen-with-drop .chosen-single div {
+    border-left: none;
+    background: transparent;
+}
+.chosen-container-active.chosen-with-drop .chosen-single div b {
+    background-position: -18px 7px;
+}
+.chosen-container-active .chosen-choices {
+    border: 1px solid #5897fb;
+    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+}
+.chosen-container-active .chosen-choices li.search-field input[type="text"] {
+    color: #111 !important;
+}
+
+/* @end */
+/* @group Disabled Support */
+.chosen-disabled {
+    opacity: 0.5 !important;
+    cursor: default;
+}
+.chosen-disabled .chosen-single {
+    cursor: default;
+}
+.chosen-disabled .chosen-choices .search-choice .search-choice-close {
+    cursor: default;
+}
+
+/* @end */
+/* @group Right to Left */
+.chosen-rtl {
+    text-align: right;
+}
+.chosen-rtl .chosen-single {
+    overflow: visible;
+    padding: 0 8px 0 0;
+}
+.chosen-rtl .chosen-single span {
+    margin-right: 0;
+    margin-left: 26px;
+    direction: rtl;
+}
+.chosen-rtl .chosen-single-with-deselect span {
+    margin-left: 38px;
+}
+.chosen-rtl .chosen-single div {
+    right: auto;
+    left: 3px;
+}
+.chosen-rtl .chosen-single abbr {
+    right: auto;
+    left: 26px;
+}
+.chosen-rtl .chosen-choices li {
+    float: right;
+}
+.chosen-rtl .chosen-choices li.search-field input[type="text"] {
+    direction: rtl;
+}
+.chosen-rtl .chosen-choices li.search-choice {
+    margin: 3px 5px 3px 0;
+    padding: 3px 5px 3px 19px;
+}
+.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
+    right: auto;
+    left: 4px;
+}
+.chosen-rtl.chosen-container-single-nosearch .chosen-search,
+.chosen-rtl .chosen-drop {
+    left: 9999px;
+}
+.chosen-rtl.chosen-container-single .chosen-results {
+    margin: 0 0 4px 4px;
+    padding: 0 4px 0 0;
+}
+.chosen-rtl .chosen-results li.group-option {
+    padding-right: 15px;
+    padding-left: 0;
+}
+.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
+    border-right: none;
+}
+.chosen-rtl .chosen-search input[type="text"] {
+    padding: 4px 5px 4px 20px;
+    background: white url('css/chosen-sprite.png') no-repeat -30px -20px;
+    background: url('css/chosen-sprite.png') no-repeat -30px -20px;
+    direction: rtl;
+}
+.chosen-rtl.chosen-container-single .chosen-single div b {
+    background-position: 6px 2px;
+}
+.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
+    background-position: -12px 2px;
+}
+
+/* @end */
+/* @group Retina compatibility */
+@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dpi) {
+    .chosen-rtl .chosen-search input[type="text"],
+    .chosen-container-single .chosen-single abbr,
+    .chosen-container-single .chosen-single div b,
+    .chosen-container-single .chosen-search input[type="text"],
+    .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
+    .chosen-container .chosen-results-scroll-down span,
+    .chosen-container .chosen-results-scroll-up span {
+        background-image: url('css/chosen-sprite@2x.png') !important;
+        background-size: 52px 37px !important;
+        background-repeat: no-repeat !important;
+    }
+}
+/* @end */

File diff suppressed because it is too large
+ 1212 - 0
watero-rst-web/src/main/webapp/common/static/chosen/js/chosen.jquery.js