diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java index 88779d5..382af2b 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java @@ -53,21 +53,21 @@ public class CarController extends BladeController { @ApiOperation(value = "新增车辆") @ApiOperationSupport(order = 1) public R saveCar(@Valid @RequestBody CarEntity carEntity) { - return R.status(carService.save(carEntity)); + return carService.saveCar(carEntity); } @PostMapping("/updateCar") @ApiOperation(value = "修改车辆") @ApiOperationSupport(order = 2) public R updateCar(@Valid @RequestBody CarEntity carEntity) { - return R.status(carService.updateById(carEntity)); + return carService.updateCar(carEntity); } @PostMapping("/removeCar") @ApiOperation(value = "删除车辆") @ApiOperationSupport(order = 3) public R removeCar(@RequestParam Long id) { - return R.status(carService.removeById(id)); + return R.status(carService.removeCar(id)); } @GetMapping("/carDetail") @@ -101,7 +101,7 @@ public class CarController extends BladeController { @ApiOperation(value = "修改车辆维保记录") @ApiOperationSupport(order = 7) public R updateCarMaintenance(@Valid @RequestBody CarMaintenanceEntity carMaintenanceEntity) { - return R.status(carMaintenanceService.updateById(carMaintenanceEntity)); + return carMaintenanceService.updateCarMaintenance(carMaintenanceEntity); } @PostMapping("/removeCarMaintenance") diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml index 33ba901..b77ecf2 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMaintenanceMapper.xml @@ -26,13 +26,13 @@ WHERE t1.is_deleted = 0 - AND t2.unit = #{param.unit} + AND t2.unit like concat('%', #{param.unit}, '%') AND t1.start_time >= #{param.startTime} - AND t1.end_time < #{param.endTime} + AND t1.end_time <= #{param.endTime} AND t1.car_id = #{param.carId} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml index 695be59..dbbb074 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/CarMapper.xml @@ -4,7 +4,7 @@