diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/domain/ChargeAlgorithmData.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/domain/ChargeAlgorithmData.java index 6b4ef6778..06efcfaec 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/domain/ChargeAlgorithmData.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/domain/ChargeAlgorithmData.java @@ -24,6 +24,56 @@ public class ChargeAlgorithmData { */ 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 */ diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChargeAlgorithmService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChargeAlgorithmService.java index 94bff2fef..1e6567158 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChargeAlgorithmService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/ChargeAlgorithmService.java @@ -12,8 +12,10 @@ import com.jsowell.common.util.StringUtils; import com.jsowell.pile.domain.OrderSplitRecord; import com.jsowell.pile.service.OrderBasicInfoService; import com.jsowell.pile.service.PileBasicInfoService; +import com.jsowell.pile.service.PileStationInfoService; import com.jsowell.pile.thirdparty.ParameterConfigData; import com.jsowell.pile.vo.uniapp.customer.OrderVO; +import com.jsowell.pile.vo.web.PileStationVO; import com.jsowell.thirdparty.platform.domain.ChargeAlgorithmData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,6 +45,9 @@ public class ChargeAlgorithmService { @Autowired private PileBasicInfoService pileBasicInfoService; + @Autowired + private PileStationInfoService pileStationInfoService; + @Autowired private RedisCache redisCache; @@ -58,6 +63,9 @@ public class ChargeAlgorithmService { if (orderVO == null) { return "订单信息为空"; } + // 查询站点信息 + PileStationVO stationVO = pileStationInfoService.getStationInfo(orderVO.getStationId()); + // 计算充电时长 long chargingTime = DateUtils.intervalTime(orderVO.getStartTime(), orderVO.getEndTime()); String transactionCode = orderVO.getTransactionCode(); @@ -125,6 +133,17 @@ public class ChargeAlgorithmService { // .gunTemp("0") // 充电枪温度 .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();