保存0x13, 0x17, 0x19, 0x23中的soc

This commit is contained in:
Guoqs
2024-12-12 13:39:31 +08:00
parent d084a58937
commit d90ece633f

View File

@@ -16,6 +16,7 @@ import com.jsowell.common.enums.ykc.OrderPayRecordEnum;
import com.jsowell.common.enums.ykc.OrderStatusEnum; import com.jsowell.common.enums.ykc.OrderStatusEnum;
import com.jsowell.common.util.DateUtils; import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.StringUtils; import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.pile.domain.*; import com.jsowell.pile.domain.*;
import com.jsowell.pile.domain.ebike.deviceupload.EBikeMessageCmd03; import com.jsowell.pile.domain.ebike.deviceupload.EBikeMessageCmd03;
import com.jsowell.pile.dto.*; import com.jsowell.pile.dto.*;
@@ -242,6 +243,23 @@ public abstract class AbstractProgramLogic implements InitializingBean {
orderBasicInfo.setSettlementTime(DateUtils.getNowDate()); // 结算时间 orderBasicInfo.setSettlementTime(DateUtils.getNowDate()); // 结算时间
} }
orderBasicInfo.setRefundAmount(residue); // 结算退款金额 orderBasicInfo.setRefundAmount(residue); // 结算退款金额
if (StringUtils.isBlank(orderBasicInfo.getStartSoc()) || StringUtils.isBlank(orderBasicInfo.getEndSoc())) {
try {
Map<String, String> socMap = YKCUtils.getSOCMap(orderBasicInfo.getTransactionCode());
if (Objects.nonNull(socMap)) {
if (StringUtils.isBlank(orderBasicInfo.getStartSoc())) {
orderBasicInfo.setStartSoc(socMap.get("startSoc"));
}
if (StringUtils.isBlank(orderBasicInfo.getEndSoc())) {
orderBasicInfo.setEndSoc(socMap.get("endSoc"));
}
}
} catch (Exception e) {
logger.error("获取订单充电开始结束SOC失败:{}", e.getMessage());
}
}
} }
/** /**