mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-26 18:18:01 +08:00
update 电池算法应用Service
This commit is contained in:
@@ -24,6 +24,56 @@ public class ChargeAlgorithmData {
|
|||||||
*/
|
*/
|
||||||
private String orderCode;
|
private String orderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点详细地址
|
||||||
|
*/
|
||||||
|
private String siteAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点编号
|
||||||
|
*/
|
||||||
|
private String siteCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 桩编号
|
||||||
|
*/
|
||||||
|
private String pileCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 枪编号
|
||||||
|
*/
|
||||||
|
private String gunNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车主年龄段
|
||||||
|
*/
|
||||||
|
private String age;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车主性别
|
||||||
|
*/
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用车场景
|
||||||
|
*/
|
||||||
|
private String scene;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆使用年限
|
||||||
|
*/
|
||||||
|
private String serviceLife;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车辆累计里程
|
||||||
|
*/
|
||||||
|
private String odometer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点名称
|
||||||
|
*/
|
||||||
|
private String siteName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始SOC
|
* 初始SOC
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,8 +12,10 @@ import com.jsowell.common.util.StringUtils;
|
|||||||
import com.jsowell.pile.domain.OrderSplitRecord;
|
import com.jsowell.pile.domain.OrderSplitRecord;
|
||||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||||
import com.jsowell.pile.service.PileBasicInfoService;
|
import com.jsowell.pile.service.PileBasicInfoService;
|
||||||
|
import com.jsowell.pile.service.PileStationInfoService;
|
||||||
import com.jsowell.pile.thirdparty.ParameterConfigData;
|
import com.jsowell.pile.thirdparty.ParameterConfigData;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
||||||
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import com.jsowell.thirdparty.platform.domain.ChargeAlgorithmData;
|
import com.jsowell.thirdparty.platform.domain.ChargeAlgorithmData;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -43,6 +45,9 @@ public class ChargeAlgorithmService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PileBasicInfoService pileBasicInfoService;
|
private PileBasicInfoService pileBasicInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PileStationInfoService pileStationInfoService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
@@ -58,6 +63,9 @@ public class ChargeAlgorithmService {
|
|||||||
if (orderVO == null) {
|
if (orderVO == null) {
|
||||||
return "订单信息为空";
|
return "订单信息为空";
|
||||||
}
|
}
|
||||||
|
// 查询站点信息
|
||||||
|
PileStationVO stationVO = pileStationInfoService.getStationInfo(orderVO.getStationId());
|
||||||
|
|
||||||
// 计算充电时长
|
// 计算充电时长
|
||||||
long chargingTime = DateUtils.intervalTime(orderVO.getStartTime(), orderVO.getEndTime());
|
long chargingTime = DateUtils.intervalTime(orderVO.getStartTime(), orderVO.getEndTime());
|
||||||
String transactionCode = orderVO.getTransactionCode();
|
String transactionCode = orderVO.getTransactionCode();
|
||||||
@@ -125,6 +133,17 @@ public class ChargeAlgorithmService {
|
|||||||
// .gunTemp("0") // 充电枪温度
|
// .gunTemp("0") // 充电枪温度
|
||||||
.doorStatus(Constants.zero) // 舱门状态
|
.doorStatus(Constants.zero) // 舱门状态
|
||||||
|
|
||||||
|
.siteAddress(stationVO.getAddress())
|
||||||
|
.siteCode(stationVO.getId())
|
||||||
|
.pileCode(orderVO.getPileSn())
|
||||||
|
.gunNo(orderVO.getPileConnectorCode())
|
||||||
|
.age("0")
|
||||||
|
.gender("0")
|
||||||
|
.scene("0")
|
||||||
|
.serviceLife("0")
|
||||||
|
.odometer("0")
|
||||||
|
.siteName(stationVO.getStationName())
|
||||||
|
|
||||||
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user