|
@@ -627,6 +627,99 @@ public class CustomerServiceImpl implements CustomerService {
|
|
|
return listCustomer.size();
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<CustomerInfo> listOnCustomer(CustomerInfo customerInfo) {
|
|
|
+ List<CustomerInfo> customerList = customerInfoMapper.listOnCustomer(customerInfo);
|
|
|
+ //查询售后维修集合
|
|
|
+ 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);
|
|
|
+ //查询售后换新集合
|
|
|
+ Renewed renewedInfo = new Renewed();
|
|
|
+ renewedInfo.setRenewedState(1);
|
|
|
+ List<Renewed> renewedList = renewedMapper.listRenewed(renewedInfo);
|
|
|
+
|
|
|
+ if (customerList != null && customerList.size() > 0) {
|
|
|
+ for (CustomerInfo customer : customerList) {
|
|
|
+ switch (customer.getCustomerIsSolve().intValue()) {
|
|
|
+ case 3: //换新
|
|
|
+ for (Renewed renewed : renewedList) {
|
|
|
+ if (renewed.getCustomerId().intValue() == customer.getCustomerId()) {
|
|
|
+ customer.setBackStatus(renewed.getRenewedBackStatus());
|
|
|
+ customer.setSendStatus(renewed.getRenewedSendStatus());
|
|
|
+ customer.setSalesTime(renewed.getSalesPayTime());
|
|
|
+ customer.setSendLogisticsNo(renewed.getRenewedSendLogisticsNo());
|
|
|
+ customer.setSendLogisticsCompany(renewed.getRenewedSendLogisticsCompany());
|
|
|
+ customer.setBackLogisticsNo(renewed.getRenewedBackLogisticsNo());
|
|
|
+ customer.setBackLogisticsCompany(renewed.getRenewedBackLogisticsCompany());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 4: //维修
|
|
|
+ for (Repair repair : repairList) {
|
|
|
+ if (repair.getCustomerId().intValue() == customer.getCustomerId()) {
|
|
|
+ customer.setBackStatus(repair.getRepairBackStatus());
|
|
|
+ customer.setSendStatus(repair.getRepairSendStatus());
|
|
|
+ customer.setSalesTime(repair.getSalesPayTime());
|
|
|
+ customer.setSendLogisticsNo(repair.getRepairSendLogisticsNo());
|
|
|
+ customer.setSendLogisticsCompany(repair.getRepairSendLogisticsCompany());
|
|
|
+ customer.setBackLogisticsNo(repair.getRepairBackLogisticsNo());
|
|
|
+ customer.setBackLogisticsCompany(repair.getRepairBackLogisticsCompany());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 5: //补发
|
|
|
+ for (Reissue reissue : reissueList) {
|
|
|
+ if (reissue.getCustomerId().intValue() == customer.getCustomerId()) {
|
|
|
+ customer.setSendStatus(reissue.getReissueSendStatus());
|
|
|
+ customer.setSalesTime(reissue.getSalesPayTime());
|
|
|
+ customer.setBackLogisticsNo(reissue.getReissueSendLogisticsNo());
|
|
|
+ customer.setBackLogisticsCompany(reissue.getReissueSendLogisticsCompany());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 6: //退货
|
|
|
+ for (BackGoods backGoods : backGoodsList) {
|
|
|
+ if (backGoods.getCustomerId().intValue() == customer.getCustomerId()) {
|
|
|
+ customer.setBackStatus(backGoods.getBackGoodsBackStatus());
|
|
|
+ customer.setSalesTime(backGoods.getSalesPayTime());
|
|
|
+ customer.setSendLogisticsNo(backGoods.getBackGoodsBackLogisticsNo());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 7: //无理由退货
|
|
|
+ for (NoreasonBack noreasonBack : noreasonBackList) {
|
|
|
+ if (noreasonBack.getCustomerId().intValue() == customer.getCustomerId()) {
|
|
|
+ customer.setBackStatus(noreasonBack.getNoreasonBackBackStatus());
|
|
|
+ customer.setSalesTime(noreasonBack.getSalesPayTime());
|
|
|
+ customer.setSendLogisticsNo(noreasonBack.getNoreasonBackBackLogisticsNo());
|
|
|
+ customer.setSendLogisticsCompany(noreasonBack.getNoreasonBackBackLogisticsCompany());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return customerList;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 产品配件初始化
|
|
|
* @param cc
|