diff --git a/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/qinghai/QingHaiController.java b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/qinghai/QingHaiController.java index 58351cda8..5a9dd54e4 100644 --- a/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/qinghai/QingHaiController.java +++ b/jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/qinghai/QingHaiController.java @@ -8,6 +8,7 @@ import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum; import com.jsowell.common.response.RestApiResponse; import com.jsowell.common.util.JWTUtils; import com.jsowell.pile.domain.ThirdPartyPlatformConfig; +import com.jsowell.pile.dto.PushRealTimeInfoDTO; import com.jsowell.pile.dto.QueryStartChargeDTO; import com.jsowell.pile.dto.QueryStationInfoDTO; import com.jsowell.pile.service.ThirdPartyPlatformConfigService; @@ -151,7 +152,7 @@ public class QingHaiController extends BaseController { * @return */ @PostMapping("/pushStationPower") - public RestApiResponse pushStationPower(List stationIds) { + public RestApiResponse pushStationPower(@RequestBody List stationIds) { RestApiResponse response = null; try { String result = qingHaiPlatformServiceImpl.notificationPowerInfo(stationIds); @@ -163,4 +164,40 @@ public class QingHaiController extends BaseController { return response; } + /** + * 推送设备状态变化 + * @param dto + * @return + */ + @PostMapping("/PushRealTimeInfo") + public RestApiResponse pushStationPower(@RequestBody PushRealTimeInfoDTO dto) { + RestApiResponse response = null; + try { + String result = qingHaiPlatformServiceImpl.notificationStationStatus(dto); + response = new RestApiResponse<>(result); + }catch (Exception e) { + logger.error("青海平台推送设备状态变化 error", e); + } + logger.info("青海平台推送设备状态变化 result:{}", response); + return response; + } + + /** + * 推送充电状态 + * @param orderCode + * @return + */ + @GetMapping("/notificationEquipChargeStatus/{orderCode}") + public RestApiResponse notificationEquipChargeStatus(@PathVariable("orderCode") String orderCode) { + RestApiResponse response = null; + try { + String result = qingHaiPlatformServiceImpl.notificationEquipChargeStatus(orderCode); + response = new RestApiResponse<>(result); + }catch (Exception e) { + logger.error("青海平台推送充电状态 error", e); + } + logger.info("青海平台推送充电状态 result:{}", response); + return response; + } + } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/qinghai/service/QingHaiPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/qinghai/service/QingHaiPlatformServiceImpl.java index 1b4a56043..47b0d30b1 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/qinghai/service/QingHaiPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/qinghai/service/QingHaiPlatformServiceImpl.java @@ -220,7 +220,7 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService { .stationName(stationInfoVO.getStationName()) .countryCode(stationInfoVO.getCountryCode()) .address(stationInfoVO.getAddress()) - .serviceTel(stationInfoVO.getServiceTel()) + .serviceTel(stationInfoVO.getStationTel()) .stationClassification(Constants.one) // 1-充电站 .stationType(Integer.parseInt(stationInfoVO.getStationType())) .stationStatus(Integer.parseInt(stationInfoVO.getStationStatus())) @@ -234,7 +234,7 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService { .isAloneApply(Integer.parseInt(stationInfoVO.getAloneApply())) // .ratedPower() // 站点额定总功率 .periodFee(1) // 峰谷分时 0-否;1-是 - .runTime(String.valueOf(stationInfoVO.getCreateTime())) + .runTime(DateUtils.formatDateTime(stationInfoVO.getCreateTime())) .videoMonitor(0) // 视频监控配套情况 0-无;1-有 .build();