| | |
| | | import { ALL, Body, Get, Inject, Post, Provide, Query } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Colletmeta } from '../../entity/colletmeta'; |
| | | // import { ColletmetaService } from '../../service/colletmeta'; |
| | | // import { ColletmetaService } from '../../service/'; |
| | | import { DataController } from '../../../base/controller/dataController'; |
| | | import { SocketHandler } from '../../../../../socket/socketHandle'; |
| | | import { RpcService } from '../../../base/service/dataapi/rpcservice'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | |
| | | export class ColletmetaController extends DataController { |
| | | // @Inject() |
| | | // colletmetaService: ColletmetaService; |
| | | |
| | | |
| | | @Inject() |
| | | socketHandler: SocketHandler |
| | | |
| | | @Inject() |
| | | rpcService: RpcService |
| | | |
| | | /** |
| | | * 接收设备监控消息 |
| | | */ |
| | | @Post('/getDeviceMsg', { summary: '接收设备消息' }) |
| | | async getDeviceMsg(@Query(ALL) params: any) { |
| | | this.dealMessage(params) |
| | | return this.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 获得数据 |
| | |
| | | async postData(@Query(ALL) params: any) { |
| | | return this.ok(await this.dataService.getData(params)); |
| | | } |
| | | |
| | | |
| | | async dealMessage(params: any) { |
| | | // this.socketHandler.connection |
| | | console.log(params); |
| | | } |
| | | |
| | | } |