From 2ce4235f583c1a43a4dcc5118cd59d6f6a11e507 Mon Sep 17 00:00:00 2001 From: "YAS\\29473" <2947326429@qq.com> Date: Tue, 5 Aug 2025 10:30:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?update=20=E5=B8=B8=E7=95=85=E5=85=85?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=85=85=E7=94=B5=E8=AE=B0=E5=BD=95=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3,=E5=8F=AA=E9=9C=80=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E4=BB=96=E4=BB=AC=E5=B9=B3=E5=8F=B0=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E7=9A=84=E5=85=85=E7=94=B5=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/ChangZhouPlatformServiceImpl.java | 37 +++++++++++++++++++ .../util/ThirdPartyPlatformUtils.java | 13 +++++++ 2 files changed, 50 insertions(+) diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChangZhouPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChangZhouPlatformServiceImpl.java index 295efb174..6db725c00 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChangZhouPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChangZhouPlatformServiceImpl.java @@ -59,6 +59,8 @@ import java.time.format.DateTimeFormatter; import java.util.*; import java.util.concurrent.CompletableFuture; +import static com.jsowell.thirdparty.platform.util.ThirdPartyPlatformUtils.isNeedPushToThirdPartyPlatform; + @Service @Slf4j public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { @@ -469,6 +471,13 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { */ @Override public String notificationStartChargeResult(String orderCode) { + //判断是否是常畅充平台的订单 + Boolean flag = isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.CHANG_ZHOU_PLATFORM.getOperatorId()); + if (!flag){ + //表示不是常畅充平台的订单 + return null; + } + // 根据订单号查询订单信息 OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); if (orderInfo == null) { @@ -582,6 +591,13 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { */ @Override public String notificationEquipChargeStatus(String orderCode) { + //判断是否是常畅充平台的订单 + Boolean flag = isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.CHANG_ZHOU_PLATFORM.getOperatorId()); + if (!flag){ + //表示不是常畅充平台的订单 + return null; + } + // 根据订单号查询订单信息 OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderInfo.getOrderCode()); @@ -684,6 +700,13 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { */ @Override public String notificationStopChargeResult(String orderCode) { + //判断是否是常畅充平台的订单 + Boolean flag = isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.CHANG_ZHOU_PLATFORM.getOperatorId()); + if (!flag){ + //表示不是常畅充平台的订单 + return null; + } + // 根据订单号查询订单信息 OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); if (orderInfo == null) { @@ -752,6 +775,13 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { */ @Override public String notificationChargeOrderInfo(String orderCode, ThirdPartySecretInfoVO thirdPartySecretInfoVO) { + //判断是否是常畅充平台的订单 + Boolean flag = isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.CHANG_ZHOU_PLATFORM.getOperatorId()); + if (!flag){ + //表示不是常畅充平台的订单 + return null; + } + OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); OrderDetail orderDetail = orderBasicInfoService.getOrderDetailByOrderCode(orderCode); @@ -808,6 +838,13 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService { */ @Override public String notificationPayOrderInfo(String orderCode){ + //判断是否是常畅充平台的订单 + Boolean flag = isNeedPushToThirdPartyPlatform(orderCode , ThirdPlatformTypeEnum.CHANG_ZHOU_PLATFORM.getOperatorId()); + if (!flag){ + //表示不是常畅充平台的订单 + return null; + } + //获取订单信息 OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); if (orderBasicInfo == null) { diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java index aa40616ef..846d84498 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java @@ -116,4 +116,17 @@ public class ThirdPartyPlatformUtils { } } + /** + * 通过截取订单号前9位,来判断是否需要推送充电记录到指定的第三方平台 + * 例: 2025-08-05 ,常畅充平台只需要通过他们平台启动的充电记录 + * + * + * @param orderCode + * @return + */ + public static Boolean isNeedPushToThirdPartyPlatform(String orderCode,String operatorId) { + String operatorIdPrefix = StringUtils.substring(orderCode , 0 , 9); + return operatorIdPrefix.equals(operatorId); + } + } From 0025eb9f90d01c16c46285d23aff174c95e60890 Mon Sep 17 00:00:00 2001 From: Lemon Date: Tue, 5 Aug 2025 10:39:48 +0800 Subject: [PATCH 2/3] =?UTF-8?q?update=20=20=E8=AE=A2=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E6=B1=87=E6=80=BB=E6=95=B0=E6=8D=AE=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E9=87=91=E9=A2=9D=E6=8D=A2=E4=B8=BA=E5=AE=9E=E6=94=B6?= =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/jsowell/pile/vo/web/OrderTotalDataVO.java | 3 +++ .../src/main/resources/mapper/pile/OrderBasicInfoMapper.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/OrderTotalDataVO.java b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/OrderTotalDataVO.java index e61ee17e5..0f71e823d 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/OrderTotalDataVO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/OrderTotalDataVO.java @@ -21,6 +21,9 @@ public class OrderTotalDataVO { // 总用电量 private BigDecimal sumUsedElectricity; + // 总实收金额 + private BigDecimal sumActualReceivedAmount; + // 总结算金额 private BigDecimal sumSettleAmount; } diff --git a/jsowell-pile/src/main/resources/mapper/pile/OrderBasicInfoMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/OrderBasicInfoMapper.xml index 8175eadd4..842606b97 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/OrderBasicInfoMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/OrderBasicInfoMapper.xml @@ -1952,6 +1952,7 @@ select IFNULL(sum(t1.order_amount),0) as sumOrderAmount, IFNULL(sum(t4.total_used_electricity),0) as sumUsedElectricity, + IFNULL(sum(t1.actual_received_amount), 0) as sumActualReceivedAmount, IFNULL(sum(t1.settle_amount),0) as sumSettleAmount from order_basic_info t1 left join member_basic_info t2 on t1.member_id = t2.member_id and t2.del_flag = '0' From d751f8efbe0028c8795dd93f179f080c51caaaf5 Mon Sep 17 00:00:00 2001 From: Lemon Date: Tue, 5 Aug 2025 14:08:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?update=20=20=E5=AF=BC=E5=87=BA=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E7=BB=93=E7=AE=97=E9=87=91=E9=A2=9D=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=AE=9E=E6=94=B6=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/pile/OrderBasicInfoController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/OrderBasicInfoController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/OrderBasicInfoController.java index aabcbb880..ef07e5323 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/OrderBasicInfoController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/pile/OrderBasicInfoController.java @@ -132,6 +132,12 @@ public class OrderBasicInfoController extends BaseController { orderBasicInfo.setMerchantId(String.valueOf(pileMerchantInfo.getId())); } List list = orderBasicInfoService.selectOrderBasicInfoListWithAuth(orderBasicInfo); + // 将结算金额改为实收金额 + if (CollectionUtils.isNotEmpty(list)) { + for (OrderListVO orderListVO : list) { + orderListVO.setSettleAmount(String.valueOf(orderListVO.getActualReceivedAmount())); + } + } ExcelUtil util = new ExcelUtil(OrderListVO.class); util.exportExcel(response, list, "订单数据"); }