feat:退换各自食堂明细

This commit is contained in:
dzc committed 2025-06-18 17:03:13 +08:00
1 parent ab1397897f
commit 8b0df2572e
10 files changed
+139 -15

No files matched your search

@@ -417,6 +417,9 @@ public class HardOrderTotalController {
// 盈利
BigDecimal orderProfitPriceSum = BigDecimal.ZERO;
BigDecimal orderProfitContSum = BigDecimal.ZERO;
// 退还各自食堂金额
BigDecimal walletReturnCanteenPriceSum = BigDecimal.ZERO;
BigDecimal walletReturnCanteenCountSum = BigDecimal.ZERO;
Long lineNumber = 1L;
for (HardDeptTotalVo v : list) {
@@ -485,6 +488,15 @@ public class HardOrderTotalController {
orderProfitContSum = orderProfitContSum.add(BigDecimal.valueOf(v.getOrderProfitCont()));
v.setOrderProfitCont(BigDecimal.valueOf(v.getOrderProfitCont()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
// 退还各自食堂金额
if (ObjectUtil.isNotEmpty(v.getWalletReturnCanteenPrice())) {
walletReturnCanteenPriceSum = walletReturnCanteenPriceSum.add(BigDecimal.valueOf(v.getWalletReturnCanteenPrice()));
v.setWalletReturnCanteenPrice(BigDecimal.valueOf(v.getWalletReturnCanteenPrice()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
if (ObjectUtil.isNotEmpty(v.getWalletReturnCanteenCount())) {
walletReturnCanteenCountSum = walletReturnCanteenCountSum.add(BigDecimal.valueOf(v.getWalletReturnCanteenCount()));
v.setWalletReturnCanteenCount(BigDecimal.valueOf(v.getWalletReturnCanteenCount()).divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).longValue());
}
// 批量充值
map.put("walletPriceSum", walletPriceSum.divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).toString());
map.put("walletCountSum", walletCountSum.toString());
@@ -506,6 +518,10 @@ public class HardOrderTotalController {
map.put("orderProfitPriceSum", orderProfitPriceSum.divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).toString());
map.put("orderProfitContSum", orderProfitContSum.toString());
// 退还各自食堂金额
map.put("walletReturnCanteenPriceSum", walletReturnCanteenPriceSum.divide(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP).toString());
map.put("walletReturnCanteenCountSum", walletReturnCanteenCountSum.toString());
}
}
excelWriter.fill(map, writeSheet);
@@ -247,6 +247,7 @@ public class HardThirdPayServiceImpl implements HardThirdPayService {
refundVo.setThirdRefundId(dto.getThirdRefundId());
refundVo.setPlatformOrderId(dto.getPlatformOrderId());
refundVo.setPlatformRefundId(String.valueOf(saveObj.getId()));
refundVo.setPrice(dto.getPrice());
baseVo.set(ThirdPayVoStatusEnum.SUCCESS);
baseVo.setData(refundVo);
return baseVo;