From 99eddbebf80c5549a7487caed95b041abdc9bb5f Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期一, 14 七月 2025 14:06:40 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java index 2216d2a..99f11b7 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyDetailServiceImpl.java @@ -234,7 +234,11 @@ TChargingGun chargingGun = chargingGunService.getById(gunId); TAccountingStrategy accountingStrategy = accountingStrategyMapper.selectById(chargingGun.getAccountingStrategyId()); if(Objects.isNull(accountingStrategy)){ - throw new ServiceException("未查询到计费策略"); + Site site = siteService.getById(chargingGun.getSiteId()); + accountingStrategy = accountingStrategyMapper.selectById(site.getAccountingStrategyId()); + if(Objects.isNull(accountingStrategy)){ + throw new ServiceException("未查询到计费策略"); + } } List<TAccountingStrategyDetailVO> list = this.queryAccountingStrategyDetailByStrategyId(accountingStrategy.getId()); list.stream().filter(item -> "00:00".equals(item.getEndTime())).forEach(item -> item.setEndTime("23:59:59")); -- Gitblit v1.7.1