This commit is contained in:
YAS\29473
2025-09-11 13:39:54 +08:00
parent a501da1386
commit 41de21f7f8

View File

@@ -776,19 +776,25 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
// 根据枪口号查询充电实时状态
// OrderBasicInfo orderBasicInfo = orderBasicInfoService.queryChargingByPileConnectorCode(orderInfo.getPileConnectorCode());
List<RealTimeMonitorData> list = orderBasicInfoService.getChargingRealTimeData(orderInfo.getTransactionCode());
if (CollectionUtils.isEmpty(list)) {
log.info("订单号{}未查询到充电实时数据", orderCode);
}
//获取枪口状态
PileConnectorInfoVO connectorInfoVO = pileConnectorInfoService.getPileConnectorInfoByConnectorCode(orderInfo.getPileConnectorCode());
RealTimeMonitorData realTimeMonitorData = list.get(0);
// 拼装联联参数
ConnectorChargeStatusInfo info = ConnectorChargeStatusInfo.builder()
.startChargeSeq(orderCode)
.connectorID(orderInfo.getPileConnectorCode())
.connectorStatus(Integer.valueOf(realTimeMonitorData.getConnectorStatus()))
.connectorStatus(connectorInfoVO.getStatus() == null ? 1 : connectorInfoVO.getStatus())
.currentA(new BigDecimal(realTimeMonitorData.getOutputCurrent()))
.voltageA(new BigDecimal(realTimeMonitorData.getOutputVoltage()))
.soc(new BigDecimal(realTimeMonitorData.getSOC()))
.soc(new BigDecimal(realTimeMonitorData.getSOC()== null ? "0" : realTimeMonitorData.getSOC()))
.startTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderInfo.getChargeStartTime()))
.endTime(DateUtils.getDateTime())
.totalPower(new BigDecimal(realTimeMonitorData.getChargingDegree()))
.elecMoney(new BigDecimal("0")) // TODO
.elecMoney(new BigDecimal("0")) // TODO 实时数据中只有总金额,没有区分电费和服务费
.seviceMoney(new BigDecimal("0")) // TODO
.totalMoney(new BigDecimal(realTimeMonitorData.getChargingAmount()).setScale(2, BigDecimal.ROUND_HALF_UP))
.build();