mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 电单车查询收费标准
This commit is contained in:
@@ -16,6 +16,7 @@ import com.jsowell.common.util.id.Seq;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.dto.BillingTimeDTO;
|
||||
import com.jsowell.pile.dto.CreateOrUpdateBillingTemplateDTO;
|
||||
import com.jsowell.pile.dto.ImportBillingTemplateDTO;
|
||||
import com.jsowell.pile.mapper.PileBillingTemplateMapper;
|
||||
import com.jsowell.pile.service.MemberGroupService;
|
||||
import com.jsowell.pile.service.PileBillingTemplateService;
|
||||
@@ -142,9 +143,9 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
List<String> templateCodes = pileBillingDetails.stream().map(PileBillingDetail::getTemplateCode).collect(Collectors.toList());
|
||||
pileBillingTemplateMapper.deletePileBillingDetailByTemplateCodes(templateCodes);
|
||||
}
|
||||
for (Long id : ids) {
|
||||
cleanCache(null , id);
|
||||
}
|
||||
for (Long id : ids) {
|
||||
cleanCache(null, id);
|
||||
}
|
||||
return pileBillingTemplateMapper.deletePileBillingTemplateByIds(ids);
|
||||
}
|
||||
|
||||
@@ -158,7 +159,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
@Override
|
||||
public int deletePileBillingTemplateById(Long id) {
|
||||
// pileBillingTemplateMapper.deletePileBillingDetailByTemplateCode(id);
|
||||
cleanCache(null , id);
|
||||
cleanCache(null, id);
|
||||
return pileBillingTemplateMapper.deletePileBillingTemplateById(id);
|
||||
}
|
||||
|
||||
@@ -222,7 +223,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
// 入库
|
||||
transactionService.doCreateBillingTemplate(build);
|
||||
|
||||
cleanCache(dto.getStationId() , null);
|
||||
cleanCache(dto.getStationId(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -265,7 +266,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
// 入库
|
||||
transactionService.doUpdateBillingTemplate(build);
|
||||
|
||||
cleanCache(dto.getStationId() , Long.valueOf(dto.getBillingTemplateId()));
|
||||
cleanCache(dto.getStationId(), Long.valueOf(dto.getBillingTemplateId()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -401,7 +402,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
|
||||
// 查询站点的集团会员计费模板
|
||||
BillingTemplateVO preferentialBillingTemplate = this.queryPreferentialBillingTemplate(stationId);
|
||||
if (Objects.nonNull(preferentialBillingTemplate) && Objects.nonNull(result) ) {
|
||||
if (Objects.nonNull(preferentialBillingTemplate) && Objects.nonNull(result)) {
|
||||
List<BillingDetailVO> billingDetailList = preferentialBillingTemplate.getBillingDetailList();
|
||||
for (BillingDetailVO detailVO : billingDetailList) {
|
||||
List<String> applyTimeList = detailVO.getApplyTime();
|
||||
@@ -425,13 +426,12 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过站点id查询当前时间的收费详情 (用于查询电动单车的收费详情)
|
||||
*
|
||||
* @param stationId 站点id
|
||||
*/
|
||||
@Override
|
||||
@Override
|
||||
public CurrentTimePriceDetails getCurrentTimePriceDetailsForEBike(String stationId) {
|
||||
CurrentTimePriceDetails result = null;
|
||||
// 查询当前时段电费
|
||||
@@ -461,39 +461,41 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用于微信发送微信提醒,查询计费详情
|
||||
* 用于微信发送微信提醒,查询计费详情
|
||||
*
|
||||
* @param stationId
|
||||
* @param pileSn
|
||||
* @return
|
||||
*/
|
||||
// @Override
|
||||
// public CurrentTimePriceDetails getCurrentTimePriceDetailsByPileType(String stationId , String pileSn) {
|
||||
// // 使用工具类判断是否为电单车桩
|
||||
// // boolean isEBike = YouDianUtils.isEBikePileSn(pileSn);
|
||||
// // 判断桩号是否为汽车桩号
|
||||
// Boolean result = YKCUtils.checkEVPileSn(pileSn);
|
||||
//
|
||||
// if (result) {
|
||||
// log.info("走电动汽车逻辑");
|
||||
// // 电动汽车:调用电动汽车计费模板查询方法
|
||||
// return getCurrentTimePriceDetails(stationId);
|
||||
// } else {
|
||||
// log.info("走电单车方法");
|
||||
// // 电单车:调用电单车计费模板查询方法
|
||||
// return getCurrentTimePriceDetailsForEBike(stationId);
|
||||
// }
|
||||
@Override
|
||||
public CurrentTimePriceDetails getCurrentTimePriceDetailsByPileType(String stationId, String pileSn) {
|
||||
return null;
|
||||
// 使用工具类判断是否为电单车桩
|
||||
// boolean isEBike = YouDianUtils.isEBikePileSn(pileSn);
|
||||
// 判断桩号是否为汽车桩号
|
||||
// Boolean result = YKCUtils.checkEVPileSn(pileSn);
|
||||
//
|
||||
// if (result) {
|
||||
// log.info("走电动汽车逻辑");
|
||||
// // 电动汽车:调用电动汽车计费模板查询方法
|
||||
// return getCurrentTimePriceDetails(stationId);
|
||||
// } else {
|
||||
// log.info("走电单车方法");
|
||||
// // 电单车:调用电单车计费模板查询方法
|
||||
// return getCurrentTimePriceDetailsForEBike(stationId);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过计费模板id查询计费模板详情
|
||||
* 缓存1天,修改清缓存
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@@ -513,6 +515,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
|
||||
/**
|
||||
* 修改站点计费模板状态并下发最新模板
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@@ -586,6 +589,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
|
||||
/**
|
||||
* 根据站点id查询优惠计费模板
|
||||
*
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
@@ -671,7 +675,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
*/
|
||||
@Override
|
||||
public List<BillingTemplateVO> queryStationBillingTemplateListForUniApp(String stationId) {
|
||||
// 加缓存
|
||||
// 加缓存
|
||||
String redisKey = CacheConstants.QUERY_STATION_BILLING_TEMPLATE_LIST + stationId;
|
||||
List<BillingTemplateVO> voList = redisCache.getCacheList(redisKey);
|
||||
if (CollectionUtils.isEmpty(voList)) {
|
||||
@@ -720,6 +724,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
|
||||
/**
|
||||
* 转换参数
|
||||
*
|
||||
* @param billingDetailList
|
||||
* @return
|
||||
*/
|
||||
@@ -759,6 +764,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
|
||||
/**
|
||||
* 通过站点id查询计费模板列表
|
||||
*
|
||||
* @param stationId 站点id
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -250,6 +250,7 @@ public class WxAppletRemoteService {
|
||||
return null;
|
||||
}
|
||||
String pileSn = orderBasicInfo.getPileSn();
|
||||
// 判断桩类型是否为汽车桩号
|
||||
Boolean result = YKCUtils.checkEVPileSn(pileSn);
|
||||
|
||||
// 收费标准
|
||||
|
||||
Reference in New Issue
Block a user