Merge branch 'dev-zzx' into dev-new

This commit is contained in:
Lemon
2024-12-11 11:26:10 +08:00
19 changed files with 704 additions and 226 deletions

View File

@@ -1,10 +1,11 @@
package com.jsowell.api.thirdparty;
import com.alibaba.fastjson2.JSON;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.dto.QueryOperatorInfoDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.thirdparty.CommonParamsDTO;
@@ -12,12 +13,10 @@ import com.jsowell.thirdparty.lianlian.common.CommonResult;
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
/**
@@ -33,6 +32,7 @@ public class GuiZhouPlatformController extends ThirdPartyBaseController {
@Qualifier("guiZhouPlatformServiceImpl")
private ThirdPartyPlatformService platformLogic;
/**
* getToken
*/
@@ -150,4 +150,63 @@ public class GuiZhouPlatformController extends ThirdPartyBaseController {
}
return CommonResult.failed("查询充电站状态信息发生异常");
}
}
/**
* 历史充电订单信息推送
*/
@GetMapping("/v1/supervise_notification_charge_order_info_history/{orderCode}")
public RestApiResponse<?> notificationChargeOrderInfoHistory(@PathVariable("orderCode") String orderCode) {
RestApiResponse<?> response = null;
String result = null;
try {
result = platformLogic.notificationChargeOrderInfoHistory(orderCode);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("贵州平台推送充电站历史充电订单信息 error", e);
return new RestApiResponse<>(e);
}
logger.info("贵州平台推送充电站历史充电订单信息 result:{}", result);
return response;
}
/**
* 推送充换电站用能统计信息
* @param stationId
* @return
*/
@GetMapping("/v1/supervise_notification_operation_stats_info/{stationId}")
public RestApiResponse<?> notificationOperationStatsInfo(@PathVariable("stationId") String stationId) {
RestApiResponse<?> response = null;
String result = null;
try {
result = platformLogic.notificationOperationStatsInfo(stationId);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("贵州平台推送充换电站用能统计信息 error", e);
return new RestApiResponse<>(e);
}
logger.info("贵州平台推送充换电站用能统计信息 result:{}", result);
return response;
}
/**
* 推送充换电站实时功率
* @param stationIds
* @return
*/
@GetMapping("/v1/supervise_notification_realtime_power_info/{stationIds}")
public RestApiResponse<?> notificationPowerInfo(@PathVariable("stationIds") List<String> stationIds) {
RestApiResponse<?> response = null;
String result = null;
try {
result = platformLogic.notificationPowerInfo(stationIds);
response = new RestApiResponse<>(result);
} catch (Exception e) {
logger.error("贵州平台推送充换电站用能统计信息 error", e);
return new RestApiResponse<>(e);
}
logger.info("贵州平台推送充换电站用能统计信息 result:{}", result);
return response;
}
}