From 1b4c59f5f3a0e332ad1cc27c836d98c6d2bdf22c Mon Sep 17 00:00:00 2001
From: wang-hao-jie <1550036656@qq.com>
Date: 星期三, 08 十二月 2021 14:49:16 +0800
Subject: [PATCH] 违章记录
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CarController.java | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CarController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CarController.java
index e261f9d..7fd6d1d 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CarController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CarController.java
@@ -24,8 +24,11 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.transaction.annotation.Transactional;
+import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
/**
* @author zhangzeli
@@ -101,6 +104,27 @@
}
return new ResultUtil<List<CarVo>>().setData(carVos);
}
+ @RequestMapping(value = "/getInfo", method = RequestMethod.GET)
+ @ApiOperation(value = "閫氳繃杞﹁締id鑾峰彇")
+ public Result<List<Car>> getInfo(String beginTime,String endTime) {
+ QueryWrapper<Car> wrapper = new QueryWrapper<>();
+ wrapper.ge(beginTime!=null && beginTime!="","a.add_date",beginTime);
+ wrapper.le(endTime!=null && endTime!="","a.add_date",endTime);
+ wrapper.groupBy("car_no");
+ List<Car> list2 = iCarService.getCarInfo2(wrapper);
+ List<Car> list = iCarService.getCarInfo();
+ for (Car car:list2){
+ for (Car car1:list){
+ if (car.getId().equals(car1.getId())){
+ car1.setAmount(car.getAmount());
+ car1.setMileage(car.getMileage());
+ car1.setMoney(car.getMoney());
+ continue;
+ }
+ }
+ }
+ return new ResultUtil<List<Car>>().setData(list);
+ }
@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "鍒嗛〉鑾峰彇")
--
Gitblit v1.9.1