From 1f753ffa37c3cf281f1835b467f1c99ce0bca769 Mon Sep 17 00:00:00 2001 From: PQZ Date: Tue, 13 Aug 2024 17:00:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E8=AE=A1=E7=AE=97=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/yudao/common/BaseConstants.java | 8 +- .../controller/admin/CarMainController.java | 15 ++ .../yudao/module/custom/entity/CarBrand.java | 6 + .../yudao/module/custom/entity/CarModel.java | 6 + .../module/custom/service/CarMainService.java | 2 +- .../service/impl/CarMainServiceImpl.java | 232 ++++++++++++++---- .../module/custom/vo/BrandAndModelDTO.java | 19 ++ .../yudao/module/custom/vo/CarBrandReqVO.java | 6 + .../yudao/module/custom/vo/CarModelReqVO.java | 6 + .../mapper/custom/CarBrandMapper.xml | 2 + .../mapper/custom/CarModelMapper.xml | 2 + 11 files changed, 253 insertions(+), 51 deletions(-) create mode 100644 dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/BrandAndModelDTO.java diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java index 59c1eadf..97f89400 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java @@ -25,10 +25,10 @@ public class BaseConstants { public static final String PASSWORD_DEFAULT = "123456"; /**租户下部门名称*/ public static final String DEPT_NAME_CORP_NAME = "政企客户"; - /**计算下次保险时间*/ - public static final String COMPUTE_TYPE_BX = "bx"; - /**计算下次保养时间*/ - public static final String COMPUTE_TYPE_BY = "by"; + /**私家车*/ + public static final String CAR_CATEGORY_PRIVATE = "01"; + /**货车*/ + public static final String CAR_CATEGORY_TRUCK = "02"; /**计算下次检测时间*/ public static final String COMPUTE_TYPE_JC = "jc"; /**企业管理-员工管理表名称*/ diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java index 28d76fe4..d6ce57a8 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java @@ -120,6 +120,21 @@ public class CarMainController { return success(pageResult); } + + /** + * 测算车辆下一次保养/检测/保险时间 + * @author PQZ + * @date 11:48 2024/8/13 + * @param pageReqVO CarMainReqVO + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + **/ + @PostMapping("/compute") + @Operation(summary = "测算车辆下一次保养/检测/保险时间") + public CommonResult compute(@RequestBody CarMainReqVO pageReqVO) { + CarMainRespVO result = carMainService.compute(pageReqVO); + return success(result); + } + /** * 导出车辆信息 * diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarBrand.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarBrand.java index 7224b1e4..7a9921f6 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarBrand.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarBrand.java @@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; import com.alibaba.excel.annotation.ExcelProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; + +import java.math.BigDecimal; import java.util.*; import java.time.LocalDateTime; import java.time.LocalDateTime; @@ -80,5 +82,9 @@ public class CarBrand extends BaseDO { */ @Schema(description = "品牌键值", example = "1") private String brandValue; + /**保养里程规则*/ + private BigDecimal ruleMileage; + /**保养时间规则(月)*/ + private Integer ruleTime; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarModel.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarModel.java index 17b0232f..7d4f6a62 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarModel.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/entity/CarModel.java @@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import com.alibaba.excel.annotation.ExcelProperty; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; + +import java.math.BigDecimal; import java.util.*; import java.time.LocalDateTime; import java.time.LocalDateTime; @@ -64,5 +66,9 @@ public class CarModel extends BaseDO { * 品牌id */ private String brandId; + /**保养里程规则*/ + private BigDecimal ruleMileage; + /**保养时间规则(月)*/ + private Integer ruleTime; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java index 5daf0a75..bfed4318 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/CarMainService.java @@ -76,7 +76,7 @@ public interface CarMainService extends IService { * @param reqVO TODO * @return java.time.LocalDateTime **/ - LocalDateTime compute(CarMainReqVO reqVO); + CarMainRespVO compute(CarMainReqVO reqVO); } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java index f7c567d4..e1c95b42 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/service/impl/CarMainServiceImpl.java @@ -3,15 +3,17 @@ package cn.iocoder.yudao.module.custom.service.impl; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.custom.entity.CarBrand; import cn.iocoder.yudao.module.custom.entity.CarMain; +import cn.iocoder.yudao.module.custom.entity.CarModel; import cn.iocoder.yudao.module.custom.entity.CustomerCar; import cn.iocoder.yudao.module.custom.mapper.CarMainMapper; import cn.iocoder.yudao.module.custom.mapper.CustomerCarMapper; +import cn.iocoder.yudao.module.custom.service.CarBrandService; import cn.iocoder.yudao.module.custom.service.CarMainService; +import cn.iocoder.yudao.module.custom.service.CarModelService; import cn.iocoder.yudao.module.custom.service.CustomerCarService; -import cn.iocoder.yudao.module.custom.vo.CarMainReqVO; -import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; -import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO; +import cn.iocoder.yudao.module.custom.vo.*; import cn.iocoder.yudao.module.label.entity.BusiLabel; import cn.iocoder.yudao.module.label.service.BusiLabelService; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -21,12 +23,14 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.math.BigDecimal; +import java.time.Duration; import java.time.LocalDateTime; +import java.time.Period; import java.util.ArrayList; import java.util.List; -import static cn.iocoder.yudao.common.BaseConstants.COMPUTE_TYPE_BX; -import static cn.iocoder.yudao.common.BaseConstants.CUS_SIGN_CAR; +import static cn.iocoder.yudao.common.BaseConstants.*; /** * 车辆信息 Service 实现类 @@ -34,7 +38,7 @@ import static cn.iocoder.yudao.common.BaseConstants.CUS_SIGN_CAR; * @author 后台管理员 */ @Service -public class CarMainServiceImpl extends ServiceImpl implements CarMainService{ +public class CarMainServiceImpl extends ServiceImpl implements CarMainService { @Autowired private CustomerCarMapper customerCarMapper; @@ -45,6 +49,11 @@ public class CarMainServiceImpl extends ServiceImpl impl @Autowired private BusiLabelService busiLabelService; + @Resource + private CarBrandService carBrandService; + @Resource + private CarModelService carModelService; + /** * 创建车辆信息 @@ -57,11 +66,14 @@ public class CarMainServiceImpl extends ServiceImpl impl //车牌号license_number,车架号vin,发动机号码engine_number 重复校验 int checkResult = isDataKeyValueRepeat(createReqVO); //如果查重失败 - if (checkResult != 0){ - switch (checkResult){ - case 1: return CommonResult.error(4051,"该车牌号已在系统中登记"); - case 2: return CommonResult.error(4052,"该车架号已在系统中登记"); - case 3: return CommonResult.error(4053,"该发动机号码已在系统中登记"); + if (checkResult != 0) { + switch (checkResult) { + case 1: + return CommonResult.error(4051, "该车牌号已在系统中登记"); + case 2: + return CommonResult.error(4052, "该车架号已在系统中登记"); + case 3: + return CommonResult.error(4053, "该发动机号码已在系统中登记"); } } @@ -71,10 +83,10 @@ public class CarMainServiceImpl extends ServiceImpl impl CarMain carMain = BeanUtils.toBean(createReqVO, CarMain.class); carMain.setCarBrand(brandAndModel.get(0)); //判断是否仅填入了品牌 - if(brandAndModel.size()>1){ + if (brandAndModel.size() > 1) { //填入了型号 carMain.setCarModel(brandAndModel.get(1)); - }else { + } else { carMain.setCarModel(""); } //todo 计算下次保养时间,下次保养里程,下次年检时间,保险到期时间 @@ -89,15 +101,18 @@ public class CarMainServiceImpl extends ServiceImpl impl * @param updateReqVO 更新信息 */ @Override - public CommonResult updateCarMain(CarMainReqVO updateReqVO){ + public CommonResult updateCarMain(CarMainReqVO updateReqVO) { //车牌号license_number,车架号vin,发动机号码engine_number 重复校验 int checkResult = isDataKeyValueRepeat(updateReqVO); //如果查重失败 - if (checkResult != 0){ - switch (checkResult){ - case 1: return CommonResult.error(4051,"该车牌号已在系统中登记"); - case 2: return CommonResult.error(4052,"该车架号已在系统中登记"); - case 3: return CommonResult.error(4053,"该发动机号码已在系统中登记"); + if (checkResult != 0) { + switch (checkResult) { + case 1: + return CommonResult.error(4051, "该车牌号已在系统中登记"); + case 2: + return CommonResult.error(4052, "该车架号已在系统中登记"); + case 3: + return CommonResult.error(4053, "该发动机号码已在系统中登记"); } } @@ -107,10 +122,10 @@ public class CarMainServiceImpl extends ServiceImpl impl CarMain carMain = BeanUtils.toBean(updateReqVO, CarMain.class); carMain.setCarBrand(brandAndModel.get(0)); //判断是否仅填入了品牌 - if(brandAndModel.size()>1){ + if (brandAndModel.size() > 1) { //填入了型号 carMain.setCarModel(brandAndModel.get(1)); - }else { + } else { carMain.setCarModel(""); } //todo 计算下次保养时间,下次保养里程,下次年检时间,保险到期时间 @@ -127,7 +142,7 @@ public class CarMainServiceImpl extends ServiceImpl impl public void deleteCarMain(String id) { //判断车辆是否发生过业务 CarMain target = baseMapper.selectById(id); - if (ObjectUtil.isEmpty(target.getRecentlyHandledBusiness()) && !"".equals(target.getRecentlyHandledBusiness()) ){ + if (ObjectUtil.isEmpty(target.getRecentlyHandledBusiness()) && !"".equals(target.getRecentlyHandledBusiness())) { } // 逻辑删除 @@ -172,7 +187,7 @@ public class CarMainServiceImpl extends ServiceImpl impl //取分页参数 Page page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); //分页查询 - return baseMapper.findPage(page,pageReqVO); + return baseMapper.findPage(page, pageReqVO); } /** @@ -185,7 +200,7 @@ public class CarMainServiceImpl extends ServiceImpl impl public void bindCustomAndCar(CarMainReqVO saveReqVO) { List customerCars = new ArrayList<>(); List cusList = saveReqVO.getCusList(); - if (ObjectUtil.isNotEmpty(cusList)){ + if (ObjectUtil.isNotEmpty(cusList)) { //组装数据 cusList.forEach(item -> { CustomerCar customerCar = new CustomerCar(); @@ -195,44 +210,169 @@ public class CarMainServiceImpl extends ServiceImpl impl customerCars.add(customerCar); }); } - customerCarService.bindCustomerCar(saveReqVO.getId(),CUS_SIGN_CAR,customerCars); + customerCarService.bindCustomerCar(saveReqVO.getId(), CUS_SIGN_CAR, customerCars); } /** * 测算车辆下一次保养/检测/保险时间 - * @author PQZ - * @date 7:45 2024/8/9 + * * @param reqVO CarMainReqVO * @return java.time.LocalDateTime + * @author PQZ + * @date 7:45 2024/8/9 **/ @Override - public LocalDateTime compute(CarMainReqVO reqVO) { - LocalDateTime resultTime; + public CarMainRespVO compute(CarMainReqVO reqVO) { + CarMainRespVO respVO = new CarMainRespVO(); + /*1、测算车辆保险到期时间,车辆保险购买时间不可为空*/ + if (null != reqVO.getInsuranceDate()) { + respVO.setInsuranceExpiryDate(reqVO.getInsuranceDate().plusYears(1)); + } + /*2、测算车辆年检临期(车辆类型及车辆注册时间不可为空)*/ + if (null != reqVO.getCarCategory() && null != reqVO.getCarRegisterDate()) { + respVO.setNextInspectionDate(computeNextInsp(reqVO.getInspectionDate(), reqVO.getCarCategory(), reqVO.getCarRegisterDate())); + } + /*3、测算车辆保养里程及下次保养时间*/ + List brandAndModel = reqVO.getBrandAndModel(); + //根据品牌型号获取保养规则 + BrandAndModelDTO rule = getBrandAndModel(brandAndModel); + //设置保养里程 + if (null != reqVO.getMaintenanceMileage()) { + respVO.setNextMaintenanceMileage(reqVO.getMaintenanceMileage().add(rule.getRuleMileage())); + } + //设置保养时间 + if (null != reqVO.getMaintenanceDate()) { + respVO.setNextMaintenanceDate(reqVO.getMaintenanceDate().plusMonths(rule.getRuleTime())); + } + return respVO; + } - return null; + /** + * 根据品牌型号获取保养规则 + * + * @param brandAndModel List品牌型号集合 + * @return cn.iocoder.yudao.module.custom.vo.BrandAndModelDTO + * @author PQZ + * @date 11:41 2024/8/13 + **/ + private BrandAndModelDTO getBrandAndModel(List brandAndModel) { + BrandAndModelDTO result = new BrandAndModelDTO(); + int ruleTime = 0; + BigDecimal ruleMileage = new BigDecimal(0); + if (null != brandAndModel && brandAndModel.size() > 0) { + //优先以车辆型号绑定的里程及保养时间为准 + if (brandAndModel.size() > 1) { + //取车辆型号id + String modelId = brandAndModel.get(1); + //查询车辆型号 + CarModel carModel = carModelService.getById(modelId); + if (null != carModel) { + ruleTime = carModel.getRuleTime(); + ruleMileage = carModel.getRuleMileage(); + } + } else { + //没有选择型号情况,以车辆品牌绑定规则为准 + String brandId = brandAndModel.get(0); + //查询车辆品牌 + CarBrand carBrand = carBrandService.getById(brandId); + if (null != carBrand){ + ruleTime = carBrand.getRuleTime(); + ruleMileage = carBrand.getRuleMileage(); + } + } + } + result.setRuleTime(ruleTime); + result.setRuleMileage(ruleMileage); + return result; + } + + /** + * 计算车辆下次年检时间 + * + * @param inspectionDate 年检时间 + * @param carCategory 车辆类型 + * @param carRegisterDate 车辆类别 + * @return java.time.LocalDateTime + * @author PQZ + * @date 9:51 2024/8/13 + **/ + private LocalDateTime computeNextInsp(LocalDateTime inspectionDate, String carCategory, LocalDateTime carRegisterDate) { + /*1、基础参数定义*/ + LocalDateTime resultTime = null; + //车辆是否存在年检时间 + boolean isInspNull = null != inspectionDate; + //当前时间 + LocalDateTime currentTime = LocalDateTime.now(); + //计算当前时间与车辆注册日期的差值 + Period period = Period.between(carRegisterDate.toLocalDate(), currentTime.toLocalDate()); + //年份差值 + int yearPeriod = period.getYears(); + + if (CAR_CATEGORY_PRIVATE.equals(carCategory)) { + /*2、计算私家车类型车辆下次年检日期*/ + //私家车计算规则,第6、10年需要年检,过后1年1检 + if (yearPeriod < 6) { + //小于6年情况在第六年车检 + resultTime = carRegisterDate.plusYears(6); + } else if (yearPeriod < 10) { + //大于6年小于10年情况 + resultTime = carRegisterDate.plusYears(10); + } else { + //大于10情况,一年一检 + if (isInspNull) { + resultTime = inspectionDate.plusYears(1); + } + } + } else if (CAR_CATEGORY_TRUCK.equals(carCategory)) { + /*2、计算货车类型车辆下次年检日期*/ + //货车测算必须传入年检时间 + if (isInspNull) { + if (yearPeriod <= 10) { + //10年内,一年一检 + resultTime = inspectionDate.plusYears(1); + } else { + //大于10年半年一检 + resultTime = inspectionDate.plusMonths(6); + } + } + } else { + /*3、计算非营运车辆下次年检日期*/ + //非营运车辆必须传入年检时间 + if (isInspNull) { + if (yearPeriod <= 5) { + //5年内,一年一检 + resultTime = inspectionDate.plusYears(1); + } else { + //大于5年半年一检 + resultTime = inspectionDate.plusMonths(6); + } + } + } + return resultTime; } /** * 车牌号,车架号,发动机号码 查重 + * * @param reqVO * @return 0无重复,1车牌号重复,2车架号重复,发动机号码重复 */ - private int isDataKeyValueRepeat(CarMainReqVO reqVO){ + private int isDataKeyValueRepeat(CarMainReqVO reqVO) { //车牌号license_number 查重 - if(ObjectUtil.isNotEmpty(reqVO.getLicenseNumber())){ + if (ObjectUtil.isNotEmpty(reqVO.getLicenseNumber())) { CarMain target = new CarMain(); target.setLicenseNumber(reqVO.getLicenseNumber()); List results = baseMapper.isDataKeyValueRepeat(target); //判断是否登记过这个车牌号的车辆 - if (results.size()>0){ + if (results.size() > 0) { //无id是新增,有相应登记记录 - if(ObjectUtil.isEmpty(reqVO.getId()) ){ + if (ObjectUtil.isEmpty(reqVO.getId())) { return 1; } //有id是修改,如果登记过,比较id查验是否是当前要修改的车辆本身 - for (CarMain item: results) { - if (!item.getId().equals(reqVO.getId())){ + for (CarMain item : results) { + if (!item.getId().equals(reqVO.getId())) { return 1; } @@ -241,19 +381,19 @@ public class CarMainServiceImpl extends ServiceImpl impl } //车架号vin 查重 } - if (ObjectUtil.isNotEmpty(reqVO.getVin())){ + if (ObjectUtil.isNotEmpty(reqVO.getVin())) { CarMain target = new CarMain(); target.setVin(reqVO.getVin()); List results = baseMapper.isDataKeyValueRepeat(target); //判断是否登记过这个车架号的车辆 - if (results.size()>0){ + if (results.size() > 0) { //无id是新增,有相应登记记录 - if(ObjectUtil.isEmpty(reqVO.getId()) ){ + if (ObjectUtil.isEmpty(reqVO.getId())) { return 2; } //有id是修改,如果登记过,比较id查验是否是当前要修改的车辆本身 - for (CarMain item: results) { - if (!item.getId().equals(reqVO.getId())){ + for (CarMain item : results) { + if (!item.getId().equals(reqVO.getId())) { return 2; } @@ -262,19 +402,19 @@ public class CarMainServiceImpl extends ServiceImpl impl } //发动机号码engine_number 查重 } - if (ObjectUtil.isNotEmpty(reqVO.getEngineNumber())){ + if (ObjectUtil.isNotEmpty(reqVO.getEngineNumber())) { CarMain target = new CarMain(); target.setEngineNumber(reqVO.getEngineNumber()); List results = baseMapper.isDataKeyValueRepeat(target); //判断是否登记过这个发动机号的车辆 - if (results.size()>0){ + if (results.size() > 0) { //无id是新增,有相应登记记录 - if(ObjectUtil.isEmpty(reqVO.getId()) ){ + if (ObjectUtil.isEmpty(reqVO.getId())) { return 3; } //有id是修改,如果登记过,比较id查验是否是当前要修改的车辆本身 - for (CarMain item: results) { - if (!item.getId().equals(reqVO.getId())){ + for (CarMain item : results) { + if (!item.getId().equals(reqVO.getId())) { return 3; } diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/BrandAndModelDTO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/BrandAndModelDTO.java new file mode 100644 index 00000000..7e328d52 --- /dev/null +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/BrandAndModelDTO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.custom.vo; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * 保养里程及规则DTO + * @author PQZ + * @date 11:37 2024/8/13 +**/ +@Data +public class BrandAndModelDTO{ + /**保养里程规则*/ + private BigDecimal ruleMileage; + /**保养时间规则(月)*/ + private Integer ruleTime; + +} \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarBrandReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarBrandReqVO.java index 129f2082..894b9f59 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarBrandReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarBrandReqVO.java @@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.custom.vo; import com.alibaba.excel.annotation.ExcelProperty; import lombok.*; + +import java.math.BigDecimal; import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; import cn.iocoder.yudao.framework.common.pojo.PageParam; @@ -47,5 +49,9 @@ public class CarBrandReqVO extends PageParam { @Schema(description = "品牌键值") private String brandValue; + /**保养里程规则*/ + private BigDecimal ruleMileage; + /**保养时间规则(月)*/ + private Integer ruleTime; } \ No newline at end of file diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelReqVO.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelReqVO.java index 7ecf2663..4dd35b94 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelReqVO.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/vo/CarModelReqVO.java @@ -2,6 +2,8 @@ package cn.iocoder.yudao.module.custom.vo; import com.alibaba.excel.annotation.ExcelProperty; import lombok.*; + +import java.math.BigDecimal; import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; import cn.iocoder.yudao.framework.common.pojo.PageParam; @@ -41,6 +43,10 @@ public class CarModelReqVO extends PageParam { @Schema(description = "品牌id", example = "李四") private String brandId; + /**保养里程规则*/ + private BigDecimal ruleMileage; + /**保养时间规则(月)*/ + private Integer ruleTime; diff --git a/dl-module-base/src/main/resources/mapper/custom/CarBrandMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CarBrandMapper.xml index 7eec2559..c68dea5b 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CarBrandMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CarBrandMapper.xml @@ -15,6 +15,8 @@ tbcb.logo_img, tbcb.english_name, tbcb.abb_name, + tbcb.rule_mileage, + tbcb.rule_time, tbcb.brand_value, tbcb.deleted, tbcb.tenant_id diff --git a/dl-module-base/src/main/resources/mapper/custom/CarModelMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CarModelMapper.xml index d9cf8579..075c2ac0 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CarModelMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CarModelMapper.xml @@ -7,6 +7,8 @@ tbcmod.sort, tbcmod.model_name, tbcmod.model_value, + tbcmod.rule_mileage, + tbcmod.rule_time, tbcmod.remark, tbcmod.creator, tbcmod.create_time,