新增 宁波点行平台Service

This commit is contained in:
Lemon
2024-05-13 11:00:16 +08:00
parent 09a32ab467
commit 60039af78c
5 changed files with 90 additions and 31 deletions

View File

@@ -60,14 +60,14 @@ public class DianXingPlatformServiceImpl implements ThirdPartyPlatformService {
if (orderBasicInfo == null) {
throw new BusinessException("", "未查询到该订单信息");
}
String plateNum = orderBasicInfo.getPlateNumber() == null ? "" : orderBasicInfo.getPlateNumber();
String plateNum = orderBasicInfo.getPlateNumber().equals("") ? "" : orderBasicInfo.getPlateNumber();
// 拼装订单信息 JSON 参数
JSONObject jsonObject = new JSONObject();
jsonObject.put("outTradeId", orderBasicInfo.getOrderCode()); // 充电桩平台订单号
jsonObject.put("plateNum", plateNum); // 车牌号
jsonObject.put("startTime", orderBasicInfo.getChargeStartTime()); // 充电开始时间,格式 yyyy-MM-dd HH:mm:ss
jsonObject.put("endTime", orderBasicInfo.getChargeEndTime()); // 充电结束时间,
jsonObject.put("payAmount", orderBasicInfo.getPayAmount()); // 支付金额,格式为小数点后保留 2 位
jsonObject.put("startTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderBasicInfo.getChargeStartTime())); // 充电开始时间,格式 yyyy-MM-dd HH:mm:ss
jsonObject.put("endTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, orderBasicInfo.getChargeEndTime())); // 充电结束时间,
jsonObject.put("payAmount", String.valueOf(orderBasicInfo.getPayAmount())); // 支付金额,格式为小数点后保留 2 位
jsonObject.put("recordTime", DateUtils.getDateTime()); // 记录上报时间
// 查询出该平台的配置参数