|
@@ -73,18 +73,6 @@ public class AdminCustomerController {
|
|
|
@Autowired
|
|
|
private QuestionDescribeService questionDescribeService;
|
|
|
@Autowired
|
|
|
- private RenewedService renewedService;
|
|
|
- @Autowired
|
|
|
- private RepairService repairService;
|
|
|
- @Autowired
|
|
|
- private BackGoodsService backGoodsService;
|
|
|
- @Autowired
|
|
|
- private FittingsInfoService fittingsInfoService;
|
|
|
- @Autowired
|
|
|
- private ReissueService reissueService;
|
|
|
- @Autowired
|
|
|
- private NoreasonBackService noreasonBackService;
|
|
|
- @Autowired
|
|
|
private ComplaintQuestionInfoService complaintQuestionInfoService;
|
|
|
@Autowired
|
|
|
private SmsService smsService;
|
|
@@ -93,8 +81,6 @@ public class AdminCustomerController {
|
|
|
@Autowired
|
|
|
private ComplaintSmallClassInfoService complaintSmallClassInfoService;
|
|
|
@Autowired
|
|
|
- private CustomerCommonService customerCommonService;
|
|
|
- @Autowired
|
|
|
private AddressService addressService;
|
|
|
@Autowired
|
|
|
private PostageService postageService;
|
|
@@ -109,7 +95,6 @@ public class AdminCustomerController {
|
|
|
@Autowired
|
|
|
private ProcMethodService procMethodService ;
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 获取客诉列表
|
|
|
*
|
|
@@ -326,17 +311,6 @@ public class AdminCustomerController {
|
|
|
salesOrderItem.setItemProductDiscount(productColor.getColorDiscount());
|
|
|
salesOrderItem.setItemIsSource(1);
|
|
|
salesAmount += productColor.getColorDiscount();
|
|
|
- } else if (salesOrderItem.getItemIsSource() == 2) {
|
|
|
- Product product = productService.getProductByFittingsId(salesOrderItem.getItemColorId());
|
|
|
- FittingsInfo fittingsInfo = fittingsInfoService.getFittingsById(salesOrderItem.getItemColorId());
|
|
|
- salesOrderItem.setItemProductType(product.getProductType());
|
|
|
- salesOrderItem.setItemProductName(product.getProductName());
|
|
|
- salesOrderItem.setItemProductColor(fittingsInfo.getFittingsName());
|
|
|
- salesOrderItem.setItemColorBar(fittingsInfo.getFittingsBar());
|
|
|
- salesOrderItem.setItemProductPrice(fittingsInfo.getFittingsPrice());
|
|
|
- salesOrderItem.setItemProductDiscount(fittingsInfo.getFittingsDiscount());
|
|
|
- salesOrderItem.setItemIsSource(2);
|
|
|
- salesAmount += fittingsInfo.getFittingsDiscount();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -746,28 +720,6 @@ public class AdminCustomerController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 查询产品
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @return
|
|
|
- */
|
|
|
- @ResponseBody
|
|
|
- @RequiresPermissions("customer:add:customer")
|
|
|
- @RequestMapping("/select_produce_fittings")
|
|
|
- public ResponseJson selectProduceFittings(HttpServletRequest request, FittingsInfo fittingsInfo) {
|
|
|
- ResponseJson rj = new ResponseJson(200, "查询成功!", 200);
|
|
|
-
|
|
|
- List<FittingsInfo> produceFittingsList = fittingsInfoService.listFittings(fittingsInfo);
|
|
|
-
|
|
|
- if (produceFittingsList != null && produceFittingsList.size() > 0) {
|
|
|
- rj.addResponseKeyValue("produceFittingsList", produceFittingsList);
|
|
|
- return rj;
|
|
|
- } else {
|
|
|
- return new ResponseJson(500, "查询失败!", 500);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* 添加客诉
|
|
|
*
|
|
|
* @param request
|
|
@@ -1331,77 +1283,7 @@ public class AdminCustomerController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 修改维修处理信息
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @param repair
|
|
|
- * @return
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
- @ResponseBody
|
|
|
- @RequiresPermissions("customer:update:repair")
|
|
|
- @RequestMapping("/update_repair_info")
|
|
|
- public ResponseJson updateRepairInfo(HttpServletRequest request, Repair repair) throws Exception {
|
|
|
- if (!StringUtils.isNotEmpty(repair.getRepairId().toString())) {
|
|
|
- return new ResponseJson(500, "该换新信息不能修改!", 500);
|
|
|
- }
|
|
|
- /* String closedProducts = request.getParameter("closed_products");
|
|
|
- String closedFittings = request.getParameter("closed_fittings");*/
|
|
|
- String provinceNumber = request.getParameter("repairProvinceNumber");
|
|
|
- String cityNumber = request.getParameter("repairCityNumber");
|
|
|
- String areaNumber = request.getParameter("repairAreaNumber");
|
|
|
- String mergeAddress = request.getParameter("merge_address");
|
|
|
- if (StringUtils.isNotEmpty(provinceNumber)) {
|
|
|
- repair.setProvinceNumber(Integer.parseInt(provinceNumber));
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(cityNumber)) {
|
|
|
- repair.setCityNumber(Integer.parseInt(cityNumber));
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(areaNumber)) {
|
|
|
- repair.setAreaNumber(Integer.parseInt(areaNumber));
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(mergeAddress)) {
|
|
|
- repair.setRepairSendMergeAddress(mergeAddress);
|
|
|
- }
|
|
|
-// if (StringUtils.isNotEmpty(repair.getRepairBackPostage().toString())) {
|
|
|
-// repair.setRepairBackPostage(repair.getRepairBackPostage().intValue() * 100);
|
|
|
-// }
|
|
|
- /*if (!StringUtils.isNotEmpty(repair.getRepairBackEfastOrderId())) {
|
|
|
- return new ResponseJson(500, "请输入efast订单号!", 500);
|
|
|
- }*/
|
|
|
- if (StringUtils.isNotEmpty(mergeAddress)) {
|
|
|
- repair.setRepairSendMergeAddress(mergeAddress);
|
|
|
- }
|
|
|
-
|
|
|
- /*SalesOrder order = new SalesOrder();
|
|
|
- order.setSalesOrderStatus(1);
|
|
|
- order.setSalesOrderId(repair.getRepairBackEfastOrderId());
|
|
|
- int count = salesOrderService.getOrderInfoCount(order);
|
|
|
- //判断efast订单是否可查出有效数据
|
|
|
- if (count == 0) {
|
|
|
- return new ResponseJson(500, "该efast订单号无效,请重新输入!", 500);
|
|
|
- }*/
|
|
|
-
|
|
|
- if (repair.getRepairBackStatus() != null) {
|
|
|
- if (repair.getRepairBackStatus() != 1) {
|
|
|
- ComplaintSignclosedInfo cs = new ComplaintSignclosedInfo();
|
|
|
- cs.setSignclosedCustomerId(repair.getCustomerId());
|
|
|
- cs.setSignclosedLogistics(repair.getRepairBackLogisticsCompany());
|
|
|
- cs.setSignclosedLogisticsNumber(repair.getRepairBackLogisticsNo());
|
|
|
- complaintSignclosedInfoService.updateSignclosedByCustomerId(cs);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //修改维修信息
|
|
|
- int num = repairService.updateRepairInfo(repair, null, null);
|
|
|
|
|
|
- if (num > 0) {
|
|
|
- return new ResponseJson(200, "修改成功!", 200);
|
|
|
- } else {
|
|
|
- return new ResponseJson(500, "修改失败!", 500);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 进入修改退货页面
|
|
@@ -1447,42 +1329,6 @@ public class AdminCustomerController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 修改售后退货信息
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @param backGoods
|
|
|
- * @return
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
- @ResponseBody
|
|
|
- @RequiresPermissions("customer:update:backGoods")
|
|
|
- @RequestMapping("/update_back_goods")
|
|
|
- public ResponseJson updateBackGoods(HttpServletRequest request, BackGoods backGoods) throws Exception {
|
|
|
- String closedProducts = request.getParameter("closed_products");
|
|
|
- String closedFittings = request.getParameter("closed_fittings");
|
|
|
- if (!StringUtils.isNotEmpty(backGoods.getBackGoodsId().toString())) {
|
|
|
- return new ResponseJson(500, "该售后退货信息不能修改!", 500);
|
|
|
- }
|
|
|
-// if (StringUtils.isNotEmpty(backGoods.getBackGoodsBackPostage().toString())) {
|
|
|
-// backGoods.setBackGoodsBackPostage(backGoods.getBackGoodsBackPostage().intValue() * 100);
|
|
|
-// }
|
|
|
-
|
|
|
-// if(backGoods.getBackGoodsBackStatus() != 1){
|
|
|
-// ComplaintSignclosedInfo cs = new ComplaintSignclosedInfo();
|
|
|
-// cs.setSignclosedCustomerId(backGoods.getCustomerId());
|
|
|
-// cs.setSignclosedLogistics(backGoods.getBackGoodsBackLogisticsCompany());
|
|
|
-// cs.setSignclosedLogisticsNumber(backGoods.getBackGoodsBackLogisticsNo());
|
|
|
-// complaintSignclosedInfoService.updateSignclosedByCustomerId(cs);
|
|
|
-// }
|
|
|
-
|
|
|
- int num = backGoodsService.updateBackGoods(backGoods, closedProducts, closedFittings);
|
|
|
- if (num > 0) {
|
|
|
- return new ResponseJson(200, "修改成功!", 200);
|
|
|
- } else {
|
|
|
- return new ResponseJson(500, "修改失败!", 500);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 进入修改补寄页面
|
|
@@ -1527,45 +1373,6 @@ public class AdminCustomerController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 修改售后补寄信息
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @param reissue
|
|
|
- * @return
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
- @ResponseBody
|
|
|
- @RequiresPermissions("customer:update:reissue")
|
|
|
- @RequestMapping("/update_reissue_info")
|
|
|
- public ResponseJson updateReissueInfo(HttpServletRequest request, Reissue reissue) throws Exception {
|
|
|
- String provinceNumber = request.getParameter("reissueProvinceNumber");
|
|
|
- String cityNumber = request.getParameter("reissueCityNumber");
|
|
|
- String areaNumber = request.getParameter("reissueAreaNumber");
|
|
|
- String mergeAddress = request.getParameter("merge_address");
|
|
|
- if (!StringUtils.isNotEmpty(reissue.getReissueId().toString())) {
|
|
|
- return new ResponseJson(500, "该售后补寄信息不能修改!", 500);
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(provinceNumber)) {
|
|
|
- reissue.setProvinceNumber(Integer.parseInt(provinceNumber));
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(cityNumber)) {
|
|
|
- reissue.setCityNumber(Integer.parseInt(cityNumber));
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(areaNumber)) {
|
|
|
- reissue.setAreaNumber(Integer.parseInt(areaNumber));
|
|
|
- }
|
|
|
- if (StringUtils.isNotEmpty(mergeAddress)) {
|
|
|
- reissue.setReissueSendMergeAddress(mergeAddress);
|
|
|
- }
|
|
|
- //修改售后补寄信息
|
|
|
- int num = reissueService.updateReissueInfo(reissue);
|
|
|
- if (num > 0) {
|
|
|
- return new ResponseJson(200, "修改成功!", 200);
|
|
|
- } else {
|
|
|
- return new ResponseJson(500, "修改失败!", 500);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 进入修改退货页面
|
|
@@ -1612,42 +1419,7 @@ public class AdminCustomerController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 修改售后无理由退货信息
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @param noreasonBack
|
|
|
- * @return
|
|
|
- * @throws Exception
|
|
|
- */
|
|
|
- @ResponseBody
|
|
|
- @RequiresPermissions("customer:update:noreason")
|
|
|
- @RequestMapping("/update_noreason")
|
|
|
- public ResponseJson updateNoreason(HttpServletRequest request, NoreasonBack noreasonBack) throws Exception {
|
|
|
- String closedProducts = request.getParameter("closed_products");
|
|
|
- String closedFittings = request.getParameter("closed_fittings");
|
|
|
- if (!StringUtils.isNotEmpty(noreasonBack.getNoreasonBackId().toString())) {
|
|
|
- return new ResponseJson(500, "该售后无理由退货信息不能修改!", 500);
|
|
|
- }
|
|
|
-// if (StringUtils.isNotEmpty(noreasonBack.getNoreasonBackBackPostage().toString())) {
|
|
|
-// noreasonBack.setNoreasonBackBackPostage(noreasonBack.getNoreasonBackBackPostage().intValue() * 100);
|
|
|
-// }
|
|
|
-
|
|
|
-// if(noreasonBack.getNoreasonBackBackStatus() != 1){
|
|
|
-// ComplaintSignclosedInfo cs = new ComplaintSignclosedInfo();
|
|
|
-// cs.setSignclosedCustomerId(noreasonBack.getCustomerId());
|
|
|
-// cs.setSignclosedLogistics(noreasonBack.getNoreasonBackBackLogisticsCompany());
|
|
|
-// cs.setSignclosedLogisticsNumber(noreasonBack.getNoreasonBackBackLogisticsNo());
|
|
|
-// complaintSignclosedInfoService.updateSignclosedByCustomerId(cs);
|
|
|
-// }
|
|
|
|
|
|
- int num = noreasonBackService.updateNoreasonBack(noreasonBack, closedProducts, closedFittings);
|
|
|
- if (num > 0) {
|
|
|
- return new ResponseJson(200, "修改成功!", 200);
|
|
|
- } else {
|
|
|
- return new ResponseJson(500, "修改失败!", 500);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
* 查询未解决客诉数量
|
|
@@ -1659,22 +1431,22 @@ public class AdminCustomerController {
|
|
|
CustomerInfo customerInfo = new CustomerInfo();
|
|
|
//获取登录员工id
|
|
|
Admin admin = AdminUtils.getLoginAdmin();
|
|
|
- customerInfo.setAdminId(admin.getAdminId());
|
|
|
- customerInfo.setCustomerIsSolve(2);
|
|
|
+// customerInfo.setAdminId(admin.getAdminId());
|
|
|
+// customerInfo.setCustomerIsSolve(2);
|
|
|
//未解决客诉数量
|
|
|
- Integer notSolvedCustomer = customerService.selectNotSolvedCustomer(customerInfo);
|
|
|
+// Integer notSolvedCustomer = customerService.selectNotSolvedCustomer(customerInfo);
|
|
|
//需要向工厂确认所有已签收的产品数量
|
|
|
- CustomerCommon customerCommon = new CustomerCommon();
|
|
|
- customerCommon.setAdminId(admin.getAdminId());
|
|
|
- customerCommon.setRelationBackStatus(4);
|
|
|
- Integer amountReceivedCustomer = customerCommonService.listCustomerCommonByStatus(customerCommon);
|
|
|
+// CustomerCommon customerCommon = new CustomerCommon();
|
|
|
+// customerCommon.setAdminId(admin.getAdminId());
|
|
|
+// customerCommon.setRelationBackStatus(4);
|
|
|
+// Integer amountReceivedCustomer = customerCommonService.listCustomerCommonByStatus(customerCommon);
|
|
|
//需要填写Efast订单号的客诉数量
|
|
|
- customerCommon.setRelationBackStatus(3);
|
|
|
- Integer noEntryCustomer = customerCommonService.listCustomerCommonByStatus(customerCommon);
|
|
|
+// customerCommon.setRelationBackStatus(3);
|
|
|
+// Integer noEntryCustomer = customerCommonService.listCustomerCommonByStatus(customerCommon);
|
|
|
//客诉录入后,三天后未寄回的客诉数量
|
|
|
- customerCommon.setRelationBackStatus(1);
|
|
|
- customerCommon.setRelationCreateTime(new Date());
|
|
|
- Integer notSendCustomer = customerCommonService.listCustomerCommonByStatus(customerCommon);
|
|
|
+// customerCommon.setRelationBackStatus(1);
|
|
|
+// customerCommon.setRelationCreateTime(new Date());
|
|
|
+// Integer notSendCustomer = customerCommonService.listCustomerCommonByStatus(customerCommon);
|
|
|
|
|
|
SalesOrder salesOrder = new SalesOrder();
|
|
|
salesOrder.setSalesStatus(0); //未确认
|
|
@@ -1706,10 +1478,11 @@ public class AdminCustomerController {
|
|
|
numberMap.put("toBeDelivered", toBeDelivered);
|
|
|
numberMap.put("allToDayOrder", allToDayOrder);
|
|
|
|
|
|
- numberMap.put("notSolvedCustomer", notSolvedCustomer);
|
|
|
- numberMap.put("amountReceivedCustomer", amountReceivedCustomer);
|
|
|
- numberMap.put("noEntryCustomer", noEntryCustomer);
|
|
|
- numberMap.put("notSendCustomer", notSendCustomer);
|
|
|
+// numberMap.put("notSolvedCustomer", notSolvedCustomer);
|
|
|
+// numberMap.put("amountReceivedCustomer", amountReceivedCustomer);
|
|
|
+// numberMap.put("noEntryCustomer", noEntryCustomer);
|
|
|
+// numberMap.put("notSendCustomer", notSendCustomer);
|
|
|
+
|
|
|
numberMap.put("adminDept", admin.getAdminDept());
|
|
|
msg.setResultCode(ResultInfo.SUCCESSCODE);
|
|
|
msg.setStatus(true);
|
|
@@ -1717,28 +1490,28 @@ public class AdminCustomerController {
|
|
|
return msg;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 根据微信昵称/姓名/电话查询客诉
|
|
|
- *
|
|
|
- * @param request
|
|
|
- * @return
|
|
|
- */
|
|
|
- @ResponseBody
|
|
|
- @RequiresPermissions("customer:list:customer")
|
|
|
- @RequestMapping("/get_custoner_info")
|
|
|
- public ResponseJson getCustonerInfo(HttpServletRequest request, CustomerCommon customerCommon) throws Exception {
|
|
|
- if (customerCommon == null) {
|
|
|
- return new ResponseJson(500, "参数错误!", 500);
|
|
|
- }
|
|
|
- List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
|
|
|
- if (customerCommonList.size() < 1) {
|
|
|
- return new ResponseJson(500, "不存在相关客诉信息!", 500);
|
|
|
- } else {
|
|
|
- ResponseJson rj = new ResponseJson(200, "查询成功", 200);
|
|
|
- rj.addResponseKeyValue("customer", customerCommonList.get(0));
|
|
|
- return rj;
|
|
|
- }
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 根据微信昵称/姓名/电话查询客诉
|
|
|
+// *
|
|
|
+// * @param request
|
|
|
+// * @return
|
|
|
+// */
|
|
|
+// @ResponseBody
|
|
|
+// @RequiresPermissions("customer:list:customer")
|
|
|
+// @RequestMapping("/get_custoner_info")
|
|
|
+// public ResponseJson getCustonerInfo(HttpServletRequest request, CustomerCommon customerCommon) throws Exception {
|
|
|
+// if (customerCommon == null) {
|
|
|
+// return new ResponseJson(500, "参数错误!", 500);
|
|
|
+// }
|
|
|
+// List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
|
|
|
+// if (customerCommonList.size() < 1) {
|
|
|
+// return new ResponseJson(500, "不存在相关客诉信息!", 500);
|
|
|
+// } else {
|
|
|
+// ResponseJson rj = new ResponseJson(200, "查询成功", 200);
|
|
|
+// rj.addResponseKeyValue("customer", customerCommonList.get(0));
|
|
|
+// return rj;
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -1755,25 +1528,22 @@ public class AdminCustomerController {
|
|
|
return new ResponseJson(500, "未获取到客诉", 500);
|
|
|
}
|
|
|
|
|
|
- CustomerCommon customerCommon = new CustomerCommon();
|
|
|
- customerCommon.setCustomerId(customerId);
|
|
|
- List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
|
|
|
- customerCommon = customerCommonList.get(0);
|
|
|
+ CmRelation cmRelation = cmRelationService.getCmRelationByCustomerId(customerId);
|
|
|
|
|
|
- if (customerCommon.getRelationBackStatus() == 1) { //1:未寄回 2:已寄回 3:已收货 4:已签收待确认
|
|
|
+ if (cmRelation.getRelationBackStatus() == 1) { //1:未寄回 2:已寄回 3:已收货 4:已签收待确认
|
|
|
return new ResponseJson(500, "请修改寄回状态,并填写寄回信息", 500);
|
|
|
}
|
|
|
|
|
|
- if (customerCommon.getRelationBackStatus() == 2) { //1:未寄回 2:已寄回 3:已收货 4:已签收待确认
|
|
|
+ if (cmRelation.getRelationBackStatus() == 2) { //1:未寄回 2:已寄回 3:已收货 4:已签收待确认
|
|
|
return new ResponseJson(500, "产品正在寄回中!", 500);
|
|
|
}
|
|
|
|
|
|
- if (customerCommon.getRelationIsTransfer() == 0) { //relationIsTransfer 是否需要转账邮费 0:不需要 10:需要转账
|
|
|
+ if (cmRelation.getRelationIsTransfer() == 0) { //relationIsTransfer 是否需要转账邮费 0:不需要 10:需要转账
|
|
|
return new ResponseJson(500, "请修改邮费转账状态,并填写邮费信息", 500);
|
|
|
}
|
|
|
|
|
|
- if (customerCommon.getRelationBackPostage() == null || customerCommon.getRelationBackPostage() == 0 //relationBackPostage
|
|
|
- || customerCommon.getRelationAlipay() == null || customerCommon.getRelationAlipayName() == null) {
|
|
|
+ if (cmRelation.getRelationBackPostage() == null || cmRelation.getRelationBackPostage() == 0 //relationBackPostage
|
|
|
+ || cmRelation.getRelationAlipay() == null || cmRelation.getRelationAlipayName() == null) {
|
|
|
return new ResponseJson(500, "请填写邮费信息", 500);
|
|
|
}
|
|
|
|
|
@@ -1789,7 +1559,7 @@ public class AdminCustomerController {
|
|
|
}
|
|
|
|
|
|
ResponseJson rj = new ResponseJson(200, "可以申请邮费", 200);
|
|
|
- rj.addResponseKeyValue("customerCommon", customerCommon);
|
|
|
+ rj.addResponseKeyValue("customerCommon", cmRelation);
|
|
|
rj.addResponseKeyValue("customerInfo", customerInfo);
|
|
|
return rj;
|
|
|
}
|
|
@@ -1808,25 +1578,22 @@ public class AdminCustomerController {
|
|
|
return new ResponseJson(500, "未获取到客诉", 500);
|
|
|
}
|
|
|
|
|
|
- CustomerCommon customerCommon = new CustomerCommon();
|
|
|
- customerCommon.setCustomerId(customerId);
|
|
|
- List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
|
|
|
- customerCommon = customerCommonList.get(0);
|
|
|
+ CmRelation cmRelation = cmRelationService.getCmRelationByCustomerId(customerId);
|
|
|
|
|
|
- if (customerCommon.getRelationBackStatus() == 1) { //1:未寄回 2:已寄回 3:已收货 4:已签收待确认
|
|
|
+ if (cmRelation.getRelationBackStatus() == 1) { //1:未寄回 2:已寄回 3:已收货 4:已签收待确认
|
|
|
return new ResponseJson(500, "请修改寄回状态,并填写寄回信息", 500);
|
|
|
}
|
|
|
|
|
|
- if (customerCommon.getRelationBackStatus() == 2) { //1:未寄回 2:已寄回 3:已收货 4:已签收待确认
|
|
|
+ if (cmRelation.getRelationBackStatus() == 2) { //1:未寄回 2:已寄回 3:已收货 4:已签收待确认
|
|
|
return new ResponseJson(500, "产品正在寄回中!", 500);
|
|
|
}
|
|
|
|
|
|
- if (customerCommon.getRelationIsTransfer() == 0) { //relationIsTransfer 是否需要转账邮费 0:不需要 10:需要转账
|
|
|
+ if (cmRelation.getRelationIsTransfer() == 0) { //relationIsTransfer 是否需要转账邮费 0:不需要 10:需要转账
|
|
|
return new ResponseJson(500, "请修改邮费转账状态,并填写邮费信息", 500);
|
|
|
}
|
|
|
|
|
|
- if (customerCommon.getRelationBackPostage() == null || customerCommon.getRelationBackPostage() == 0 //relationBackPostage
|
|
|
- || customerCommon.getRelationAlipay() == null || customerCommon.getRelationAlipayName() == null) {
|
|
|
+ if (cmRelation.getRelationBackPostage() == null || cmRelation.getRelationBackPostage() == 0 //relationBackPostage
|
|
|
+ || cmRelation.getRelationAlipay() == null || cmRelation.getRelationAlipayName() == null) {
|
|
|
return new ResponseJson(500, "请填写邮费信息", 500);
|
|
|
}
|
|
|
|
|
@@ -1842,7 +1609,7 @@ public class AdminCustomerController {
|
|
|
}
|
|
|
|
|
|
String orderId = "";
|
|
|
- for (SalesOrder salesOrder : customerCommon.getSalesOrderList()) {
|
|
|
+ for (SalesOrder salesOrder : cmRelation.getSalesOrderList()) {
|
|
|
if ("".equals(orderId)) {
|
|
|
orderId = salesOrder.getSalesOrderId();
|
|
|
} else {
|
|
@@ -1858,16 +1625,16 @@ public class AdminCustomerController {
|
|
|
postage.setPostageCustomerStatus(2); //------考虑手动点, 直接变为申请中
|
|
|
postage.setPostageManagerStatus(1); //------考虑手动点, 直接变为申请中
|
|
|
postage.setPostageOrderSource(customerInfo.getStoreId()); //店铺id
|
|
|
- postage.setPostageTreatmentMethod(customerCommon.getCustomerIsSolve()); //处理方式
|
|
|
+// postage.setPostageTreatmentMethod(cmRelation.getProcMethodId()); //处理方式
|
|
|
postage.setSalesOrderId(orderId); //efast订单号
|
|
|
- postage.setPostageClientName(customerCommon.getRelationBackName());
|
|
|
- postage.setPostageClientTel(customerCommon.getRelationBackTel());
|
|
|
- postage.setPostageClientAddress(customerCommon.getRelationSendAddress());
|
|
|
- postage.setPostageLogisticsCompany(customerCommon.getRelationBackLogisticsCompany());
|
|
|
- postage.setPostageLogisticsNo(customerCommon.getRelationBackLogisticsNo());
|
|
|
- postage.setPostageAmount(customerCommon.getRelationBackPostage()); //寄回邮费
|
|
|
- postage.setPostageAlipay(customerCommon.getRelationAlipay()); //支付宝账户
|
|
|
- postage.setPostageAlipayName(customerCommon.getRelationAlipayName()); //支付宝账号名称
|
|
|
+ postage.setPostageClientName(cmRelation.getRelationBackName());
|
|
|
+ postage.setPostageClientTel(cmRelation.getRelationBackTel());
|
|
|
+ postage.setPostageClientAddress(cmRelation.getRelationSendAddress());
|
|
|
+ postage.setPostageLogisticsCompany(cmRelation.getRelationBackLogisticsCompany());
|
|
|
+ postage.setPostageLogisticsNo(cmRelation.getRelationBackLogisticsNo());
|
|
|
+ postage.setPostageAmount(cmRelation.getRelationBackPostage()); //寄回邮费
|
|
|
+ postage.setPostageAlipay(cmRelation.getRelationAlipay()); //支付宝账户
|
|
|
+ postage.setPostageAlipayName(cmRelation.getRelationAlipayName()); //支付宝账号名称
|
|
|
postage.setPostageLogisticsImg(postageLogisticsImg);
|
|
|
flag = postageService.savePostage(postage);
|
|
|
|
|
@@ -1982,7 +1749,7 @@ public class AdminCustomerController {
|
|
|
BeanUtils.copyProperties(customerInfo, customer);
|
|
|
CustomerCommon customerCommon = new CustomerCommon();
|
|
|
customerCommon.setCustomerId(customerInfo.getCustomerId());
|
|
|
- List<CustomerCommon> listCustomerCommon = customerCommonService.listCustomerCommon(customerCommon);
|
|
|
+ List<CustomerCommon> listCustomerCommon = new ArrayList<>();//customerCommonService.listCustomerCommon(customerCommon);
|
|
|
if(listCustomerCommon.size() > 0) {
|
|
|
for (CustomerCommon common : listCustomerCommon) {
|
|
|
if (common.getSalesOrderList().size() > 0) {
|