|
@@ -2289,7 +2289,7 @@ public class TOrderController {
|
|
|
orderDetails.setMachineType(equipment.getMachineType());
|
|
|
|
|
|
// String client6 = clientId.substring(clientId.length() - 6);
|
|
|
- String productName1 = newProductName + "-" + equipment.getName() + "-" + client6;
|
|
|
+ String productName1 = "雪糕" + "-" + equipment.getName() + "-" + client6;
|
|
|
String result = null;
|
|
|
if(StringUtils.isNotEmpty(payPlatform)&&payPlatform.equals("1")){
|
|
|
// 汇付分账参数
|
|
@@ -2787,12 +2787,12 @@ public class TOrderController {
|
|
|
orderDetails.setMachineType(equipment.getMachineType());
|
|
|
|
|
|
// String client6 = clientId.substring(clientId.length() - 6);
|
|
|
- String productName1 = "";
|
|
|
- if(productNumber > 1) {
|
|
|
- productName1 = "冰淇淋-" + equipment.getName() + "-" + client6;
|
|
|
- } else {
|
|
|
- productName1 = productName + "-" + equipment.getName() + "-" + client6;
|
|
|
- }
|
|
|
+ String productName1 = "雪糕x"+ productNumber + "-" + equipment.getName() + "-" + client6;
|
|
|
+// if(productNumber > 1) {
|
|
|
+// productName1 = "雪糕-" + equipment.getName() + "-" + client6;
|
|
|
+// } else {
|
|
|
+// productName1 = productName + "-" + equipment.getName() + "-" + client6;
|
|
|
+// }
|
|
|
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
String[] products = order.getNote().split(",");
|
|
@@ -3754,85 +3754,6 @@ public class TOrderController {
|
|
|
if(result.equals("退款成功")) {
|
|
|
return R.ok(result);
|
|
|
}
|
|
|
-// String respData = request.getParameter("resp_data");
|
|
|
-// JSONObject data = JSONObject.parseObject(respData);
|
|
|
-// String transStat = data.getString("trans_stat");
|
|
|
-// // 订单号
|
|
|
-// String sn = data.getString("org_req_seq_id");
|
|
|
-// if(StrUtil.hasEmpty(sn)) {
|
|
|
-// return R.fail(ResponseCodesEnum.A0001,"订单号为空!");
|
|
|
-// }
|
|
|
-// LambdaQueryWrapper<TOrder> wrapper = new LambdaQueryWrapper<>();
|
|
|
-// wrapper.eq(TOrder::getSn,sn);
|
|
|
-// TOrder order = orderService.getOne(wrapper);
|
|
|
-// if(order == null) {
|
|
|
-// return R.fail(ResponseCodesEnum.A0001,"订单不存在");
|
|
|
-// }
|
|
|
-// if(HuifuConstant.TRANS_STAT_S.equals(transStat)) {
|
|
|
-// if(order.getRefundQuantity() < order.getProductNumber()) {
|
|
|
-// order.setStatus(1);
|
|
|
-// } else {
|
|
|
-// order.setStatus(3);
|
|
|
-// }
|
|
|
-// String refundOrderNo = data.getString("req_seq_id");
|
|
|
-// String ordAmt = data.getString("ord_amt");
|
|
|
-// String refundTrxNo = data.getString("hf_seq_id");
|
|
|
-// order.setRefundOrderNo(refundOrderNo);
|
|
|
-// order.setRefundDate(new Date());
|
|
|
-// order.setRefundTrxNo(refundTrxNo);
|
|
|
-// // 更改订单明细表
|
|
|
-// LambdaQueryWrapper<TOrderDetails> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
-// queryWrapper.eq(TOrderDetails::getOrderSn, sn);
|
|
|
-// // 处理退款中状态的明细
|
|
|
-// queryWrapper.eq(TOrderDetails::getRefundStatus, "4");
|
|
|
-// List<TOrderDetails> tOrderDetails = orderDetailsService.list(queryWrapper);
|
|
|
-// for (TOrderDetails tOrderDetail : tOrderDetails) {
|
|
|
-// Integer refundQuantity = tOrderDetail.getRefundQuantity();
|
|
|
-// Integer productNumber = tOrderDetail.getProductNumber();
|
|
|
-// if(refundQuantity < productNumber) {
|
|
|
-// // 部分退款
|
|
|
-// tOrderDetail.setRefundStatus("2");
|
|
|
-// orderDetailsService.updateById(tOrderDetail);
|
|
|
-// } else {
|
|
|
-// // 全部退款
|
|
|
-// tOrderDetail.setRefundStatus("3");
|
|
|
-// orderDetailsService.updateById(tOrderDetail);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// String acctSplitBunch = "";
|
|
|
-// // 部分退款或全部退款
|
|
|
-// TProportion proportion = R.getDataIfSuccess(szwlFeign.getProportion(String.valueOf(order.getEquipmentId())));
|
|
|
-// if(order.getRefundAmount() != null) {
|
|
|
-// // 退款总额
|
|
|
-// BigDecimal newRefundAmount = order.getRefundAmount().add(new BigDecimal(ordAmt).setScale(2, RoundingMode.HALF_UP));
|
|
|
-// order.setRefundAmount(newRefundAmount);
|
|
|
-// // 如果小于订单金额
|
|
|
-// if(newRefundAmount.compareTo(order.getPrice()) < 0) {
|
|
|
-// acctSplitBunch = getAcctSplitBunch(proportion,order.getPrice().subtract(newRefundAmount), order.getCompanyType()).toString();
|
|
|
-// order.setAcctSplitBunch(acctSplitBunch);
|
|
|
-// } else {
|
|
|
-// acctSplitBunch = getAcctSplitBunch(proportion,order.getPrice(), order.getCompanyType()).toString();
|
|
|
-// order.setAcctSplitBunch(acctSplitBunch);
|
|
|
-// }
|
|
|
-// } else {
|
|
|
-// order.setRefundAmount(new BigDecimal(ordAmt).setScale(2,RoundingMode.HALF_UP));
|
|
|
-// if(new BigDecimal(ordAmt).setScale(2, RoundingMode.HALF_UP).compareTo(order.getPrice()) < 0) {
|
|
|
-// // 重新设置分销
|
|
|
-// acctSplitBunch = getAcctSplitBunch(proportion,order.getPrice()
|
|
|
-// .subtract(new BigDecimal(ordAmt).setScale(2,RoundingMode.HALF_UP)), order.getCompanyType()).toString();
|
|
|
-// order.setAcctSplitBunch(acctSplitBunch);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// try {
|
|
|
-// esTOrderService.updateDataById(order);
|
|
|
-// }catch (Exception e) {
|
|
|
-// e.printStackTrace();
|
|
|
-// }finally {
|
|
|
-// orderService.updateById(order);
|
|
|
-// }
|
|
|
-// return R.ok("退款成功");
|
|
|
-// }
|
|
|
return R.fail(ResponseCodesEnum.A0001,result);
|
|
|
}
|
|
|
|