From c70376e2735aed27fa655cdbbc67e914ac8a42f5 Mon Sep 17 00:00:00 2001 From: zhibing.pu <393733352@qq.com> Date: 星期一, 12 八月 2024 11:40:59 +0800 Subject: [PATCH] 修改bug --- ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/PlatformController.java | 41 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 38 insertions(+), 3 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/PlatformController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/PlatformController.java index 4ef08d7..c4543d3 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/PlatformController.java +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/PlatformController.java @@ -316,6 +316,7 @@ PlatformVO platformVO = new PlatformVO(); switch (settlementDetail.getOrderType()){ case 1: + // 专车订单 TOrderPrivateCar tOrderPrivateCar = orderPrivateCarService.selectById(settlementDetail.getOrderId()); if (tOrderPrivateCar==null){ @@ -352,6 +353,12 @@ unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); platformVO.setEndTime(format.format(settlementRecord.getDay())); } + }else{ + // 未结算 + if (state!=null && state!=2){ + continue; + } + unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); } res.add(platformVO); @@ -394,6 +401,12 @@ unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); platformVO.setEndTime(format.format(settlementRecord.getDay())); } + }else{ + // 未结算 + if (state!=null && state!=2){ + continue; + } + unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); } res.add(platformVO); break; @@ -692,8 +705,6 @@ break; } - - // 司机提现 for (TPubWithdrawal tPubWithdrawal : driver) { if(payType!=null && payType == 1){ @@ -721,7 +732,9 @@ break; } WaterVO waterVO = new WaterVO(); - waterVO.setInsertTime(format.format(tPubWithdrawal.getHandleTime())); + if (tPubWithdrawal.getHandleTime()!=null){ + waterVO.setInsertTime(format.format(tPubWithdrawal.getHandleTime())); + } waterVO.setCode(tPubWithdrawal.getCode()); TUser user2 = appUserService.selectById(tPubWithdrawal.getUserId()); if (user2!=null){ @@ -741,6 +754,10 @@ Integer orderId = tPubTransactionDetail.getOrderId(); PaymentRecord paymentRecord = paymentRecordService.selectById(orderId); if (paymentRecord!=null){ + if (paymentRecord.getState() == 1){ + // 临时数据 + continue; + } waterVO.setInsertTime(format.format(paymentRecord.getInsertTime())); waterVO.setCode(paymentRecord.getCode()); if (paymentRecord.getPayType()!=null){ @@ -911,6 +928,8 @@ break; } } + // 过滤掉res中insertTime未空的数据 + res.removeIf(waterVO -> waterVO.getInsertTime() == null); Collections.sort(res, Comparator.comparing(WaterVO::getInsertTime).reversed()); WaterMoneyVO waterMoneyVO = new WaterMoneyVO(); BigDecimal add = userRecharge.add(userConsume).add(balance).subtract(driverWithdrawal).subtract(userWithdrawal); @@ -1256,6 +1275,10 @@ Integer orderId = tPubTransactionDetail.getOrderId(); PaymentRecord paymentRecord = paymentRecordService.selectById(orderId); if (paymentRecord!=null){ + if (paymentRecord.getState() == 1){ + // 临时数据 + continue; + } waterVO.setInsertTime(format.format(paymentRecord.getInsertTime())); waterVO.setCode(paymentRecord.getCode()); if (paymentRecord.getPayType()!=null){ @@ -1697,6 +1720,12 @@ platformVO.setState(2); unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); } + }else{ + // 未结算 + if (state!=null && state!=2){ + continue; + } + unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); } res.add(platformVO); break; @@ -1738,6 +1767,12 @@ unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); platformVO.setEndTime(format.format(settlementRecord.getDay())); } + }else{ + // 未结算 + if (state!=null && state!=2){ + continue; + } + unBalance = unBalance.add(new BigDecimal(settlementDetail.getPrice())); } res.add(platformVO); break; -- Gitblit v1.7.1