From 11ddf9cb831c5d12da0c85c718dafc04d51ce751 Mon Sep 17 00:00:00 2001
From: zhangzeli <123456>
Date: 星期三, 24 十一月 2021 09:08:45 +0800
Subject: [PATCH] 报表
---
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Suggest.java | 9 ++
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/SuggestMapper.java | 11 +-
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICarService.java | 3
xboot-modules/xboot-your/src/main/resources/mapper/SuggestMapper.xml | 5 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/vo/CarVo.java | 19 ++++
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CarController.java | 57 +++++++++++++
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Car.java | 7 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IAddOilServiceImpl.java | 5 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AddOilController.java | 69 ++++++++++++++++
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/SuggestController.java | 8 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ISuggestServiceImpl.java | 2
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IAddOilService.java | 4 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICarServiceImpl.java | 6 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CarMapper.java | 4 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java | 9 ++
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/AddOilMapper.java | 4 +
xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/AddOil.java | 7 +
17 files changed, 217 insertions(+), 12 deletions(-)
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AddOilController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AddOilController.java
index 19a72f2..3fe62e0 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AddOilController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/AddOilController.java
@@ -1,22 +1,34 @@
package cn.exrick.xboot.your.controller;
+import cn.exrick.xboot.core.common.utils.ExcelUtil;
import cn.exrick.xboot.core.common.utils.PageUtil;
import cn.exrick.xboot.core.common.utils.ResultUtil;
import cn.exrick.xboot.core.common.vo.PageVo;
import cn.exrick.xboot.core.common.vo.Result;
import cn.exrick.xboot.your.entity.AddOil;
import cn.exrick.xboot.your.service.IAddOilService;
+
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import jodd.net.URLCoder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.transaction.annotation.Transactional;
-import java.util.List;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import java.io.*;
+import java.math.BigDecimal;
+import java.nio.charset.StandardCharsets;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
/**
* @author zhangzeli
@@ -39,10 +51,62 @@
return new ResultUtil<AddOil>().setData(addOil);
}
+ @RequestMapping(value = "/getExcel", method = RequestMethod.GET)
+ @ApiOperation(value = "閫氳繃杞﹁締id鑾峰彇")
+ public Result<List<AddOil>> getExcel(String beginTime,String endTime) {
+
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+ if (beginTime!=null && beginTime==""){
+ //鑾峰彇褰撳墠鏈堢涓�澶╋細
+ Calendar c = Calendar.getInstance();
+ c.add(Calendar.MONTH, 0);
+ c.set(Calendar.DAY_OF_MONTH,1);
+ beginTime = format.format(c.getTime());
+ }
+ if (endTime!=null && endTime==""){
+ //鑾峰彇褰撳墠鏈堟渶鍚庝竴澶�
+ Calendar ca = Calendar.getInstance();
+ ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
+ endTime = format.format(ca.getTime());
+ }
+
+ QueryWrapper<AddOil> wrapper = new QueryWrapper<>();
+
+ wrapper.ge(beginTime!=null && beginTime!="","add_date",beginTime);
+ wrapper.le(endTime!=null && endTime!="","add_date",endTime);
+
+ List<AddOil> list = iAddOilService.getAddOil(wrapper);
+ List<AddOil> addOilList = new ArrayList<>();
+ Map<String, List<AddOil>> map = list.stream().collect(Collectors.groupingBy(AddOil::getCarNo));
+ map.forEach((key, value) -> {
+ for (AddOil addOil:
+ value) {
+ addOilList.add(addOil);
+ }
+ AddOil addOil = new AddOil();
+ java.text.DecimalFormat df =new java.text.DecimalFormat("#.00");
+
+ addOil.setCarNo("鍚堣");
+ addOil.setAmount(value.stream().map(e -> e.getAmount()).reduce(Double::sum).get());
+ addOil.setMileage(value.stream().map(e -> e.getMileage()).reduce(Integer::sum).get());
+ addOil.setMoney(value.stream().map(e -> e.getMoney()).reduce(Double::sum).get());
+ Double f = addOil.getAmount()/addOil.getMileage()*100;
+ BigDecimal b = new BigDecimal(f);
+ addOil.setOilWear(b.setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue());
+ addOilList.add(addOil);
+ addOilList.add(new AddOil());
+ addOilList.add(new AddOil());
+ addOilList.add(new AddOil());
+
+ });
+
+
+ return new ResultUtil<List<AddOil>>().setData(addOilList);
+ }
+
@RequestMapping(value = "/getAll", method = RequestMethod.GET)
@ApiOperation(value = "鑾峰彇鍏ㄩ儴鏁版嵁")
public Result<List<AddOil>> getAll() {
-
List<AddOil> list = iAddOilService.list();
return new ResultUtil<List<AddOil>>().setData(list);
}
@@ -76,4 +140,5 @@
}
return ResultUtil.success("鎵归噺閫氳繃id鍒犻櫎鏁版嵁鎴愬姛");
}
+
}
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 507c2e2..e261f9d 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
@@ -4,8 +4,14 @@
import cn.exrick.xboot.core.common.utils.ResultUtil;
import cn.exrick.xboot.core.common.vo.PageVo;
import cn.exrick.xboot.core.common.vo.Result;
+import cn.exrick.xboot.your.entity.AddOil;
import cn.exrick.xboot.your.entity.Car;
+import cn.exrick.xboot.your.entity.DrivingRecord;
+import cn.exrick.xboot.your.entity.Suggest;
+import cn.exrick.xboot.your.service.IAddOilService;
import cn.exrick.xboot.your.service.ICarService;
+import cn.exrick.xboot.your.service.IDrivingRecordService;
+import cn.exrick.xboot.your.vo.CarVo;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -18,6 +24,7 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.transaction.annotation.Transactional;
+import java.util.ArrayList;
import java.util.List;
/**
@@ -32,6 +39,10 @@
@Autowired
private ICarService iCarService;
+ @Autowired
+ private IAddOilService iAddOilService;
+ @Autowired
+ private IDrivingRecordService iDrivingRecordService;
@RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
@ApiOperation(value = "閫氳繃id鑾峰彇")
@@ -41,14 +52,56 @@
return new ResultUtil<Car>().setData(car);
}
- @RequestMapping(value = "/getAll", method = RequestMethod.GET)
+ @RequestMapping(value = "/getAllCar", method = RequestMethod.GET)
@ApiOperation(value = "鑾峰彇鍏ㄩ儴鏁版嵁")
- public Result<List<Car>> getAll() {
+ public Result<List<Car>> getAllCar() {
List<Car> list = iCarService.list();
return new ResultUtil<List<Car>>().setData(list);
}
+ @RequestMapping(value = "/getAll", method = RequestMethod.GET)
+ @ApiOperation(value = "鑾峰彇鍏ㄩ儴鏁版嵁")
+ public Result<List<CarVo>> getAll(String beginTime,String endTime) {
+ List<CarVo> carVos = new ArrayList<>();
+ List<Car> list = iCarService.getAll2();
+ for (Car car:list){
+ CarVo carVo = new CarVo();
+ //鍔犳补淇℃伅
+ QueryWrapper<AddOil> queryWrapper = new QueryWrapper<>();
+ queryWrapper.select("sum(money) as money,sum(amount) as amount").eq("car_id", car.getId());
+
+
+ //浠庡彂杞︽椂闂磋椹堕噷绋嬪垽鏂垵濮嬮噷绋�
+ QueryWrapper<DrivingRecord> wrapper = new QueryWrapper<>();
+ wrapper.select("min(mileage) as beginMileage,max(mileage) as endMileage").eq("car_id",car.getId());
+
+ wrapper.ge(beginTime!=null && beginTime!="","out_time",beginTime);
+ queryWrapper.ge(beginTime!=null && beginTime!="","add_date",beginTime);
+
+ wrapper.le(endTime!=null && endTime!="","in_time",endTime);
+ queryWrapper.le(endTime!=null && endTime!="","add_date",beginTime);
+
+ DrivingRecord drivingRecord = iDrivingRecordService.getOne(wrapper);
+
+ AddOil addOil = iAddOilService.getOne(queryWrapper);
+
+ if (addOil!=null){
+ carVo.setMoney(addOil.getMoney());
+ carVo.setOilWear(addOil.getAmount());
+ }
+
+ if (drivingRecord!=null) {
+ carVo.setBeginMileage(drivingRecord.getBeginMileage());
+ carVo.setEndMileage(drivingRecord.getEndMileage());
+ }
+
+ carVo.setCar(car);
+ carVos.add(carVo);
+ }
+ return new ResultUtil<List<CarVo>>().setData(carVos);
+ }
+
@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "鍒嗛〉鑾峰彇")
public Result<IPage<Car>> getByPage(String carNo,PageVo page) {
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/SuggestController.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/SuggestController.java
index c0ad03e..c23d2f2 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/SuggestController.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/SuggestController.java
@@ -49,9 +49,11 @@
@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "鍒嗛〉鑾峰彇")
- public Result<IPage<Suggest>> getByPage(PageVo page) {
-
- IPage<Suggest> data = iSuggestService.page(PageUtil.initMpPage(page));
+ public Result<IPage<Suggest>> getByPage(String content,PageVo page) {
+ QueryWrapper<Suggest> wrapper = new QueryWrapper<>();
+ if (!StrUtil.isEmpty(content))
+ wrapper.like("a.content","%"+content+"%");
+ IPage<Suggest> data = iSuggestService.page2(PageUtil.initMpPage(page),wrapper);
return new ResultUtil<IPage<Suggest>>().setData(data);
}
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/AddOil.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/AddOil.java
index 576a281..92b9cd6 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/AddOil.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/AddOil.java
@@ -41,6 +41,9 @@
@ApiModelProperty(value = "鍔犳补閲�")
private double amount;
+ @ApiModelProperty(value = "鍔犳补鍗″彿")
+ private String addOilCode;
+
@ApiModelProperty(value = "鍗曚环")
private double unitPrice;
@@ -56,4 +59,8 @@
@Transient
@TableField(exist = false)
private String carNo;
+
+ @Transient
+ @TableField(exist = false)
+ private Double oilWear;
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Car.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Car.java
index b3443e1..02888a0 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Car.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Car.java
@@ -50,6 +50,9 @@
@ApiModelProperty(value = "0:姝e父 1:绉婚櫎")
private int status;
+ @ApiModelProperty(value = "鍔犳补鍗″彿")
+ private int addOilCode;
+
@ApiModelProperty(value = "绉婚櫎鍘熷洜锛堟姤搴熴�佷簩鎵嬭溅閿�鍞級")
private String removeReason;
@@ -73,4 +76,8 @@
@TableField(exist = false)
private String followNickName;
+ @Transient
+ @TableField(exist = false)
+ private String areaName;
+
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java
index da5564b..027a29e 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/DrivingRecord.java
@@ -1,6 +1,7 @@
package cn.exrick.xboot.your.entity;
import cn.exrick.xboot.core.base.XbootBaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@@ -12,6 +13,7 @@
import javax.persistence.Entity;
import javax.persistence.Table;
+import javax.persistence.Transient;
import java.util.Date;
/**
@@ -99,4 +101,11 @@
@ApiModelProperty(value = "澶勭悊鎰忚")
private String content;
+ @Transient
+ @TableField(exist = false)
+ private double beginMileage;
+
+ @Transient
+ @TableField(exist = false)
+ private double endMileage;
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Suggest.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Suggest.java
index 4686bdd..3539b35 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Suggest.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/Suggest.java
@@ -1,6 +1,7 @@
package cn.exrick.xboot.your.entity;
import cn.exrick.xboot.core.base.XbootBaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@@ -12,6 +13,7 @@
import javax.persistence.Entity;
import javax.persistence.Table;
+import javax.persistence.Transient;
import java.util.Date;
/**
@@ -40,4 +42,11 @@
@ApiModelProperty(value = "鍙告満鎴栭殢杞﹀憳id")
private String userId;
+ @Transient
+ @TableField(exist = false)
+ private String name;
+
+ @Transient
+ @TableField(exist = false)
+ private String title;
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/AddOilMapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/AddOilMapper.java
index 680884b..1a5a35b 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/AddOilMapper.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/AddOilMapper.java
@@ -24,4 +24,8 @@
@Select("SELECT a.*,b.car_no as temp FROM t_add_oil a LEFT JOIN t_car b ON a.car_id=b.id ${ew.customSqlSegment} ")
@Results({@Result(column="temp", property="carNo", jdbcType = JdbcType.VARCHAR)})
IPage<AddOil> page2(Page initMpPage, @Param(Constants.WRAPPER) QueryWrapper<AddOil> wrapper);
+
+ @Select("SELECT a.*,b.car_no as temp FROM t_add_oil a LEFT JOIN t_car b ON a.car_id=b.id ${ew.customSqlSegment} ")
+ @Results({@Result(column="temp", property="carNo", jdbcType = JdbcType.VARCHAR)})
+ List<AddOil> getAddOil(@Param(Constants.WRAPPER) QueryWrapper<AddOil> wrapper);
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CarMapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CarMapper.java
index 696a084..8ba94ee 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CarMapper.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CarMapper.java
@@ -1,5 +1,6 @@
package cn.exrick.xboot.your.mapper;
import cn.exrick.xboot.your.entity.Area;
+import cn.exrick.xboot.your.vo.CarVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
@@ -24,4 +25,7 @@
@Select("SELECT a.*,b1.nickname AS temp,b2.nickname AS followNickName FROM t_car a LEFT JOIN t_user AS b1 ON a.user_id = b1.id LEFT JOIN t_user AS b2 ON a.follow_user_id = b2.id ${ew.customSqlSegment} ")
@Results({@Result(column="temp", property="nickName", jdbcType = JdbcType.VARCHAR)})
IPage<Car> page2(Page initMpPage, @Param(Constants.WRAPPER) QueryWrapper<Car> wrapper);
+
+ @Select("SELECT c.*,u.nickname,a.`name` AS area_name FROM t_car c LEFT JOIN t_user AS u ON c.user_id=u.id LEFT JOIN t_area AS a ON a.user_id=u.id")
+ List<Car> getAll2();
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/SuggestMapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/SuggestMapper.java
index 2993673..f3811c7 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/SuggestMapper.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/SuggestMapper.java
@@ -1,6 +1,7 @@
package cn.exrick.xboot.your.mapper;
import cn.exrick.xboot.your.entity.CustomerReceive;
+import cn.exrick.xboot.your.entity.UserStatistic;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.exrick.xboot.your.entity.Suggest;
@@ -20,7 +21,9 @@
* @author zhangzeli
*/
public interface SuggestMapper extends BaseMapper<Suggest> {
- @Select("SELECT a.*,b.name as temp FROM t_customer_receive a LEFT JOIN t_customer b ON a.customer_id=b.id ${ew.customSqlSegment} ORDER BY a.status ASC,a.create_time DESC")
- @Results({@Result(column="temp", property="customerName", jdbcType = JdbcType.VARCHAR)})
- IPage<CustomerReceive> page2(Page initMpPage, @Param(Constants.WRAPPER) QueryWrapper<CustomerReceive> wrapper);
-}
\ No newline at end of file
+
+ @Select("SELECT a.*,b.name,c.title as title FROM t_suggest a LEFT JOIN t_customer b ON a.customer_id=b.id LEFT JOIN t_dict_data c ON a.dict_data_id=c.id ${ew.customSqlSegment}")
+ @Results({@Result(column="name", property="name", jdbcType = JdbcType.VARCHAR)})
+ IPage<Suggest> page2(Page initMpPage, @Param(Constants.WRAPPER) QueryWrapper<Suggest> wrapper);
+}
+
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IAddOilService.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IAddOilService.java
index 9bb5043..79ff8cd 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IAddOilService.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IAddOilService.java
@@ -2,9 +2,11 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.exrick.xboot.your.entity.AddOil;
+import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -15,4 +17,6 @@
public interface IAddOilService extends IService<AddOil> {
IPage<AddOil> page2(Page initMpPage, QueryWrapper<AddOil> wrapper);
+
+ List<AddOil> getAddOil(@Param(Constants.WRAPPER) QueryWrapper<AddOil> wrapper);
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICarService.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICarService.java
index 87bfa31..a5d8d54 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICarService.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICarService.java
@@ -1,5 +1,6 @@
package cn.exrick.xboot.your.service;
+import cn.exrick.xboot.your.vo.CarVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -15,4 +16,6 @@
public interface ICarService extends IService<Car> {
IPage<Car> page2(Page initMpPage, QueryWrapper<Car> wrapper);
+
+ List<Car> getAll2();
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IAddOilServiceImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IAddOilServiceImpl.java
index 195831d..2fa2d8c 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IAddOilServiceImpl.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IAddOilServiceImpl.java
@@ -31,4 +31,9 @@
public IPage<AddOil> page2(Page initMpPage, QueryWrapper<AddOil> wrapper) {
return addOilMapper.page2(initMpPage,wrapper);
}
+
+ @Override
+ public List<AddOil> getAddOil(QueryWrapper<AddOil> wrapper) {
+ return addOilMapper.getAddOil(wrapper);
+ }
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICarServiceImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICarServiceImpl.java
index 65268cf..41a4d28 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICarServiceImpl.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICarServiceImpl.java
@@ -3,6 +3,7 @@
import cn.exrick.xboot.your.mapper.CarMapper;
import cn.exrick.xboot.your.entity.Car;
import cn.exrick.xboot.your.service.ICarService;
+import cn.exrick.xboot.your.vo.CarVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -31,4 +32,9 @@
public IPage<Car> page2(Page initMpPage, QueryWrapper<Car> wrapper) {
return carMapper.page2(initMpPage,wrapper);
}
+
+ @Override
+ public List<Car> getAll2() {
+ return carMapper.getAll2();
+ }
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ISuggestServiceImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ISuggestServiceImpl.java
index 4ed8ea4..c31e596 100644
--- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ISuggestServiceImpl.java
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ISuggestServiceImpl.java
@@ -29,6 +29,6 @@
@Override
public IPage<Suggest> page2(Page initMpPage, QueryWrapper<Suggest> wrapper) {
- return null;
+ return suggestMapper.page2(initMpPage,wrapper);
}
}
\ No newline at end of file
diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/vo/CarVo.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/vo/CarVo.java
new file mode 100644
index 0000000..9495e28
--- /dev/null
+++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/vo/CarVo.java
@@ -0,0 +1,19 @@
+package cn.exrick.xboot.your.vo;
+
+import cn.exrick.xboot.your.entity.Car;
+import lombok.Data;
+
+@Data
+public class CarVo {
+
+ private Car car;
+
+ private double beginMileage;
+
+ private double endMileage;
+
+ private double money;
+
+ private double oilWear;
+
+}
diff --git a/xboot-modules/xboot-your/src/main/resources/mapper/SuggestMapper.xml b/xboot-modules/xboot-your/src/main/resources/mapper/SuggestMapper.xml
new file mode 100644
index 0000000..39db1bf
--- /dev/null
+++ b/xboot-modules/xboot-your/src/main/resources/mapper/SuggestMapper.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.exrick.xboot.your.mapper.SuggestMapper">
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.1