|
@@ -120,31 +120,77 @@ public class CustomerServiceImpl implements CustomerService {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public CustomerInfo getCustomerInfo(CustomerInfo customerInfo) {
|
|
|
|
|
|
+ public CustomerCommon getCustomerInfo(CustomerInfo customerInfo) {
|
|
|
|
+ CustomerCommon customerCommon = new CustomerCommon();
|
|
//查询客诉列表
|
|
//查询客诉列表
|
|
List<CustomerInfo> customerList = customerInfoMapper.listCustomer(customerInfo);
|
|
List<CustomerInfo> customerList = customerInfoMapper.listCustomer(customerInfo);
|
|
if (customerList == null || customerList.size() == 0) {
|
|
if (customerList == null || customerList.size() == 0) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
CustomerInfo customer = customerList.get(0);
|
|
CustomerInfo customer = customerList.get(0);
|
|
-
|
|
|
|
- //查询售后维修集合
|
|
|
|
- Repair repairInfo = new Repair();
|
|
|
|
- repairInfo.setRepairState(1);
|
|
|
|
- List<Repair> repairList = repairMapper.listRepair(repairInfo);
|
|
|
|
- //查询售后退货集合
|
|
|
|
- BackGoods backGoodsInfo = new BackGoods();
|
|
|
|
- backGoodsInfo.setBackGoodsState(1);
|
|
|
|
- List<BackGoods> backGoodsList = backGoodsMapper.listBackGoods(backGoodsInfo);
|
|
|
|
- //查询售后无理由退货集合
|
|
|
|
- NoreasonBack noreasonBackInfo = new NoreasonBack();
|
|
|
|
- noreasonBackInfo.setNoreasonBackState(1);
|
|
|
|
- List<NoreasonBack> noreasonBackList = noreasonBackMapper.listNoreasonBack(noreasonBackInfo);
|
|
|
|
- //查询售后补发集合
|
|
|
|
- Reissue reissueInfo = new Reissue();
|
|
|
|
- reissueInfo.setReissueState(1);
|
|
|
|
- List<Reissue> reissueList = reissueMapper.listReissue(reissueInfo);
|
|
|
|
- return customer;
|
|
|
|
|
|
+ switch (customer.getCustomerIsSolve().intValue()) {
|
|
|
|
+ case 3://换新
|
|
|
|
+ //查询售后换新集合
|
|
|
|
+ Renewed renewedInfo = new Renewed();
|
|
|
|
+ renewedInfo.setRenewedState(1);
|
|
|
|
+ renewedInfo.setCustomerId(customerInfo.getCustomerId());
|
|
|
|
+ List<Renewed> renewedList = renewedMapper.listRenewed(renewedInfo);
|
|
|
|
+ if (renewedList == null || renewedList.size() == 0) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ renewedInfo = renewedList.get(0);
|
|
|
|
+ customerCommon = CustomerCommon.getCustomerCommon(3,renewedInfo);
|
|
|
|
+ break;
|
|
|
|
+ case 4://维修
|
|
|
|
+ //查询售后维修集合
|
|
|
|
+ Repair repairInfo = new Repair();
|
|
|
|
+ repairInfo.setRepairState(1);
|
|
|
|
+ repairInfo.setCustomerId(customerInfo.getCustomerId());
|
|
|
|
+ List<Repair> repairList = repairMapper.listRepair(repairInfo);
|
|
|
|
+ if (repairList == null || repairList.size() == 0) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ repairInfo = repairList.get(0);
|
|
|
|
+ customerCommon = CustomerCommon.getCustomerCommon(4,repairInfo);
|
|
|
|
+ break;
|
|
|
|
+ case 5://补发
|
|
|
|
+ //查询售后补发集合
|
|
|
|
+ Reissue reissueInfo = new Reissue();
|
|
|
|
+ reissueInfo.setReissueState(1);
|
|
|
|
+ reissueInfo.setCustomerId(customerInfo.getCustomerId());
|
|
|
|
+ List<Reissue> reissueList = reissueMapper.listReissue(reissueInfo);
|
|
|
|
+ if (reissueList == null || reissueList.size() == 0) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ reissueInfo = reissueList.get(0);
|
|
|
|
+ customerCommon = CustomerCommon.getCustomerCommon(5,reissueInfo);
|
|
|
|
+ break;
|
|
|
|
+ case 6://退货
|
|
|
|
+ //查询售后退货集合
|
|
|
|
+ BackGoods backGoodsInfo = new BackGoods();
|
|
|
|
+ backGoodsInfo.setBackGoodsState(1);
|
|
|
|
+ backGoodsInfo.setCustomerId(customerInfo.getCustomerId());
|
|
|
|
+ List<BackGoods> backGoodsList = backGoodsMapper.listBackGoods(backGoodsInfo);
|
|
|
|
+ if (backGoodsList == null || backGoodsList.size() == 0) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ backGoodsInfo = backGoodsList.get(0);
|
|
|
|
+ customerCommon = CustomerCommon.getCustomerCommon(6,backGoodsInfo);
|
|
|
|
+ break;
|
|
|
|
+ case 7://无理由退货
|
|
|
|
+ //查询售后无理由退货集合
|
|
|
|
+ NoreasonBack noreasonBackInfo = new NoreasonBack();
|
|
|
|
+ noreasonBackInfo.setNoreasonBackState(1);
|
|
|
|
+ noreasonBackInfo.setCustomerId(customerInfo.getCustomerId());
|
|
|
|
+ List<NoreasonBack> noreasonBackList = noreasonBackMapper.listNoreasonBack(noreasonBackInfo);
|
|
|
|
+ if (noreasonBackList == null || noreasonBackList.size() == 0) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ noreasonBackInfo = noreasonBackList.get(0);
|
|
|
|
+ customerCommon = CustomerCommon.getCustomerCommon(7,noreasonBackInfo);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ return customerCommon;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|