From 8d1011df28e773f85eecd1769784cea9d410ac34 Mon Sep 17 00:00:00 2001 From: Lemon Date: Mon, 15 Dec 2025 10:11:08 +0800 Subject: [PATCH] =?UTF-8?q?update=20=20=E7=94=B5=E5=8D=95=E8=BD=A6?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=94=B6=E8=B4=B9=E6=A0=87=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PileBillingTemplateServiceImpl.java | 66 ++++++++++--------- .../wxpay/service/WxAppletRemoteService.java | 1 + 2 files changed, 37 insertions(+), 30 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBillingTemplateServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBillingTemplateServiceImpl.java index cc16a3b98..fc183aaf8 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBillingTemplateServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBillingTemplateServiceImpl.java @@ -16,6 +16,7 @@ import com.jsowell.common.util.id.Seq; import com.jsowell.pile.domain.*; import com.jsowell.pile.dto.BillingTimeDTO; import com.jsowell.pile.dto.CreateOrUpdateBillingTemplateDTO; +import com.jsowell.pile.dto.ImportBillingTemplateDTO; import com.jsowell.pile.mapper.PileBillingTemplateMapper; import com.jsowell.pile.service.MemberGroupService; import com.jsowell.pile.service.PileBillingTemplateService; @@ -142,9 +143,9 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic List templateCodes = pileBillingDetails.stream().map(PileBillingDetail::getTemplateCode).collect(Collectors.toList()); pileBillingTemplateMapper.deletePileBillingDetailByTemplateCodes(templateCodes); } - for (Long id : ids) { - cleanCache(null , id); - } + for (Long id : ids) { + cleanCache(null, id); + } return pileBillingTemplateMapper.deletePileBillingTemplateByIds(ids); } @@ -158,7 +159,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic @Override public int deletePileBillingTemplateById(Long id) { // pileBillingTemplateMapper.deletePileBillingDetailByTemplateCode(id); - cleanCache(null , id); + cleanCache(null, id); return pileBillingTemplateMapper.deletePileBillingTemplateById(id); } @@ -222,7 +223,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic // 入库 transactionService.doCreateBillingTemplate(build); - cleanCache(dto.getStationId() , null); + cleanCache(dto.getStationId(), null); } @Override @@ -265,7 +266,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic // 入库 transactionService.doUpdateBillingTemplate(build); - cleanCache(dto.getStationId() , Long.valueOf(dto.getBillingTemplateId())); + cleanCache(dto.getStationId(), Long.valueOf(dto.getBillingTemplateId())); } /** @@ -401,7 +402,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic // 查询站点的集团会员计费模板 BillingTemplateVO preferentialBillingTemplate = this.queryPreferentialBillingTemplate(stationId); - if (Objects.nonNull(preferentialBillingTemplate) && Objects.nonNull(result) ) { + if (Objects.nonNull(preferentialBillingTemplate) && Objects.nonNull(result)) { List billingDetailList = preferentialBillingTemplate.getBillingDetailList(); for (BillingDetailVO detailVO : billingDetailList) { List applyTimeList = detailVO.getApplyTime(); @@ -425,13 +426,12 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic } - /** * 通过站点id查询当前时间的收费详情 (用于查询电动单车的收费详情) * * @param stationId 站点id */ - @Override + @Override public CurrentTimePriceDetails getCurrentTimePriceDetailsForEBike(String stationId) { CurrentTimePriceDetails result = null; // 查询当前时段电费 @@ -461,39 +461,41 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic } } } + } + return result; } - /** - * 用于微信发送微信提醒,查询计费详情 + * 用于微信发送微信提醒,查询计费详情 + * * @param stationId * @param pileSn * @return */ - // @Override - // public CurrentTimePriceDetails getCurrentTimePriceDetailsByPileType(String stationId , String pileSn) { - // // 使用工具类判断是否为电单车桩 - // // boolean isEBike = YouDianUtils.isEBikePileSn(pileSn); - // // 判断桩号是否为汽车桩号 - // Boolean result = YKCUtils.checkEVPileSn(pileSn); - // - // if (result) { - // log.info("走电动汽车逻辑"); - // // 电动汽车:调用电动汽车计费模板查询方法 - // return getCurrentTimePriceDetails(stationId); - // } else { - // log.info("走电单车方法"); - // // 电单车:调用电单车计费模板查询方法 - // return getCurrentTimePriceDetailsForEBike(stationId); - // } + @Override + public CurrentTimePriceDetails getCurrentTimePriceDetailsByPileType(String stationId, String pileSn) { + return null; + // 使用工具类判断是否为电单车桩 + // boolean isEBike = YouDianUtils.isEBikePileSn(pileSn); + // 判断桩号是否为汽车桩号 + // Boolean result = YKCUtils.checkEVPileSn(pileSn); + // + // if (result) { + // log.info("走电动汽车逻辑"); + // // 电动汽车:调用电动汽车计费模板查询方法 + // return getCurrentTimePriceDetails(stationId); + // } else { + // log.info("走电单车方法"); + // // 电单车:调用电单车计费模板查询方法 + // return getCurrentTimePriceDetailsForEBike(stationId); + // } } - - /** * 通过计费模板id查询计费模板详情 * 缓存1天,修改清缓存 + * * @param id * @return */ @@ -513,6 +515,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic /** * 修改站点计费模板状态并下发最新模板 + * * @return */ @Override @@ -586,6 +589,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic /** * 根据站点id查询优惠计费模板 + * * @param stationId * @return */ @@ -671,7 +675,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic */ @Override public List queryStationBillingTemplateListForUniApp(String stationId) { - // 加缓存 + // 加缓存 String redisKey = CacheConstants.QUERY_STATION_BILLING_TEMPLATE_LIST + stationId; List voList = redisCache.getCacheList(redisKey); if (CollectionUtils.isEmpty(voList)) { @@ -720,6 +724,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic /** * 转换参数 + * * @param billingDetailList * @return */ @@ -759,6 +764,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic /** * 通过站点id查询计费模板列表 + * * @param stationId 站点id * @return */ diff --git a/jsowell-pile/src/main/java/com/jsowell/wxpay/service/WxAppletRemoteService.java b/jsowell-pile/src/main/java/com/jsowell/wxpay/service/WxAppletRemoteService.java index 3a0fd7dfb..daacabcca 100644 --- a/jsowell-pile/src/main/java/com/jsowell/wxpay/service/WxAppletRemoteService.java +++ b/jsowell-pile/src/main/java/com/jsowell/wxpay/service/WxAppletRemoteService.java @@ -250,6 +250,7 @@ public class WxAppletRemoteService { return null; } String pileSn = orderBasicInfo.getPileSn(); + // 判断桩类型是否为汽车桩号 Boolean result = YKCUtils.checkEVPileSn(pileSn); // 收费标准