| | |
| | | import com.xiaopeng.api.model.operation.XpTestPlanVehicle; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import com.xiaopeng.operation.dto.XpTestPlanAddDTO; |
| | | import com.xiaopeng.common.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | import com.xiaopeng.operation.dto.XpTestPlanEditDTO; |
| | | import com.xiaopeng.operation.query.TestPlanQuery; |
| | | import com.xiaopeng.operation.service.IXpTestPlanPointService; |
| | |
| | | |
| | | @ApiOperation(value = "新增测试计划", tags = {"管理后台-测试计划"}) |
| | | @PostMapping(value = {"/api/v1/xp-test-plan/add"}) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.TEST_PLAN, |
| | | operationType = AdminOperationType.ADD, |
| | | content = "新增测试计划", |
| | | appendRequestData = true |
| | | ) |
| | | public R<Long> add() { |
| | | XpTestPlan plan = new XpTestPlan(); |
| | | xpTestPlanService.save(plan); |
| | |
| | | |
| | | @ApiOperation(value = "编辑测试计划", tags = {"管理后台-测试计划"}) |
| | | @PostMapping(value = {"/api/v1/xp-test-plan/edit"}) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.TEST_PLAN, |
| | | operationType = AdminOperationType.EDIT, |
| | | content = "编辑测试计划", |
| | | appendRequestData = true |
| | | ) |
| | | public R<?> edit(@Valid @RequestBody XpTestPlanEditDTO dto) { |
| | | xpTestPlanService.edit(dto); |
| | | return R.ok(); |
| | |
| | | |
| | | @ApiOperation(value = "删除测试计划", tags = {"管理后台-测试计划"}) |
| | | @DeleteMapping(value = {"/api/v1/xp-test-plan/deleteById/{id}"}) |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.TEST_PLAN, |
| | | operationType = AdminOperationType.DELETE, |
| | | content = "删除测试计划", |
| | | appendRequestData = true |
| | | ) |
| | | public R<?> deleteById(@ApiParam(name = "id", value = "测试计划ID") @PathVariable Long id) { |
| | | xpTestPlanService.deleteById(id); |
| | | return R.ok(); |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/inner/v1/xp-test-plan/getXpTestPlanById") |
| | | @PostMapping("/logan/inner/v1/xp-test-plan/getXpTestPlanById") |
| | | public R<XpTestPlan> getXpTestPlanById(@RequestParam Long id){ |
| | | XpTestPlan xpTestPlan = xpTestPlanService.getById(id); |
| | | return R.ok(xpTestPlan); |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/inner/v1/xp-test-plan/getXpTestPlanPointById") |
| | | @PostMapping("/logan/inner/v1/xp-test-plan/getXpTestPlanPointById") |
| | | public R<XpTestPlanPoint> getXpTestPlanPointById(@RequestParam Long id){ |
| | | XpTestPlanPoint xpTestPlanPoint = xpTestPlanPointService.getById(id); |
| | | return R.ok(xpTestPlanPoint); |
| | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据id获取测试计划点位 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/logan/inner/v1/xp-test-plan/getXpTestPointById") |
| | | public R<XpTestPoint> getXpTestPointById(@RequestParam Long id){ |
| | | XpTestPoint xpTestPoint = xpTestPointService.queryById(id).getData(); |
| | | return R.ok(xpTestPoint); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据测试计划获取车辆信息 |
| | | * @param testPlanId |
| | | * @return |
| | | */ |
| | | @PostMapping("/inner/v1/xp-test-plan/getXpTestPlanVehicleByTestPlanId") |
| | | @PostMapping("/logan/inner/v1/xp-test-plan/getXpTestPlanVehicleByTestPlanId") |
| | | public R<List<XpTestPlanVehicle>> getXpTestPlanVehicleByTestPlanId(@RequestParam Long testPlanId){ |
| | | List<XpTestPlanVehicle> xpTestPlanVehicleList = xpTestPlanVehicleService.lambdaQuery() |
| | | .eq(XpTestPlanVehicle::getTestPlanId, testPlanId) |