diff --git a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/ThirdPartyBaseController.java b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/ThirdPartyBaseController.java index 1bfe1e4e2..fd1aad5a0 100644 --- a/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/ThirdPartyBaseController.java +++ b/jsowell-admin/src/main/java/com/jsowell/api/thirdparty/ThirdPartyBaseController.java @@ -58,8 +58,15 @@ public class ThirdPartyBaseController extends BaseController { protected T parseParamsDTO(CommonParamsDTO dto, Class 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", "无此对接平台"); } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GanSuPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GanSuPlatformServiceImpl.java index 409f5ed05..173295015 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GanSuPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/GanSuPlatformServiceImpl.java @@ -160,9 +160,10 @@ public class GanSuPlatformServiceImpl implements ThirdPartyPlatformService { public Map 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 stationInfos = pileStationInfoService.getStationInfosByThirdParty(dto); + List 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 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);