You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							22 lines
						
					
					
						
							566 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							22 lines
						
					
					
						
							566 B
						
					
					
				| 'use strict'; | |
| 
 | |
| function getRealStateData(opts) { | |
|     return async function (ctx, next) { | |
| 
 | |
|         const models = ctx.fs.dc.models; | |
|         let errMsg = { message: '获取水务实时态势数据失败' } | |
|         try { | |
|             const res = await models.FloodControlHeadquarters.findAll(); | |
|             ctx.status = 200; | |
|             ctx.body = res; | |
|         } catch (error) { | |
|             ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); | |
|             ctx.status = 400; | |
|             ctx.body = errMsg | |
|         } | |
|     } | |
| } | |
| 
 | |
| module.exports = { | |
|     getRealStateData | |
| } |