From e8e85af44422291582d859a6970020e68580b2a5 Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Mon, 30 Dec 2024 11:41:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B8=8C=E6=99=93=E4=BD=99=E9=A2=9D?= =?UTF-8?q?=E6=94=AF=E4=BB=98bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jsowell/api/uniapp/customer/PayController.java | 2 +- .../jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java | 5 +---- .../service/programlogic/NotDelayMerchantProgramLogic.java | 3 +++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PayController.java b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PayController.java index 586e0dcab..a1476c99e 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PayController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/uniapp/customer/PayController.java @@ -145,7 +145,7 @@ public class PayController extends BaseController { } response = new RestApiResponse<>(map); } catch (BusinessException e) { - logger.warn("支付订单接口 warn param:{}", dto, e); + logger.error("支付订单接口 warn param:{}", dto, e); response = new RestApiResponse<>(e.getCode(), e.getMessage()); } catch (Exception e) { logger.error("支付订单接口 error param:{}", dto, e); diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index b694dee91..2ea8c434e 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -2,7 +2,6 @@ package com.jsowell.pile.service.impl; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; -import com.alipay.api.domain.ChargeOrderInfo; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; @@ -3250,9 +3249,7 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService { BigDecimal remedialAmount = orderInfo.getRemedialAmount(); orderInfo.setRemedialAmount(remedialAmount.subtract(payAmount)); } - - - + // 更新订单信息 this.updateOrderBasicInfo(orderInfo); } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/programlogic/NotDelayMerchantProgramLogic.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/programlogic/NotDelayMerchantProgramLogic.java index dbfbdb6be..11c3eb876 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/programlogic/NotDelayMerchantProgramLogic.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/programlogic/NotDelayMerchantProgramLogic.java @@ -256,6 +256,9 @@ public class NotDelayMerchantProgramLogic extends AbstractProgramLogic { giftBalancePay = stringBigDecimalMap.get("giftBalancePay"); } + // 更新支付金额 = 本金支付金额 + 赠送金支付金额 + chargeAmount = principalBalancePay.add(giftBalancePay); + // 更新会员钱包 全部金额都用于支付订单 UpdateMemberBalanceDTO updateMemberBalanceDTO = UpdateMemberBalanceDTO.builder() .memberId(memberId) From eff073a4ce7fe6de04d4f03e9c21bc31ab2a6974 Mon Sep 17 00:00:00 2001 From: Lemon Date: Mon, 30 Dec 2024 11:47:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update=20=E5=B9=BF=E8=A5=BF=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0Service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../thirdparty/GuangXiPlatformController.java | 9 +++++++ .../impl/PileBasicInfoServiceImpl.java | 15 ++++++++--- .../pile/thirdparty/ConnectorInfo.java | 24 +++++++++++++++++ .../pile/thirdparty/EquipmentInfo.java | 18 +++++++++++++ .../impl/GuangXiPlatformServiceImpl.java | 27 +++++++++++++------ 5 files changed, 81 insertions(+), 12 deletions(-) diff --git a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuangXiPlatformController.java b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuangXiPlatformController.java index 1ee992f9e..90fdf6e18 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuangXiPlatformController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/GuangXiPlatformController.java @@ -5,6 +5,7 @@ import com.jsowell.common.annotation.Anonymous; import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum; import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum; +import com.jsowell.common.response.RestApiResponse; import com.jsowell.pile.dto.QueryStartChargeDTO; import com.jsowell.pile.dto.QueryStationInfoDTO; import com.jsowell.pile.thirdparty.CommonParamsDTO; @@ -88,6 +89,14 @@ public class GuangXiPlatformController extends ThirdPartyBaseController { return CommonResult.failed("查询充电站信息发生异常"); } + @PostMapping("/queryStationInfo") + public RestApiResponse queryStationInfo(@RequestBody QueryStationInfoDTO queryStationInfoDTO) { + Map map = platformLogic.queryStationsInfo(queryStationInfoDTO); + RestApiResponse response = new RestApiResponse<>(map); + return response; + } + + /** * 查询充电站状态信息 * query_station_status diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java index ff53a992a..ba372f95b 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java @@ -1245,6 +1245,9 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService { equipmentInfo.setNewNationalStandard(1); equipmentInfo.setVinFlag(1); equipmentInfo.setEquipmentName(pileSn); + equipmentInfo.setEquipmentInvestment(new BigDecimal("0.0")); + equipmentInfo.setProductSN(pileSn); + equipmentInfo.setOpenDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileDetailInfoVO.getCreateTime())); equipmentInfo.setPower(new BigDecimal(pileDetailInfoVO.getRatedPower()).setScale(1, BigDecimal.ROUND_HALF_UP)); // 枪口列表 @@ -1371,15 +1374,19 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService { if (StringUtils.isNotBlank(pileConnectorInfo.getParkNo())) { connectorInfo.setParkNo(pileConnectorInfo.getParkNo()); } - connectorInfo.setVoltageUpperLimits(Integer.valueOf(pileDetailInfoVO.getRatedVoltage())); + connectorInfo.setVoltageUpperLimits(Integer.parseInt(pileDetailInfoVO.getRatedVoltage())); connectorInfo.setEquipmentClassification(1); - connectorInfo.setVoltageLowerLimits(Integer.valueOf(pileDetailInfoVO.getRatedVoltage())); - connectorInfo.setCurrent(Integer.valueOf(pileDetailInfoVO.getRatedCurrent())); + connectorInfo.setVoltageLowerLimits(Integer.parseInt(pileDetailInfoVO.getRatedVoltage())); + connectorInfo.setCurrent(Integer.parseInt(pileDetailInfoVO.getRatedCurrent())); connectorInfo.setConnectorName(pileConnectorInfo.getPileConnectorCode()); connectorInfo.setOperateStatus(50); // 50-正常使用 connectorInfo.setOpreateStatus(50); // 50-正常使用 - connectorInfo.setNationalStandard(2); // 2-2015 + connectorInfo.setNationalStandard(StringUtils.equals("1", pileDetailInfoVO.getSpeedType()) ? 12 : 11); // 2-2015 connectorInfo.setAuxPower(3); // 3-兼容12V和24V + connectorInfo.setStatus(Integer.parseInt(pileConnectorInfo.getStatus())); + connectorInfo.setCurrentUpperLimits(Integer.parseInt(pileDetailInfoVO.getRatedCurrent())); + connectorInfo.setCurrentLowerLimits(Integer.parseInt(pileDetailInfoVO.getRatedCurrent())); + connectorInfo.setPowerType(StringUtils.equals(Constants.ONE, pileDetailInfoVO.getSpeedType()) ? 2 : 1); if (!StringUtils.equals(pileDetailInfoVO.getConnectorNum(), "1")) { // 如果不是单枪,则枪口功率需要除以枪口数量 diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/ConnectorInfo.java b/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/ConnectorInfo.java index ffef9cd28..1148ef1d7 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/ConnectorInfo.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/ConnectorInfo.java @@ -47,6 +47,12 @@ public class ConnectorInfo { @JSONField(name = "ConnectorType") private Integer connectorType; + /** + * 枪口状态 + */ + @JSONField(name = "Status") + private Integer status; + /** * 额定电压上限(单位:V) Y */ @@ -83,6 +89,18 @@ public class ConnectorInfo { @JSONField(name = "ConstantCurrentUpperLimits") private Integer ConstantCurrentUpperLimits; + /** + * 额 定 电 流 上限 + */ + @JSONField(name = "CurrentUpperLimits") + private Integer currentUpperLimits; + + /** + * 额 定 电 流 下限 + */ + @JSONField(name = "CurrentLowerLimits") + private Integer currentLowerLimits; + /** *恒功率电流下限 */ @@ -95,6 +113,12 @@ public class ConnectorInfo { @JSONField(name = "Power") private BigDecimal power; + /** + * 接口功率类型 + */ + @JSONField(name = "PowerType") + private Integer powerType; + /** * 车位号 N * 停车场车位编号 diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/EquipmentInfo.java b/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/EquipmentInfo.java index bb3309a8b..e5d53fd64 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/EquipmentInfo.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/thirdparty/EquipmentInfo.java @@ -140,6 +140,24 @@ public class EquipmentInfo { @JSONField(name = "Power") private BigDecimal power; + /** + * 设备开通时间 + */ + @JSONField(name = "OpenDate") + private String openDate; + + /** + * 设备投资金额 + */ + @JSONField(name = "EquipmentInvestment") + private BigDecimal equipmentInvestment; + + /** + * 设备出厂序号 + */ + @JSONField(name = "ProductSN") + private String productSN; + /** * 站点额定功率 diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuangXiPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuangXiPlatformServiceImpl.java index ace9edba0..f38bea542 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuangXiPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GuangXiPlatformServiceImpl.java @@ -168,7 +168,7 @@ public class GuangXiPlatformServiceImpl implements ThirdPartyPlatformService { @Override public Map queryStationsInfo(QueryStationInfoDTO dto) { int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo(); - int pageSize = dto.getPageSize() == null ? 50 : dto.getPageSize(); + int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize(); dto.setThirdPlatformType(thirdPlatformType); PageUtils.startPage(pageNo, pageSize); @@ -191,7 +191,7 @@ public class GuangXiPlatformServiceImpl implements ThirdPartyPlatformService { // .areaCode() // .streetCode() .address(pileStationInfo.getAddress()) - .serviceTel(pileStationInfo.getServiceTel()) + .serviceTel(pileStationInfo.getStationTel()) .stationType(Integer.parseInt(pileStationInfo.getStationType())) .stationStatus(Integer.parseInt(pileStationInfo.getStationStatus())) .parkNums(Integer.parseInt(pileStationInfo.getParkNums())) @@ -204,18 +204,29 @@ public class GuangXiPlatformServiceImpl implements ThirdPartyPlatformService { .runDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileStationInfo.getCreateTime())) .buildDate(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, pileStationInfo.getCreateTime())) + .build(); - JSONObject electricityFee = new JSONObject(); - JSONObject serviceFee = new JSONObject(); + StringBuilder electricityFee = new StringBuilder(); + StringBuilder serviceFee = new StringBuilder(); // 查询计费模板 List priceList = pileBillingTemplateService.queryBillingPrice(String.valueOf(pileStationInfo.getId())); for (BillingPriceVO billingPriceVO : priceList) { - electricityFee.put(billingPriceVO.getStartTime() + "-" + billingPriceVO.getEndTime(), billingPriceVO.getElectricityPrice()); - serviceFee.put(billingPriceVO.getStartTime() + "-" + billingPriceVO.getEndTime(), billingPriceVO.getServicePrice()); + electricityFee.append(billingPriceVO.getStartTime()) + .append("-").append(billingPriceVO.getEndTime()) + .append(":").append(billingPriceVO.getElectricityPrice()) + .append(";"); + serviceFee.append(billingPriceVO.getStartTime()) + .append("-").append(billingPriceVO.getEndTime()) + .append(":").append(billingPriceVO.getServicePrice()) + .append(";"); } - info.setElectricityFee(electricityFee.toJSONString()); - info.setServiceFee(serviceFee.toJSONString()); + // 去除最后一位的分号 + electricityFee.deleteCharAt(electricityFee.length() - 1); + serviceFee.deleteCharAt(serviceFee.length() - 1); + + info.setElectricityFee(electricityFee.toString()); + info.setServiceFee(serviceFee.toString()); // AreaCode String areaCode = pileStationInfo.getAreaCode(); // 330000,330200,330213