|
|
@ -3,9 +3,9 @@ package com.hnac.hzims.safeproduct.controller; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.hnac.hzims.common.utils.Condition; |
|
|
|
import com.hnac.hzims.common.utils.Condition; |
|
|
|
|
|
|
|
import com.hnac.hzims.safeproduct.dto.CarCheckRecordDTO; |
|
|
|
import com.hnac.hzims.safeproduct.dto.CarMaintenanceConfirmationDTO; |
|
|
|
import com.hnac.hzims.safeproduct.dto.CarMaintenanceConfirmationDTO; |
|
|
|
import com.hnac.hzims.safeproduct.dto.CarUsedRecordConfirmationDTO; |
|
|
|
import com.hnac.hzims.safeproduct.dto.CarUsedRecordConfirmationDTO; |
|
|
|
import com.hnac.hzims.safeproduct.entity.CarCheckRecordEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.safeproduct.entity.CarEntity; |
|
|
|
import com.hnac.hzims.safeproduct.entity.CarEntity; |
|
|
|
import com.hnac.hzims.safeproduct.entity.CarMaintenanceEntity; |
|
|
|
import com.hnac.hzims.safeproduct.entity.CarMaintenanceEntity; |
|
|
|
import com.hnac.hzims.safeproduct.entity.CarUsedRecordEntity; |
|
|
|
import com.hnac.hzims.safeproduct.entity.CarUsedRecordEntity; |
|
|
@ -25,6 +25,7 @@ import org.springblade.core.tool.api.R; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import springfox.documentation.annotations.ApiIgnore; |
|
|
|
import springfox.documentation.annotations.ApiIgnore; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.validation.Valid; |
|
|
|
import javax.validation.Valid; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
@ -84,7 +85,8 @@ public class CarController extends BladeController { |
|
|
|
@ApiOperation(value = "车辆分页") |
|
|
|
@ApiOperation(value = "车辆分页") |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
public R<IPage<CarEntity>> carPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
|
|
|
public R<IPage<CarEntity>> carPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
|
|
|
IPage<CarEntity> page = carService.page(Condition.getPage(query), Condition.getQueryWrapper(param, CarEntity.class)); |
|
|
|
IPage<CarEntity> page = carService.page(Condition.getPage(query), Condition.getQueryWrapper(param, CarEntity.class) |
|
|
|
|
|
|
|
.lambda().orderByDesc(CarEntity::getCreateTime)); |
|
|
|
return R.data(page); |
|
|
|
return R.data(page); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -133,8 +135,8 @@ public class CarController extends BladeController { |
|
|
|
@PostMapping("/confirmCarMaintenance") |
|
|
|
@PostMapping("/confirmCarMaintenance") |
|
|
|
@ApiOperation(value = "车辆维保记录确认") |
|
|
|
@ApiOperation(value = "车辆维保记录确认") |
|
|
|
@ApiOperationSupport(order = 11) |
|
|
|
@ApiOperationSupport(order = 11) |
|
|
|
public R confirmCarMaintenance(@RequestBody CarMaintenanceConfirmationDTO confirmationDTO) { |
|
|
|
public R confirmCarMaintenance(@Valid @RequestBody CarMaintenanceConfirmationDTO confirmationDTO) { |
|
|
|
return R.status(carMaintenanceService.confirmCarMaintenance(confirmationDTO)); |
|
|
|
return carMaintenanceService.confirmCarMaintenance(confirmationDTO); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/saveCarUsedRecord") |
|
|
|
@PostMapping("/saveCarUsedRecord") |
|
|
@ -148,7 +150,7 @@ public class CarController extends BladeController { |
|
|
|
@ApiOperation(value = "修改用车记录") |
|
|
|
@ApiOperation(value = "修改用车记录") |
|
|
|
@ApiOperationSupport(order = 13) |
|
|
|
@ApiOperationSupport(order = 13) |
|
|
|
public R updateCarUsedRecord(@Valid @RequestBody CarUsedRecordEntity carUsedRecordEntity) { |
|
|
|
public R updateCarUsedRecord(@Valid @RequestBody CarUsedRecordEntity carUsedRecordEntity) { |
|
|
|
return R.status(carUsedRecordService.updateById(carUsedRecordEntity)); |
|
|
|
return R.status(carUsedRecordService.updateCarUsedRecord(carUsedRecordEntity)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/removeCarUsedRecord") |
|
|
|
@PostMapping("/removeCarUsedRecord") |
|
|
@ -167,9 +169,10 @@ public class CarController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/carUsedRecordPage") |
|
|
|
@GetMapping("/carUsedRecordPage") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string") |
|
|
|
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"), |
|
|
|
|
|
|
|
@ApiImplicitParam(name = "carId", value = "车辆id", dataType = "query", paramType = "string") |
|
|
|
}) |
|
|
|
}) |
|
|
|
@ApiOperation(value = "车辆维保记录分页") |
|
|
|
@ApiOperation(value = "用车记录分页") |
|
|
|
@ApiOperationSupport(order = 16) |
|
|
|
@ApiOperationSupport(order = 16) |
|
|
|
public R<IPage<CarUsedRecordPageVO>> carUsedRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
|
|
|
public R<IPage<CarUsedRecordPageVO>> carUsedRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
|
|
|
IPage<CarUsedRecordPageVO> page = carUsedRecordService.getCarUsedRecordPage(param, query); |
|
|
|
IPage<CarUsedRecordPageVO> page = carUsedRecordService.getCarUsedRecordPage(param, query); |
|
|
@ -179,8 +182,8 @@ public class CarController extends BladeController { |
|
|
|
@PostMapping("/confirmCarUsedRecord") |
|
|
|
@PostMapping("/confirmCarUsedRecord") |
|
|
|
@ApiOperation(value = "用车记录确认") |
|
|
|
@ApiOperation(value = "用车记录确认") |
|
|
|
@ApiOperationSupport(order = 17) |
|
|
|
@ApiOperationSupport(order = 17) |
|
|
|
public R confirmCarUsedRecord(@RequestBody CarUsedRecordConfirmationDTO confirmationDTO) { |
|
|
|
public R confirmCarUsedRecord(@Valid @RequestBody CarUsedRecordConfirmationDTO confirmationDTO) { |
|
|
|
return R.status(carUsedRecordService.confirmCarUsedRecord(confirmationDTO)); |
|
|
|
return carUsedRecordService.confirmCarUsedRecord(confirmationDTO); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/milesDataByYear") |
|
|
|
@GetMapping("/milesDataByYear") |
|
|
@ -194,39 +197,61 @@ public class CarController extends BladeController { |
|
|
|
@PostMapping("/saveCarCheckRecord") |
|
|
|
@PostMapping("/saveCarCheckRecord") |
|
|
|
@ApiOperation(value = "新增车检记录") |
|
|
|
@ApiOperation(value = "新增车检记录") |
|
|
|
@ApiOperationSupport(order = 19) |
|
|
|
@ApiOperationSupport(order = 19) |
|
|
|
public R saveCarCheckRecord(@Valid @RequestBody CarCheckRecordEntity carCheckRecordEntity) { |
|
|
|
public R saveCarCheckRecord(@Valid @RequestBody CarCheckRecordDTO carCheckRecordDTO) { |
|
|
|
return R.status(carCheckRecordService.saveCarCheckRecord(carCheckRecordEntity)); |
|
|
|
return R.status(carCheckRecordService.saveCarCheckRecord(carCheckRecordDTO)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/updateCarCheckRecord") |
|
|
|
@PostMapping("/updateCarCheckRecord") |
|
|
|
@ApiOperation(value = "修改车检记录") |
|
|
|
@ApiOperation(value = "修改车检记录") |
|
|
|
@ApiOperationSupport(order = 20) |
|
|
|
@ApiOperationSupport(order = 20) |
|
|
|
public R updateCarCheckRecord(@Valid @RequestBody CarCheckRecordEntity carCheckRecordEntity) { |
|
|
|
public R updateCarCheckRecord(@Valid @RequestBody CarCheckRecordDTO carCheckRecordDTO) { |
|
|
|
return R.status(carCheckRecordService.updateById(carCheckRecordEntity)); |
|
|
|
return R.status(carCheckRecordService.updateCarCheckRecord(carCheckRecordDTO)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/removeCarCheckRecord") |
|
|
|
@PostMapping("/removeCarCheckRecord") |
|
|
|
@ApiOperation(value = "删除车检记录") |
|
|
|
@ApiOperation(value = "删除车检记录") |
|
|
|
@ApiOperationSupport(order = 21) |
|
|
|
@ApiOperationSupport(order = 21) |
|
|
|
public R removeCarCheckRecord(@RequestParam Long id) { |
|
|
|
public R removeCarCheckRecord(@RequestParam Long id) { |
|
|
|
return R.status(carCheckRecordService.removeById(id)); |
|
|
|
return R.status(carCheckRecordService.removeCarCheckRecord(id)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/carCheckRecordDetail") |
|
|
|
@GetMapping("/carCheckRecordDetail") |
|
|
|
@ApiOperation(value = "车检记录详情") |
|
|
|
@ApiOperation(value = "车检记录详情") |
|
|
|
@ApiOperationSupport(order = 15) |
|
|
|
@ApiOperationSupport(order = 22) |
|
|
|
public R<CarCheckRecordDetailVO> carCheckRecordDetail(@RequestParam Long id) { |
|
|
|
public R<CarCheckRecordDetailVO> carCheckRecordDetail(@RequestParam Long id) { |
|
|
|
return R.data(carCheckRecordService.getCarCheckRecord(id)); |
|
|
|
return R.data(carCheckRecordService.getCarCheckRecord(id)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/carCheckRecordPage") |
|
|
|
@GetMapping("/carCheckRecordPage") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string") |
|
|
|
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"), |
|
|
|
|
|
|
|
@ApiImplicitParam(name = "carId", value = "车辆id", dataType = "query", paramType = "string") |
|
|
|
}) |
|
|
|
}) |
|
|
|
@ApiOperation(value = "车辆维保记录分页") |
|
|
|
@ApiOperation(value = "车检记录分页") |
|
|
|
@ApiOperationSupport(order = 16) |
|
|
|
@ApiOperationSupport(order = 23) |
|
|
|
public R<IPage<CarUsedRecordPageVO>> carCheckRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
|
|
|
public R<IPage<CarCheckRecordPageVO>> carCheckRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
|
|
|
IPage<CarUsedRecordPageVO> page = carUsedRecordService.getCarUsedRecordPage(param, query); |
|
|
|
IPage<CarCheckRecordPageVO> page = carCheckRecordService.getCarCheckRecordPage(param, query); |
|
|
|
return R.data(page); |
|
|
|
return R.data(page); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/exportCarMaintenanceData") |
|
|
|
|
|
|
|
@ApiOperation(value = "导出车辆维保记录单") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 24) |
|
|
|
|
|
|
|
public void exportCarMaintenanceData(@RequestParam Long id, HttpServletResponse response) { |
|
|
|
|
|
|
|
carMaintenanceService.exportCarMaintenanceData(id, response); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/exportCarUsedRecordData") |
|
|
|
|
|
|
|
@ApiOperation(value = "导出用车记录单") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 25) |
|
|
|
|
|
|
|
public void exportCarUsedRecordData() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/exportCarCheckRecordData") |
|
|
|
|
|
|
|
@ApiOperation(value = "导出车检记录单") |
|
|
|
|
|
|
|
@ApiOperationSupport(order = 26) |
|
|
|
|
|
|
|
public void exportCarCheckRecordData() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|