update 电单车协议

This commit is contained in:
Guoqs
2024-09-04 14:27:15 +08:00
parent 6ee161de0a
commit 0d26625b57
3 changed files with 48 additions and 65 deletions

View File

@@ -185,31 +185,17 @@ public class PileRemoteService {
pileBillingTemplate.setPublishTime(new Date());
pileBillingTemplateService.updatePileBillingTemplate(pileBillingTemplate);
// 获取到站点下所有的桩
List<PileDetailVO> pileList = pileBasicInfoService.selectPileListByStationIds(Lists.newArrayList(Long.valueOf(dto.getStationId())));
if (CollectionUtils.isEmpty(pileList)) {
log.warn("获取到站点下所有的桩, 通过站点id:{}查询充电桩列表为空", dto.getStationId());
return false;
// 获取到站点下所有的桩, 下发计费模板, 电单车不支持
if (StringUtils.equals(billingTemplateVO.getDeviceType(), "1")) {
List<PileDetailVO> pileList = pileBasicInfoService.selectPileListByStationIds(Lists.newArrayList(Long.valueOf(dto.getStationId())));
if (CollectionUtils.isNotEmpty(pileList)) {
for (PileDetailVO pileInfoVO : pileList) {
// 下发计费模板
publishPileBillingTemplate(pileInfoVO.getPileSn(), billingTemplateVO);
}
}
}
// 保存计费模板和桩的关系
// List<PileBillingRelation> relationList = Lists.newArrayList();
for (PileDetailVO pileInfoVO : pileList) {
// push
publishPileBillingTemplate(pileInfoVO.getPileSn(), billingTemplateVO);
// 入库
// relationList.add(PileBillingRelation.builder()
// .pileSn(pileInfoVO.getPileSn())
// .billingTemplateCode(billingTemplateVO.getTemplateCode())
// .stationId(dto.getStationId())
// .build());
}
// if (CollectionUtils.isNotEmpty(relationList)) {
// pileBillingTemplateService.insertPileBillingRelation(relationList);
// }
// 修改计费模板状态
pileBillingTemplateService.changeStationTemplate(dto.getStationId(), dto.getTemplateId(), billingTemplateVO.getDeviceType());
return true;

View File

@@ -30,7 +30,7 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService {
EBikeMessageCmd82.SpecificData data = new EBikeMessageCmd82.SpecificData();
// 充电模式
data.setRateMode("0");
data.setRateMode("3");
// 余额或有效期
data.setBalanceOrValidity("356");
// 端口号
@@ -45,7 +45,7 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService {
data.setOrderNumber(orderNumber);
// 最大充电时长
data.setMaxChargeDuration("28800");
data.setMaxChargeDuration("0");
// 过载功率
data.setOverloadPower("5000");
data.setQrCodeLight("0");