Compare commits
	
		
			No commits in common. "9ac4b2f05d5b4c235090bacb7693983865102c3c" and "dc74f8f0b09d7a96ee2d9abe67034e91a2a15cfe" have entirely different histories.
		
	
	
		
			9ac4b2f05d
			...
			dc74f8f0b0
		
	
		
| @ -120,30 +120,14 @@ public class CarMainController { | ||||
|         return success(pageResult); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 保险/年检/保养提醒列表 | ||||
|      * | ||||
|      * @param pageReqVO CarMainReqVO(入参) | ||||
|      * @return cn.iocoder.yudao.framework.common.pojo.CommonResult<com.baomidou.mybatisplus.core.metadata.IPage < cn.iocoder.yudao.module.custom.vo.CarMainRespVO>> | ||||
|      * @author PQZ | ||||
|      * @date 11:01 2024/8/14 | ||||
|      **/ | ||||
|     @GetMapping("/remindCarMainPage") | ||||
|     @Operation(summary = "获得车辆信息分页") | ||||
|     public CommonResult<IPage<CarMainRespVO>> remindCarMainPage(CarMainReqVO pageReqVO) { | ||||
|         IPage<CarMainRespVO> pageResult = carMainService.remindCarMainPage(pageReqVO); | ||||
|         return success(pageResult); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * 测算车辆下一次保养/检测/保险时间 | ||||
|      * | ||||
|      * @param pageReqVO CarMainReqVO | ||||
|      * @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.custom.vo.CarMainRespVO> | ||||
|      * @author PQZ | ||||
|      * @date 11:48 2024/8/13 | ||||
|      **/ | ||||
|      * @param pageReqVO CarMainReqVO | ||||
|      * @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.custom.vo.CarMainRespVO> | ||||
|     **/ | ||||
|     @PostMapping("/compute") | ||||
|     @Operation(summary = "测算车辆下一次保养/检测/保险时间") | ||||
|     public CommonResult<CarMainRespVO> compute(@RequestBody CarMainReqVO pageReqVO) { | ||||
| @ -151,7 +135,6 @@ public class CarMainController { | ||||
|         return success(result); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * 导出车辆信息 | ||||
|      * | ||||
|  | ||||
| @ -29,17 +29,6 @@ public interface CarMainMapper extends BaseMapper<CarMain> { | ||||
|      */ | ||||
|     IPage<CarMainRespVO> findPage(Page<CarMainReqVO> page, @Param("dto") CarMainReqVO pageReqVO); | ||||
| 
 | ||||
|     /** | ||||
|      * 保险/年检/保养提醒列表 | ||||
|      * | ||||
|      * @param page      Page<CarMainReqVO> | ||||
|      * @param pageReqVO CarMainReqVO | ||||
|      * @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.custom.vo.CarMainRespVO> | ||||
|      * @author PQZ | ||||
|      * @date 9:12 2024/8/14 | ||||
|      **/ | ||||
|     IPage<CarMainRespVO> remindCarMainPage(Page<CarMainReqVO> page, @Param("entity") CarMainReqVO pageReqVO); | ||||
| 
 | ||||
|     /** | ||||
|      * 获得车辆信息分页 | ||||
|      * | ||||
| @ -49,6 +38,7 @@ public interface CarMainMapper extends BaseMapper<CarMain> { | ||||
|     CarMainRespVO findOne(@Param("id") String id); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * 车牌号,车架号,发动机号码 查重 | ||||
|      * | ||||
|  | ||||
| @ -60,15 +60,6 @@ public interface CarMainService extends IService<CarMain> { | ||||
|      */ | ||||
|     IPage<CarMainRespVO> getCarMainPage(CarMainReqVO pageReqVO); | ||||
| 
 | ||||
|     /** | ||||
|      * 保险/年检/保养提醒列表 | ||||
|      * @author PQZ | ||||
|      * @date 9:08 2024/8/14 | ||||
|      * @param pageReqVO 查询条件 | ||||
|      * @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.custom.vo.CarMainRespVO> | ||||
|     **/ | ||||
|     IPage<CarMainRespVO> remindCarMainPage(CarMainReqVO pageReqVO); | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * 绑定车辆信息 | ||||
|  | ||||
| @ -190,20 +190,6 @@ public class CarMainServiceImpl extends ServiceImpl<CarMainMapper, CarMain> impl | ||||
|         return baseMapper.findPage(page, pageReqVO); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 保险/年检/保养提醒列表 | ||||
|      * | ||||
|      * @param pageReqVO 查询条件 | ||||
|      * @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.custom.vo.CarMainRespVO> | ||||
|      * @author PQZ | ||||
|      * @date 9:08 2024/8/14 | ||||
|      **/ | ||||
|     @Override | ||||
|     public IPage<CarMainRespVO> remindCarMainPage(CarMainReqVO pageReqVO) { | ||||
|         Page<CarMainReqVO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); | ||||
|         return baseMapper.remindCarMainPage(page,pageReqVO); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 绑定客户信息 | ||||
|      * | ||||
|  | ||||
| @ -41,8 +41,4 @@ public class CarMainReqVO extends CarMain { | ||||
|     List<BusiLabel> labelList; | ||||
|     /**车辆品牌型号数组*/ | ||||
|     List<String> brandAndModel; | ||||
|     /**客户名称*/ | ||||
|     String cusName; | ||||
|     /**查询标识(01:年检临期;02:保养临期;03:保险临期)*/ | ||||
|     String selectSign; | ||||
| } | ||||
| @ -17,6 +17,9 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ | ||||
| @ExcelIgnoreUnannotated | ||||
| public class CarMainRespVO extends CarMain { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     /**是否车主(0否1是)*/ | ||||
|     @Schema(description = "是否车主(0否1是)") | ||||
|     private String isOwner; | ||||
| @ -30,16 +33,8 @@ public class CarMainRespVO extends CarMain { | ||||
|     String brandStr; | ||||
|     /**型号字符*/ | ||||
|     String modelStr; | ||||
|     /**客户名称*/ | ||||
|     String cusName; | ||||
|     /**电话号码*/ | ||||
|     String phoneNumber; | ||||
|     /**年检剩余*/ | ||||
|     String njCont; | ||||
|     /**保险剩余*/ | ||||
|     String byCont; | ||||
|     /**保险剩余*/ | ||||
|     String bxCont; | ||||
| 
 | ||||
| 
 | ||||
|     /**车辆品牌型号数组*/ | ||||
|     List<String> brandAndModel; | ||||
| 
 | ||||
|  | ||||
| @ -109,40 +109,5 @@ | ||||
|         </if> | ||||
| 
 | ||||
|     </select> | ||||
|     <select id="remindCarMainPage" resultType="cn.iocoder.yudao.module.custom.vo.CarMainRespVO"> | ||||
|         SELECT | ||||
|             <include refid="baseCarMainColumn"></include>, | ||||
|             bcc.is_owner AS isOwner, | ||||
|             bcm.cus_name AS cusName, | ||||
|             bcm.phone_number AS phoneNumber, | ||||
|             bcb.brand_name AS brandStr, | ||||
|             bcmm.model_name AS modelStr, | ||||
|             DATEDIFF(tbcm.next_inspection_date, CURDATE()) AS njCont, | ||||
|             DATEDIFF(tbcm.next_maintenance_date, CURDATE()) AS byCont, | ||||
|             DATEDIFF(tbcm.insurance_expiry_date, CURDATE()) AS bxCont | ||||
|         FROM | ||||
|             base_car_main tbcm | ||||
|                 LEFT JOIN base_customer_car bcc ON tbcm.id = bcc.car_id AND bcc.deleted = 0 | ||||
|                 LEFT JOIN base_customer_main bcm ON bcc.cus_id = bcm.id AND bcm.deleted = 0 | ||||
|                 LEFT JOIN base_car_brand bcb ON bcb.deleted = 0 AND tbcm.car_brand = bcb.id | ||||
|                 LEFT JOIN base_car_model bcmm ON bcmm.deleted = 0 AND tbcm.car_model = bcmm.id | ||||
|         WHERE | ||||
|             tbcm.deleted = 0 | ||||
|         <if test="entity.licenseNumber != null and entity.licenseNumber != ''"> | ||||
|             AND tbcm.license_number LIKE CONCAT('%',#{entity.licenseNumber},'%') | ||||
|         </if> | ||||
|         <if test="entity.cusName != null and entity.cusName != ''"> | ||||
|             AND bcm.cus_name LIKE CONCAT('%',#{entity.cusName},'%') | ||||
|         </if> | ||||
|         <if test="entity.selectSign == '01'"> | ||||
|             AND tbcm.next_inspection_date BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 3 MONTH) | ||||
|         </if> | ||||
|         <if test="entity.selectSign == '02'"> | ||||
|             AND tbcm.next_maintenance_date BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 6 MONTH) | ||||
|         </if> | ||||
|         <if test="entity.selectSign == '03'"> | ||||
|             AND tbcm.insurance_expiry_date BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 45 DAY) | ||||
|         </if> | ||||
|     </select> | ||||
| 
 | ||||
| </mapper> | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user