|
@@ -4,7 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.kym.common.R;
|
|
import com.kym.common.R;
|
|
|
import com.kym.common.annotation.SysLog;
|
|
import com.kym.common.annotation.SysLog;
|
|
|
import com.kym.entity.admin.Station;
|
|
import com.kym.entity.admin.Station;
|
|
|
-import com.kym.entity.enplus.EnResponse;
|
|
|
|
|
|
|
+import com.kym.entity.enplus.response.EnResponse;
|
|
|
import com.kym.entity.miniapp.ChargeOrder;
|
|
import com.kym.entity.miniapp.ChargeOrder;
|
|
|
import com.kym.service.admin.StationService;
|
|
import com.kym.service.admin.StationService;
|
|
|
import com.kym.service.enplus.EnNotifyService;
|
|
import com.kym.service.enplus.EnNotifyService;
|
|
@@ -25,7 +25,7 @@ import java.util.List;
|
|
|
* @since 2023-06-27
|
|
* @since 2023-06-27
|
|
|
*/
|
|
*/
|
|
|
@RestController
|
|
@RestController
|
|
|
-@RequestMapping("/api/charge/")
|
|
|
|
|
|
|
+@RequestMapping("/charge/")
|
|
|
public class ChargerController {
|
|
public class ChargerController {
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -92,6 +92,10 @@ public class ChargerController {
|
|
|
return R.success(chargeService.queryEquipChargeStatus(startChargeSeq));
|
|
return R.success(chargeService.queryEquipChargeStatus(startChargeSeq));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ R businessPolicy(){
|
|
|
|
|
+
|
|
|
|
|
+ return R.success();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
//====================================================以上是请求EN+接口==============================================================
|
|
//====================================================以上是请求EN+接口==============================================================
|
|
|
|
|
|
|
@@ -100,11 +104,12 @@ public class ChargerController {
|
|
|
//====================================================以下是EN+推送接口==============================================================
|
|
//====================================================以下是EN+推送接口==============================================================
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * EN+ 设备状态变化推送
|
|
|
|
|
|
|
+ * EN+设备状态变化推送
|
|
|
*
|
|
*
|
|
|
* @param json
|
|
* @param json
|
|
|
* @return 0:接收 1:丢弃/忽略,不需要重试
|
|
* @return 0:接收 1:丢弃/忽略,不需要重试
|
|
|
*/
|
|
*/
|
|
|
|
|
+ @SysLog("EN+设备状态变化推送")
|
|
|
@PostMapping("/notification_stationStatus")
|
|
@PostMapping("/notification_stationStatus")
|
|
|
JSONObject notificationStationStatus(@RequestBody JSONObject json) {
|
|
JSONObject notificationStationStatus(@RequestBody JSONObject json) {
|
|
|
// TODO: 2023-08-05 验签 业务逻辑
|
|
// TODO: 2023-08-05 验签 业务逻辑
|
|
@@ -115,11 +120,12 @@ public class ChargerController {
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * EN+ 推送启动充电结果
|
|
|
|
|
|
|
+ * EN+推送启动充电结果
|
|
|
*
|
|
*
|
|
|
* @param json
|
|
* @param json
|
|
|
* @return StartChargeSeq SuccStat 0:成功 1:失败 FailReason 0:无 1:接收失败
|
|
* @return StartChargeSeq SuccStat 0:成功 1:失败 FailReason 0:无 1:接收失败
|
|
|
*/
|
|
*/
|
|
|
|
|
+ @SysLog("EN+推送启动充电结果")
|
|
|
@PostMapping("/notification_start_charge_result")
|
|
@PostMapping("/notification_start_charge_result")
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
EnResponse notificationStartChargeResult(@RequestBody JSONObject json) {
|
|
EnResponse notificationStartChargeResult(@RequestBody JSONObject json) {
|
|
@@ -128,11 +134,12 @@ public class ChargerController {
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 推送启动充电结果
|
|
|
|
|
|
|
+ * EN+推送启动状态
|
|
|
*
|
|
*
|
|
|
* @param json
|
|
* @param json
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
|
|
+ @SysLog("EN+推送启动充电结果")
|
|
|
@PostMapping("/notification_start_charge_status")
|
|
@PostMapping("/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));
|