mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-15 15:28:41 +08:00
update
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
package com.jsowell.thirdparty.platform.service.impl;
|
package com.jsowell.thirdparty.platform.service.impl;
|
||||||
|
|
||||||
|
import com.jsowell.common.constant.Constants;
|
||||||
|
import com.jsowell.common.util.StringUtils;
|
||||||
|
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||||
|
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||||
|
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
||||||
|
import com.jsowell.thirdparty.platform.domain.ChargeAlgorithmData;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10,4 +17,69 @@ import org.springframework.stereotype.Service;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ChargeAlgorithmService {
|
public class ChargeAlgorithmService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrderBasicInfoService orderBasicInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送充电订单数据
|
||||||
|
* @param orderCode
|
||||||
|
*/
|
||||||
|
public void pushOrderInfo(String orderCode) {
|
||||||
|
// 根据订单号查询订单信息
|
||||||
|
OrderVO orderVO = orderBasicInfoService.getChargeOrderInfoByOrderCode(orderCode);
|
||||||
|
|
||||||
|
ChargeAlgorithmData data = ChargeAlgorithmData.builder()
|
||||||
|
.orderCode(orderCode)
|
||||||
|
.initSoc(Constants.zero)
|
||||||
|
.currentSoc(Constants.zero)
|
||||||
|
.alarmCode(Constants.ZERO)
|
||||||
|
.currentServiceFee(String.valueOf(orderVO.getTotalServiceAmount()))
|
||||||
|
.currentTotalFee(String.valueOf(orderVO.getOrderAmount()))
|
||||||
|
.totalCharge(orderVO.getTotalPower())
|
||||||
|
.totalChargeTime(Integer.parseInt(orderVO.getChargingTime()))
|
||||||
|
.remainChargeTime(Constants.zero)
|
||||||
|
// .maxAllowElectricity()
|
||||||
|
// .singleMaxAllowVoltage()
|
||||||
|
// .dcv()
|
||||||
|
// .dca()
|
||||||
|
// .bmsDemandVoltage()
|
||||||
|
// .bmsDemandElectricity()
|
||||||
|
// .bmsChargeMode()
|
||||||
|
// .readBeforeCharge()
|
||||||
|
// .readCurrentCharge()
|
||||||
|
// .beginTime()
|
||||||
|
// .maxAllowTemp()
|
||||||
|
// .chargePower()
|
||||||
|
// .ratedCapacity()
|
||||||
|
// .nominalEnergy()
|
||||||
|
// .ratedVoltage()
|
||||||
|
// .singleMaxVoltage()
|
||||||
|
// .singleMinVoltage()
|
||||||
|
// .singleMaxTemp()
|
||||||
|
// .ventTemp()
|
||||||
|
// .environmentTemp()
|
||||||
|
// .gunTemp()
|
||||||
|
// .doorStatus()
|
||||||
|
// .bmsVersion()
|
||||||
|
// .measuringChargeVoltage()
|
||||||
|
// .measuringChargeElectricity()
|
||||||
|
// .maxSingleVoltageGroupNum()
|
||||||
|
// .maxSingleVoltageNum()
|
||||||
|
// .maxTempPointNum()
|
||||||
|
// .minTempPointNum()
|
||||||
|
// .batteryType()
|
||||||
|
// .batteryInsulation()
|
||||||
|
// .maxAllowTotalVoltage()
|
||||||
|
// .beforeChargeTotalVoltage()
|
||||||
|
|
||||||
|
.build();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(orderVO.getStartSoc())) {
|
||||||
|
data.setInitSoc(Integer.parseInt(orderVO.getStartSoc()));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(orderVO.getEndSoc())) {
|
||||||
|
data.setCurrentSoc(Integer.parseInt(orderVO.getEndSoc()));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user