From f84f2ca883aacf4409b2766ca8c877749cb21b46 Mon Sep 17 00:00:00 2001 From: Lemon Date: Wed, 28 Feb 2024 16:30:07 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=20=20=E4=BF=AE=E5=A4=8D=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=BF=A1=E6=81=AF=E7=A9=BA=E6=8C=87=E9=92=88=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lianlian/service/impl/LianLianServiceImpl.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java index c477fa3d7..07ebb9fe4 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java @@ -1471,12 +1471,20 @@ public class LianLianServiceImpl implements LianLianService { String thirdPartyType = relationInfo.getThirdPartyType(); String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_CHARGE_ORDER_INFO.getValue(); + Date chargeStartTime = orderBasicInfo.getChargeStartTime(); + if (chargeStartTime == null) { + chargeStartTime = orderBasicInfo.getCreateTime(); + } + Date chargeEndTime = orderBasicInfo.getChargeEndTime(); + if (chargeEndTime == null) { + chargeEndTime = orderBasicInfo.getCreateTime(); + } JSONObject json = new JSONObject(); json.put("StartChargeSeq", orderCode); json.put("ConnectorID", orderBasicInfo.getPileConnectorCode()); - json.put("StartTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderBasicInfo.getChargeStartTime())); - json.put("EndTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderBasicInfo.getChargeEndTime())); + json.put("StartTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, chargeStartTime)); + json.put("EndTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, chargeEndTime)); json.put("TotalPower", orderDetail.getTotalUsedElectricity().setScale(2, BigDecimal.ROUND_HALF_UP)); json.put("TotalElecMoney", orderDetail.getTotalElectricityAmount().setScale(2, BigDecimal.ROUND_HALF_UP)); json.put("TotalSeviceMoney", orderDetail.getTotalServiceAmount().setScale(2, BigDecimal.ROUND_HALF_UP));