mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update 推送第三方平台可多选
This commit is contained in:
@@ -299,40 +299,44 @@ public class PileStationInfoController extends BaseController {
|
||||
public RestApiResponse<?> pushStationInfo(@RequestBody PushStationInfoDTO dto) {
|
||||
logger.info("推送第三方平台充电站信息 params:{}", JSONObject.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
List<String> types = dto.getThirdPartyTypes();
|
||||
try {
|
||||
if (StringUtils.isBlank(String.valueOf(dto.getStationId()))) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PARAM_NOT_NULL_ERROR);
|
||||
}
|
||||
String result = "";
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), dto.getThirdPartyType())) {
|
||||
// 推送联联
|
||||
// result = lianLianService.pushStationInfo(dto);
|
||||
result = lianLianService.pushStationInfoV2(dto);
|
||||
for (String type : types) {
|
||||
dto.setThirdPartyType(type);
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getCode(), dto.getThirdPartyType())) {
|
||||
// 推送联联
|
||||
// result = lianLianService.pushStationInfo(dto);
|
||||
result = lianLianService.pushStationInfoV2(dto);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getCode(), dto.getThirdPartyType())) {
|
||||
// 中电联
|
||||
// result = zdlService.pushStationInfo(dto);
|
||||
result = zdlService.pushStationInfoV2(dto);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getCode(), dto.getThirdPartyType())) {
|
||||
// 江苏省平台
|
||||
// result = nrService.pushStationInfo(dto);
|
||||
result = nrService.pushStationInfoV2(dto);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), dto.getThirdPartyType())) {
|
||||
// 甬城泊车平台
|
||||
// result = ycbcService.pushStationInfo(dto);
|
||||
result = ycbcService.pushStationInfoV2(dto);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getCode(), dto.getThirdPartyType())) {
|
||||
// 新电途平台
|
||||
xdtService.pushStationInfo(dto);
|
||||
}
|
||||
// if(StringUtils.equals(ThirdPlatformTypeEnum.HUA_WEI.getCode(), dto.getThirdPartyType())) {
|
||||
// // 华为
|
||||
// result = huaWeiService.notificationOperationSystemInfo(dto);
|
||||
// }
|
||||
response = new RestApiResponse<>(result);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getCode(), dto.getThirdPartyType())) {
|
||||
// 中电联
|
||||
// result = zdlService.pushStationInfo(dto);
|
||||
result = zdlService.pushStationInfoV2(dto);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getCode(), dto.getThirdPartyType())) {
|
||||
// 江苏省平台
|
||||
// result = nrService.pushStationInfo(dto);
|
||||
result = nrService.pushStationInfoV2(dto);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.YONG_CHENG_BO_CHE.getCode(), dto.getThirdPartyType())) {
|
||||
// 甬城泊车平台
|
||||
// result = ycbcService.pushStationInfo(dto);
|
||||
result = ycbcService.pushStationInfoV2(dto);
|
||||
}
|
||||
if (StringUtils.equals(ThirdPlatformTypeEnum.XIN_DIAN_TU.getCode(), dto.getThirdPartyType())) {
|
||||
// 新电途平台
|
||||
xdtService.pushStationInfo(dto);
|
||||
}
|
||||
// if(StringUtils.equals(ThirdPlatformTypeEnum.HUA_WEI.getCode(), dto.getThirdPartyType())) {
|
||||
// // 华为
|
||||
// result = huaWeiService.notificationOperationSystemInfo(dto);
|
||||
// }
|
||||
response = new RestApiResponse<>(result);
|
||||
}catch (BusinessException e) {
|
||||
logger.error("推送第三方平台充电站信息 error",e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user