Browse Source

添加公共类封装参数方法

liuzhiwei 7 years ago
parent
commit
4d7f36a062

+ 140 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/CustomerCommon.java

@@ -289,4 +289,144 @@ public class CustomerCommon implements Serializable {
     public void setRelationUpdateTime(Date relationUpdateTime) {
         this.relationUpdateTime = relationUpdateTime;
     }
+
+
+    /**
+     * 封装参数
+     * @param solve  处理类型
+     * @param object
+     * @return
+     */
+    public 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());
+                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());
+                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 = new BackGoods();
+                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());
+                break;
+            case 7:
+                NoreasonBack noreasonBack = new NoreasonBack();
+                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());
+                break;
+        }
+        return customerCommon;
+    }
 }