|
@@ -24,7 +24,6 @@ import java.util.List;
|
|
|
* @since 2023-06-27
|
|
* @since 2023-06-27
|
|
|
*/
|
|
*/
|
|
|
@RestController
|
|
@RestController
|
|
|
-@RequestMapping("/charge/")
|
|
|
|
|
public class ChargerController {
|
|
public class ChargerController {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -41,7 +40,7 @@ public class ChargerController {
|
|
|
|
|
|
|
|
@SneakyThrows
|
|
@SneakyThrows
|
|
|
@ApiLog("充电站列表")
|
|
@ApiLog("充电站列表")
|
|
|
- @GetMapping("/listStation")
|
|
|
|
|
|
|
+ @GetMapping("/api/charge/listStation")
|
|
|
R listChargeStation(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
R listChargeStation(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
// 请求en+接口
|
|
// 请求en+接口
|
|
|
List<Station> response = stationService.queryStationInfo(pageNum, pageSize);
|
|
List<Station> response = stationService.queryStationInfo(pageNum, pageSize);
|
|
@@ -49,39 +48,39 @@ public class ChargerController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiLog("充电站状态")
|
|
@ApiLog("充电站状态")
|
|
|
- @GetMapping("/stationStatus")
|
|
|
|
|
|
|
+ @GetMapping("/api/charge/stationStatus")
|
|
|
R stationStatus(@RequestParam("stationIds") String ids) {
|
|
R stationStatus(@RequestParam("stationIds") String ids) {
|
|
|
// 请求en+接口
|
|
// 请求en+接口
|
|
|
var response = stationService.stationStatus(ids.split(","));
|
|
var response = stationService.stationStatus(ids.split(","));
|
|
|
return R.success(response);
|
|
return R.success(response);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @GetMapping("/token")
|
|
|
|
|
|
|
+ @GetMapping("/api/charge/token")
|
|
|
R<String> queryToken() {
|
|
R<String> queryToken() {
|
|
|
return R.success(enPlusService.queryToken());
|
|
return R.success(enPlusService.queryToken());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiLog("启动充电")
|
|
@ApiLog("启动充电")
|
|
|
- @GetMapping("/startCharge")
|
|
|
|
|
|
|
+ @GetMapping("/api/charge/startCharge")
|
|
|
R startCharge(@RequestParam("connectorId") String connectorId, @RequestParam("stationId") String stationId) {
|
|
R startCharge(@RequestParam("connectorId") String connectorId, @RequestParam("stationId") String stationId) {
|
|
|
return R.success(chargeService.queryStartCharge(connectorId, stationId));
|
|
return R.success(chargeService.queryStartCharge(connectorId, stationId));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiLog("停止充电")
|
|
@ApiLog("停止充电")
|
|
|
- @GetMapping("/stopCharge/{connectorId}")
|
|
|
|
|
|
|
+ @GetMapping("/api/charge/stopCharge/{connectorId}")
|
|
|
R stopCharge(@PathVariable("connectorId") String connectorId) {
|
|
R stopCharge(@PathVariable("connectorId") String connectorId) {
|
|
|
chargeService.queryStopCharge(connectorId);
|
|
chargeService.queryStopCharge(connectorId);
|
|
|
return R.success();
|
|
return R.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiLog("查询充电状态")
|
|
@ApiLog("查询充电状态")
|
|
|
- @GetMapping("/chargeStatus/{startChargeSeq}")
|
|
|
|
|
|
|
+ @GetMapping("/api/charge/chargeStatus/{startChargeSeq}")
|
|
|
R<ChargeOrder> chargeStatus(@PathVariable("startChargeSeq") String startChargeSeq) {
|
|
R<ChargeOrder> chargeStatus(@PathVariable("startChargeSeq") String startChargeSeq) {
|
|
|
return R.success(chargeService.queryEquipChargeStatus(startChargeSeq));
|
|
return R.success(chargeService.queryEquipChargeStatus(startChargeSeq));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiLog("查询设备充电策略")
|
|
@ApiLog("查询设备充电策略")
|
|
|
- @GetMapping("/businessPolicy/{connectorId}")
|
|
|
|
|
|
|
+ @GetMapping("/api/charge/businessPolicy/{connectorId}")
|
|
|
R businessPolicy(@PathVariable("connectorId") String connectorId) {
|
|
R businessPolicy(@PathVariable("connectorId") String connectorId) {
|
|
|
return R.success(chargeService.queryEquipBusinessPolicy(connectorId));
|
|
return R.success(chargeService.queryEquipBusinessPolicy(connectorId));
|
|
|
}
|
|
}
|
|
@@ -99,7 +98,7 @@ public class ChargerController {
|
|
|
* @return 0:接收 1:丢弃/忽略,不需要重试
|
|
* @return 0:接收 1:丢弃/忽略,不需要重试
|
|
|
*/
|
|
*/
|
|
|
@ApiLog("EN+设备状态变化推送")
|
|
@ApiLog("EN+设备状态变化推送")
|
|
|
- @PostMapping("/notification_stationStatus")
|
|
|
|
|
|
|
+ @PostMapping("/charge/notification_stationStatus")
|
|
|
JSONObject notificationStationStatus(@RequestBody JSONObject json) {
|
|
JSONObject notificationStationStatus(@RequestBody JSONObject json) {
|
|
|
// TODO: 2023-08-05 验签 业务逻辑
|
|
// TODO: 2023-08-05 验签 业务逻辑
|
|
|
|
|
|
|
@@ -115,7 +114,7 @@ public class ChargerController {
|
|
|
* @return StartChargeSeq SuccStat 0:成功 1:失败 FailReason 0:无 1:接收失败
|
|
* @return StartChargeSeq SuccStat 0:成功 1:失败 FailReason 0:无 1:接收失败
|
|
|
*/
|
|
*/
|
|
|
@ApiLog("EN+推送启动充电结果")
|
|
@ApiLog("EN+推送启动充电结果")
|
|
|
- @PostMapping("/notification_start_charge_result")
|
|
|
|
|
|
|
+ @PostMapping("/charge/notification_start_charge_result")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
EnResponse notificationStartChargeResult(@RequestBody JSONObject json) {
|
|
EnResponse notificationStartChargeResult(@RequestBody JSONObject json) {
|
|
|
return new EnResponse(enNotifyService.handleNotificationStartChargeResult(json));
|
|
return new EnResponse(enNotifyService.handleNotificationStartChargeResult(json));
|
|
@@ -129,7 +128,7 @@ public class ChargerController {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@ApiLog("EN+推送启动充电结果")
|
|
@ApiLog("EN+推送启动充电结果")
|
|
|
- @PostMapping("/notification_start_charge_status")
|
|
|
|
|
|
|
+ @PostMapping("/charge/notification_start_charge_status")
|
|
|
EnResponse notificationStartChargeStatus(@RequestBody JSONObject json) {
|
|
EnResponse notificationStartChargeStatus(@RequestBody JSONObject json) {
|
|
|
return new EnResponse(enNotifyService.handleNotificationEquipChargeStatus(json));
|
|
return new EnResponse(enNotifyService.handleNotificationEquipChargeStatus(json));
|
|
|
}
|
|
}
|
|
@@ -141,7 +140,7 @@ public class ChargerController {
|
|
|
* @param json
|
|
* @param json
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- @PostMapping("/notification_stop_charge_result")
|
|
|
|
|
|
|
+ @PostMapping("/charge/notification_stop_charge_result")
|
|
|
EnResponse notificationStopChargeResult(@RequestBody JSONObject json) {
|
|
EnResponse notificationStopChargeResult(@RequestBody JSONObject json) {
|
|
|
return new EnResponse(enNotifyService.handleNotificationStopChargeResult(json));
|
|
return new EnResponse(enNotifyService.handleNotificationStopChargeResult(json));
|
|
|
}
|
|
}
|
|
@@ -152,7 +151,7 @@ public class ChargerController {
|
|
|
* @param json
|
|
* @param json
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- @PostMapping("/notification_charge_order_info")
|
|
|
|
|
|
|
+ @PostMapping("/charge/notification_charge_order_info")
|
|
|
EnResponse notificationChargeOrderInfo(@RequestBody JSONObject json) {
|
|
EnResponse notificationChargeOrderInfo(@RequestBody JSONObject json) {
|
|
|
return new EnResponse(enNotifyService.handleNotificationChargeOrderInfo(json));
|
|
return new EnResponse(enNotifyService.handleNotificationChargeOrderInfo(json));
|
|
|
}
|
|
}
|
|
@@ -165,7 +164,7 @@ public class ChargerController {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping("/pullEnStations")
|
|
|
|
|
|
|
+ @GetMapping("/charge/pullEnStations")
|
|
|
R pullEnStationInfos() {
|
|
R pullEnStationInfos() {
|
|
|
stationService.pullEnStationInfos();
|
|
stationService.pullEnStationInfos();
|
|
|
return R.success();
|
|
return R.success();
|