mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-23 16:49:49 +08:00
update 甘肃平台Service
This commit is contained in:
@@ -58,8 +58,15 @@ public class ThirdPartyBaseController extends BaseController {
|
|||||||
protected <T> T parseParamsDTO(CommonParamsDTO dto, Class<T> targetClass) throws NoSuchFieldException, IllegalAccessException {
|
protected <T> T parseParamsDTO(CommonParamsDTO dto, Class<T> targetClass) throws NoSuchFieldException, IllegalAccessException {
|
||||||
// 解密
|
// 解密
|
||||||
String operatorId = StringUtils.isNotBlank(dto.getOperatorID()) ? dto.getOperatorID() : dto.getPlatformID();
|
String operatorId = StringUtils.isNotBlank(dto.getOperatorID()) ? dto.getOperatorID() : dto.getPlatformID();
|
||||||
|
ThirdPartySecretInfoVO secretInfoVO;
|
||||||
|
if (StringUtils.isNotBlank(dto.getPlatformType())) {
|
||||||
|
// type不为空,按照type查
|
||||||
|
secretInfoVO = thirdpartySecretInfoService.queryByThirdPlatformType(dto.getPlatformType());
|
||||||
|
}else {
|
||||||
|
secretInfoVO = thirdpartySecretInfoService.queryByOperatorId(operatorId);
|
||||||
|
}
|
||||||
// 通过operatorId 查出 operatorSecret
|
// 通过operatorId 查出 operatorSecret
|
||||||
ThirdPartySecretInfoVO secretInfoVO = thirdpartySecretInfoService.queryByOperatorId(operatorId);
|
// ThirdPartySecretInfoVO secretInfoVO = thirdpartySecretInfoService.queryByOperatorId(operatorId);
|
||||||
if (secretInfoVO == null) {
|
if (secretInfoVO == null) {
|
||||||
throw new BusinessException("1", "无此对接平台");
|
throw new BusinessException("1", "无此对接平台");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,9 +160,10 @@ public class GanSuPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
||||||
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
|
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
|
||||||
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
||||||
|
dto.setThirdPlatformType(thirdPlatformType);
|
||||||
|
|
||||||
PageUtils.startPage(pageNo, pageSize);
|
PageUtils.startPage(pageNo, pageSize);
|
||||||
List<ThirdPartyStationInfoVO> stationInfos = pileStationInfoService.getStationInfosByThirdParty(dto);
|
List<ThirdPartyStationInfoVO> stationInfos = pileStationInfoService.selectStationInfosByThirdParty(dto);
|
||||||
if (CollectionUtils.isEmpty(stationInfos)) {
|
if (CollectionUtils.isEmpty(stationInfos)) {
|
||||||
// 未查到数据
|
// 未查到数据
|
||||||
return null;
|
return null;
|
||||||
@@ -189,6 +190,17 @@ public class GanSuPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
// todo .serviceFee()
|
// todo .serviceFee()
|
||||||
|
|
||||||
.build();
|
.build();
|
||||||
|
JSONObject electricityFee = new JSONObject();
|
||||||
|
JSONObject serviceFee = new JSONObject();
|
||||||
|
// 查询计费模板
|
||||||
|
List<BillingPriceVO> priceList = pileBillingTemplateService.queryBillingPrice(stationId);
|
||||||
|
for (BillingPriceVO billingPriceVO : priceList) {
|
||||||
|
electricityFee.put(billingPriceVO.getStartTime() + ":00" + "-" + billingPriceVO.getEndTime() + ":00", billingPriceVO.getElectricityPrice());
|
||||||
|
serviceFee.put(billingPriceVO.getStartTime() + ":00" + "-" + billingPriceVO.getEndTime() + ":00", billingPriceVO.getServicePrice());
|
||||||
|
}
|
||||||
|
stationInfo.setElectricityFee(electricityFee.toJSONString());
|
||||||
|
stationInfo.setServiceFee(serviceFee.toJSONString());
|
||||||
|
|
||||||
// busineHours
|
// busineHours
|
||||||
String busineHours = getBusineHours();
|
String busineHours = getBusineHours();
|
||||||
stationInfo.setBusineHours(busineHours);
|
stationInfo.setBusineHours(busineHours);
|
||||||
|
|||||||
Reference in New Issue
Block a user