| | |
| | | import com.xiaopeng.maintenance.dto.XpChargingRecordStopDTO; |
| | | import com.xiaopeng.maintenance.model.vo.XpChargingRecordVO; |
| | | import com.xiaopeng.maintenance.service.IXpChargingRecordService; |
| | | import com.xiaopeng.maintenance.service.XpTaskService; |
| | | import com.xiaopeng.maintenance.vo.ChargingStatusVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private IXpChargingRecordService xpChargingRecordService; |
| | | |
| | | @Autowired |
| | | private XpVehicleClient xpVehicleClient; |
| | | @Autowired |
| | | private XpOperationUserClient xpOperationUserClient; |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | @Autowired |
| | | private XpTaskService xpTaskService; |
| | | |
| | | /** |
| | | * 车辆运维-车辆运维-车辆开始充电 |
| | |
| | | |
| | | Long id = tokenService.getLoginOperationUser().getId(); |
| | | xpChargingRecordService.stopCharging(dto, id); |
| | | //更新任务状态 |
| | | xpTaskService.updateTaskStatus(dto.getTaskId(), 2); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 车辆运维-车辆运维-车辆充电查询当前状态 |
| | | */ |
| | | @ApiOperation(value = "车辆运维-车辆运维-车辆充电查询当前状态", tags = {"运维APP-车辆管理"}) |
| | | @GetMapping("/api/v1/chargingRecord/queryChargingStatus") |
| | | public R<ChargingStatusVO> queryChargingStatus(@RequestParam Long vehicleId) { |
| | | Long id = tokenService.getLoginOperationUser().getId(); |
| | | ChargingStatusVO chargingStatusVO = xpChargingRecordService.queryChargingStatus(vehicleId); |
| | | return R.ok(chargingStatusVO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 车辆运维-车辆运维-充电记录详情 |
| | | */ |
| | | @ApiOperation(value = "车辆运维-运维记录-充电记录详情", tags = {"运维APP-车辆管理"}) |