表格导出
This commit is contained in:
parent
cd258a589c
commit
de22fa9e2e
@ -39,4 +39,10 @@ public class DictBaseConstants {
|
|||||||
public static final String MEMBER_CAR = "member_car";
|
public static final String MEMBER_CAR = "member_car";
|
||||||
/** 活动类型 */
|
/** 活动类型 */
|
||||||
public static final String MEMBER_ACTIVE = "member_active";
|
public static final String MEMBER_ACTIVE = "member_active";
|
||||||
|
/** 品牌类型 */
|
||||||
|
public static final String DICT_BRAND_TYPE = "brand_type";
|
||||||
|
/** 车辆类别 */
|
||||||
|
public static final String DICT_CAR_CATEGORY = "car_category";
|
||||||
|
/** 车辆性质 */
|
||||||
|
public static final String DICT_CAR_NATURE = "car_nature";
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
package cn.iocoder.yudao.module.custom.controller.admin;
|
package cn.iocoder.yudao.module.custom.controller.admin;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||||
import cn.iocoder.yudao.module.custom.service.CarMainService;
|
import cn.iocoder.yudao.module.custom.service.CarMainService;
|
||||||
import cn.iocoder.yudao.module.custom.service.UserCarService;
|
import cn.iocoder.yudao.module.custom.service.UserCarService;
|
||||||
import cn.iocoder.yudao.module.custom.vo.CarMainReqVO;
|
import cn.iocoder.yudao.module.custom.vo.*;
|
||||||
import cn.iocoder.yudao.module.custom.vo.CarMainRespVO;
|
|
||||||
import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO;
|
|
||||||
import cn.iocoder.yudao.module.label.service.BusiLabelService;
|
import cn.iocoder.yudao.module.label.service.BusiLabelService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -25,6 +25,7 @@ import javax.servlet.http.*;
|
|||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
@ -32,6 +33,7 @@ import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|||||||
|
|
||||||
import static cn.iocoder.yudao.common.BaseConstants.TABLE_BASE_CAR_MAIN;
|
import static cn.iocoder.yudao.common.BaseConstants.TABLE_BASE_CAR_MAIN;
|
||||||
import static cn.iocoder.yudao.common.BaseConstants.TABLE_BASE_CUSTOMER_MAIN;
|
import static cn.iocoder.yudao.common.BaseConstants.TABLE_BASE_CUSTOMER_MAIN;
|
||||||
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
@ -167,7 +169,7 @@ public class CarMainController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出车辆信息 Excel")
|
@Operation(summary = "导出车辆信息 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('base:car-main:customer')")
|
@PreAuthorize("@ss.hasPermission('base:car-main:export')")
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportCarMainExcel(CarMainReqVO pageReqVO, HttpServletResponse response) throws IOException {
|
public void exportCarMainExcel(CarMainReqVO pageReqVO, HttpServletResponse response) throws IOException {
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
@ -233,4 +235,94 @@ public class CarMainController {
|
|||||||
public CommonResult<?> vehicleLicenseOCR(@RequestBody String imagePath) throws Exception {
|
public CommonResult<?> vehicleLicenseOCR(@RequestBody String imagePath) throws Exception {
|
||||||
return CommonResult.success(userCarService.vehicleLicenseOCR(imagePath));
|
return CommonResult.success(userCarService.vehicleLicenseOCR(imagePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据 年检临期
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:38 2024/12/3
|
||||||
|
* @param pageReqVO 请求对象
|
||||||
|
**/
|
||||||
|
@GetMapping("/export-inspection")
|
||||||
|
@Operation(summary = "导出数据")
|
||||||
|
public void exportInspection(CarMainReqVO pageReqVO, HttpServletResponse response)throws IOException{
|
||||||
|
int pageNo = 1, pageSize = 1000;
|
||||||
|
List<InspectionExportVO> list = new ArrayList<>();
|
||||||
|
Page<CarMainReqVO> page = new Page<>(pageNo, pageSize);
|
||||||
|
do {
|
||||||
|
IPage<CarMainRespVO> carMainRespVOIPage = carMainService.remindCarMainPage2(page, pageReqVO);
|
||||||
|
List<CarMainRespVO> records = carMainRespVOIPage.getRecords();
|
||||||
|
if (CollUtil.isEmpty(records)){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
List<InspectionExportVO> convertedRecords = records.stream().map(item -> BeanUtils.toBean(item, InspectionExportVO.class)).collect(Collectors.toList());
|
||||||
|
list.addAll(convertedRecords);
|
||||||
|
pageNo++;
|
||||||
|
page.setCurrent(pageNo);
|
||||||
|
}while (true);
|
||||||
|
if (CollUtil.isEmpty(list)){
|
||||||
|
throw exception0(500, "没有数据可以导出");
|
||||||
|
}
|
||||||
|
ExcelUtils.write(response, "年检临期提醒数据.xls", "数据", InspectionExportVO.class, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据 保养临期
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:19 2024/12/3
|
||||||
|
* @param pageReqVO 请求对象
|
||||||
|
**/
|
||||||
|
@GetMapping("/export-maintenance")
|
||||||
|
@Operation(summary = "导出数据")
|
||||||
|
public void exportMaintenance(CarMainReqVO pageReqVO, HttpServletResponse response)throws IOException{
|
||||||
|
int pageNo = 1, pageSize = 1000;
|
||||||
|
List<MaintenanceExportVO> list = new ArrayList<>();
|
||||||
|
Page<CarMainReqVO> page = new Page<>(pageNo, pageSize);
|
||||||
|
do {
|
||||||
|
IPage<CarMainRespVO> carMainRespVOIPage = carMainService.remindCarMainPage2(page, pageReqVO);
|
||||||
|
List<CarMainRespVO> records = carMainRespVOIPage.getRecords();
|
||||||
|
if (CollUtil.isEmpty(records)){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
List<MaintenanceExportVO> convertedRecords = records.stream().map(item -> BeanUtils.toBean(item, MaintenanceExportVO.class)).collect(Collectors.toList());
|
||||||
|
list.addAll(convertedRecords);
|
||||||
|
pageNo++;
|
||||||
|
page.setCurrent(pageNo);
|
||||||
|
}while (true);
|
||||||
|
if (CollUtil.isEmpty(list)){
|
||||||
|
throw exception0(500, "没有数据可以导出");
|
||||||
|
}
|
||||||
|
ExcelUtils.write(response, "保养临期提醒数据.xls", "数据", MaintenanceExportVO.class, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据 保险临期
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:19 2024/12/3
|
||||||
|
* @param pageReqVO 请求对象
|
||||||
|
**/
|
||||||
|
@GetMapping("/export-insurance")
|
||||||
|
@Operation(summary = "导出数据")
|
||||||
|
public void exportInsurance(CarMainReqVO pageReqVO, HttpServletResponse response)throws IOException{
|
||||||
|
int pageNo = 1, pageSize = 1000;
|
||||||
|
List<InsuranceExportVO> list = new ArrayList<>();
|
||||||
|
Page<CarMainReqVO> page = new Page<>(pageNo, pageSize);
|
||||||
|
do {
|
||||||
|
IPage<CarMainRespVO> carMainRespVOIPage = carMainService.remindCarMainPage2(page, pageReqVO);
|
||||||
|
List<CarMainRespVO> records = carMainRespVOIPage.getRecords();
|
||||||
|
if (CollUtil.isEmpty(records)){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
List<InsuranceExportVO> convertedRecords = records.stream().map(item -> BeanUtils.toBean(item, InsuranceExportVO.class)).collect(Collectors.toList());
|
||||||
|
list.addAll(convertedRecords);
|
||||||
|
pageNo++;
|
||||||
|
page.setCurrent(pageNo);
|
||||||
|
}while (true);
|
||||||
|
if (CollUtil.isEmpty(list)){
|
||||||
|
throw exception0(500, "没有数据可以导出");
|
||||||
|
}
|
||||||
|
ExcelUtils.write(response, "保险临期提醒数据.xls", "数据", InsuranceExportVO.class, list);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.custom.entity;
|
package cn.iocoder.yudao.module.custom.entity;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -12,6 +13,8 @@ import java.time.LocalDateTime;
|
|||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.common.DictBaseConstants.DICT_BRAND_TYPE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆品牌维护 DO
|
* 车辆品牌维护 DO
|
||||||
*
|
*
|
||||||
@ -76,6 +79,7 @@ public class CarBrand extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "品牌类型 (01国产车 02韩系车 03日系车 04美系车 05欧系车 06德系车)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "品牌类型 (01国产车 02韩系车 03日系车 04美系车 05欧系车 06德系车)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
@ExcelProperty(value = "品牌类型 (01国产车 02韩系车 03日系车 04美系车 05欧系车 06德系车)", converter = DictConvert.class)
|
@ExcelProperty(value = "品牌类型 (01国产车 02韩系车 03日系车 04美系车 05欧系车 06德系车)", converter = DictConvert.class)
|
||||||
|
@DictFormat(DICT_BRAND_TYPE)
|
||||||
private String brandType;
|
private String brandType;
|
||||||
/**
|
/**
|
||||||
* 品牌键值
|
* 品牌键值
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package cn.iocoder.yudao.module.custom.entity;
|
package cn.iocoder.yudao.module.custom.entity;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
@ -12,6 +15,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.common.DictBaseConstants.*;
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,14 +40,17 @@ public class CarMain extends TenantBaseDO {
|
|||||||
/**
|
/**
|
||||||
* 发动机号码
|
* 发动机号码
|
||||||
*/
|
*/
|
||||||
|
@ExcelProperty("发动机号码")
|
||||||
private String engineNumber;
|
private String engineNumber;
|
||||||
/**
|
/**
|
||||||
* 车架号
|
* 车架号
|
||||||
*/
|
*/
|
||||||
|
@ExcelProperty("车架号")
|
||||||
private String vin;
|
private String vin;
|
||||||
/**
|
/**
|
||||||
* 车牌号
|
* 车牌号
|
||||||
*/
|
*/
|
||||||
|
@ExcelProperty("车牌号")
|
||||||
private String licenseNumber;
|
private String licenseNumber;
|
||||||
/**
|
/**
|
||||||
* 车辆型号
|
* 车辆型号
|
||||||
@ -106,16 +113,21 @@ public class CarMain extends TenantBaseDO {
|
|||||||
/**
|
/**
|
||||||
* 车辆性质:营运 非营运等
|
* 车辆性质:营运 非营运等
|
||||||
*/
|
*/
|
||||||
|
@ExcelProperty(value = "车辆性质", converter = DictConvert.class)
|
||||||
|
@DictFormat(DICT_CAR_NATURE)
|
||||||
private String carNature;
|
private String carNature;
|
||||||
/**
|
/**
|
||||||
* 车辆类别:私家车 货车 教练车 公务车 出租车
|
* 车辆类别:私家车 货车 教练车 公务车 出租车
|
||||||
*/
|
*/
|
||||||
|
@ExcelProperty(value = "车辆类别", converter = DictConvert.class)
|
||||||
|
@DictFormat(DICT_CAR_CATEGORY)
|
||||||
private String carCategory;
|
private String carCategory;
|
||||||
/**
|
/**
|
||||||
* 车辆注册日期
|
* 车辆注册日期
|
||||||
*/
|
*/
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("车辆注册日期")
|
||||||
private LocalDateTime carRegisterDate;
|
private LocalDateTime carRegisterDate;
|
||||||
/**
|
/**
|
||||||
* 行驶证图片
|
* 行驶证图片
|
||||||
@ -124,11 +136,15 @@ public class CarMain extends TenantBaseDO {
|
|||||||
/**
|
/**
|
||||||
* 最近办理业务
|
* 最近办理业务
|
||||||
*/
|
*/
|
||||||
|
@ExcelProperty(value = "最近办理业务", converter = DictConvert.class)
|
||||||
|
@DictFormat(DICT_CUS_BUSI_TYPE)
|
||||||
private String recentlyHandledBusiness;
|
private String recentlyHandledBusiness;
|
||||||
/**
|
/**
|
||||||
* 最近办理业务的时间
|
* 最近办理业务的时间
|
||||||
*/
|
*/
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("最近业务时间")
|
||||||
private LocalDateTime recentlyHandleBusinessTime;
|
private LocalDateTime recentlyHandleBusinessTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import cn.iocoder.yudao.module.custom.entity.CarMain;
|
|||||||
import cn.iocoder.yudao.module.custom.vo.CarMainReqVO;
|
import cn.iocoder.yudao.module.custom.vo.CarMainReqVO;
|
||||||
import cn.iocoder.yudao.module.custom.vo.CarMainRespVO;
|
import cn.iocoder.yudao.module.custom.vo.CarMainRespVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -82,6 +83,15 @@ public interface CarMainService extends IService<CarMain> {
|
|||||||
**/
|
**/
|
||||||
IPage<CarMainRespVO> remindCarMainPage(CarMainReqVO pageReqVO);
|
IPage<CarMainRespVO> remindCarMainPage(CarMainReqVO pageReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外提供一个导出用
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:03 2024/12/3
|
||||||
|
* @param pageReqVO 查询条件
|
||||||
|
**/
|
||||||
|
IPage<CarMainRespVO> remindCarMainPage2(Page<CarMainReqVO> page, CarMainReqVO pageReqVO);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定车辆信息
|
* 绑定车辆信息
|
||||||
|
@ -242,6 +242,18 @@ public class CarMainServiceImpl extends ServiceImpl<CarMainMapper, CarMain> impl
|
|||||||
return baseMapper.remindCarMainPage(page,pageReqVO);
|
return baseMapper.remindCarMainPage(page,pageReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对外提供一个导出用
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:03 2024/12/3
|
||||||
|
* @param pageReqVO 查询条件
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public IPage<CarMainRespVO> remindCarMainPage2(Page<CarMainReqVO> page, CarMainReqVO pageReqVO){
|
||||||
|
return baseMapper.remindCarMainPage(page, pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定客户信息
|
* 绑定客户信息
|
||||||
*
|
*
|
||||||
|
@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.custom.vo;
|
|||||||
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
import cn.iocoder.yudao.module.custom.entity.CarMain;
|
||||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||||
import cn.iocoder.yudao.module.label.entity.BusiLabel;
|
import cn.iocoder.yudao.module.label.entity.BusiLabel;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -10,6 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import com.alibaba.excel.annotation.*;
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 车辆信息 Response VO")
|
@Schema(description = "管理后台 - 车辆信息 Response VO")
|
||||||
@ -27,8 +29,10 @@ public class CarMainRespVO extends CarMain {
|
|||||||
@Schema(description = "标签信息")
|
@Schema(description = "标签信息")
|
||||||
List<BusiLabel> labelList;
|
List<BusiLabel> labelList;
|
||||||
/**品牌字符*/
|
/**品牌字符*/
|
||||||
|
@ExcelProperty("车辆品牌")
|
||||||
String brandStr;
|
String brandStr;
|
||||||
/**型号字符*/
|
/**型号字符*/
|
||||||
|
@ExcelProperty("车辆型号")
|
||||||
String modelStr;
|
String modelStr;
|
||||||
/**客户名称*/
|
/**客户名称*/
|
||||||
String cusName;
|
String cusName;
|
||||||
@ -46,4 +50,9 @@ public class CarMainRespVO extends CarMain {
|
|||||||
private String brandType;
|
private String brandType;
|
||||||
/** 车辆logo */
|
/** 车辆logo */
|
||||||
private String logoImg;
|
private String logoImg;
|
||||||
|
/** 登记时间 */
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("登记时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
}
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package cn.iocoder.yudao.module.custom.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于车检临期数据导出VO
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:49 2024/12/3
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class InspectionExportVO extends SyntheticExportVO{
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("上次年检时间")
|
||||||
|
private LocalDateTime inspectionDate;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("下次年检时间")
|
||||||
|
private LocalDateTime nextInspectionDate;
|
||||||
|
|
||||||
|
@ExcelProperty("临近年检天数")
|
||||||
|
private String njCont;
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package cn.iocoder.yudao.module.custom.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户导出保险临期提醒数据VO
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:23 2024/12/3
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class InsuranceExportVO extends SyntheticExportVO{
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("保险日期")
|
||||||
|
private LocalDateTime insuranceDate;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("保险到期日期")
|
||||||
|
private LocalDateTime insuranceExpiryDate;
|
||||||
|
|
||||||
|
@ExcelProperty("保险到期天数")
|
||||||
|
private String bxCont;
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package cn.iocoder.yudao.module.custom.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于保养临期提醒VO
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 12:14 2024/12/3
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class MaintenanceExportVO extends SyntheticExportVO{
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("保养日期")
|
||||||
|
private LocalDateTime maintenanceDate;
|
||||||
|
|
||||||
|
@ExcelProperty("保养里程")
|
||||||
|
private BigDecimal maintenanceMileage;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||||
|
@ExcelProperty("下次保养日期")
|
||||||
|
private LocalDateTime nextMaintenanceDate;
|
||||||
|
|
||||||
|
@ExcelProperty("下次保养里程")
|
||||||
|
private BigDecimal nextMaintenanceMileage;
|
||||||
|
|
||||||
|
@ExcelProperty("临近保养天数")
|
||||||
|
private String byCont;
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package cn.iocoder.yudao.module.custom.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.common.DictBaseConstants.DICT_CAR_CATEGORY;
|
||||||
|
import static cn.iocoder.yudao.common.DictBaseConstants.DICT_CAR_NATURE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于车检临期、保养临期、保险临期数据导出公共数据VO
|
||||||
|
*
|
||||||
|
* @author 小李
|
||||||
|
* @date 11:49 2024/12/3
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class SyntheticExportVO {
|
||||||
|
|
||||||
|
@ExcelProperty("车牌号")
|
||||||
|
private String licenseNumber;
|
||||||
|
|
||||||
|
@ExcelProperty("车辆品牌")
|
||||||
|
String brandStr;
|
||||||
|
|
||||||
|
@ExcelProperty("车辆型号")
|
||||||
|
String modelStr;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "车辆类别", converter = DictConvert.class)
|
||||||
|
@DictFormat(DICT_CAR_CATEGORY)
|
||||||
|
private String carCategory;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "车辆性质", converter = DictConvert.class)
|
||||||
|
@DictFormat(DICT_CAR_NATURE)
|
||||||
|
private String carNature;
|
||||||
|
|
||||||
|
@ExcelProperty("联系人")
|
||||||
|
private String cusName;
|
||||||
|
|
||||||
|
@ExcelProperty("联系方式")
|
||||||
|
private String phoneNumber;
|
||||||
|
}
|
@ -47,6 +47,8 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
|
|||||||
return selectPage(reqVO, new LambdaQueryWrapperX<AdminUserDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<AdminUserDO>()
|
||||||
.likeIfPresent(AdminUserDO::getUsername, reqVO.getUsername())
|
.likeIfPresent(AdminUserDO::getUsername, reqVO.getUsername())
|
||||||
.likeIfPresent(AdminUserDO::getMobile, reqVO.getMobile())
|
.likeIfPresent(AdminUserDO::getMobile, reqVO.getMobile())
|
||||||
|
// 这里加了个模糊查询,用户名称搜索时可以模糊查用户昵称
|
||||||
|
.likeIfPresent(AdminUserDO::getNickname, reqVO.getUsername())
|
||||||
.eqIfPresent(AdminUserDO::getStatus, reqVO.getStatus())
|
.eqIfPresent(AdminUserDO::getStatus, reqVO.getStatus())
|
||||||
.betweenIfPresent(AdminUserDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(AdminUserDO::getCreateTime, reqVO.getCreateTime())
|
||||||
.inIfPresent(AdminUserDO::getDeptId, deptIds)
|
.inIfPresent(AdminUserDO::getDeptId, deptIds)
|
||||||
|
Loading…
Reference in New Issue
Block a user