mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-12 14:00:12 +08:00
update 青海平台controller测试用接口
This commit is contained in:
@@ -8,6 +8,7 @@ import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
|||||||
import com.jsowell.common.response.RestApiResponse;
|
import com.jsowell.common.response.RestApiResponse;
|
||||||
import com.jsowell.common.util.JWTUtils;
|
import com.jsowell.common.util.JWTUtils;
|
||||||
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
||||||
|
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
|
||||||
import com.jsowell.pile.dto.QueryStartChargeDTO;
|
import com.jsowell.pile.dto.QueryStartChargeDTO;
|
||||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||||
import com.jsowell.pile.service.ThirdPartyPlatformConfigService;
|
import com.jsowell.pile.service.ThirdPartyPlatformConfigService;
|
||||||
@@ -151,7 +152,7 @@ public class QingHaiController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/pushStationPower")
|
@PostMapping("/pushStationPower")
|
||||||
public RestApiResponse<?> pushStationPower(List<String> stationIds) {
|
public RestApiResponse<?> pushStationPower(@RequestBody List<String> stationIds) {
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
try {
|
try {
|
||||||
String result = qingHaiPlatformServiceImpl.notificationPowerInfo(stationIds);
|
String result = qingHaiPlatformServiceImpl.notificationPowerInfo(stationIds);
|
||||||
@@ -163,4 +164,40 @@ public class QingHaiController extends BaseController {
|
|||||||
return response;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
.stationName(stationInfoVO.getStationName())
|
.stationName(stationInfoVO.getStationName())
|
||||||
.countryCode(stationInfoVO.getCountryCode())
|
.countryCode(stationInfoVO.getCountryCode())
|
||||||
.address(stationInfoVO.getAddress())
|
.address(stationInfoVO.getAddress())
|
||||||
.serviceTel(stationInfoVO.getServiceTel())
|
.serviceTel(stationInfoVO.getStationTel())
|
||||||
.stationClassification(Constants.one) // 1-充电站
|
.stationClassification(Constants.one) // 1-充电站
|
||||||
.stationType(Integer.parseInt(stationInfoVO.getStationType()))
|
.stationType(Integer.parseInt(stationInfoVO.getStationType()))
|
||||||
.stationStatus(Integer.parseInt(stationInfoVO.getStationStatus()))
|
.stationStatus(Integer.parseInt(stationInfoVO.getStationStatus()))
|
||||||
@@ -234,7 +234,7 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
|
|||||||
.isAloneApply(Integer.parseInt(stationInfoVO.getAloneApply()))
|
.isAloneApply(Integer.parseInt(stationInfoVO.getAloneApply()))
|
||||||
// .ratedPower() // 站点额定总功率
|
// .ratedPower() // 站点额定总功率
|
||||||
.periodFee(1) // 峰谷分时 0-否;1-是
|
.periodFee(1) // 峰谷分时 0-否;1-是
|
||||||
.runTime(String.valueOf(stationInfoVO.getCreateTime()))
|
.runTime(DateUtils.formatDateTime(stationInfoVO.getCreateTime()))
|
||||||
.videoMonitor(0) // 视频监控配套情况 0-无;1-有
|
.videoMonitor(0) // 视频监控配套情况 0-无;1-有
|
||||||
|
|
||||||
.build();
|
.build();
|
||||||
|
|||||||
Reference in New Issue
Block a user