Ver código fonte

创建独立的customercommon转换的util

wangxiaoming 7 anos atrás
pai
commit
79c67f5209

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

@@ -8,6 +8,9 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
+/**
+ * 退货
+ */
 public class BackGoods  implements Serializable {
     private static final long serialVersionUID = -6844954322262497132L;
     private Integer backGoodsId;

+ 1 - 308
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerCommon.java

@@ -372,313 +372,6 @@ public class CustomerCommon implements Serializable {
         this.customerIsSolve = customerIsSolve;
     }
 
-    /**
-     * @param type 处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
-     * @return
-     */
-    public static Object getRelation(Integer type,CustomerCommon c){
-        switch (type){
-            case 3: //换新
-                Renewed renewed = new Renewed();
-                renewed.setRenewedId(c.getRelationId());
-                renewed.setCustomerId(c.getCustomerId());
-                renewed.setOrderId(c.orderId);
-                renewed.setSignclosedId(c.signclosedId);
-                renewed.setRenewedBackEfastOrderId(c.getRelationBackEfastOrderId());
-                renewed.setRenewedBackStatus(c.getRelationBackStatus());
-                renewed.setRenewedBackName(c.getRelationBackName());
-                renewed.setRenewedBackTel(c.getRelationBackTel());
-                renewed.setRenewedBackLogisticsCompany(c.getRelationBackLogisticsCompany());
-                renewed.setRenewedBackLogisticsNo(c.getRelationBackLogisticsNo());
-                renewed.setRenewedBackPostage(c.getRelationBackPostage());
-                renewed.setRenewedBackMachineNo(c.getRelationBackMachineNo());
-                renewed.setRenewedSendStatus(c.getRelationSendStatus());
-                renewed.setRenewedSendName(c.getRelationSendName());
-                renewed.setRenewedSendTel(c.getRelationSendTel());
-                renewed.setProvinceNumber(c.getProvinceNumber());
-                renewed.setCityNumber(c.getCityNumber());
-                renewed.setAreaNumber(c.getAreaNumber());
-                renewed.setRenewedSendMergeAddress(c.getRelationSendMergeAddress());
-                renewed.setRenewedSendAddress(c.getRelationSendAddress());
-                renewed.setRenewedSendLogisticsCompany(c.getRelationSendLogisticsCompany());
-                renewed.setRenewedSendLogisticsNo(c.getRelationSendLogisticsNo());
-                renewed.setRenewedDesc(c.getRelationDesc());
-                renewed.setRenewedState(c.getRelationState());
-                renewed.setRenewedAlipay(c.getRelationAlipay());
-                renewed.setRenewedIsTransfer(c.getRelationIsTransfer());
-                renewed.setRenewedCreateTime(c.getRelationCreateTime());
-                renewed.setRenewedUpdateTime(c.getRelationUpdateTime());
-                return renewed;
-            case 4: //维修
-                Repair repair = new Repair();
-                repair.setRepairId(c.getRelationId());
-                repair.setCustomerId(c.getCustomerId());
-                repair.setOrderId(c.orderId);
-                repair.setSignclosedId(c.signclosedId);
-                repair.setRepairBackEfastOrderId( c.getRelationBackEfastOrderId());
-                repair.setRepairBackStatus(c.getRelationBackStatus());
-                repair.setRepairBackName(c.getRelationBackName());
-                repair.setRepairBackTel(c.getRelationBackTel());
-                repair.setRepairBackLogisticsCompany(c.getRelationBackLogisticsCompany());
-                repair.setRepairBackLogisticsNo(c.getRelationBackLogisticsNo());
-                repair.setRepairBackPostage(c.getRelationBackPostage());
-                repair.setRepairBackMachineNo(c.getRelationBackMachineNo());
-                repair.setRepairSendStatus(c.getRelationSendStatus());
-                repair.setRepairSendName(c.getRelationSendName());
-                repair.setRepairSendTel(c.getRelationSendTel());
-                repair.setProvinceNumber(c.getProvinceNumber());
-                repair.setCityNumber(c.getCityNumber());
-                repair.setAreaNumber(c.getAreaNumber());
-                repair.setRepairSendMergeAddress(c.getRelationSendMergeAddress());
-                repair.setRepairSendAddress(c.getRelationSendAddress());
-                repair.setRepairSendLogisticsCompany(c.getRelationSendLogisticsCompany());
-                repair.setRepairSendLogisticsNo(c.getRelationSendLogisticsNo());
-                repair.setRepairDesc(c.getRelationDesc());
-                repair.setRepairState(c.getRelationState());
-                repair.setRepairAlipay(c.getRelationAlipay());
-                repair.setRepairIsTransfer(c.getRelationIsTransfer());
-                repair.setRepairCreateTime(c.getRelationCreateTime());
-                repair.setRepairUpdateTime(c.getRelationUpdateTime());
-                return repair;
-            case 5://补发
-                Reissue reissue = new Reissue();
-                reissue.setReissueId(c.getRelationId());
-                reissue.setCustomerId(c.getCustomerId());
-                reissue.setOrderId(c.orderId);
-                reissue.setReissueBackEfastOrderId(c.getRelationBackEfastOrderId());
-                reissue.setReissueSendStatus(c.getRelationSendStatus());
-                reissue.setReissueSendName(c.getRelationSendName());
-                reissue.setReissueSendTel(c.getRelationSendTel());
-                reissue.setProvinceNumber(c.getProvinceNumber());
-                reissue.setCityNumber(c.getCityNumber());
-                reissue.setAreaNumber(c.getAreaNumber());
-                reissue.setReissueSendMergeAddress(c.getRelationSendMergeAddress());
-                reissue.setReissueSendAddress(c.getRelationSendAddress());
-                reissue.setReissueSendLogisticsCompany(c.getRelationSendLogisticsCompany());
-                reissue.setReissueSendLogisticsNo(c.getRelationSendLogisticsNo());
-                reissue.setReissueDesc(c.getRelationDesc());
-                reissue.setReissueState(c.getRelationState());
-                reissue.setReissueCreateTime(c.getRelationCreateTime());
-                reissue.setReissueUpdateTime(c.getRelationUpdateTime());
-                return reissue;
-            case 6://退货
-                BackGoods backGoods = new BackGoods();
-                backGoods.setBackGoodsId(c.getRelationId());
-                backGoods.setCustomerId(c.getCustomerId());
-                backGoods.setOrderId(c.orderId);
-                backGoods.setSignclosedId(c.signclosedId);
-                backGoods.setBackGoodsBackStatus(c.getRelationBackStatus());
-                backGoods.setBackGoodsBackName(c.getRelationBackName());
-                backGoods.setBackGoodsBackTel(c.getRelationBackTel());
-                backGoods.setBackGoodsBackLogisticsCompany(c.getRelationBackLogisticsCompany());
-                backGoods.setBackGoodsBackLogisticsNo(c.getRelationBackLogisticsNo());
-                backGoods.setBackGoodsBackPostage(c.getRelationBackPostage());
-                backGoods.setBackGoodsBackMachineNo(c.getRelationBackMachineNo());
-                backGoods.setBackGoodsDesc(c.getRelationDesc());
-                backGoods.setBackGoodsState(c.getRelationState());
-                backGoods.setBackGoodsAlipay(c.getRelationAlipay());
-                backGoods.setBackGoodsIsTransfer(c.getRelationIsTransfer());
-                backGoods.setBackGoodsCreateTime(c.getRelationCreateTime());
-                backGoods.setBackGoodsUpdateTime(c.getRelationUpdateTime());
-                return backGoods;
-            case 7://无理由退货
-                NoreasonBack noreasonBack = new NoreasonBack();
-                noreasonBack.setNoreasonBackId( c.getRelationId());
-                noreasonBack.setCustomerId(c.getCustomerId());
-                noreasonBack.setOrderId(c.orderId);
-                noreasonBack.setSignclosedId(c.signclosedId);
-                noreasonBack.setNoreasonBackBackStatus(c.getRelationBackStatus());
-                noreasonBack.setNoreasonBackBackName(c.getRelationBackName());
-                noreasonBack.setNoreasonBackBackTel(c.getRelationBackTel());
-                noreasonBack.setNoreasonBackBackLogisticsCompany(c.getRelationBackLogisticsCompany());
-                noreasonBack.setNoreasonBackBackLogisticsNo(c.getRelationBackLogisticsNo());
-                noreasonBack.setNoreasonBackBackPostage(c.getRelationBackPostage());
-                noreasonBack.setNoreasonBackBackMachineNo(c.getRelationBackMachineNo());
-                noreasonBack.setNoreasonBackDesc(c.getRelationDesc());
-                noreasonBack.setNoreasonBackState(c.getRelationState());
-                noreasonBack.setNoreasonBackAlipay(c.getRelationAlipay());
-                noreasonBack.setNoreasonBackIsTransfer(c.getRelationIsTransfer());
-                noreasonBack.setNoreasonBackCreateTime(c.getRelationCreateTime());
-                noreasonBack.setNoreasonBackUpdateTime(c.getRelationUpdateTime());
-                return noreasonBack;
-            default :
-                return null;
-        }
-    }
-
-
-
-
-    /**
-     * 封装参数
-     * @param solve  处理类型
-     * @param object
-     * @return
-     */
-    public static CustomerCommon getCustomerCommon(int solve, Object object) {
-        if (object == null) {
-            return null;
-        }
-        CustomerCommon customerCommon = new CustomerCommon();
-        switch (solve) {
-            case 3://换新
-                Renewed renewed = (Renewed)object;
-                customerCommon.setRelationId(renewed.getRenewedId());
-                customerCommon.setCustomerId(renewed.getCustomerId());
-                customerCommon.setOrderId(renewed.getOrderId());
-                customerCommon.setSignclosedId(renewed.getSignclosedId());
-                customerCommon.setRelationBackEfastOrderId(renewed.getRenewedBackEfastOrderId());
-                customerCommon.setRelationBackStatus(renewed.getRenewedBackStatus());
-                customerCommon.setRelationBackName(renewed.getRenewedBackName());
-                customerCommon.setRelationBackTel(renewed.getRenewedBackTel());
-                customerCommon.setRelationBackLogisticsCompany(renewed.getRenewedBackLogisticsCompany());
-                customerCommon.setRelationBackLogisticsNo(renewed.getRenewedBackLogisticsNo());
-                customerCommon.setRelationBackPostage(renewed.getRenewedBackPostage());
-                customerCommon.setRelationBackMachineNo(renewed.getRenewedBackMachineNo());
-                customerCommon.setRelationSendStatus(renewed.getRenewedSendStatus());
-                customerCommon.setRelationSendName(renewed.getRenewedSendName());
-                customerCommon.setRelationSendTel(renewed.getRenewedSendTel());
-                customerCommon.setProvinceNumber(renewed.getProvinceNumber());
-                customerCommon.setCityNumber(renewed.getCityNumber());
-                customerCommon.setAreaNumber(renewed.getAreaNumber());
-                customerCommon.setRelationSendMergeAddress(renewed.getRenewedSendMergeAddress());
-                customerCommon.setRelationSendAddress(renewed.getRenewedSendAddress());
-                customerCommon.setRelationSendLogisticsCompany(renewed.getRenewedSendLogisticsCompany());
-                customerCommon.setRelationSendLogisticsNo(renewed.getRenewedSendLogisticsNo());
-                customerCommon.setRelationDesc(renewed.getRenewedDesc());
-                customerCommon.setRelationState(renewed.getRenewedState());
-                customerCommon.setRelationAlipay(renewed.getRenewedAlipay());
-                customerCommon.setRelationIsTransfer(renewed.getRenewedIsTransfer());
-                customerCommon.setRelationCreateTime(renewed.getRenewedCreateTime());
-                customerCommon.setRelationUpdateTime(renewed.getRenewedUpdateTime());
-                customerCommon.setMaintenanceIsRepair(renewed.getMaintenanceIsRepair());
-                break;
-            case 4://维修
-                Repair repair = (Repair)object;
-                customerCommon.setRelationId(repair.getRepairId());
-                customerCommon.setCustomerId(repair.getCustomerId());
-                customerCommon.setOrderId(repair.getOrderId());
-                customerCommon.setSignclosedId(repair.getSignclosedId());
-                customerCommon.setRelationBackEfastOrderId(repair.getRepairBackEfastOrderId());
-                customerCommon.setRelationBackStatus(repair.getRepairBackStatus());
-                customerCommon.setRelationBackName(repair.getRepairBackName());
-                customerCommon.setRelationBackTel(repair.getRepairBackTel());
-                customerCommon.setRelationBackLogisticsCompany(repair.getRepairBackLogisticsCompany());
-                customerCommon.setRelationBackLogisticsNo(repair.getRepairBackLogisticsNo());
-                customerCommon.setRelationBackPostage(repair.getRepairBackPostage());
-                customerCommon.setRelationBackMachineNo(repair.getRepairBackMachineNo());
-                customerCommon.setRelationSendStatus(repair.getRepairSendStatus());
-                customerCommon.setRelationSendName(repair.getRepairSendName());
-                customerCommon.setRelationSendTel(repair.getRepairSendTel());
-                customerCommon.setProvinceNumber(repair.getProvinceNumber());
-                customerCommon.setCityNumber(repair.getCityNumber());
-                customerCommon.setAreaNumber(repair.getAreaNumber());
-                customerCommon.setRelationSendMergeAddress(repair.getRepairSendMergeAddress());
-                customerCommon.setRelationSendAddress(repair.getRepairSendAddress());
-                customerCommon.setRelationSendLogisticsCompany(repair.getRepairSendLogisticsCompany());
-                customerCommon.setRelationSendLogisticsNo(repair.getRepairSendLogisticsNo());
-                customerCommon.setRelationDesc(repair.getRepairDesc());
-                customerCommon.setRelationState(repair.getRepairState());
-                customerCommon.setRelationAlipay(repair.getRepairAlipay());
-                customerCommon.setRelationIsTransfer(repair.getRepairIsTransfer());
-                customerCommon.setRelationCreateTime(repair.getRepairCreateTime());
-                customerCommon.setRelationUpdateTime(repair.getRepairUpdateTime());
-                customerCommon.setMaintenanceIsRepair(repair.getMaintenanceIsRepair());
-                customerCommon.setDetectState(repair.getDetectState());
-                break;
-            case 5://补发
-                Reissue reissue = (Reissue)object;
-                customerCommon.setRelationId(reissue.getReissueId());
-                customerCommon.setCustomerId(reissue.getCustomerId());
-                customerCommon.setOrderId(reissue.getOrderId());
-                customerCommon.setRelationBackEfastOrderId(reissue.getReissueBackEfastOrderId());
-                customerCommon.setRelationSendStatus(reissue.getReissueSendStatus());
-                customerCommon.setRelationSendName(reissue.getReissueSendName());
-                customerCommon.setRelationSendTel(reissue.getReissueSendTel());
-                customerCommon.setProvinceNumber(reissue.getProvinceNumber());
-                customerCommon.setCityNumber(reissue.getCityNumber());
-                customerCommon.setAreaNumber(reissue.getAreaNumber());
-                customerCommon.setRelationSendMergeAddress(reissue.getReissueSendMergeAddress());
-                customerCommon.setRelationSendAddress(reissue.getReissueSendAddress());
-                customerCommon.setRelationSendLogisticsCompany(reissue.getReissueSendLogisticsCompany());
-                customerCommon.setRelationSendLogisticsNo(reissue.getReissueSendLogisticsNo());
-                customerCommon.setRelationDesc(reissue.getReissueDesc());
-                customerCommon.setRelationState(reissue.getReissueState());
-                customerCommon.setRelationCreateTime(reissue.getReissueCreateTime());
-                customerCommon.setRelationUpdateTime(reissue.getReissueUpdateTime());
-                break;
-            case 6://退货
-                BackGoods backGoods = (BackGoods)object;
-                customerCommon.setRelationId(backGoods.getBackGoodsId());
-                customerCommon.setCustomerId(backGoods.getCustomerId());
-                customerCommon.setOrderId(backGoods.getOrderId());
-                customerCommon.setSignclosedId(backGoods.getSignclosedId());
-                customerCommon.setRelationBackStatus(backGoods.getBackGoodsBackStatus());
-                customerCommon.setRelationBackName(backGoods.getBackGoodsBackName());
-                customerCommon.setRelationBackTel(backGoods.getBackGoodsBackTel());
-                customerCommon.setRelationBackLogisticsCompany(backGoods.getBackGoodsBackLogisticsCompany());
-                customerCommon.setRelationBackLogisticsNo(backGoods.getBackGoodsBackLogisticsNo());
-                customerCommon.setRelationBackPostage(backGoods.getBackGoodsBackPostage());
-                customerCommon.setRelationBackMachineNo(backGoods.getBackGoodsBackMachineNo());
-                customerCommon.setRelationDesc(backGoods.getBackGoodsDesc());
-                customerCommon.setRelationState(backGoods.getBackGoodsState());
-                customerCommon.setRelationAlipay(backGoods.getBackGoodsAlipay());
-                customerCommon.setRelationIsTransfer(backGoods.getBackGoodsIsTransfer());
-                customerCommon.setRelationCreateTime(backGoods.getBackGoodsCreateTime());
-                customerCommon.setRelationUpdateTime(backGoods.getBackGoodsUpdateTime());
-                customerCommon.setDetectState(backGoods.getDetectState());
-                break;
-            case 7://无理由退货
-                NoreasonBack noreasonBack = (NoreasonBack)object;
-                customerCommon.setRelationId(noreasonBack.getNoreasonBackId());
-                customerCommon.setCustomerId(noreasonBack.getCustomerId());
-                customerCommon.setOrderId(noreasonBack.getOrderId());
-                customerCommon.setSignclosedId(noreasonBack.getSignclosedId());
-                customerCommon.setRelationBackStatus(noreasonBack.getNoreasonBackBackStatus());
-                customerCommon.setRelationBackName(noreasonBack.getNoreasonBackBackName());
-                customerCommon.setRelationBackTel(noreasonBack.getNoreasonBackBackTel());
-                customerCommon.setRelationBackLogisticsCompany(noreasonBack.getNoreasonBackBackLogisticsCompany());
-                customerCommon.setRelationBackLogisticsNo(noreasonBack.getNoreasonBackBackLogisticsNo());
-                customerCommon.setRelationBackPostage(noreasonBack.getNoreasonBackBackPostage());
-                customerCommon.setRelationBackMachineNo(noreasonBack.getNoreasonBackBackMachineNo());
-                customerCommon.setRelationDesc(noreasonBack.getNoreasonBackDesc());
-                customerCommon.setRelationState(noreasonBack.getNoreasonBackState());
-                customerCommon.setRelationAlipay(noreasonBack.getNoreasonBackAlipay());
-                customerCommon.setRelationIsTransfer(noreasonBack.getNoreasonBackIsTransfer());
-                customerCommon.setRelationCreateTime(noreasonBack.getNoreasonBackCreateTime());
-                customerCommon.setRelationUpdateTime(noreasonBack.getNoreasonBackUpdateTime());
-                customerCommon.setDetectState(noreasonBack.getDetectState());
-                break;
-                default:
-                    customerCommon = null;
-                    break;
-        }
-        return customerCommon;
-    }
-
-
-    /**
-     * 将所有的寄回寄出中的类型改为  type
-     * 售后类型  3:换新;4:维修;5:补发;6:退货;7:无理由退货
-     * @param type
-     */
-    public static void setProduceOrFitting(Integer type,CustomerCommon cc){
-        for (int i=0;i<cc.getSendProdcues().size();i++) {
-            cc.getSendProdcues().get(i).setSendProduceType(type);
-            cc.getSendProdcues().get(i).setRelationId(cc.getRelationId());
-        }
-        for (int i=0;i<cc.getSendFittings().size();i++) {
-            cc.getSendFittings().get(i).setSendFittingType(type);
-            cc.getSendFittings().get(i).setRelationId(cc.getRelationId());
-        }
-        for (int i=0;i<cc.getClosedProdcues().size();i++) {
-            cc.getClosedProdcues().get(i).setClosedProdcueType(type);
-            cc.getClosedProdcues().get(i).setRelationId(cc.getRelationId());
-        }
-        for (int i=0;i<cc.getClosedFittings().size();i++) {
-            cc.getClosedFittings().get(i).setClosedFittingType(type);
-            cc.getClosedFittings().get(i).setRelationId(cc.getRelationId());
-        }
-    }
+
 
 }

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

@@ -30,7 +30,8 @@ public class CustomerInfo  implements Serializable {
     private String customerSource;
     //  咨询类型  1:售前咨询  2:售后咨询  3:其他 
     private Integer customerCounselType;
-    //  用户姓名 
+    //  用户姓名
+
     private String customerName;
     //  用户手机号码
     private String customerTel;

+ 3 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/NoreasonBack.java

@@ -8,6 +8,9 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
+/**
+ * 无理由退货
+ */
 public class NoreasonBack  implements Serializable {
     private static final long serialVersionUID = -8771772978569981906L;
     private Integer noreasonBackId;

+ 5 - 27
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerCommonService.java

@@ -6,39 +6,17 @@ import java.util.List;
 
 public interface CustomerCommonService {
     /**
-     * 获取寄回配件
-     * @param closedFitting
-     * @return
-     */
-    List<ClosedFitting> listClosedFitting(ClosedFitting closedFitting);
-
-    /**
-     * 获取寄回产品
-     * @param closedProdcue
-     * @return
-     */
-    List<ClosedProdcue> listClosedProdcue(ClosedProdcue closedProdcue);
-
-    /**
-     * 获取寄送产品
-     * @param sendProdcue
-     * @return
-     */
-    List<SendProdcue> listSendProdcue(SendProdcue sendProdcue);
-
-    /**
-     * 获取寄送配件
-     * @param sendFitting
+     * 获取寄送寄回的产品和配件
+     * @param customerCommon
      * @return
      */
-    List<SendFitting> listSendFitting(SendFitting sendFitting);
+    CustomerCommon getListProduceAndFitting(CustomerCommon customerCommon);
 
     /**
-     * 获取寄送寄回的产品和配件
+     * 按照处理状态,获取所有的处理内容
      * @param customerCommon
      * @return
      */
-    CustomerCommon getListProduceAndFitting(CustomerCommon customerCommon);
-
+    List<CustomerCommon> ListCustomerCommon(CustomerCommon customerCommon);
 
 }

+ 40 - 25
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerCommonServiceImpl.java

@@ -3,9 +3,11 @@ package com.iamberry.rst.service.cm;
 import com.iamberry.rst.core.cm.*;
 import com.iamberry.rst.faces.cm.CustomerCommonService;
 import com.iamberry.rst.service.cm.mapper.*;
+import com.iamberry.rst.util.CustomerCommonUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 @Service
@@ -32,49 +34,62 @@ public class CustomerCommonServiceImpl implements CustomerCommonService {
     @Autowired
     private SendFittingMapper sendFittingMapper;
 
-
-    @Override
-    public List<ClosedFitting> listClosedFitting(ClosedFitting closedFitting) {
-        return closedFittingMapper.listClosedFitting(closedFitting);
-    }
-
-    @Override
-    public List<ClosedProdcue> listClosedProdcue(ClosedProdcue closedProdcue) {
-        return closedProdcueMapper.listclosedProdcue(closedProdcue);
-    }
-
-    @Override
-    public List<SendProdcue> listSendProdcue(SendProdcue sendProdcue) {
-        return sendProdcueMapper.listSendProdcue(sendProdcue);
-    }
-
-    @Override
-    public List<SendFitting> listSendFitting(SendFitting sendFitting) {
-        return sendFittingMapper.listSendFitting(sendFitting);
-    }
-
     @Override
     public CustomerCommon getListProduceAndFitting(CustomerCommon customerCommon) {
         ClosedFitting closedFitting = new ClosedFitting();
         closedFitting.setClosedFittingType(customerCommon.getCustomerIsSolve());
         closedFitting.setRelationId(customerCommon.getRelationId());
-        customerCommon.setClosedFittings(customerCommonService.listClosedFitting(closedFitting));
+        customerCommon.setClosedFittings(closedFittingMapper.listClosedFitting(closedFitting));
 
         ClosedProdcue closedProdcue = new ClosedProdcue();
         closedProdcue.setClosedProdcueType(customerCommon.getCustomerIsSolve());
         closedProdcue.setRelationId(customerCommon.getRelationId());
-        customerCommon.setClosedProdcues(customerCommonService.listClosedProdcue(closedProdcue));
+        customerCommon.setClosedProdcues(closedProdcueMapper.listclosedProdcue(closedProdcue));
 
         SendProdcue sendProdcue = new SendProdcue();
         sendProdcue.setSendProduceType(customerCommon.getCustomerIsSolve());
         sendProdcue.setRelationId(customerCommon.getRelationId());
-        customerCommon.setSendProdcues(customerCommonService.listSendProdcue(sendProdcue));
+        customerCommon.setSendProdcues(sendProdcueMapper.listSendProdcue(sendProdcue));
 
         SendFitting sendFitting = new SendFitting();
         sendFitting.setSendFittingType(customerCommon.getCustomerIsSolve());
         sendFitting.setRelationId(customerCommon.getRelationId());
-        customerCommon.setSendFittings(customerCommonService.listSendFitting(sendFitting));
+        customerCommon.setSendFittings(sendFittingMapper.listSendFitting(sendFitting));
 
         return customerCommon;
     }
+
+    @Override
+    public List<CustomerCommon> ListCustomerCommon(CustomerCommon customerCommon) {
+        List<CustomerCommon> customerCommonList = new ArrayList<>();
+
+        /*换新*/
+        Renewed renewed = (Renewed)CustomerCommonUtil.getRelation(3,customerCommon);
+        List<Renewed> renewedList = renewedMapper.listRenewed(renewed);
+        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(3,renewedList));
+
+         /*维修*/
+        Repair repair = (Repair)CustomerCommonUtil.getRelation(4,customerCommon);
+        List<Repair> repairList = repairMapper.listRepair(repair);
+        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(4,repairList));
+
+        /*补发*/
+        Reissue reissue = (Reissue)CustomerCommonUtil.getRelation(5,customerCommon);
+        List<Reissue> reissueList = reissueMapper.listReissue(reissue);
+        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(5,reissueList));
+
+        /*退货*/
+        BackGoods backGoods = (BackGoods)CustomerCommonUtil.getRelation(6,customerCommon);
+        List<BackGoods> backGoodsList = backGoodsMapper.listBackGoods(backGoods);
+        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(6,backGoodsList));
+
+        /*无理由退货*/
+        NoreasonBack noreasonBack = (NoreasonBack)CustomerCommonUtil.getRelation(7,customerCommon);
+        List<NoreasonBack> noreasonBackList = noreasonBackMapper.listNoreasonBack(noreasonBack);
+        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(7,noreasonBackList));
+
+        return customerCommonList;
+    }
+
+
 }

+ 10 - 9
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -9,6 +9,7 @@ import com.iamberry.rst.faces.order.EfastOrderService;
 import com.iamberry.rst.service.address.mapper.AddressMapper;
 import com.iamberry.rst.service.cm.mapper.*;
 import com.iamberry.rst.service.product.mapper.ProductMapper;
+import com.iamberry.rst.util.CustomerCommonUtil;
 import com.iamberry.rst.util.PageUtil;
 import net.sf.json.JSONObject;
 import org.slf4j.Logger;
@@ -208,7 +209,7 @@ public class CustomerServiceImpl implements CustomerService {
             customerCommon.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储id
 
             /*将公共的对象 转换换新/维修/退款等*/
-            Object object = CustomerCommon.getRelation(customerInfo.getCustomerIsSolve(), customerCommon);
+            Object object = CustomerCommonUtil.getRelation(customerInfo.getCustomerIsSolve(), customerCommon);
 
             Integer relationId = 0;
             switch (customerInfo.getCustomerIsSolve()) {  //处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
@@ -244,7 +245,7 @@ public class CustomerServiceImpl implements CustomerService {
             logger.info("-----------添加客诉-添加换新/维修/补发/退货/无理由退货信息成功--------------");
             customerCommon.setRelationId(relationId);
 
-            CustomerCommon.setProduceOrFitting(customerInfo.getCustomerIsSolve(),customerCommon);
+            CustomerCommonUtil.setProduceOrFitting(customerInfo.getCustomerIsSolve(),customerCommon);
 
             if(customerCommon.getClosedFittings()!=null && customerCommon.getClosedFittings().size() > 0){
                 closedFittingMapper.insert(customerCommon.getClosedFittings());
@@ -392,7 +393,7 @@ public class CustomerServiceImpl implements CustomerService {
             logger.info("-----------修改客诉-创建仓储/品检成功--------------");
             customerCommon.setSignclosedId(complaintSignclosedInfo.getSignclosedId()); //设置仓储id
 
-            Object object = CustomerCommon.getRelation(customerInfo.getCustomerIsSolve(), customerCommon);
+            Object object = CustomerCommonUtil.getRelation(customerInfo.getCustomerIsSolve(), customerCommon);
             Integer relationId = 0;
             switch (customerInfo.getCustomerIsSolve()) {  //处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
                 case 3: //换新
@@ -427,7 +428,7 @@ public class CustomerServiceImpl implements CustomerService {
             logger.info("-----------修改客诉-添加换新/维修/补发/退货/无理由退货信息成功--------------");
             customerCommon.setRelationId(relationId);
 
-            CustomerCommon.setProduceOrFitting(customerInfo.getCustomerIsSolve(),customerCommon);
+            CustomerCommonUtil.setProduceOrFitting(customerInfo.getCustomerIsSolve(),customerCommon);
 
             if(customerCommon.getClosedFittings()!=null && customerCommon.getClosedFittings().size() > 0){
                 closedFittingMapper.insert(customerCommon.getClosedFittings());
@@ -1137,7 +1138,7 @@ public class CustomerServiceImpl implements CustomerService {
                 //查询售后换新详情
                 renewedInfo = renewedMapper.getRenewedInfo(renewedInfo);
                 orderId = renewedInfo.getOrderId();
-                customerCommon = CustomerCommon.getCustomerCommon(3,renewedInfo);
+                customerCommon = CustomerCommonUtil.getCustomerCommon(3,renewedInfo);
                 customerCommon = customerService.selectProdcueAndFitting(customerCommon,3);
                 break;
             case 4://维修
@@ -1150,7 +1151,7 @@ public class CustomerServiceImpl implements CustomerService {
                     repairInfo.setDetectState(repairInfo.getComplaintDetectList().get(0).getDetectState());
                 }
                 orderId = repairInfo.getOrderId();
-                customerCommon = CustomerCommon.getCustomerCommon(4,repairInfo);
+                customerCommon = CustomerCommonUtil.getCustomerCommon(4,repairInfo);
                 customerCommon = customerService.selectProdcueAndFitting(customerCommon,4);
                 break;
             case 5://补发
@@ -1164,7 +1165,7 @@ public class CustomerServiceImpl implements CustomerService {
                 }
                 reissueInfo = reissueList.get(0);
                 orderId = reissueInfo.getOrderId();
-                customerCommon = CustomerCommon.getCustomerCommon(5,reissueInfo);
+                customerCommon = CustomerCommonUtil.getCustomerCommon(5,reissueInfo);
                 customerCommon = customerService.selectProdcueAndFitting(customerCommon,5);
                 break;
             case 6://退货
@@ -1181,7 +1182,7 @@ public class CustomerServiceImpl implements CustomerService {
                     backGoodsInfo.setDetectState(backGoodsInfo.getComplaintDetectList().get(0).getDetectState());
                 }
                 orderId = backGoodsInfo.getOrderId();
-                customerCommon = CustomerCommon.getCustomerCommon(6,backGoodsInfo);
+                customerCommon = CustomerCommonUtil.getCustomerCommon(6,backGoodsInfo);
                 customerCommon = customerService.selectProdcueAndFitting(customerCommon,6);
                 break;
             case 7://无理由退货
@@ -1198,7 +1199,7 @@ public class CustomerServiceImpl implements CustomerService {
                     noreasonBackInfo.setDetectState(noreasonBackInfo.getComplaintDetectList().get(0).getDetectState());
                 }
                 orderId = noreasonBackInfo.getOrderId();
-                customerCommon = CustomerCommon.getCustomerCommon(7,noreasonBackInfo);
+                customerCommon = CustomerCommonUtil.getCustomerCommon(7,noreasonBackInfo);
                 customerCommon = customerService.selectProdcueAndFitting(customerCommon,7);
                 break;
         }

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

@@ -316,10 +316,10 @@
            question_id = #{questionId}
         </if>
         <if test="startTime!=null and startTime!='' ">
-           and DATE_FORMAT(customer_create_time,'%Y-%m-%d') &gt;= #{startTime}
+           and customer_create_time &gt;= #{startTime}
         </if>
         <if test="endTime!=null and endTime!=''">
-           and DATE_FORMAT(customer_create_time,'%Y-%m-%d') &lt;= #{endTime}
+           and customer_create_time &lt;= #{endTime}
         </if>
       </where>
   </select>

+ 338 - 0
watero-rst-service/src/main/java/com/iamberry/rst/util/CustomerCommonUtil.java

@@ -0,0 +1,338 @@
+package com.iamberry.rst.util;
+
+import com.iamberry.rst.core.cm.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CustomerCommonUtil {
+
+    /**
+     * @param type 处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
+     * @return
+     */
+    public static Object getRelation(Integer type,CustomerCommon c){
+        switch (type){
+            case 3: //换新
+                Renewed renewed = new Renewed();
+                renewed.setRenewedId(c.getRelationId());
+                renewed.setCustomerId(c.getCustomerId());
+                renewed.setOrderId(c.getOrderId());
+                renewed.setSignclosedId(c.getSignclosedId());
+                renewed.setRenewedBackEfastOrderId(c.getRelationBackEfastOrderId());
+                renewed.setRenewedBackStatus(c.getRelationBackStatus());
+                renewed.setRenewedBackName(c.getRelationBackName());
+                renewed.setRenewedBackTel(c.getRelationBackTel());
+                renewed.setRenewedBackLogisticsCompany(c.getRelationBackLogisticsCompany());
+                renewed.setRenewedBackLogisticsNo(c.getRelationBackLogisticsNo());
+                renewed.setRenewedBackPostage(c.getRelationBackPostage());
+                renewed.setRenewedBackMachineNo(c.getRelationBackMachineNo());
+                renewed.setRenewedSendStatus(c.getRelationSendStatus());
+                renewed.setRenewedSendName(c.getRelationSendName());
+                renewed.setRenewedSendTel(c.getRelationSendTel());
+                renewed.setProvinceNumber(c.getProvinceNumber());
+                renewed.setCityNumber(c.getCityNumber());
+                renewed.setAreaNumber(c.getAreaNumber());
+                renewed.setRenewedSendMergeAddress(c.getRelationSendMergeAddress());
+                renewed.setRenewedSendAddress(c.getRelationSendAddress());
+                renewed.setRenewedSendLogisticsCompany(c.getRelationSendLogisticsCompany());
+                renewed.setRenewedSendLogisticsNo(c.getRelationSendLogisticsNo());
+                renewed.setRenewedDesc(c.getRelationDesc());
+                renewed.setRenewedState(c.getRelationState());
+                renewed.setRenewedAlipay(c.getRelationAlipay());
+                renewed.setRenewedIsTransfer(c.getRelationIsTransfer());
+                renewed.setRenewedCreateTime(c.getRelationCreateTime());
+                renewed.setRenewedUpdateTime(c.getRelationUpdateTime());
+                return renewed;
+            case 4: //维修
+                Repair repair = new Repair();
+                repair.setRepairId(c.getRelationId());
+                repair.setCustomerId(c.getCustomerId());
+                repair.setOrderId(c.getOrderId());
+                repair.setSignclosedId(c.getSignclosedId());
+                repair.setRepairBackEfastOrderId( c.getRelationBackEfastOrderId());
+                repair.setRepairBackStatus(c.getRelationBackStatus());
+                repair.setRepairBackName(c.getRelationBackName());
+                repair.setRepairBackTel(c.getRelationBackTel());
+                repair.setRepairBackLogisticsCompany(c.getRelationBackLogisticsCompany());
+                repair.setRepairBackLogisticsNo(c.getRelationBackLogisticsNo());
+                repair.setRepairBackPostage(c.getRelationBackPostage());
+                repair.setRepairBackMachineNo(c.getRelationBackMachineNo());
+                repair.setRepairSendStatus(c.getRelationSendStatus());
+                repair.setRepairSendName(c.getRelationSendName());
+                repair.setRepairSendTel(c.getRelationSendTel());
+                repair.setProvinceNumber(c.getProvinceNumber());
+                repair.setCityNumber(c.getCityNumber());
+                repair.setAreaNumber(c.getAreaNumber());
+                repair.setRepairSendMergeAddress(c.getRelationSendMergeAddress());
+                repair.setRepairSendAddress(c.getRelationSendAddress());
+                repair.setRepairSendLogisticsCompany(c.getRelationSendLogisticsCompany());
+                repair.setRepairSendLogisticsNo(c.getRelationSendLogisticsNo());
+                repair.setRepairDesc(c.getRelationDesc());
+                repair.setRepairState(c.getRelationState());
+                repair.setRepairAlipay(c.getRelationAlipay());
+                repair.setRepairIsTransfer(c.getRelationIsTransfer());
+                repair.setRepairCreateTime(c.getRelationCreateTime());
+                repair.setRepairUpdateTime(c.getRelationUpdateTime());
+                return repair;
+            case 5://补发
+                Reissue reissue = new Reissue();
+                reissue.setReissueId(c.getRelationId());
+                reissue.setCustomerId(c.getCustomerId());
+                reissue.setOrderId(c.getOrderId());
+                reissue.setReissueBackEfastOrderId(c.getRelationBackEfastOrderId());
+                reissue.setReissueSendStatus(c.getRelationSendStatus());
+                reissue.setReissueSendName(c.getRelationSendName());
+                reissue.setReissueSendTel(c.getRelationSendTel());
+                reissue.setProvinceNumber(c.getProvinceNumber());
+                reissue.setCityNumber(c.getCityNumber());
+                reissue.setAreaNumber(c.getAreaNumber());
+                reissue.setReissueSendMergeAddress(c.getRelationSendMergeAddress());
+                reissue.setReissueSendAddress(c.getRelationSendAddress());
+                reissue.setReissueSendLogisticsCompany(c.getRelationSendLogisticsCompany());
+                reissue.setReissueSendLogisticsNo(c.getRelationSendLogisticsNo());
+                reissue.setReissueDesc(c.getRelationDesc());
+                reissue.setReissueState(c.getRelationState());
+                reissue.setReissueCreateTime(c.getRelationCreateTime());
+                reissue.setReissueUpdateTime(c.getRelationUpdateTime());
+                return reissue;
+            case 6://退货
+                BackGoods backGoods = new BackGoods();
+                backGoods.setBackGoodsId(c.getRelationId());
+                backGoods.setCustomerId(c.getCustomerId());
+                backGoods.setOrderId(c.getOrderId());
+                backGoods.setSignclosedId(c.getSignclosedId());
+                backGoods.setBackGoodsBackStatus(c.getRelationBackStatus());
+                backGoods.setBackGoodsBackName(c.getRelationBackName());
+                backGoods.setBackGoodsBackTel(c.getRelationBackTel());
+                backGoods.setBackGoodsBackLogisticsCompany(c.getRelationBackLogisticsCompany());
+                backGoods.setBackGoodsBackLogisticsNo(c.getRelationBackLogisticsNo());
+                backGoods.setBackGoodsBackPostage(c.getRelationBackPostage());
+                backGoods.setBackGoodsBackMachineNo(c.getRelationBackMachineNo());
+                backGoods.setBackGoodsDesc(c.getRelationDesc());
+                backGoods.setBackGoodsState(c.getRelationState());
+                backGoods.setBackGoodsAlipay(c.getRelationAlipay());
+                backGoods.setBackGoodsIsTransfer(c.getRelationIsTransfer());
+                backGoods.setBackGoodsCreateTime(c.getRelationCreateTime());
+                backGoods.setBackGoodsUpdateTime(c.getRelationUpdateTime());
+                return backGoods;
+            case 7://无理由退货
+                NoreasonBack noreasonBack = new NoreasonBack();
+                noreasonBack.setNoreasonBackId( c.getRelationId());
+                noreasonBack.setCustomerId(c.getCustomerId());
+                noreasonBack.setOrderId(c.getOrderId());
+                noreasonBack.setSignclosedId(c.getSignclosedId());
+                noreasonBack.setNoreasonBackBackStatus(c.getRelationBackStatus());
+                noreasonBack.setNoreasonBackBackName(c.getRelationBackName());
+                noreasonBack.setNoreasonBackBackTel(c.getRelationBackTel());
+                noreasonBack.setNoreasonBackBackLogisticsCompany(c.getRelationBackLogisticsCompany());
+                noreasonBack.setNoreasonBackBackLogisticsNo(c.getRelationBackLogisticsNo());
+                noreasonBack.setNoreasonBackBackPostage(c.getRelationBackPostage());
+                noreasonBack.setNoreasonBackBackMachineNo(c.getRelationBackMachineNo());
+                noreasonBack.setNoreasonBackDesc(c.getRelationDesc());
+                noreasonBack.setNoreasonBackState(c.getRelationState());
+                noreasonBack.setNoreasonBackAlipay(c.getRelationAlipay());
+                noreasonBack.setNoreasonBackIsTransfer(c.getRelationIsTransfer());
+                noreasonBack.setNoreasonBackCreateTime(c.getRelationCreateTime());
+                noreasonBack.setNoreasonBackUpdateTime(c.getRelationUpdateTime());
+                return noreasonBack;
+            default :
+                return null;
+        }
+    }
+
+
+
+
+    /**
+     * 封装参数
+     * @param solve  处理类型
+     * @param object
+     * @return
+     */
+    public static CustomerCommon getCustomerCommon(int solve, Object object) {
+        if (object == null) {
+            return null;
+        }
+        CustomerCommon customerCommon = new CustomerCommon();
+        switch (solve) {
+            case 3://换新
+                Renewed renewed = (Renewed)object;
+                customerCommon.setRelationId(renewed.getRenewedId());
+                customerCommon.setCustomerId(renewed.getCustomerId());
+                customerCommon.setOrderId(renewed.getOrderId());
+                customerCommon.setSignclosedId(renewed.getSignclosedId());
+                customerCommon.setRelationBackEfastOrderId(renewed.getRenewedBackEfastOrderId());
+                customerCommon.setRelationBackStatus(renewed.getRenewedBackStatus());
+                customerCommon.setRelationBackName(renewed.getRenewedBackName());
+                customerCommon.setRelationBackTel(renewed.getRenewedBackTel());
+                customerCommon.setRelationBackLogisticsCompany(renewed.getRenewedBackLogisticsCompany());
+                customerCommon.setRelationBackLogisticsNo(renewed.getRenewedBackLogisticsNo());
+                customerCommon.setRelationBackPostage(renewed.getRenewedBackPostage());
+                customerCommon.setRelationBackMachineNo(renewed.getRenewedBackMachineNo());
+                customerCommon.setRelationSendStatus(renewed.getRenewedSendStatus());
+                customerCommon.setRelationSendName(renewed.getRenewedSendName());
+                customerCommon.setRelationSendTel(renewed.getRenewedSendTel());
+                customerCommon.setProvinceNumber(renewed.getProvinceNumber());
+                customerCommon.setCityNumber(renewed.getCityNumber());
+                customerCommon.setAreaNumber(renewed.getAreaNumber());
+                customerCommon.setRelationSendMergeAddress(renewed.getRenewedSendMergeAddress());
+                customerCommon.setRelationSendAddress(renewed.getRenewedSendAddress());
+                customerCommon.setRelationSendLogisticsCompany(renewed.getRenewedSendLogisticsCompany());
+                customerCommon.setRelationSendLogisticsNo(renewed.getRenewedSendLogisticsNo());
+                customerCommon.setRelationDesc(renewed.getRenewedDesc());
+                customerCommon.setRelationState(renewed.getRenewedState());
+                customerCommon.setRelationAlipay(renewed.getRenewedAlipay());
+                customerCommon.setRelationIsTransfer(renewed.getRenewedIsTransfer());
+                customerCommon.setRelationCreateTime(renewed.getRenewedCreateTime());
+                customerCommon.setRelationUpdateTime(renewed.getRenewedUpdateTime());
+                customerCommon.setMaintenanceIsRepair(renewed.getMaintenanceIsRepair());
+                break;
+            case 4://维修
+                Repair repair = (Repair)object;
+                customerCommon.setRelationId(repair.getRepairId());
+                customerCommon.setCustomerId(repair.getCustomerId());
+                customerCommon.setOrderId(repair.getOrderId());
+                customerCommon.setSignclosedId(repair.getSignclosedId());
+                customerCommon.setRelationBackEfastOrderId(repair.getRepairBackEfastOrderId());
+                customerCommon.setRelationBackStatus(repair.getRepairBackStatus());
+                customerCommon.setRelationBackName(repair.getRepairBackName());
+                customerCommon.setRelationBackTel(repair.getRepairBackTel());
+                customerCommon.setRelationBackLogisticsCompany(repair.getRepairBackLogisticsCompany());
+                customerCommon.setRelationBackLogisticsNo(repair.getRepairBackLogisticsNo());
+                customerCommon.setRelationBackPostage(repair.getRepairBackPostage());
+                customerCommon.setRelationBackMachineNo(repair.getRepairBackMachineNo());
+                customerCommon.setRelationSendStatus(repair.getRepairSendStatus());
+                customerCommon.setRelationSendName(repair.getRepairSendName());
+                customerCommon.setRelationSendTel(repair.getRepairSendTel());
+                customerCommon.setProvinceNumber(repair.getProvinceNumber());
+                customerCommon.setCityNumber(repair.getCityNumber());
+                customerCommon.setAreaNumber(repair.getAreaNumber());
+                customerCommon.setRelationSendMergeAddress(repair.getRepairSendMergeAddress());
+                customerCommon.setRelationSendAddress(repair.getRepairSendAddress());
+                customerCommon.setRelationSendLogisticsCompany(repair.getRepairSendLogisticsCompany());
+                customerCommon.setRelationSendLogisticsNo(repair.getRepairSendLogisticsNo());
+                customerCommon.setRelationDesc(repair.getRepairDesc());
+                customerCommon.setRelationState(repair.getRepairState());
+                customerCommon.setRelationAlipay(repair.getRepairAlipay());
+                customerCommon.setRelationIsTransfer(repair.getRepairIsTransfer());
+                customerCommon.setRelationCreateTime(repair.getRepairCreateTime());
+                customerCommon.setRelationUpdateTime(repair.getRepairUpdateTime());
+                customerCommon.setMaintenanceIsRepair(repair.getMaintenanceIsRepair());
+                customerCommon.setDetectState(repair.getDetectState());
+                break;
+            case 5://补发
+                Reissue reissue = (Reissue)object;
+                customerCommon.setRelationId(reissue.getReissueId());
+                customerCommon.setCustomerId(reissue.getCustomerId());
+                customerCommon.setOrderId(reissue.getOrderId());
+                customerCommon.setRelationBackEfastOrderId(reissue.getReissueBackEfastOrderId());
+                customerCommon.setRelationSendStatus(reissue.getReissueSendStatus());
+                customerCommon.setRelationSendName(reissue.getReissueSendName());
+                customerCommon.setRelationSendTel(reissue.getReissueSendTel());
+                customerCommon.setProvinceNumber(reissue.getProvinceNumber());
+                customerCommon.setCityNumber(reissue.getCityNumber());
+                customerCommon.setAreaNumber(reissue.getAreaNumber());
+                customerCommon.setRelationSendMergeAddress(reissue.getReissueSendMergeAddress());
+                customerCommon.setRelationSendAddress(reissue.getReissueSendAddress());
+                customerCommon.setRelationSendLogisticsCompany(reissue.getReissueSendLogisticsCompany());
+                customerCommon.setRelationSendLogisticsNo(reissue.getReissueSendLogisticsNo());
+                customerCommon.setRelationDesc(reissue.getReissueDesc());
+                customerCommon.setRelationState(reissue.getReissueState());
+                customerCommon.setRelationCreateTime(reissue.getReissueCreateTime());
+                customerCommon.setRelationUpdateTime(reissue.getReissueUpdateTime());
+                break;
+            case 6://退货
+                BackGoods backGoods = (BackGoods)object;
+                customerCommon.setRelationId(backGoods.getBackGoodsId());
+                customerCommon.setCustomerId(backGoods.getCustomerId());
+                customerCommon.setOrderId(backGoods.getOrderId());
+                customerCommon.setSignclosedId(backGoods.getSignclosedId());
+                customerCommon.setRelationBackStatus(backGoods.getBackGoodsBackStatus());
+                customerCommon.setRelationBackName(backGoods.getBackGoodsBackName());
+                customerCommon.setRelationBackTel(backGoods.getBackGoodsBackTel());
+                customerCommon.setRelationBackLogisticsCompany(backGoods.getBackGoodsBackLogisticsCompany());
+                customerCommon.setRelationBackLogisticsNo(backGoods.getBackGoodsBackLogisticsNo());
+                customerCommon.setRelationBackPostage(backGoods.getBackGoodsBackPostage());
+                customerCommon.setRelationBackMachineNo(backGoods.getBackGoodsBackMachineNo());
+                customerCommon.setRelationDesc(backGoods.getBackGoodsDesc());
+                customerCommon.setRelationState(backGoods.getBackGoodsState());
+                customerCommon.setRelationAlipay(backGoods.getBackGoodsAlipay());
+                customerCommon.setRelationIsTransfer(backGoods.getBackGoodsIsTransfer());
+                customerCommon.setRelationCreateTime(backGoods.getBackGoodsCreateTime());
+                customerCommon.setRelationUpdateTime(backGoods.getBackGoodsUpdateTime());
+                customerCommon.setDetectState(backGoods.getDetectState());
+                break;
+            case 7://无理由退货
+                NoreasonBack noreasonBack = (NoreasonBack)object;
+                customerCommon.setRelationId(noreasonBack.getNoreasonBackId());
+                customerCommon.setCustomerId(noreasonBack.getCustomerId());
+                customerCommon.setOrderId(noreasonBack.getOrderId());
+                customerCommon.setSignclosedId(noreasonBack.getSignclosedId());
+                customerCommon.setRelationBackStatus(noreasonBack.getNoreasonBackBackStatus());
+                customerCommon.setRelationBackName(noreasonBack.getNoreasonBackBackName());
+                customerCommon.setRelationBackTel(noreasonBack.getNoreasonBackBackTel());
+                customerCommon.setRelationBackLogisticsCompany(noreasonBack.getNoreasonBackBackLogisticsCompany());
+                customerCommon.setRelationBackLogisticsNo(noreasonBack.getNoreasonBackBackLogisticsNo());
+                customerCommon.setRelationBackPostage(noreasonBack.getNoreasonBackBackPostage());
+                customerCommon.setRelationBackMachineNo(noreasonBack.getNoreasonBackBackMachineNo());
+                customerCommon.setRelationDesc(noreasonBack.getNoreasonBackDesc());
+                customerCommon.setRelationState(noreasonBack.getNoreasonBackState());
+                customerCommon.setRelationAlipay(noreasonBack.getNoreasonBackAlipay());
+                customerCommon.setRelationIsTransfer(noreasonBack.getNoreasonBackIsTransfer());
+                customerCommon.setRelationCreateTime(noreasonBack.getNoreasonBackCreateTime());
+                customerCommon.setRelationUpdateTime(noreasonBack.getNoreasonBackUpdateTime());
+                customerCommon.setDetectState(noreasonBack.getDetectState());
+                break;
+            default:
+                customerCommon = null;
+                break;
+        }
+        return customerCommon;
+    }
+
+    /**
+     * 封装参数  list
+     * @param solve  处理类型
+     * @param relationList
+     * @return
+     */
+    public static List<CustomerCommon> listToCustomerCommon(int solve,List<?> relationList){
+        List<CustomerCommon> ccList = new ArrayList<>();
+        for (Object relation : relationList){
+            CustomerCommon cc = CustomerCommonUtil.getCustomerCommon(solve,relationList);
+            ccList.add(cc);
+        }
+        return ccList;
+    }
+
+
+    /**
+     * 将所有的寄回寄出中的类型改为  type
+     * 售后类型  3:换新;4:维修;5:补发;6:退货;7:无理由退货
+     * @param type
+     */
+    public static void setProduceOrFitting(Integer type,CustomerCommon cc){
+        for (int i=0;i<cc.getSendProdcues().size();i++) {
+            cc.getSendProdcues().get(i).setSendProduceType(type);
+            cc.getSendProdcues().get(i).setRelationId(cc.getRelationId());
+        }
+        for (int i=0;i<cc.getSendFittings().size();i++) {
+            cc.getSendFittings().get(i).setSendFittingType(type);
+            cc.getSendFittings().get(i).setRelationId(cc.getRelationId());
+        }
+        for (int i=0;i<cc.getClosedProdcues().size();i++) {
+            cc.getClosedProdcues().get(i).setClosedProdcueType(type);
+            cc.getClosedProdcues().get(i).setRelationId(cc.getRelationId());
+        }
+        for (int i=0;i<cc.getClosedFittings().size();i++) {
+            cc.getClosedFittings().get(i).setClosedFittingType(type);
+            cc.getClosedFittings().get(i).setRelationId(cc.getRelationId());
+        }
+    }
+
+
+
+
+
+}

+ 6 - 5
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -12,6 +12,7 @@ import com.iamberry.rst.faces.cm.*;
 import com.iamberry.rst.faces.product.ProductService;
 import com.iamberry.rst.faces.sms.SmsService;
 import com.iamberry.rst.faces.sys.SysService;
+import com.iamberry.rst.util.CustomerCommonUtil;
 import com.iamberry.rst.util.SmsConfig;
 import com.iamberry.rst.utils.AdminUtils;
 import com.iamberry.rst.utils.OrderNoUtil;
@@ -174,31 +175,31 @@ public class AdminCustomerController {
                     Renewed renewed = new Renewed();
                     renewed.setCustomerId(customerInfo.getCustomerId());
                     renewed = renewedService.getRenewed(renewed);
-                    customerCommon = customerCommon.getCustomerCommon(3,renewed);
+                    customerCommon = CustomerCommonUtil.getCustomerCommon(3,renewed);
                     break;
                 case 4://维修
                     Repair repair = new Repair();
                     repair.setCustomerId(customerInfo.getCustomerId());
                     repair = repairService.getRepair(repair);
-                    customerCommon = customerCommon.getCustomerCommon(4,repair);
+                    customerCommon = CustomerCommonUtil.getCustomerCommon(4,repair);
                     break;
                 case 5:
                     Reissue reissue = new  Reissue();
                     reissue.setCustomerId(customerInfo.getCustomerId());
                     reissue = reissueService.getReissue(reissue);
-                    customerCommon = customerCommon.getCustomerCommon(5,reissue);
+                    customerCommon = CustomerCommonUtil.getCustomerCommon(5,reissue);
                     break;
                 case 6:
                     BackGoods backGoods = new  BackGoods();
                     backGoods.setCustomerId(customerInfo.getCustomerId());
                     backGoods = backGoodsService.getBackGoods(backGoods);
-                    customerCommon = customerCommon.getCustomerCommon(6,backGoods);
+                    customerCommon = CustomerCommonUtil.getCustomerCommon(6,backGoods);
                     break;
                 case 7:
                     NoreasonBack noreasonBack = new  NoreasonBack();
                     noreasonBack.setCustomerId(customerInfo.getCustomerId());
                     noreasonBack = noreasonBackService.getNoreasonBack(noreasonBack);
-                    customerCommon = customerCommon.getCustomerCommon(7,noreasonBack);
+                    customerCommon = CustomerCommonUtil.getCustomerCommon(7,noreasonBack);
                     break;
             }
 

+ 7 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerReportController.java

@@ -48,7 +48,13 @@ public class AdminCustomerReportController {
     @RequestMapping(value = "/question_statistics")
     public ResponseJson listStoreInfo(HttpServletRequest request,CustomerInfo customerInfo) {
 
-        Date customerUpdateTime = customerInfo.getCustomerUpdateTime();
+        Date customerEndTime = customerInfo.getEndTime();
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(customerEndTime);
+        calendar.set(Calendar.HOUR_OF_DAY, 23);
+        calendar.set(Calendar.MINUTE, 59);
+        calendar.set(Calendar.SECOND, 59);
+        customerInfo.setEndTime(calendar.getTime());
 
         ComplaintTypeInfo complaintTypeInfo = new ComplaintTypeInfo();
         List<ComplaintTypeInfo> complaintTypeInfoList = complaintTypeInfoService.listComplaintQuestionToReport(complaintTypeInfo);

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

@@ -136,7 +136,14 @@
                         <tr class="text-c">
                             <td>${customer.customerId!''}</td>
                             <td>${customer.adminName!''}</td>
-                            <td>${customer.customerName!''}</td>
+                            <td>${customer.customerName!''}
+                                <#if customer.customerWechatName?? >
+                                    <#if customer.customerWechatName?length gt 0 >
+                                        <br>(${customer.customerWechatName})
+                                    </#if>
+                                </#if>
+                            </td>
+
                             <#if (customer.customerTel)?? && customer.customerTel?length gt 7>
                                 <td>${customer.customerTel?substring(0,3)}***${customer.customerTel?substring(customer.customerTel?length-4,customer.customerTel?length)}</td>
                             <#else>
@@ -342,7 +349,7 @@
                         </tr>
                     </#list>
             <#else>
-                <tr><td colspan="16" class="td-manage text-c" >暂时没有客诉信息,请添加!</td></tr>
+                <tr><td colspan="17" class="td-manage text-c" >暂时没有客诉信息,请添加!</td></tr>
             </#if>
         </tbody>
     </table>

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

@@ -643,10 +643,10 @@
                 <div class="row cl">
                     <label class="form-label col-1 col-sm-1"><span class="c-red">*</span>被回访人:</label>
                     <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text" value="${visitName!''}" placeholder="填写回访人姓名" id="" name="visitName"   datatype="/^[\u4e00-\u9fa5]{1,20}$/" errormsg="回访人姓名格式不正确!" >
+                        <input type="text" class="input-text" value="${visitName!''}" placeholder="填写回访人姓名" id="" name="visitName"   errormsg="回访人姓名格式不正确!" >
                     </div>
                     <div class="formControls col-2 col-sm-2">
-                        <input type="text" class="input-text associated-phone" value="${customerTel!''}" placeholder="填写回访人手机号" id="" name="visitTel" datatype="m" errormsg="回访人手机号码格式不正确!">
+                        <input type="text" class="input-text associated-phone" value="${customerTel!''}" placeholder="填写回访人手机号" id="" name="visitTel"  errormsg="回访人手机号码格式不正确!">
                     </div>
                 </div>
                 <div class="row cl">