From 50a5f466710309a4be298826f5e414281a5475b4 Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Fri, 25 Apr 2025 17:44:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=AD=A3=E5=9C=A8=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=B8=AD=E7=9A=84=E8=AE=A1=E8=B4=B9=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=96=B9=E6=B3=95,=20=E6=B7=BB=E5=8A=A0=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6,=20=E7=8A=B6=E6=80=81=E4=B8=BA1=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pile/service/impl/PileBillingTemplateServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ddd88b343..42cc30092 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 @@ -630,7 +630,8 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic public BillingTemplateVO queryUsedBillingTemplateForEV(String stationId) { List list = queryStationBillingTemplateListForUniApp(stationId); Optional max = list.stream() - .filter(x -> StringUtils.equals(x.getDeviceType(), Constants.ONE)) // 过滤出汽车桩的计费模板 + .filter(x -> StringUtils.equals(x.getDeviceType(), Constants.ONE)) // 过滤出汽车桩的计费模板(1-电动汽车;2-电动自行车) + .filter(x -> StringUtils.equals(x.getStatus(), Constants.ONE)) // 状态为启用状态(0-未启用;1-启用) .filter(x -> StringUtils.isNotBlank(x.getPublishTime())) .filter(x -> StringUtils.equals(Constants.ZERO, x.getMemberFlag())) // 过滤出非会员价格 .max(Comparator.comparing(BillingTemplateVO::getPublishTime)); @@ -642,6 +643,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic List list = queryStationBillingTemplateListForUniApp(stationId); Optional max = list.stream() .filter(x -> StringUtils.equals(x.getDeviceType(), Constants.TWO)) // 过滤出电单车桩的计费模板 + .filter(x -> StringUtils.equals(x.getStatus(), Constants.ONE)) // 状态为启用状态(0-未启用;1-启用) .filter(x -> StringUtils.isNotBlank(x.getPublishTime())) .max(Comparator.comparing(BillingTemplateVO::getPublishTime)); return max.orElse(null);