mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 华为Service
This commit is contained in:
@@ -651,8 +651,8 @@ public class HuaweiServiceV2 {
|
||||
if (connectorStatus != 0) {
|
||||
setPileAlive(pileSn);
|
||||
}
|
||||
// 计算时间间隔
|
||||
String poorDays = DateUtils.getDatePoor(DateUtils.parseDate(endTime), DateUtils.parseDate(startTime));
|
||||
// 计算充电时间(单位:分钟)
|
||||
long sumChargingTime = DateUtils.intervalTime(startTime, endTime);
|
||||
// 通过订单号查询交易流水号
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(startChargeSeq);
|
||||
if (orderBasicInfo == null) {
|
||||
@@ -680,7 +680,7 @@ public class HuaweiServiceV2 {
|
||||
.outputVoltage(String.valueOf(dto.getVoltageA()))
|
||||
.outputCurrent(String.valueOf(dto.getCurrentA()))
|
||||
.SOC(String.valueOf(dto.getSoc()))
|
||||
.sumChargingTime(poorDays)
|
||||
.sumChargingTime(String.valueOf(sumChargingTime))
|
||||
.chargingDegree(String.valueOf(dto.getTotalPower()))
|
||||
.chargingAmount(String.valueOf(dto.getTotalMoney()))
|
||||
|
||||
@@ -745,12 +745,14 @@ public class HuaweiServiceV2 {
|
||||
String pileSn = StringUtils.substring(connectorID, 0, 14);
|
||||
setPileAlive(pileSn);
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(startChargeSeq);
|
||||
Date date = new Date();
|
||||
if (orderBasicInfo == null) {
|
||||
return null;
|
||||
}
|
||||
if (succStat == Constants.zero) {
|
||||
// 成功标识为 0-成功,修改订单状态为 2-待结算,具体的订单金额等详情金额,从所推送的订单信息中取
|
||||
orderBasicInfo.setOrderStatus(OrderStatusEnum.STAY_SETTLEMENT.getValue());
|
||||
orderBasicInfo.setChargeEndTime(date);
|
||||
}else {
|
||||
// 若成功标识为失败,则将失败原因记录存库
|
||||
String reason = StopFailedReasonEnum.getReasonByCode(failReasonCode);
|
||||
|
||||
Reference in New Issue
Block a user