mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.JWTUtils;
|
||||
import com.jsowell.pile.dto.huawei.*;
|
||||
import com.jsowell.pile.vo.huawei.QueryChargeStatusVO;
|
||||
@@ -26,7 +27,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* 华为 Controller V2
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2024/2/2 14:34:56
|
||||
@@ -223,16 +224,18 @@ public class HuaWeiControllerV2 extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v2/notification_operation_system_info/{stationId}")
|
||||
public String notificationOperationSystemInfo(@PathVariable("stationId") String stationId) {
|
||||
logger.info("华为平台充电设备编码同步 stationId:{}", stationId);
|
||||
public RestApiResponse<?> notificationOperationSystemInfo(@PathVariable("stationId") String stationId) {
|
||||
// logger.info("华为平台充电设备编码同步 stationId:{}", stationId);
|
||||
RestApiResponse<?> response = null;
|
||||
String result = null;
|
||||
try {
|
||||
result = huaweiServiceV2.notificationOperationSystemInfo(stationId);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (Exception e) {
|
||||
logger.error("华为平台充电设备编码同步 error", e);
|
||||
}
|
||||
logger.info("华为平台充电设备编码同步 result:{}", result);
|
||||
return result;
|
||||
logger.info("华为平台充电设备编码同步 stationId:{}, result:{}", stationId, result);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -241,16 +244,18 @@ public class HuaWeiControllerV2 extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v2/query_station_status")
|
||||
public Map<String, String> queryStationStatus(@RequestBody List<String> stationIds) {
|
||||
logger.info("查询华为设备接口状态 stationIds:{}", stationIds);
|
||||
public RestApiResponse<?> queryStationStatus(@RequestBody List<String> stationIds) {
|
||||
// logger.info("查询华为设备接口状态 stationIds:{}", stationIds);
|
||||
RestApiResponse<?> response = null;
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
try {
|
||||
map = huaweiServiceV2.queryStationStatus(stationIds);
|
||||
response = new RestApiResponse<>(map);
|
||||
} catch (Exception e) {
|
||||
logger.error("查询华为设备接口状态 error", e);
|
||||
}
|
||||
logger.info("查询华为设备接口状态 result:{}", map);
|
||||
return map;
|
||||
logger.info("查询华为设备接口状态 stationIds:{}, result:{}", stationIds, map);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -259,16 +264,18 @@ public class HuaWeiControllerV2 extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v2/query_equip_auth")
|
||||
public QueryEquipAuthVO queryEquipAuth(@RequestBody String connectorId) {
|
||||
logger.info("请求华为设备认证 connectorId:{}", connectorId);
|
||||
public RestApiResponse<?> queryEquipAuth(@RequestBody String connectorId) {
|
||||
// logger.info("请求华为设备认证 connectorId:{}", connectorId);
|
||||
RestApiResponse<?> response = null;
|
||||
QueryEquipAuthVO vo = null;
|
||||
try {
|
||||
vo = huaweiServiceV2.queryEquipAuth(connectorId);
|
||||
response = new RestApiResponse<>(vo);
|
||||
} catch (Exception e) {
|
||||
logger.error("请求华为设备认证 error", e);
|
||||
}
|
||||
logger.info("请求华为设备认证 result:{}", JSON.toJSONString(vo));
|
||||
return vo;
|
||||
logger.info("请求华为设备认证 connectorId:{}, result:{}", connectorId, JSON.toJSONString(vo));
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -277,16 +284,18 @@ public class HuaWeiControllerV2 extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v2/query_start_charge")
|
||||
public QueryStartChargeVO queryStartCharge(@RequestBody HWQueryStartChargeDTO dto) {
|
||||
logger.info("请求华为启动充电 param:{}", JSON.toJSONString(dto));
|
||||
public RestApiResponse<?> queryStartCharge(@RequestBody HWQueryStartChargeDTO dto) {
|
||||
// logger.info("请求华为启动充电 param:{}", JSON.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
QueryStartChargeVO vo = null;
|
||||
try {
|
||||
vo = huaweiServiceV2.queryStartCharge(dto);
|
||||
response = new RestApiResponse<>(vo);
|
||||
} catch (Exception e) {
|
||||
logger.error("请求华为启动充电 error", e);
|
||||
}
|
||||
logger.info("请求华为启动充电 result:{}", JSON.toJSONString(vo));
|
||||
return vo;
|
||||
logger.info("请求华为启动充电 param:{}, result:{}", JSON.toJSONString(dto), JSON.toJSONString(vo));
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@@ -296,16 +305,18 @@ public class HuaWeiControllerV2 extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v2/query_equip_charge_status")
|
||||
public QueryChargeStatusVO queryChargeStatus(@RequestBody String startChargeSeq) {
|
||||
logger.info("查询华为充电状态 startChargeSeq:{}", startChargeSeq);
|
||||
public RestApiResponse<?> queryChargeStatus(@RequestBody String startChargeSeq) {
|
||||
// logger.info("查询华为充电状态 startChargeSeq:{}", startChargeSeq);
|
||||
RestApiResponse<?> response = null;
|
||||
QueryChargeStatusVO vo = null;
|
||||
try {
|
||||
vo = huaweiServiceV2.queryChargeStatus(startChargeSeq);
|
||||
response = new RestApiResponse<>(vo);
|
||||
} catch (Exception e) {
|
||||
logger.error("查询华为充电状态 error", e);
|
||||
}
|
||||
logger.info("查询华为充电状态 result:{}", JSON.toJSONString(vo));
|
||||
return vo;
|
||||
logger.info("查询华为充电状态 startChargeSeq:{}, result:{}", startChargeSeq, JSON.toJSONString(vo));
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@@ -315,16 +326,18 @@ public class HuaWeiControllerV2 extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v2/query_stop_charge")
|
||||
public QueryStartChargeVO queryStopCharge(@RequestBody String startChargeSeq) {
|
||||
logger.info("请求华为停止充电 startChargeSeq:{}", startChargeSeq);
|
||||
public RestApiResponse<?> queryStopCharge(@RequestBody String startChargeSeq) {
|
||||
// logger.info("请求华为停止充电 startChargeSeq:{}", startChargeSeq);
|
||||
RestApiResponse<?> response = null;
|
||||
QueryStartChargeVO vo = null;
|
||||
try {
|
||||
vo = huaweiServiceV2.queryStopCharge(startChargeSeq);
|
||||
response = new RestApiResponse<>(vo);
|
||||
}catch (Exception e) {
|
||||
logger.error("请求华为停止充电 error", e);
|
||||
}
|
||||
logger.info("请求华为停止充电 result:{}", JSON.toJSONString(vo));
|
||||
return vo;
|
||||
logger.info("请求华为停止充电 startChargeSeq:{}, result:{}", startChargeSeq, JSON.toJSONString(vo));
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user