| | |
| | | import com.xiaopeng.maintenance.dto.XpVehiclePreparationDTO; |
| | | import com.xiaopeng.maintenance.model.vo.XpVehiclePreparationVO; |
| | | import com.xiaopeng.maintenance.service.IXpVehiclePreparationService; |
| | | import com.xiaopeng.maintenance.service.XpTaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | private XpVehicleClient xpVehicleClient; |
| | | @Autowired |
| | | private XpOperationUserClient xpOperationUserClient; |
| | | @Autowired |
| | | private XpTaskService xpTaskService; |
| | | /** |
| | | * 车辆详情-车辆运维-车辆整备 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @ApiOperation(value = "车辆运维-车辆运维-车辆整备", tags = {"运维APP-车辆管理"}) |
| | | @PostMapping("/api/v1/vehiclePreparation/savePreparation") |
| | | public R<String> savePreparation(@RequestBody XpVehiclePreparationDTO dto) { |
| | | Long id = tokenService.getLoginOperationUser().getId(); |
| | | dto.setOperationsUserId(id); |
| | | xpVehiclePreparationService.save(dto); |
| | | //更新任务状态 |
| | | xpTaskService.updateTaskStatus(dto.getTaskId(), 2); |
| | | return R.ok(); |
| | | } |
| | | |