mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update
This commit is contained in:
@@ -817,6 +817,13 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
chargingRealTimeData.add(realTimeMonitorData);
|
||||
} else {
|
||||
realTimeMonitorData = chargingRealTimeData.get(0);
|
||||
//获取设备枪口状态
|
||||
PileConnectorInfoVO info = pileConnectorInfoService.getPileConnectorInfoByConnectorCode(orderInfo.getPileConnectorCode());
|
||||
if (info == null) {
|
||||
realTimeMonitorData.setConnectorStatus("3");
|
||||
}else {
|
||||
realTimeMonitorData.setConnectorStatus(String.valueOf(info.getStatus()));
|
||||
}
|
||||
}
|
||||
|
||||
// String orderStatus = orderInfo.getOrderStatus();
|
||||
@@ -843,9 +850,19 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
BigDecimal totalElectricityAmount = orderDetail.getTotalElectricityAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalElectricityAmount();
|
||||
BigDecimal totalServiceAmount = orderDetail.getTotalServiceAmount() == null ? BigDecimal.ZERO : orderDetail.getTotalServiceAmount();
|
||||
|
||||
//StartChargeSeqStat "1、启动中 ;2、充电中;3、停止中;4、已结束;5、未知"
|
||||
String orderStatus = orderInfo.getOrderStatus();
|
||||
//转换订单状态
|
||||
if (OrderStatusEnum.IN_THE_CHARGING.getValue().equals(orderStatus)) {
|
||||
orderStatus = "2";
|
||||
} else if (OrderStatusEnum.ORDER_COMPLETE.getValue().equals(orderStatus)) {
|
||||
orderStatus = "4";
|
||||
}else{
|
||||
orderStatus = "5";
|
||||
}
|
||||
QueryChargingStatusVO vo = QueryChargingStatusVO.builder()
|
||||
.startChargeSeq(orderInfo.getOrderCode()) // 订单号
|
||||
.startChargeSeqStat(Integer.parseInt(orderInfo.getOrderStatus())) // 订单状态
|
||||
.startChargeSeqStat(Integer.parseInt(orderStatus)) // 订单状态
|
||||
.connectorID(orderInfo.getPileConnectorCode()) // 枪口编码
|
||||
.connectorStatus(Integer.parseInt(realTimeMonitorData.getConnectorStatus())) // 枪口状态
|
||||
.currentA(current) // 电流
|
||||
@@ -1501,8 +1518,7 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
json.put("StartChargeSeq", orderCode);
|
||||
json.put("StartChargeSeqStat", 4); // 只能给 4-已结束
|
||||
json.put("ConnectorID", orderInfo.getPileConnectorCode());
|
||||
json.put("SuccStat", 0);
|
||||
json.put("FailReason", 0);
|
||||
json.put("StartTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderInfo.getChargeStartTime()));
|
||||
|
||||
String jsonString = JSON.toJSONString(json);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user