| | |
| | | |
| | | import com.xiaopeng.api.feignClient.account.XpOperationUserClient; |
| | | import com.xiaopeng.api.feignClient.vehicleConvoy.XpVehicleClient; |
| | | import com.xiaopeng.api.model.maintenance.XpTask; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.common.security.service.TokenService; |
| | | import com.xiaopeng.maintenance.dto.XpVehicleDetectionDTO; |
| | | import com.xiaopeng.maintenance.model.query.XpVehicleDetectionPageQuery; |
| | | import com.xiaopeng.maintenance.model.vo.XpVehicleDetectionVO; |
| | | import com.xiaopeng.maintenance.service.IXpTaskService; |
| | | import com.xiaopeng.maintenance.service.IXpVehicleDetectionService; |
| | | 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; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private XpVehicleClient xpVehicleClient; |
| | | @Autowired |
| | | private XpOperationUserClient xpOperationUserClient; |
| | | @Autowired |
| | | private XpTaskService xpTaskService; |
| | | |
| | | /** |
| | | * 车辆运维-车辆运维-开始自检 |
| | |
| | | /** |
| | | * 车辆详情-车辆运维-车辆检测提交 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @ApiOperation(value = "车辆运维-车辆运维-车辆检测提交", tags = {"运维APP-车辆管理"}) |
| | | @PostMapping("/api/v1/vehicleDetection/saveDetection") |
| | | public R<String> saveDetection(@RequestBody XpVehicleDetectionDTO dto) { |
| | |
| | | dto.setOperationsUserId(id); |
| | | dto.setCheckTime(LocalDateTime.now()); |
| | | xpVehicleDetectionService.save(dto); |
| | | //更新任务状态 |
| | | xpTaskService.updateTaskStatus(dto.getTaskId(), 2); |
| | | return R.ok(); |
| | | } |
| | | |