| | |
| | | */ |
| | | @PostMapping("/startCharging") |
| | | public ResponseVO<Object> startCharging(@RequestBody C3ChargingParam c3ChargingParam) { |
| | | c3ChargingService.startCharging(c3ChargingParam.getC3Mac(), c3ChargingParam.getChargingCapacity(), c3ChargingParam.getChargeAmount()); |
| | | String result = c3ChargingService.startCharging(c3ChargingParam.getC3Mac(), c3ChargingParam.getChargingCapacity(), c3ChargingParam.getChargeAmount()); |
| | | if ("操作成功".equals(result)) { |
| | | return ResponseUtil.success(result); |
| | | } else { |
| | | return ResponseUtil.fail(result); |
| | | } |
| | | |
| | | return ResponseUtil.success(null); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PostMapping("/finishCharging") |
| | | public ResponseVO<Object> finishCharging(@RequestBody C3ChargingParam c3ChargingParam) { |
| | | c3ChargingService.finishCharging(c3ChargingParam.getC3Mac()); |
| | | String result = c3ChargingService.finishCharging(c3ChargingParam.getC3Mac()); |
| | | |
| | | return ResponseUtil.success(null); |
| | | if ("操作成功".equals(result)) { |
| | | return ResponseUtil.success(result); |
| | | } else { |
| | | return ResponseUtil.fail(result); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @PostMapping("/restartCharging") |
| | | public ResponseVO<Object> restartCharging(@RequestBody C3ChargingParam c3ChargingParam) { |
| | | c3ChargingService.restartCharging(c3ChargingParam.getC3Mac()); |
| | | String result = c3ChargingService.restartCharging(c3ChargingParam.getC3Mac()); |
| | | |
| | | return ResponseUtil.success(null); |
| | | if ("操作成功".equals(result)) { |
| | | return ResponseUtil.success(result); |
| | | } else { |
| | | return ResponseUtil.fail(result); |
| | | } |
| | | } |
| | | } |