| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -12,12 +12,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.common.logs.utils.StringUtils; | 
					 | 
					 | 
					 | 
					import com.hnac.hzims.common.logs.utils.StringUtils; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.dto.CarMilesYearDTO; | 
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.dto.CarMilesYearDTO; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.entity.CarEntity; | 
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.entity.CarEntity; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.enums.CarMaintenanceStatusEnum; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.mapper.CarMapper; | 
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.mapper.CarMapper; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.service.ICarCheckRecordService; | 
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.service.*; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.service.ICarMaintenanceService; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.service.ICarService; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.service.ICarUsedRecordService; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.vo.CarMilesYearVO; | 
					 | 
					 | 
					 | 
					import com.hnac.hzims.safeproduct.vo.CarMilesYearVO; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import org.springblade.core.log.exception.ServiceException; | 
					 | 
					 | 
					 | 
					import org.springblade.core.log.exception.ServiceException; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import org.springblade.core.mp.support.Query; | 
					 | 
					 | 
					 | 
					import org.springblade.core.mp.support.Query; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -55,6 +51,12 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, CarEntity> implements | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    ICarCheckRecordService carCheckRecordService; | 
					 | 
					 | 
					 | 
					    ICarCheckRecordService carCheckRecordService; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    ICarInsuranceService carInsuranceService; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    ICarAnnualInspectionService carAnnualInspectionService; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    /** | 
					 | 
					 | 
					 | 
					    /** | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     * 年度里程数页面 | 
					 | 
					 | 
					 | 
					     * 年度里程数页面 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     */ | 
					 | 
					 | 
					 | 
					     */ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -195,15 +197,29 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, CarEntity> implements | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // 删除关联维保记录
 | 
					 | 
					 | 
					 | 
					            // 删除关联维保记录
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            boolean removeCarMaintenance = carMaintenanceService.removeRelativeCarMaintenance(id); | 
					 | 
					 | 
					 | 
					            boolean removeCarMaintenance = carMaintenanceService.removeRelativeCarMaintenance(id); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (!removeCarMaintenance) { | 
					 | 
					 | 
					 | 
					            if (!removeCarMaintenance) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return false; | 
					 | 
					 | 
					 | 
					                throw new ServiceException("关联维保记录删除失败"); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // 删除关联用车记录
 | 
					 | 
					 | 
					 | 
					            // 删除关联用车记录
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            boolean removeCarUsedRecord = carUsedRecordService.removeRelativeCarUsedRecord(id); | 
					 | 
					 | 
					 | 
					            boolean removeCarUsedRecord = carUsedRecordService.removeRelativeCarUsedRecord(id); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (!removeCarUsedRecord) { | 
					 | 
					 | 
					 | 
					            if (!removeCarUsedRecord) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                return false; | 
					 | 
					 | 
					 | 
					                throw new ServiceException("关联用车记录删除失败"); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // 删除关联车检记录
 | 
					 | 
					 | 
					 | 
					            // 删除关联车检记录
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return carCheckRecordService.removeRelativeCarCheckRecord(id); | 
					 | 
					 | 
					 | 
					            boolean removeCarCheckRecord = carCheckRecordService.removeRelativeCarCheckRecord(id); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!removeCarCheckRecord) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                throw new ServiceException("关联车检记录删除失败"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            // 删除关联年检记录
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            boolean removeCarAnnualInspection = carAnnualInspectionService.removeRelativeCarAnnualInspection(id); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!removeCarAnnualInspection) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                throw new ServiceException("关联年检记录删除失败"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            // 删除关联车保记录
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            boolean removeCarInsurance = carInsuranceService.removeRelativeCarInsurance(id); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            if (!removeCarInsurance) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					                throw new ServiceException("关联车保记录删除失败"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            return true; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        return false; | 
					 | 
					 | 
					 | 
					        return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |