mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
update 电单车协议
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user