|  | @ -4,12 +4,12 @@ async function overspeedGet (ctx) { | 
			
		
	
		
		
			
				
					|  |  |     try { |  |  |     try { | 
			
		
	
		
		
			
				
					|  |  |         const models = ctx.fs.dc.models; |  |  |         const models = ctx.fs.dc.models; | 
			
		
	
		
		
			
				
					|  |  |         const { limit, page, nameOfInspectionPoint, licensePlate, numberOfAxles, overrunRateUpper, overrunRateFloor, testTime } = ctx.query |  |  |         const { limit, page, nameOfInspectionPoint, licensePlate, numberOfAxles, overrunRateUpper, overrunRateFloor, testTime } = ctx.query | 
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  |         const sequelize = ctx.fs.dc.ORM; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |         let findOption = { |  |  |         let findOption = { | 
			
		
	
		
		
			
				
					|  |  |             where: { |  |  |             where: { | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |             }, |  |  |             }, | 
			
		
	
		
		
			
				
					
					|  |  |             order: [['id', 'DESC']] |  |  |             order: [['id', 'DESC']], | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |         if (limit) { |  |  |         if (limit) { | 
			
		
	
		
		
			
				
					|  |  |             findOption.limit = limit |  |  |             findOption.limit = limit | 
			
		
	
	
		
		
			
				
					|  | @ -17,16 +17,19 @@ async function overspeedGet (ctx) { | 
			
		
	
		
		
			
				
					|  |  |         if (page && limit) { |  |  |         if (page && limit) { | 
			
		
	
		
		
			
				
					|  |  |             findOption.offset = page * limit |  |  |             findOption.offset = page * limit | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         if (nameOfInspectionPoint || licensePlate) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             findOption.where['$or'] = {} | 
			
		
	
		
		
			
				
					|  |  |             if (nameOfInspectionPoint) { |  |  |             if (nameOfInspectionPoint) { | 
			
		
	
		
		
			
				
					
					|  |  |             findOption.where.nameOfInspectionPoint = { |  |  |                 findOption.where['$or']. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                 '$like': `%${nameOfInspectionPoint}%` |  |  |                     nameOfInspectionPoint = { $like: `%${nameOfInspectionPoint}%` } | 
			
				
				
			
		
	
		
		
			
				
					|  |  |             } |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |             if (licensePlate) { |  |  |             if (licensePlate) { | 
			
		
	
		
		
			
				
					
					|  |  |             findOption.where.licensePlate = { |  |  |                 findOption.where['$or']. | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                 '$like': `%${licensePlate}%` |  |  |                     licensePlate = { $like: `%${licensePlate}%` } | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |             } |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         if (numberOfAxles) { |  |  |         if (numberOfAxles) { | 
			
		
	
		
		
			
				
					|  |  |             findOption.where.numberOfAxles = numberOfAxles |  |  |             findOption.where.numberOfAxles = numberOfAxles | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
	
		
		
			
				
					|  | 
 |