Commit 528a8f3e authored by caotao's avatar caotao

1.车辆按月统计里程接口与按月导出接口优化。

2.解决按月导出接口车辆编号为空问题。
parent 416120d0
...@@ -1450,13 +1450,13 @@ public class CarController extends AbstractBaseController { ...@@ -1450,13 +1450,13 @@ public class CarController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/getCarMileageInfoByMoth", method = RequestMethod.GET) @RequestMapping(value = "/getCarMileageInfoByMoth", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计车辆里程", notes = "车辆统计-按照月份统计车辆里程") @ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计车辆里程", notes = "车辆统计-按照月份统计车辆里程")
public BasicTableDataDto getCarMileageInfoByMoth(@RequestParam String date,@RequestParam Integer current,@RequestParam Integer size) { public BasicTableDataDto getCarMileageInfoByMoth(@RequestParam(required = false) String date,@RequestParam Integer current,@RequestParam Integer size) {
return iCarService.getCarMileageInfoByMoth(date,current,size); return iCarService.getCarMileageInfoByMoth(date,current,size);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@RequestMapping(value = "/exportCarMileageInfoByMoth", method = RequestMethod.GET) @RequestMapping(value = "/exportCarMileageInfoByMoth", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计导出车辆里程", notes = "车辆统计-按照月份统计导出车辆里程") @ApiOperation(httpMethod = "GET", value = "车辆统计-按照月份统计导出车辆里程", notes = "车辆统计-按照月份统计导出车辆里程")
public void exportCarMileageInfoByMoth(@RequestParam String date, HttpServletResponse response) { public void exportCarMileageInfoByMoth(@RequestParam(required = false) String date, HttpServletResponse response) {
List<CarExportDto> list = this.iCarService.exportCarMileageInfoByMoth(date); List<CarExportDto> list = this.iCarService.exportCarMileageInfoByMoth(date);
String name = "车辆里程月度统计表-"+date; String name = "车辆里程月度统计表-"+date;
FileHelper.exportExcel(list,name,name,CarExportDto.class,UUID.randomUUID().toString()+".xls",response); FileHelper.exportExcel(list,name,name,CarExportDto.class,UUID.randomUUID().toString()+".xls",response);
......
...@@ -1926,7 +1926,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS ...@@ -1926,7 +1926,7 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
CarExportDto carExportDto = new CarExportDto(); CarExportDto carExportDto = new CarExportDto();
Double totalTravel = iWlCarMileageService.getTotalTravelByIotCodeAndDate(date, list.get(i).getIotCode()); Double totalTravel = iWlCarMileageService.getTotalTravelByIotCodeAndDate(date, list.get(i).getIotCode());
Car car = list.get(i); Car car = list.get(i);
carExportDto.setCode(car.getCode()); carExportDto.setCode(car.getRemark());
carExportDto.setCarNumber(car.getCarNum()); carExportDto.setCarNumber(car.getCarNum());
carExportDto.setDriver(car.getDriver()); carExportDto.setDriver(car.getDriver());
carExportDto.setPhone(car.getPhone()); carExportDto.setPhone(car.getPhone());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment