From be1ab2eb2032a747a409fb765ec90f76c3116c51 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期五, 01 十一月 2024 09:15:25 +0800 Subject: [PATCH] merge --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java index f9b4c12..25718a7 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java @@ -369,14 +369,14 @@ List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.lambdaQuery().eq(TChargingOrderAccountingStrategy::getChargingOrderId, strategyId).orderByDesc(TChargingOrderAccountingStrategy::getStartTime).list(); for (TChargingOrderAccountingStrategy tChargingOrderAccountingStrategy : list) { - if (byId.getVipDiscountAmount()!=null){ + if (byId.getVipDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){ BigDecimal multiply = byId.getVipDiscountAmount().divide(byId.getServiceCharge(), 2) .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice()); tChargingOrderAccountingStrategy.setVipDiscount(multiply); } bigDecimal = bigDecimal.add(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice()); - if (byId.getCouponDiscountAmount()!=null){ + if (byId.getCouponDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){ BigDecimal multiply = byId.getCouponDiscountAmount().divide(byId.getServiceCharge(), 2) .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice()); tChargingOrderAccountingStrategy.setCouponDiscount(multiply); @@ -778,6 +778,9 @@ LocalDate sixBefore = PreviousSixMonths.get(); Map<String,Object> map = chargingOrderService.countAll(sixBefore); BigDecimal data = parkingLotClient.getRecordAmount(sixBefore).getData(); + if (map ==null){ + map = new HashMap<String,Object>(); + } map.put("parkingAmount",data); BigDecimal data1 = shoppingOrderService.getSumAmount(sixBefore); map.put("shopAmount",data1); @@ -797,7 +800,8 @@ public R watchChargingOrder(@RequestBody MongoChargingOrderQuery mongoChargingOrderQuery) { mongoChargingOrderQuery.setPageSize(10); - UploadRealTimeMonitoringPageData data1 = uploadRealTimeMonitoringDataClient.getAll(mongoChargingOrderQuery).getData(); + R<UploadRealTimeMonitoringPageData> all = uploadRealTimeMonitoringDataClient.getAll(mongoChargingOrderQuery); + UploadRealTimeMonitoringPageData data1 = all.getData(); List<ChargingOrderAndUploadRealTimeMonitoringDataDto> dtos = new ArrayList<>(); Map<String,ChargingOrderVO> map = new HashMap<>(); @@ -1182,6 +1186,8 @@ tCharingUserMapVO.setMap(charMap); tCharingUserMapVO.setMap1(charMap1); }else { + + List<Map<String,Object>> map = chargingOrderService.usersByQuery(statisticsQueryDto); -- Gitblit v1.7.1