update 订单记录停止原因码

This commit is contained in:
Lemon
2024-12-20 13:25:22 +08:00
parent 5869e8d5f3
commit bd59654994
6 changed files with 34 additions and 7 deletions

View File

@@ -1904,6 +1904,8 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
orderBasicInfo.setChargeStartTime(DateUtils.parseDate(data.getStartTime()));
// 充电结束时间
orderBasicInfo.setChargeEndTime(DateUtils.parseDate(data.getEndTime()));
// 停止原因码
orderBasicInfo.setStopReasonCode("0x" + data.getStopReasonCode());
// 停止原因
orderBasicInfo.setReason(data.getStopReasonMsg());
// 结算时间

View File

@@ -3,6 +3,7 @@ package com.jsowell.pile.service.impl;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.domain.OrderBasicInfo;
import com.jsowell.pile.domain.PersonalChargingRecord;
import com.jsowell.pile.domain.PileBasicInfo;
@@ -130,7 +131,10 @@ public class PersonalChargingRecordServiceImpl implements PersonalChargingRecord
chargingRecord.setValleyUsedElectricity(valleyUsedElectricity);
BigDecimal totalUsedElectricity = sharpUsedElectricity.add(peakUsedElectricity).add(flatUsedElectricity).add(valleyUsedElectricity);
chargingRecord.setTotalUsedElectricity(totalUsedElectricity);
chargingRecord.setReason(data.getStopReasonMsg());
chargingRecord.setStopReasonCode("0x" + data.getStopReasonCode());
if (StringUtils.isNotBlank(data.getStopReasonMsg())) {
chargingRecord.setReason(data.getStopReasonMsg());
}
// 创建或更新
this.insertOrUpdateSelective(chargingRecord);
}