update 甘肃平台Service

This commit is contained in:
Lemon
2024-11-26 15:44:56 +08:00
parent 5e0bc18390
commit 1c70a8b02f
2 changed files with 21 additions and 2 deletions

View File

@@ -58,8 +58,15 @@ public class ThirdPartyBaseController extends BaseController {
protected <T> T parseParamsDTO(CommonParamsDTO dto, Class<T> targetClass) throws NoSuchFieldException, IllegalAccessException {
// 解密
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
ThirdPartySecretInfoVO secretInfoVO = thirdpartySecretInfoService.queryByOperatorId(operatorId);
// ThirdPartySecretInfoVO secretInfoVO = thirdpartySecretInfoService.queryByOperatorId(operatorId);
if (secretInfoVO == null) {
throw new BusinessException("1", "无此对接平台");
}

View File

@@ -160,9 +160,10 @@ public class GanSuPlatformServiceImpl implements ThirdPartyPlatformService {
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
dto.setThirdPlatformType(thirdPlatformType);
PageUtils.startPage(pageNo, pageSize);
List<ThirdPartyStationInfoVO> stationInfos = pileStationInfoService.getStationInfosByThirdParty(dto);
List<ThirdPartyStationInfoVO> stationInfos = pileStationInfoService.selectStationInfosByThirdParty(dto);
if (CollectionUtils.isEmpty(stationInfos)) {
// 未查到数据
return null;
@@ -189,6 +190,17 @@ public class GanSuPlatformServiceImpl implements ThirdPartyPlatformService {
// todo .serviceFee()
.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
String busineHours = getBusineHours();
stationInfo.setBusineHours(busineHours);