mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
update 算法应用Service
This commit is contained in:
@@ -2,9 +2,9 @@ package com.jsowell.thirdparty.platform.service.impl;
|
||||
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||
import com.jsowell.pile.thirdparty.ParameterConfigData;
|
||||
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
||||
@@ -37,12 +37,16 @@ public class ChargeAlgorithmService {
|
||||
if (orderVO == null) {
|
||||
return;
|
||||
}
|
||||
String transactionCode = orderVO.getTransactionCode();
|
||||
// 获取0x17缓存中的信息
|
||||
String redisKey = CacheConstants.PARAMETER_CONFIGURATION_BY_TRANSACTIONCODE + orderVO.getTransactionCode();
|
||||
String redisKey = CacheConstants.PARAMETER_CONFIGURATION_BY_TRANSACTION_CODE + transactionCode;
|
||||
ParameterConfigData parameterConfigData = redisCache.getCacheObject(redisKey);
|
||||
if (parameterConfigData == null) {
|
||||
return;
|
||||
}
|
||||
// 获取0x3b缓存信息
|
||||
String transactionDataKey = CacheConstants.TRANSACTION_RECORD_BY_TRANSACTION_CODE + transactionCode;
|
||||
TransactionRecordsData transactionRecordsData = redisCache.getCacheObject(transactionDataKey);
|
||||
|
||||
ChargeAlgorithmData data = ChargeAlgorithmData.builder()
|
||||
.orderCode(orderCode)
|
||||
@@ -61,13 +65,13 @@ public class ChargeAlgorithmService {
|
||||
// .bmsDemandVoltage(parameterConfigData.get)
|
||||
// .bmsDemandElectricity()
|
||||
// .bmsChargeMode()
|
||||
// .readBeforeCharge()
|
||||
// .readCurrentCharge()
|
||||
.readBeforeCharge(transactionRecordsData.getAmmeterTotalStart())
|
||||
.readCurrentCharge(transactionRecordsData.getAmmeterTotalEnd())
|
||||
.beginTime(orderVO.getStartTime())
|
||||
.maxAllowTemp(parameterConfigData.getBmsMaxTemperature())
|
||||
// .chargePower()
|
||||
// .ratedCapacity()
|
||||
// .nominalEnergy()
|
||||
.nominalEnergy(parameterConfigData.getBmsSumEnergy())
|
||||
// .ratedVoltage()
|
||||
.singleMaxVoltage(parameterConfigData.getPileMaxOutputVoltage())
|
||||
.singleMinVoltage(parameterConfigData.getPileMinOutputVoltage())
|
||||
|
||||
Reference in New Issue
Block a user