update 个人桩充电记录

This commit is contained in:
Guoqs
2024-07-08 09:37:57 +08:00
parent 2c03f24b6e
commit 9285d06cb9

View File

@@ -3,6 +3,9 @@ package com.jsowell.pile.service.impl;
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
import com.jsowell.common.util.Cp56Time2a.Cp56Time2aUtil;
import com.jsowell.common.util.DateUtils;
import com.jsowell.pile.domain.PileBasicInfo;
import com.jsowell.pile.service.PileBasicInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
@@ -16,6 +19,9 @@ public class PersonalChargingRecordServiceImpl implements PersonalChargingRecord
@Resource
private PersonalChargingRecordMapper personalChargingRecordMapper;
@Autowired
private PileBasicInfoService pileBasicInfoService;
@Override
public int deleteByPrimaryKey(Integer id) {
return personalChargingRecordMapper.deleteByPrimaryKey(id);
@@ -90,17 +96,19 @@ public class PersonalChargingRecordServiceImpl implements PersonalChargingRecord
chargingRecord = new PersonalChargingRecord();
}
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(data.getPileSn());
// 处理数据
chargingRecord.setTransactionCode(transactionCode);
chargingRecord.setStatus("6");
chargingRecord.setMemberId("");
chargingRecord.setStationId("");
chargingRecord.setMerchantId("");
chargingRecord.setPileSn("");
chargingRecord.setConnectorCode("");
chargingRecord.setPileConnectorCode("");
chargingRecord.setLogicCard("");
chargingRecord.setVinCode("");
chargingRecord.setStationId(pileBasicInfo.getStationId() + "");
chargingRecord.setMerchantId(pileBasicInfo.getMerchantId() + "");
chargingRecord.setPileSn(data.getPileSn());
chargingRecord.setConnectorCode(data.getConnectorCode());
chargingRecord.setPileConnectorCode(chargingRecord.getPileSn() + chargingRecord.getConnectorCode());
chargingRecord.setLogicCard(data.getLogicCard());
chargingRecord.setVinCode(data.getVinCode());
chargingRecord.setStartMode("");
chargingRecord.setPlateNumber("");
chargingRecord.setChargeStartTime(DateUtils.parseDate(data.getStartTime()));