From 435b1cfe40ee2822381274d3a0a4f9066157b02b Mon Sep 17 00:00:00 2001 From: zhangzeli <123456> Date: 星期三, 05 一月 2022 09:26:17 +0800 Subject: [PATCH] 回复 --- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IOrderTaskServiceImpl.java | 5 + xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICustomerServiceImpl.java | 9 ++- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java | 18 ++++++ xboot-core/src/main/java/cn/exrick/xboot/core/dao/UserDao.java | 2 xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICarService.java | 6 + xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IEventLogServiceImpl.java | 6 ++ xboot-core/src/main/java/cn/exrick/xboot/core/service/UserService.java | 2 xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/vo/CarVo.java | 2 xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/controller/CarController.java | 28 +++++++-- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/EventLogMapper.java | 19 ++++++ xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IOrderTaskService.java | 3 + xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICustomerService.java | 5 + xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICarServiceImpl.java | 12 ++- xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java | 13 ++++ xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CarMapper.java | 21 ++++++- xboot-core/src/main/java/cn/exrick/xboot/core/serviceimpl/UserServiceImpl.java | 7 ++ xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IEventLogService.java | 2 xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java | 20 ++++++ 18 files changed, 157 insertions(+), 23 deletions(-) diff --git a/xboot-core/src/main/java/cn/exrick/xboot/core/dao/UserDao.java b/xboot-core/src/main/java/cn/exrick/xboot/core/dao/UserDao.java index dc6848c..872f018 100644 --- a/xboot-core/src/main/java/cn/exrick/xboot/core/dao/UserDao.java +++ b/xboot-core/src/main/java/cn/exrick/xboot/core/dao/UserDao.java @@ -67,4 +67,6 @@ @Query("select count(id) from User u where u.type2=?1") int countByType(int type); + + List<User> findByType2(int type); } diff --git a/xboot-core/src/main/java/cn/exrick/xboot/core/service/UserService.java b/xboot-core/src/main/java/cn/exrick/xboot/core/service/UserService.java index 0c7c9f4..689e714 100644 --- a/xboot-core/src/main/java/cn/exrick/xboot/core/service/UserService.java +++ b/xboot-core/src/main/java/cn/exrick/xboot/core/service/UserService.java @@ -78,4 +78,6 @@ void updateDepartmentTitle(String departmentId, String departmentTitle); int countByType(int type); + + List<User> findByType2(int type); } diff --git a/xboot-core/src/main/java/cn/exrick/xboot/core/serviceimpl/UserServiceImpl.java b/xboot-core/src/main/java/cn/exrick/xboot/core/serviceimpl/UserServiceImpl.java index a4d73db..f6b468e 100644 --- a/xboot-core/src/main/java/cn/exrick/xboot/core/serviceimpl/UserServiceImpl.java +++ b/xboot-core/src/main/java/cn/exrick/xboot/core/serviceimpl/UserServiceImpl.java @@ -201,4 +201,11 @@ public int countByType(int type) { return userDao.countByType(type); } + + @Override + public List<User> findByType2(int type) { + return userDao.findByType2(type); + } + + } diff --git a/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java b/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java index f0e75fe..5bd327e 100644 --- a/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java +++ b/xboot-modules/xboot-base/src/main/java/cn/exrick/xboot/base/controller/manage/UserController.java @@ -528,4 +528,17 @@ throw new XbootException("璇ユ墜鏈哄彿宸茶娉ㄥ唽"); } } + + @RequestMapping(value = "/findByType2", method = RequestMethod.GET) + @ApiOperation(value = "鑾峰彇鍏ㄩ儴鐢ㄦ埛鏁版嵁") + public Result<List<User>> findByType2(int type) { + + List<User> list = userService.findByType2(type); + // 娓呴櫎鎸佷箙涓婁笅鏂囩幆澧� 閬垮厤鍚庨潰璇彞瀵艰嚧鎸佷箙鍖� + entityManager.clear(); + for (User u : list) { + u.setPassword(null); + } + return new ResultUtil<List<User>>().setData(list); + } } 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 7fd6d1d..2d5156f 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,13 +4,11 @@ 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.entity.*; 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.service.IOrderTaskService; import cn.exrick.xboot.your.vo.CarVo; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; @@ -46,6 +44,9 @@ private IAddOilService iAddOilService; @Autowired private IDrivingRecordService iDrivingRecordService; + @Autowired + private IOrderTaskService iOrderTaskService; + @RequestMapping(value = "/get/{id}", method = RequestMethod.GET) @ApiOperation(value = "閫氳繃id鑾峰彇") @@ -65,10 +66,11 @@ @RequestMapping(value = "/getAll", method = RequestMethod.GET) @ApiOperation(value = "鑾峰彇鍏ㄩ儴鏁版嵁") - public Result<List<CarVo>> getAll(String beginTime,String endTime) { + public Result<List<CarVo>> getAll(String beginTime,String endTime,PageVo page) { List<CarVo> carVos = new ArrayList<>(); - List<Car> list = iCarService.getAll2(); - for (Car car:list){ + + IPage<Car> list = iCarService.getAll2(PageUtil.initMpPage(page)); + for (Car car:list.getRecords()){ CarVo carVo = new CarVo(); //鍔犳补淇℃伅 QueryWrapper<AddOil> queryWrapper = new QueryWrapper<>(); @@ -85,9 +87,20 @@ wrapper.le(endTime!=null && endTime!="","in_time",endTime); queryWrapper.le(endTime!=null && endTime!="","add_date",beginTime); + QueryWrapper<OrderTask> wrapper1 = new QueryWrapper<>(); + + + wrapper1.eq("car_id",car.getId()); + wrapper1.ge(beginTime!=null && beginTime!="","send_date",beginTime); + wrapper1.le(endTime!=null && endTime!="","send_date",endTime); + + OrderTask orderTask = iOrderTaskService.getOne(wrapper1); + DrivingRecord drivingRecord = iDrivingRecordService.getOne(wrapper); AddOil addOil = iAddOilService.getOne(queryWrapper); + + if (addOil!=null){ carVo.setMoney(addOil.getMoney()); @@ -101,6 +114,7 @@ carVo.setCar(car); carVos.add(carVo); + carVo.setTotal(list.getTotal()); } return new ResultUtil<List<CarVo>>().setData(carVos); } 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 935ceaf..3cf96f0 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,6 +1,5 @@ package cn.exrick.xboot.your.mapper; -import cn.exrick.xboot.your.entity.Area; -import cn.exrick.xboot.your.vo.CarVo; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; @@ -27,7 +26,7 @@ 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(); + IPage<Car> getAll2(Page initMpPage); @Select("SELECT\n" + "\tc.*,(SUM(amount)) AS allAmount,SUM(money) AS allMoney,(MAX(mileage)) AS allMileage\n" + @@ -43,4 +42,20 @@ "LEFT JOIN t_add_oil a ON c.id = a.car_id ${ew.customSqlSegment}") List<Car> getCarInfo2(@Param(Constants.WRAPPER) QueryWrapper<Car> wrapper); + @Select("select \n" + + "sum(case when month(create_time) < 2 && year(create_time) <= #{year} then 1 else 0 end) as january,\n" + + "sum(case when month(create_time) < 3 && year(create_time) <= #{year} then 1 else 0 end) as february,\n" + + "sum(case when month(create_time) < 4 && year(create_time) <= #{year} then 1 else 0 end) as march,\n" + + "sum(case when month(create_time) < 5 && year(create_time) <= #{year} then 1 else 0 end) as april,\n" + + "sum(case when month(create_time) < 6 && year(create_time) <= #{year} then 1 else 0 end) as may,\n" + + "sum(case when month(create_time) < 7 && year(create_time) <= #{year} then 1 else 0 end) as june,\n" + + "sum(case when month(create_time) < 8 && year(create_time) <= #{year} then 1 else 0 end) as july,\n" + + "sum(case when month(create_time) < 9 && year(create_time) <= #{year} then 1 else 0 end) as august,\n" + + "sum(case when month(create_time) < 10 && year(create_time) <= #{year} then 1 else 0 end) as september,\n" + + "sum(case when month(create_time) < 11 && year(create_time) <= #{year} then 1 else 0 end) as october,\n" + + "sum(case when month(create_time) < 12 && year(create_time) <= #{year} then 1 else 0 end) as november,\n" + + "sum(case when month(create_time) < 13 && year(create_time) <= #{year} then 1 else 0 end) as december\n" + + "from t_car") + Month getCarCount(@Param("year")Integer year); + } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java index e490ebd..ab89e39 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/CustomerMapper.java @@ -1,10 +1,10 @@ package cn.exrick.xboot.your.mapper; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.exrick.xboot.your.entity.Customer; +import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; - -import java.util.List; /** * 鍟嗘埛琛ㄦ暟鎹鐞嗗眰 @@ -14,4 +14,20 @@ @Select("select count(id) from t_customer") int count(); + + @Select("select \n" + + "sum(case when month(create_time) < 2 && year(create_time) <= #{year} then 1 else 0 end) as january,\n" + + "sum(case when month(create_time) < 3 && year(create_time) <= #{year} then 1 else 0 end) as february,\n" + + "sum(case when month(create_time) < 4 && year(create_time) <= #{year} then 1 else 0 end) as march,\n" + + "sum(case when month(create_time) < 5 && year(create_time) <= #{year} then 1 else 0 end) as april,\n" + + "sum(case when month(create_time) < 6 && year(create_time) <= #{year} then 1 else 0 end) as may,\n" + + "sum(case when month(create_time) < 7 && year(create_time) <= #{year} then 1 else 0 end) as june,\n" + + "sum(case when month(create_time) < 8 && year(create_time) <= #{year} then 1 else 0 end) as july,\n" + + "sum(case when month(create_time) < 9 && year(create_time) <= #{year} then 1 else 0 end) as august,\n" + + "sum(case when month(create_time) < 10 && year(create_time) <= #{year} then 1 else 0 end) as september,\n" + + "sum(case when month(create_time) < 11 && year(create_time) <= #{year} then 1 else 0 end) as october,\n" + + "sum(case when month(create_time) < 12 && year(create_time) <= #{year} then 1 else 0 end) as november,\n" + + "sum(case when month(create_time) < 13 && year(create_time) <= #{year} then 1 else 0 end) as december\n" + + "from t_customer") + Month getCustomerCount(@Param("year")Integer year); } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/EventLogMapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/EventLogMapper.java index b4dd248..585a710 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/EventLogMapper.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/EventLogMapper.java @@ -1,7 +1,10 @@ package cn.exrick.xboot.your.mapper; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.exrick.xboot.your.entity.EventLog; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import java.util.List; @@ -11,4 +14,20 @@ */ public interface EventLogMapper extends BaseMapper<EventLog> { + @Select("select \n" + + "sum(case month(create_time) when '1' then 1 else 0 end) as january,\n" + + "sum(case month(create_time) when '2' then 1 else 0 end) as february,\n" + + "sum(case month(create_time) when '3' then 1 else 0 end) as march,\n" + + "sum(case month(create_time) when '4' then 1 else 0 end) as april,\n" + + "sum(case month(create_time) when '5' then 1 else 0 end) as may,\n" + + "sum(case month(create_time) when '6' then 1 else 0 end) as june,\n" + + "sum(case month(create_time) when '7' then 1 else 0 end) as july,\n" + + "sum(case month(create_time) when '8' then 1 else 0 end) as august,\n" + + "sum(case month(create_time) when '9' then 1 else 0 end) as september,\n" + + "sum(case month(create_time) when '10' then 1 else 0 end) as october,\n" + + "sum(case month(create_time) when '11' then 1 else 0 end) as november,\n" + + "sum(case month(create_time) when '12' then 1 else 0 end) as december\n" + + "from t_event_log e\n" + + "where year(create_time)=#{year} and type=#{type}") + Month getEventNum(@Param("year")int year,@Param("type")int type); } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java index a2dc8fb..f233c88 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/mapper/OrderTaskMapper.java @@ -1,6 +1,7 @@ package cn.exrick.xboot.your.mapper; import cn.exrick.xboot.your.entity.AddOil; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.exrick.xboot.your.entity.OrderTask; @@ -45,4 +46,21 @@ @Select("select sum(time) as time2,send_date from t_order_task where date_sub(curdate(), interval 1 month) <= date(send_date) and area_section_id=#{arg0} GROUP BY send_date") @Results({@Result(column="time2", property="time", jdbcType = JdbcType.INTEGER)}) List<OrderTask> sumTime(String id); + + @Select("select \n" + + "sum(case month(t.send_date) when '1' then d.num else 0 end) as january,\n" + + "sum(case month(t.send_date) when '2' then d.num else 0 end) as february,\n" + + "sum(case month(t.send_date) when '3' then d.num else 0 end) as march,\n" + + "sum(case month(t.send_date) when '4' then d.num else 0 end) as april,\n" + + "sum(case month(t.send_date) when '5' then d.num else 0 end) as may,\n" + + "sum(case month(t.send_date) when '6' then d.num else 0 end) as june,\n" + + "sum(case month(t.send_date) when '7' then d.num else 0 end) as july,\n" + + "sum(case month(t.send_date) when '8' then d.num else 0 end) as august,\n" + + "sum(case month(t.send_date) when '9' then d.num else 0 end) as september,\n" + + "sum(case month(t.send_date) when '10' then d.num else 0 end) as october,\n" + + "sum(case month(t.send_date) when '11' then d.num else 0 end) as november,\n" + + "sum(case month(t.send_date) when '12' then d.num else 0 end) as december\n" + + "from t_order_task t LEFT JOIN t_order_detail d ON t.id=d.order_id\n" + + "where year(t.send_date)=#{year}") + Month getSendNum(@Param("year")int year); } \ 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 39c0aea..3f1d827 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,6 +1,6 @@ package cn.exrick.xboot.your.service; -import cn.exrick.xboot.your.vo.CarVo; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -17,9 +17,11 @@ IPage<Car> page2(Page initMpPage, QueryWrapper<Car> wrapper); - List<Car> getAll2(); + IPage<Car> getAll2(Page initMpPage); List<Car> getCarInfo(); List<Car> getCarInfo2(QueryWrapper<Car> wrapper); + + Month getCarCount(Integer year); } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICustomerService.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICustomerService.java index 523b106..7e961f6 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICustomerService.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/ICustomerService.java @@ -1,9 +1,8 @@ package cn.exrick.xboot.your.service; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.extension.service.IService; import cn.exrick.xboot.your.entity.Customer; - -import java.util.List; /** * 鍟嗘埛琛ㄦ帴鍙� @@ -12,4 +11,6 @@ public interface ICustomerService extends IService<Customer> { int countOpenId(); + + Month getCustomerCount(Integer year); } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IEventLogService.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IEventLogService.java index 0914a3f..ebcf02b 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IEventLogService.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IEventLogService.java @@ -1,5 +1,6 @@ package cn.exrick.xboot.your.service; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.extension.service.IService; import cn.exrick.xboot.your.entity.EventLog; @@ -11,4 +12,5 @@ */ public interface IEventLogService extends IService<EventLog> { + Month getEventNum(int year,int type); } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IOrderTaskService.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IOrderTaskService.java index 4c74c61..ce91357 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IOrderTaskService.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/service/IOrderTaskService.java @@ -1,5 +1,6 @@ package cn.exrick.xboot.your.service; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.IService; import cn.exrick.xboot.your.entity.OrderTask; @@ -24,5 +25,7 @@ List<OrderTask> list3(String date); + Month getSendNum(int year); + List<OrderTask> sumTime(String id); } \ 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 1182a63..fe0b165 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 @@ -1,9 +1,9 @@ package cn.exrick.xboot.your.serviceimpl; +import cn.exrick.xboot.your.vo.Month; 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; @@ -13,7 +13,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; import java.util.List; /** @@ -34,8 +33,8 @@ } @Override - public List<Car> getAll2() { - return carMapper.getAll2(); + public IPage<Car> getAll2(Page initMpPage) { + return carMapper.getAll2(initMpPage); } public List<Car> getCarInfo(){ @@ -45,4 +44,9 @@ public List<Car> getCarInfo2(QueryWrapper<Car> wrapper){ return carMapper.getCarInfo2(wrapper); } + + @Override + public Month getCarCount(Integer year) { + return carMapper.getCarCount(year); + } } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICustomerServiceImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICustomerServiceImpl.java index f439be4..125711e 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICustomerServiceImpl.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/ICustomerServiceImpl.java @@ -1,5 +1,6 @@ package cn.exrick.xboot.your.serviceimpl; +import cn.exrick.xboot.your.vo.Month; import cn.exrick.xboot.your.mapper.CustomerMapper; import cn.exrick.xboot.your.entity.Customer; import cn.exrick.xboot.your.service.ICustomerService; @@ -9,9 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - -import java.util.ArrayList; -import java.util.List; /** * 鍟嗘埛琛ㄦ帴鍙e疄鐜� @@ -37,4 +35,9 @@ return (i*100)/i2; } } + + @Override + public Month getCustomerCount(Integer year) { + return customerMapper.getCustomerCount(year); + } } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IEventLogServiceImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IEventLogServiceImpl.java index 4ec4a95..01c46aa 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IEventLogServiceImpl.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IEventLogServiceImpl.java @@ -3,6 +3,7 @@ import cn.exrick.xboot.your.mapper.EventLogMapper; import cn.exrick.xboot.your.entity.EventLog; import cn.exrick.xboot.your.service.IEventLogService; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -23,4 +24,9 @@ @Autowired private EventLogMapper eventLogMapper; + + @Override + public Month getEventNum(int year, int type) { + return eventLogMapper.getEventNum(year,type); + } } \ No newline at end of file diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IOrderTaskServiceImpl.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IOrderTaskServiceImpl.java index 494ddd4..d88c30b 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IOrderTaskServiceImpl.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/serviceimpl/IOrderTaskServiceImpl.java @@ -3,6 +3,7 @@ import cn.exrick.xboot.your.mapper.OrderTaskMapper; import cn.exrick.xboot.your.entity.OrderTask; import cn.exrick.xboot.your.service.IOrderTaskService; +import cn.exrick.xboot.your.vo.Month; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import lombok.extern.slf4j.Slf4j; @@ -63,4 +64,8 @@ public List<OrderTask> sumTime(String id) { return orderTaskMapper.sumTime(id); } + @Override + public Month getSendNum(int year){ + return orderTaskMapper.getSendNum(year); + } } \ 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 index 9495e28..f58714d 100644 --- 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 @@ -16,4 +16,6 @@ private double oilWear; + private long total; + } -- Gitblit v1.9.1