mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user