| | |
| | | import { BaseSysLoginService } from '../../service/sys/login'; |
| | | import { BaseSysParamService } from '../../service/sys/param'; |
| | | import { DataService } from '../../service/dataapi/dataapi'; |
| | | import { CreateEntityUtil } from '../../utils/createEntity'; |
| | | |
| | | /** |
| | | * 不需要登录的后台接口 |
| | |
| | | baseSysParamService: BaseSysParamService; |
| | | |
| | | @Inject() |
| | | dataService: DataService; |
| | | dataService: DataService; |
| | | |
| | | @Inject() |
| | | createEntityUtil: CreateEntityUtil; |
| | | |
| | | @Inject() |
| | | ctx: Context; |
| | |
| | | /** |
| | | * 获得数据 |
| | | */ |
| | | @Get('/getdata', { summary: '数据接口' }) |
| | | async getData(@Query(ALL) params: any) { |
| | | console.log('-------------------------------------------------------'); |
| | | console.log(params); |
| | | return this.ok(await this.dataService.getData(params)); |
| | | } |
| | | @Get('/getdata', { summary: '数据接口' }) |
| | | async getData(@Query(ALL) params: any) { |
| | | console.log(params); |
| | | return this.ok(await this.dataService.getData(params)); |
| | | } |
| | | |
| | | /** |
| | | * 获得数据 |
| | | */ |
| | | @Post('/postdata', { summary: '数据接口' }) |
| | | async postData(@Query(ALL) params: any) { |
| | | return this.ok(await this.dataService.getData(params)); |
| | | } |
| | | @Post('/postdata', { summary: '数据接口' }) |
| | | async postData(@Query(ALL) params: any) { |
| | | return this.ok(await this.dataService.getData(params)); |
| | | } |
| | | |
| | | @Get('/createEntity', {}) |
| | | async createEntity() { |
| | | console.log('生成综合实体类任务开始执行'); |
| | | |
| | | let tables = await this.dataService.getDataByNative({ "bid": "getTableNeedCreate", "pageindex": "1", "pagesize": "300" }) |
| | | let columns = await this.dataService.getDataByNative({ "bid": "getColumns", "pageindex": "1", "pagesize": "300" }) //bid_obj_[0], query?.pageindex || null , query?.pagesize || null, query |
| | | console.log(`${tables.length} and columnlength ${columns.length}`) |
| | | let tabs = {}; |
| | | tables.forEach(element => { |
| | | tabs[element.name] = element; |
| | | }); |
| | | columns.forEach(element => { |
| | | let tbname = element.table_name; |
| | | if (!tabs[tbname]) { |
| | | tabs[tbname] = {} |
| | | } |
| | | if (!tabs[tbname].tbcolumn) { |
| | | tabs[tbname].tbcolumn = []; |
| | | } |
| | | tabs[tbname].tbcolumn.push(element) |
| | | }); |
| | | Object.keys(tabs).forEach(key => { |
| | | this.createEntityUtil.createEntity(tabs[key]) |
| | | this.createEntityUtil.createService(tabs[key]) |
| | | this.createEntityUtil.createController(tabs[key]) |
| | | }) |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | import { Provide, Inject, Get, Post,Query, Body, ALL } from '@midwayjs/decorator'; |
| | | import { |
| | | CoolController, |
| | | BaseController, |
| | | ICoolCache, |
| | | ICoolFile, |
| | | } from '@cool-midway/core'; |
| | | import { Context } from 'egg'; |
| | | import { DataService } from '../service/dataapi/dataapi'; |
| | | |
| | | /** |
| | | * 通用数据的后台接口 |
| | | */ |
| | | @Provide() |
| | | @CoolController() |
| | | export class DataController extends BaseController { |
| | | @Inject('cool:eps:open') |
| | | eps; |
| | | |
| | | @Inject('cool:cache') |
| | | coolCache: ICoolCache; |
| | | |
| | | @Inject('cool:file') |
| | | coolFile: ICoolFile; |
| | | |
| | | @Inject() |
| | | ctx: Context; |
| | | |
| | | @Inject() |
| | | dataService: DataService; |
| | | |
| | | /** |
| | | * 实体信息与路径 |
| | | * @returns |
| | | */ |
| | | @Get('/eps', { summary: '实体信息与路径' }) |
| | | public async getEps() { |
| | | console.log(this.coolCache.getMode()); |
| | | return this.ok(this.eps); |
| | | } |
| | | |
| | | /** |
| | | * 文件上传 |
| | | */ |
| | | @Post('/upload', { summary: '文件上传' }) |
| | | async upload() { |
| | | return this.ok(await this.coolFile.upload(this.ctx)); |
| | | } |
| | | |
| | | /** |
| | | * 文件上传模式,本地或者云存储 |
| | | */ |
| | | @Get('/uploadMode', { summary: '文件上传模式' }) |
| | | async uploadMode() { |
| | | return this.ok(this.coolFile.getMode()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获得数据 |
| | | */ |
| | | @Get('/getdata', { summary: '数据接口' }) |
| | | async getData(@Query(ALL) params: any) { |
| | | console.log(params); |
| | | return this.ok(await this.dataService.getData(params)); |
| | | } |
| | | |
| | | /** |
| | | * 获得数据 |
| | | */ |
| | | @Post('/postdata', { summary: '数据接口' }) |
| | | async postData(@Query(ALL) params: any) { |
| | | return this.ok(await this.dataService.getData(params)); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | // src/schedule/hello.ts |
| | | import { Provide, Inject, Schedule, CommonSchedule } from '@midwayjs/decorator'; |
| | | import { DataService } from '../service/dataapi/dataapi'; |
| | | import * as fs from 'fs'; |
| | | import { ILogger } from '@midwayjs/logger'; |
| | | |
| | | /** |
| | | * 日志定时任务 |
| | | */ |
| | | @Provide() |
| | | @Schedule({ |
| | | cron: '00 53 15 * * *', // 每天0点执行 |
| | | type: 'worker', // 指定某一个 worker 执行 |
| | | }) |
| | | export class BaseEntitySchedule implements CommonSchedule { |
| | | @Inject() |
| | | dataService: DataService; |
| | | |
| | | @Inject() |
| | | logger: ILogger; |
| | | |
| | | // 定时执行的具体任务 |
| | | async exec() { |
| | | this.logger.info('生成综合实体类任务开始执行'); |
| | | const startTime = Date.now(); |
| | | if (fs.existsSync('../entity/app/commentity.ts')) { |
| | | console.log(' file is exists') |
| | | } else { |
| | | console.log(' file is not exists') |
| | | // API |
| | | fs.writeFile('./src/app/modules/base/entity/app/commentity.ts', |
| | | `import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column } from 'typeorm'; |
| | | |
| | | /** |
| | | * 文件空间信息 |
| | | */ |
| | | @EntityModel('t_sys_comm_column') |
| | | export class CommEntity extends BaseEntity { |
| | | @Column({ comment: '地址' }) |
| | | url: string; |
| | | |
| | | @Column({ comment: '类型' }) |
| | | type: string; |
| | | |
| | | @Column({ comment: '分类ID', type: 'bigint', nullable: true }) |
| | | classifyId: number; |
| | | }`, (error) => { |
| | | // 创建失败 |
| | | if(error){ |
| | | console.log(`创建失败:${error}`) |
| | | } |
| | | // 创建成功 |
| | | console.log(`创建成功!`) |
| | | |
| | | }) |
| | | } |
| | | const columns = await this.dataService.getData({"bid":"getColumns", "pageindex":"1", "pagesize":"300"}) //bid_obj_[0], query?.pageindex || null , query?.pagesize || null, query |
| | | console.log(columns) |
| | | //读取文件内容,并转化为Json对象 |
| | | // let userBugsJson = JSON.parse(fs.readFileSync("app/public/static/Data.json", "utf8")); |
| | | // //获取Json里key为data的数据 |
| | | // const data = userBugsJson['data']; |
| | | // return data; |
| | | this.logger.info(`生成综合实体类任务结束,耗时:${Date.now() - startTime}ms`); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | import { BaseService, ICoolCache, } from '@cool-midway/core'; |
| | | import * as _ from 'lodash'; |
| | | import { MysqlUtil } from '../../utils/mysqlutil'; |
| | | // 引入读写核心模块 |
| | | |
| | | |
| | | /** |
| | | * 系统用户 |
| | |
| | | // ); // 部门权限 |
| | | const bidsql = `select * from t_sys_business_config where id_='${query.bid}' limit 0,1`; |
| | | const bid_obj_ = await this.nativeQuery(bidsql); |
| | | console.log(bid_obj_) |
| | | let sqlObj = this.mysqlUtil.create_sql(bid_obj_[0], query?.pageindex || null , query?.pagesize || null, query); |
| | | if (sqlObj?.status == 0) { |
| | | return sqlObj?.msg; |
| | | } |
| | | return this.sqlRenderPage(sqlObj?.sql, query); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | */ |
| | | async getDataByNative(query) { |
| | | // const { keyWord, status, departmentIds = [] } = query; |
| | | // const permsDepartmentArr = await this.baseSysPermsService.departmentIds( |
| | | // this.ctx.admin.userId |
| | | // ); // 部门权限 |
| | | const bidsql = `select * from t_sys_business_config where id_='${query.bid}' limit 0,1`; |
| | | const bid_obj_ = await this.nativeQuery(bidsql); |
| | | console.log(bid_obj_) |
| | | let sqlObj = this.mysqlUtil.create_sql(bid_obj_[0], query?.pageindex || null , query?.pagesize || null, query); |
| | | if (sqlObj?.status == 0) { |
| | | return sqlObj?.msg; |
| | | } |
| | | return this.nativeQuery(sqlObj?.sql) |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | |
| | | } |
| | | return this.sqlRenderPage(sqlObj?.sql, query); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | import { Inject, Provide } from "@midwayjs/decorator" |
| | | import * as fs from 'fs'; |
| | | |
| | | /** |
| | | * 不需要登录的后台接口 |
| | | */ |
| | | @Provide() |
| | | export class CreateEntityUtil { |
| | | |
| | | createEntity(table) { |
| | | console.log('生成综合实体类任务开始执行'); |
| | | let EntityName = this.firstToUpper3(table.entityName) |
| | | let columnstr = []; |
| | | columnstr.push(`import { EntityModel } from '@midwayjs/orm';\n`) |
| | | columnstr.push(`import { BaseEntity } from '@cool-midway/core';\n`) |
| | | columnstr.push(`import { Column, Double } from 'typeorm';\n`) |
| | | columnstr.push(`/** |
| | | * ${table.comment} |
| | | */\n`) |
| | | columnstr.push(`@EntityModel('${table.name}') \n`) |
| | | columnstr.push(`export class ${EntityName} extends BaseEntity { \n`) |
| | | table.tbcolumn.forEach(item => { |
| | | if (item?.table_name == table.name) { |
| | | let fieldType = 'string'; //nullable length primary enum enumName width |
| | | let matResult = item.column_type.match(/\(([^)]*)\)/); |
| | | let length = 0; |
| | | if (matResult) { |
| | | length = matResult[1]; |
| | | } |
| | | switch (item.data_type) { |
| | | case 'varchar': |
| | | fieldType = 'string' |
| | | item.column_default = !isNaN(item.column_default) ? item.column_default : ''; |
| | | columnstr.push(`@Column({ comment:'${item.column_comment}', type:'${item.data_type}', default:'${item.column_default}', length:${length}})\n`) |
| | | break; |
| | | case 'text': |
| | | fieldType = 'string' |
| | | item.column_default = !isNaN(item.column_default) ? item.column_default : ''; |
| | | columnstr.push(`@Column({ comment:'${item.column_comment}', type:'${item.data_type}', default:'${item.column_default}'})\n`) |
| | | break; |
| | | case 'int': |
| | | fieldType = 'number' |
| | | item.column_default = !isNaN(Number(item.column_default)) ? item.column_default : 0; |
| | | columnstr.push(`@Column({ comment:'${item.column_comment}', type:'${item.data_type}', default:${item.column_default}, width:${length}})\n`) |
| | | break; |
| | | case 'bigint': |
| | | fieldType = 'number' |
| | | item.column_default = !isNaN(Number(item.column_default)) ? item.column_default : 0; |
| | | columnstr.push(`@Column({ comment:'${item.column_comment}', type:'${item.data_type}', default:${item.column_default}}, width:${length})\n`) |
| | | break; |
| | | case 'tinyint': |
| | | fieldType = 'number' |
| | | item.column_default = !isNaN(Number(item.column_default)) ? item.column_default : 0; |
| | | columnstr.push(`@Column({ comment:'${item.column_comment}', type:'${item.data_type}', default:${item.column_default}, width:${length}})\n`) |
| | | break; |
| | | case 'datetime': |
| | | fieldType = 'Date' |
| | | item.column_default = item.column_default != 'null' ? item.column_default : `${new Date()}`; |
| | | columnstr.push(`@Column({ comment:'${item.column_comment}', type:'${item.data_type}'})\n`) |
| | | break; |
| | | case 'double': |
| | | item.column_default = !isNaN(Number(item.column_default)) ? item.column_default : 0; |
| | | fieldType = 'Double' |
| | | columnstr.push(`@Column({ comment:'${item.column_comment}', type:'${item.data_type}', default:${item.column_default}})\n`) |
| | | break; |
| | | case 'decimal': |
| | | item.column_default = !isNaN(Number(item.column_default)) ? item.column_default : 0; |
| | | fieldType = 'Double' |
| | | columnstr.push(`@Column({ comment:'${item.column_comment}', type:'${item.data_type}', default:${item.column_default}})\n`) |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | // let fieldType = item.data_type=='varchar' ? 'string' : item.data_type=='int' ? 'number' : item.data_type=='bigint' ? 'number' : item.data_type=='tinyint' ? 'number' |
| | | columnstr.push(`${item.column_name}: ${fieldType};\n`) |
| | | columnstr.push(`\n`) |
| | | } |
| | | |
| | | }); |
| | | columnstr.push(`}`) |
| | | if (fs.existsSync(`../../business/entity/${table.entityName}.ts`)) { |
| | | console.log(' file is exists') |
| | | } else { |
| | | console.log(' file is not exists') |
| | | // API |
| | | fs.writeFile(`./src/app/modules/business/entity/${table.entityName}.ts`, |
| | | columnstr.join(''), (error) => { |
| | | // 创建失败 |
| | | if (error) { |
| | | console.log(`创建失败:${error}`) |
| | | } |
| | | // 创建成功 |
| | | console.log(`创建成功!`) |
| | | }) |
| | | } |
| | | console.log(`--------------------生成实体类结束${table.entityName}Service--------------------`); |
| | | } |
| | | |
| | | |
| | | createService(table) { |
| | | console.log('生成服务类开始执行'); |
| | | let EntityName = this.firstToUpper3(table.entityName) |
| | | let columnstr = []; |
| | | columnstr.push(`import { Provide } from '@midwayjs/decorator';\n`) |
| | | columnstr.push(`import { BaseService } from '@cool-midway/core';\n`) |
| | | columnstr.push(`import { InjectEntityModel } from '@midwayjs/orm';\n`) |
| | | columnstr.push(`import { Repository } from 'typeorm';\n`) |
| | | columnstr.push(`import { DataService } from '../../base/service/dataapi/dataapi';\n`) |
| | | columnstr.push(`import { ${EntityName} } from '../entity/${table.entityName}';\n`) |
| | | columnstr.push(`/** |
| | | * ${table.comment} |
| | | */\n`) |
| | | columnstr.push(`@Provide()\n`) |
| | | columnstr.push(`export class ${EntityName}Service extends DataService { \n`) |
| | | columnstr.push(` @InjectEntityModel(${EntityName}) \n`) |
| | | columnstr.push(` ${table.entityName}: Repository<${EntityName}> \n`); |
| | | columnstr.push(`}`) |
| | | if (fs.existsSync(`../../business/service/${table.entityName}.ts`)) { |
| | | console.log(' file is exists') |
| | | } else { |
| | | console.log(' file is not exists') |
| | | // API |
| | | fs.writeFile(`./src/app/modules/business/service/${table.entityName}.ts`, |
| | | columnstr.join(''), (error) => { |
| | | // 创建失败 |
| | | if (error) { |
| | | console.log(`创建失败:${error}`) |
| | | } |
| | | // 创建成功 |
| | | console.log(`创建成功!`) |
| | | }) |
| | | } |
| | | console.log(`--------------------生成服务类结束${EntityName}Service--------------------`); |
| | | } |
| | | |
| | | createController(table) { |
| | | console.log('生成控制类开始执行'); |
| | | let EntityName = this.firstToUpper3(table.entityName) |
| | | let columnstr = []; |
| | | columnstr.push(`import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator';\n`) |
| | | columnstr.push(`import { CoolController, BaseController } from '@cool-midway/core';\n`) |
| | | columnstr.push(`import { ${EntityName} } from '../entity/${table.entityName}';\n`) |
| | | columnstr.push(`import { ${EntityName}Service } from '../service/${table.entityName}';\n`) |
| | | columnstr.push(`import { DataController } from '../../base/controller/dataController';\n`) |
| | | columnstr.push(`/** |
| | | * ${table.comment} |
| | | */\n`) |
| | | columnstr.push(`@Provide()\n`) |
| | | columnstr.push(`@CoolController({ \n`) |
| | | columnstr.push(` api: ['add', 'delete', 'update', 'list'],\n`) |
| | | columnstr.push(` entity: ${EntityName},\n`) |
| | | columnstr.push(` service: ${EntityName}Service,\n`) |
| | | columnstr.push(`})\n`) |
| | | columnstr.push(`export class ${EntityName}Controller extends DataController {\n`) |
| | | columnstr.push(` @Inject()\n`) |
| | | columnstr.push(` ${table.entityName}Service: ${EntityName}Service;\n`) |
| | | columnstr.push(`}`) |
| | | if (fs.existsSync(`../../business/controller/${table.entityName}.ts`)) { |
| | | console.log(' file is exists') |
| | | } else { |
| | | console.log(' file is not exists') |
| | | // API |
| | | fs.writeFile(`./src/app/modules/business/controller/${table.entityName}.ts`, |
| | | columnstr.join(''), (error) => { |
| | | // 创建失败 |
| | | if (error) { |
| | | console.log(`创建失败:${error}`) |
| | | } |
| | | // 创建成功 |
| | | console.log(`创建成功!`) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | firstToUpper3(str){ |
| | | return str.toLowerCase().replace(/( |^)[a-z]/g,(L)=>L.toUpperCase()); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | import { Application } from 'egg'; |
| | | import { ModuleConfig } from '@cool-midway/core'; |
| | | |
| | | /** |
| | | * 示例 |
| | | */ |
| | | export default (app: Application) => { |
| | | return { |
| | | // 模块名称 |
| | | name: 'business', |
| | | // 模块描述 |
| | | description: '业务接口', |
| | | // 中间件 |
| | | middlewares: [], |
| | | // 全局中间件 |
| | | globalMiddlewares: [], |
| | | } as ModuleConfig; |
| | | }; |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Basedeviceinfo } from '../entity/basedeviceinfo'; |
| | | import { BasedeviceinfoService } from '../service/basedeviceinfo'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 设备信息表 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Basedeviceinfo, |
| | | service: BasedeviceinfoService, |
| | | }) |
| | | export class BasedeviceinfoController extends DataController { |
| | | @Inject() |
| | | basedeviceinfoService: BasedeviceinfoService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Basedeviceparams } from '../entity/basedeviceparams'; |
| | | import { BasedeviceparamsService } from '../service/basedeviceparams'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 设备参数表 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Basedeviceparams, |
| | | service: BasedeviceparamsService, |
| | | }) |
| | | export class BasedeviceparamsController extends DataController { |
| | | @Inject() |
| | | basedeviceparamsService: BasedeviceparamsService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Basedevicesection } from '../entity/basedevicesection'; |
| | | import { BasedevicesectionService } from '../service/basedevicesection'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 设备组件 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Basedevicesection, |
| | | service: BasedevicesectionService, |
| | | }) |
| | | export class BasedevicesectionController extends DataController { |
| | | @Inject() |
| | | basedevicesectionService: BasedevicesectionService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Basedevicestatus } from '../entity/basedevicestatus'; |
| | | import { BasedevicestatusService } from '../service/basedevicestatus'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 设备状态表 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Basedevicestatus, |
| | | service: BasedevicestatusService, |
| | | }) |
| | | export class BasedevicestatusController extends DataController { |
| | | @Inject() |
| | | basedevicestatusService: BasedevicestatusService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Colletdata } from '../entity/colletdata'; |
| | | import { ColletdataService } from '../service/colletdata'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Colletdata, |
| | | service: ColletdataService, |
| | | }) |
| | | export class ColletdataController extends DataController { |
| | | @Inject() |
| | | colletdataService: ColletdataService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Colletmeta } from '../entity/colletmeta'; |
| | | import { ColletmetaService } from '../service/colletmeta'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Colletmeta, |
| | | service: ColletmetaService, |
| | | }) |
| | | export class ColletmetaController extends DataController { |
| | | @Inject() |
| | | colletmetaService: ColletmetaService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Comconfig } from '../entity/comconfig'; |
| | | import { ComconfigService } from '../service/comconfig'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Comconfig, |
| | | service: ComconfigService, |
| | | }) |
| | | export class ComconfigController extends DataController { |
| | | @Inject() |
| | | comconfigService: ComconfigService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Deviceattachment } from '../entity/deviceattachment'; |
| | | import { DeviceattachmentService } from '../service/deviceattachment'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 设备相关的附件 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Deviceattachment, |
| | | service: DeviceattachmentService, |
| | | }) |
| | | export class DeviceattachmentController extends DataController { |
| | | @Inject() |
| | | deviceattachmentService: DeviceattachmentService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Devicegroup } from '../entity/devicegroup'; |
| | | import { DevicegroupService } from '../service/devicegroup'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 设备分组表 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Devicegroup, |
| | | service: DevicegroupService, |
| | | }) |
| | | export class DevicegroupController extends DataController { |
| | | @Inject() |
| | | devicegroupService: DevicegroupService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Deviceopreraterecord } from '../entity/deviceopreraterecord'; |
| | | import { DeviceopreraterecordService } from '../service/deviceopreraterecord'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 设备运维记录 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Deviceopreraterecord, |
| | | service: DeviceopreraterecordService, |
| | | }) |
| | | export class DeviceopreraterecordController extends DataController { |
| | | @Inject() |
| | | deviceopreraterecordService: DeviceopreraterecordService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Doutrubine } from '../entity/doutrubine'; |
| | | import { DoutrubineService } from '../service/doutrubine'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 斗轮机信息 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Doutrubine, |
| | | service: DoutrubineService, |
| | | }) |
| | | export class DoutrubineController extends DataController { |
| | | @Inject() |
| | | doutrubineService: DoutrubineService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Execrecord } from '../entity/execrecord'; |
| | | import { ExecrecordService } from '../service/execrecord'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 任务执行记录表 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Execrecord, |
| | | service: ExecrecordService, |
| | | }) |
| | | export class ExecrecordController extends DataController { |
| | | @Inject() |
| | | execrecordService: ExecrecordService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Interfacelist } from '../entity/interfacelist'; |
| | | import { InterfacelistService } from '../service/interfacelist'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 接口清单 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Interfacelist, |
| | | service: InterfacelistService, |
| | | }) |
| | | export class InterfacelistController extends DataController { |
| | | @Inject() |
| | | interfacelistService: InterfacelistService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Interfacerecord } from '../entity/interfacerecord'; |
| | | import { InterfacerecordService } from '../service/interfacerecord'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 组合模型 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Interfacerecord, |
| | | service: InterfacerecordService, |
| | | }) |
| | | export class InterfacerecordController extends DataController { |
| | | @Inject() |
| | | interfacerecordService: InterfacerecordService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Messagerecord } from '../entity/messagerecord'; |
| | | import { MessagerecordService } from '../service/messagerecord'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 任务消息记录 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Messagerecord, |
| | | service: MessagerecordService, |
| | | }) |
| | | export class MessagerecordController extends DataController { |
| | | @Inject() |
| | | messagerecordService: MessagerecordService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Metadata } from '../entity/metadata'; |
| | | import { MetadataService } from '../service/metadata'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 监测采集原数据 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Metadata, |
| | | service: MetadataService, |
| | | }) |
| | | export class MetadataController extends DataController { |
| | | @Inject() |
| | | metadataService: MetadataService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Modelcombination } from '../entity/modelcombination'; |
| | | import { ModelcombinationService } from '../service/modelcombination'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 组合模型 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Modelcombination, |
| | | service: ModelcombinationService, |
| | | }) |
| | | export class ModelcombinationController extends DataController { |
| | | @Inject() |
| | | modelcombinationService: ModelcombinationService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Modelstatic } from '../entity/modelstatic'; |
| | | import { ModelstaticService } from '../service/modelstatic'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 静态模型数据 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Modelstatic, |
| | | service: ModelstaticService, |
| | | }) |
| | | export class ModelstaticController extends DataController { |
| | | @Inject() |
| | | modelstaticService: ModelstaticService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Periodicsetting } from '../entity/periodicsetting'; |
| | | import { PeriodicsettingService } from '../service/periodicsetting'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 分组任务参数设置表 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Periodicsetting, |
| | | service: PeriodicsettingService, |
| | | }) |
| | | export class PeriodicsettingController extends DataController { |
| | | @Inject() |
| | | periodicsettingService: PeriodicsettingService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Planinventory } from '../entity/planinventory'; |
| | | import { PlaninventoryService } from '../service/planinventory'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 盘煤计划 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Planinventory, |
| | | service: PlaninventoryService, |
| | | }) |
| | | export class PlaninventoryController extends DataController { |
| | | @Inject() |
| | | planinventoryService: PlaninventoryService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Pointcloud } from '../entity/pointcloud'; |
| | | import { PointcloudService } from '../service/pointcloud'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Pointcloud, |
| | | service: PointcloudService, |
| | | }) |
| | | export class PointcloudController extends DataController { |
| | | @Inject() |
| | | pointcloudService: PointcloudService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Pointmodel } from '../entity/pointmodel'; |
| | | import { PointmodelService } from '../service/pointmodel'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 点云模型 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Pointmodel, |
| | | service: PointmodelService, |
| | | }) |
| | | export class PointmodelController extends DataController { |
| | | @Inject() |
| | | pointmodelService: PointmodelService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Statdata } from '../entity/statdata'; |
| | | import { StatdataService } from '../service/statdata'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 监测统计 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Statdata, |
| | | service: StatdataService, |
| | | }) |
| | | export class StatdataController extends DataController { |
| | | @Inject() |
| | | statdataService: StatdataService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Taskimmediately } from '../entity/taskimmediately'; |
| | | import { TaskimmediatelyService } from '../service/taskimmediately'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 即时任务记录表 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Taskimmediately, |
| | | service: TaskimmediatelyService, |
| | | }) |
| | | export class TaskimmediatelyController extends DataController { |
| | | @Inject() |
| | | taskimmediatelyService: TaskimmediatelyService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Taskmonitor } from '../entity/taskmonitor'; |
| | | import { TaskmonitorService } from '../service/taskmonitor'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 监测任务表 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Taskmonitor, |
| | | service: TaskmonitorService, |
| | | }) |
| | | export class TaskmonitorController extends DataController { |
| | | @Inject() |
| | | taskmonitorService: TaskmonitorService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Trubinelocation } from '../entity/trubinelocation'; |
| | | import { TrubinelocationService } from '../service/trubinelocation'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * 斗轮机信息 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Trubinelocation, |
| | | service: TrubinelocationService, |
| | | }) |
| | | export class TrubinelocationController extends DataController { |
| | | @Inject() |
| | | trubinelocationService: TrubinelocationService; |
| | | } |
| New file |
| | |
| | | import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { Tuser } from '../entity/tuser'; |
| | | import { TuserService } from '../service/tuser'; |
| | | import { DataController } from '../../base/controller/dataController'; |
| | | /** |
| | | * |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'list'], |
| | | entity: Tuser, |
| | | service: TuserService, |
| | | }) |
| | | export class TuserController extends DataController { |
| | | @Inject() |
| | | tuserService: TuserService; |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 设备信息表 |
| | | */ |
| | | @EntityModel('t_base_deviceinfo') |
| | | export class Basedeviceinfo extends BaseEntity { |
| | | @Column({ comment:'设备高度', type:'varchar', default:'', length:50}) |
| | | altitude: string; |
| | | |
| | | @Column({ comment:'账号', type:'varchar', default:'', length:50}) |
| | | device_account: string; |
| | | |
| | | @Column({ comment:'唯一索引,设备物理id,如厂编号、subscribeno等', type:'varchar', default:'', length:50}) |
| | | device_id: string; |
| | | |
| | | @Column({ comment:'端口', type:'varchar', default:'', length:50}) |
| | | device_port: string; |
| | | |
| | | @Column({ comment:'密码', type:'varchar', default:'', length:50}) |
| | | device_psw: string; |
| | | |
| | | @Column({ comment:'设备精度', type:'varchar', default:'', length:50}) |
| | | dimension: string; |
| | | |
| | | @Column({ comment:'', type:'varchar', default:'', length:50}) |
| | | heading_angle: string; |
| | | |
| | | @Column({ comment:'IP地址', type:'varchar', default:'', length:50}) |
| | | ipaddres: string; |
| | | |
| | | @Column({ comment:'纬度,精确到小数点后6位', type:'varchar', default:'', length:50}) |
| | | latitude: string; |
| | | |
| | | @Column({ comment:'安装位置,**省**市**区**路**号**楼**方位', type:'varchar', default:'', length:50}) |
| | | location: string; |
| | | |
| | | @Column({ comment:'设备逻辑ID', type:'varchar', default:'', length:50}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'经度,精确到小数点后6位', type:'varchar', default:'', length:50}) |
| | | longitude: string; |
| | | |
| | | @Column({ comment:'设备名称', type:'varchar', default:'', length:50}) |
| | | name: string; |
| | | |
| | | @Column({ comment:'运维负责人', type:'varchar', default:'', length:50}) |
| | | opertator: string; |
| | | |
| | | @Column({ comment:'俯仰角', type:'varchar', default:'', length:50}) |
| | | petch_angle: string; |
| | | |
| | | @Column({ comment:'航向角', type:'varchar', default:'', length:50}) |
| | | precision: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'横滚角', type:'varchar', default:'', length:50}) |
| | | roll_angle: string; |
| | | |
| | | @Column({ comment:'状态,1-启用 0-停用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 设备参数表 |
| | | */ |
| | | @EntityModel('t_base_deviceparams') |
| | | export class Basedeviceparams extends BaseEntity { |
| | | @Column({ comment:'配置人', type:'varchar', default:'', length:50}) |
| | | configurator: string; |
| | | |
| | | @Column({ comment:'设备物理ID', type:'varchar', default:'', length:50}) |
| | | device_id: string; |
| | | |
| | | @Column({ comment:'设备逻辑ID', type:'varchar', default:'', length:50}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'key', type:'varchar', default:'', length:50}) |
| | | param_key: string; |
| | | |
| | | @Column({ comment:'参数类型', type:'int', default:null, width:0}) |
| | | param_type: number; |
| | | |
| | | @Column({ comment:'参数值', type:'varchar', default:'', length:50}) |
| | | param_value: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'状态,1-启用 0-停用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 设备组件 |
| | | */ |
| | | @EntityModel('t_base_devicesection') |
| | | export class Basedevicesection extends BaseEntity { |
| | | @Column({ comment:'配置人', type:'varchar', default:'', length:50}) |
| | | configurator: string; |
| | | |
| | | @Column({ comment:'设备物理ID', type:'varchar', default:'', length:50}) |
| | | device_id: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'组件名称', type:'varchar', default:'', length:50}) |
| | | section_name: string; |
| | | |
| | | @Column({ comment:'顺序编号', type:'varchar', default:'', length:50}) |
| | | section_sort: string; |
| | | |
| | | @Column({ comment:'组件类型', type:'int', default:null, width:0}) |
| | | section_type: number; |
| | | |
| | | @Column({ comment:'状态,1-启用 0-停用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 设备状态表 |
| | | */ |
| | | @EntityModel('t_base_devicestatus') |
| | | export class Basedevicestatus extends BaseEntity { |
| | | @Column({ comment:'类别 1-心跳 2-告警', type:'int', default:null, width:0}) |
| | | alarm_type: number; |
| | | |
| | | @Column({ comment:'设备物理ID', type:'varchar', default:'', length:50}) |
| | | device_id: string; |
| | | |
| | | @Column({ comment:'设备逻辑ID', type:'varchar', default:'', length:50}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'上报内容,可以是json格式', type:'varchar', default:'', length:50}) |
| | | report_content: string; |
| | | |
| | | @Column({ comment:'上报时间', type:'datetime'}) |
| | | report_time: Date; |
| | | |
| | | @Column({ comment:'状态,1-启用 0-停用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @EntityModel('t_monitor_collet_data') |
| | | export class Colletdata extends BaseEntity { |
| | | @Column({ comment:'数据内容', type:'varchar', default:'', length:50}) |
| | | data_content: string; |
| | | |
| | | @Column({ comment:'数据存储路径,url格式,域名可由服务端或者前端配置进行访问', type:'varchar', default:'', length:50}) |
| | | data_path: string; |
| | | |
| | | @Column({ comment:'1-周期任务 0-即时性任务', type:'int', default:null, width:0}) |
| | | is_periodic: number; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'任务ID,周期任务表主键或者即时任务表主键', type:'int', default:null, width:0}) |
| | | task_id: number; |
| | | |
| | | @Column({ comment:'监测记录ID', type:'int', default:null, width:0}) |
| | | task_monitor_id: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @EntityModel('t_monitor_collet_meta') |
| | | export class Colletmeta extends BaseEntity { |
| | | @Column({ comment:'', type:'int', default:null, width:0}) |
| | | collet_data_id: number; |
| | | |
| | | @Column({ comment:'', type:'int', default:null, width:0}) |
| | | meta_data_id: number; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @EntityModel('t_model_com_config') |
| | | export class Comconfig extends BaseEntity { |
| | | @Column({ comment:'', type:'int', default:null, width:0}) |
| | | com_model_id: number; |
| | | |
| | | @Column({ comment:'', type:'int', default:null, width:0}) |
| | | model_id: number; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'', type:'varchar', default:'', length:50}) |
| | | sortby: string; |
| | | |
| | | @Column({ comment:'', type:'int', default:null, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 设备相关的附件 |
| | | */ |
| | | @EntityModel('t_base_device_attachment') |
| | | export class Deviceattachment extends BaseEntity { |
| | | @Column({ comment:'附件名称', type:'varchar', default:'', length:50}) |
| | | attach_name: string; |
| | | |
| | | @Column({ comment:'顺序编号', type:'varchar', default:'', length:50}) |
| | | attach_sort: string; |
| | | |
| | | @Column({ comment:'附件类型, 1-使用说明 2-安装位置照片 ...', type:'varchar', default:'', length:50}) |
| | | attach_type: string; |
| | | |
| | | @Column({ comment:'附件访问路径', type:'varchar', default:'', length:50}) |
| | | attach_url: string; |
| | | |
| | | @Column({ comment:'附件提供人', type:'varchar', default:'', length:50}) |
| | | configurator: string; |
| | | |
| | | @Column({ comment:'设备物理ID', type:'varchar', default:'', length:50}) |
| | | device_id: string; |
| | | |
| | | @Column({ comment:'逻辑ID', type:'varchar', default:'', length:50}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'状态,1-启用 0-停用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 设备分组表 |
| | | */ |
| | | @EntityModel('t_base_device_group') |
| | | export class Devicegroup extends BaseEntity { |
| | | @Column({ comment:'分组设置人员', type:'varchar', default:'null', length:255}) |
| | | configurator: string; |
| | | |
| | | @Column({ comment:'逻辑ID', type:'varchar', default:'null', length:255}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:255}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'状态', type:'tinyint', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 设备运维记录 |
| | | */ |
| | | @EntityModel('t_base_device_opreraterecord') |
| | | export class Deviceopreraterecord extends BaseEntity { |
| | | @Column({ comment:'设备物理ID', type:'varchar', default:'', length:50}) |
| | | device_id: string; |
| | | |
| | | @Column({ comment:'设备逻辑ID', type:'varchar', default:'', length:50}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'运维内容', type:'varchar', default:'', length:50}) |
| | | operate_content: string; |
| | | |
| | | @Column({ comment:'运维类型 1-巡检 2-维修', type:'varchar', default:'', length:50}) |
| | | operate_type: string; |
| | | |
| | | @Column({ comment:'运维人员', type:'varchar', default:'', length:50}) |
| | | operater: string; |
| | | |
| | | @Column({ comment:'附件访问路径', type:'varchar', default:'', length:50}) |
| | | pic_url: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'状态,1-启用 0-停用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 斗轮机信息 |
| | | */ |
| | | @EntityModel('t_base_dou_trubine') |
| | | export class Doutrubine extends BaseEntity { |
| | | @Column({ comment:'旋转直径', type:'varchar', default:'null', length:255}) |
| | | diameter_wheel: string; |
| | | |
| | | @Column({ comment:'dou_wheel_volumn', type:'varchar', default:'null', length:255}) |
| | | dou_wheel_volumn: string; |
| | | |
| | | @Column({ comment:'max_reclaiming', type:'varchar', default:'null', length:255}) |
| | | max_reclaiming: string; |
| | | |
| | | @Column({ comment:'煤堆2', type:'varchar', default:'null', length:255}) |
| | | max_windrow: string; |
| | | |
| | | @Column({ comment:'petch_angle', type:'varchar', default:'null', length:255}) |
| | | petch_angle: string; |
| | | |
| | | @Column({ comment:'旋转直径', type:'varchar', default:'null', length:255}) |
| | | pie_height_down: string; |
| | | |
| | | @Column({ comment:'旋转直径', type:'varchar', default:'null', length:255}) |
| | | pie_height_up: string; |
| | | |
| | | @Column({ comment:'rated_reclaiming', type:'varchar', default:'null', length:255}) |
| | | rated_reclaiming: string; |
| | | |
| | | @Column({ comment:'煤堆1', type:'varchar', default:'null', length:255}) |
| | | rated_windrow: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'null', length:255}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'状态', type:'tinyint', default:1, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'斗轮机名称', type:'varchar', default:'null', length:255}) |
| | | trubine_name: string; |
| | | |
| | | @Column({ comment:'斗轮机编号', type:'varchar', default:'null', length:255}) |
| | | trubine_no: string; |
| | | |
| | | @Column({ comment:'型号尺寸', type:'varchar', default:'null', length:255}) |
| | | trubine_size: string; |
| | | |
| | | @Column({ comment:'斗轮机类别', type:'varchar', default:'null', length:255}) |
| | | trubine_type: string; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 任务执行记录表 |
| | | */ |
| | | @EntityModel('t_task_exec_record') |
| | | export class Execrecord extends BaseEntity { |
| | | @Column({ comment:'设备物理ID', type:'varchar', default:'', length:50}) |
| | | device_id: string; |
| | | |
| | | @Column({ comment:'设备执行任务时刻的相关参数,json格式。', type:'varchar', default:'', length:50}) |
| | | device_params: string; |
| | | |
| | | @Column({ comment:'结束时间,任务执行完成时间', type:'datetime'}) |
| | | end_time: Date; |
| | | |
| | | @Column({ comment:'执行结果', type:'varchar', default:'', length:50}) |
| | | exec_result: string; |
| | | |
| | | @Column({ comment:'执行耗时', type:'varchar', default:'', length:50}) |
| | | exec_time: string; |
| | | |
| | | @Column({ comment:'1-周期任务 0-即时性任务', type:'int', default:null, width:0}) |
| | | is_periodic: number; |
| | | |
| | | @Column({ comment:'设备的逻辑ID', type:'varchar', default:'', length:50}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'服务端数据接收时间', type:'datetime'}) |
| | | receive_time: Date; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'数据回传时间', type:'datetime'}) |
| | | send_time: Date; |
| | | |
| | | @Column({ comment:'开始时间,设备收到指令时间', type:'datetime'}) |
| | | start_time: Date; |
| | | |
| | | @Column({ comment:'无意义,框架需要', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'任务指令', type:'varchar', default:'', length:50}) |
| | | task_command: string; |
| | | |
| | | @Column({ comment:'任务ID,对应t_task_periodic_setting的主键,或者t_task_immediately主键', type:'int', default:null, width:0}) |
| | | task_id: number; |
| | | |
| | | @Column({ comment:'监测记录ID,对应t_task_monitor的主键', type:'int', default:null, width:0}) |
| | | task_monitor_id: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 接口清单 |
| | | */ |
| | | @EntityModel('t_config_interface_list') |
| | | export class Interfacelist extends BaseEntity { |
| | | @Column({ comment:'账号', type:'varchar', default:'', length:50}) |
| | | auth_account: string; |
| | | |
| | | @Column({ comment:'密码', type:'varchar', default:'', length:50}) |
| | | auth_psw: string; |
| | | |
| | | @Column({ comment:'认证方式', type:'varchar', default:'', length:50}) |
| | | interface_auth: string; |
| | | |
| | | @Column({ comment:'接口IP', type:'varchar', default:'', length:50}) |
| | | interface_ip: string; |
| | | |
| | | @Column({ comment:'接口名称', type:'varchar', default:'', length:50}) |
| | | interface_name: string; |
| | | |
| | | @Column({ comment:'端口', type:'varchar', default:'', length:50}) |
| | | interface_port: string; |
| | | |
| | | @Column({ comment:'接口协议', type:'varchar', default:'', length:50}) |
| | | interface_protocal: string; |
| | | |
| | | @Column({ comment:'接口类型', type:'varchar', default:'', length:50}) |
| | | interface_type: string; |
| | | |
| | | @Column({ comment:'接口地址', type:'varchar', default:'', length:50}) |
| | | interface_url: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'', type:'varchar', default:'', length:50}) |
| | | share_service: string; |
| | | |
| | | @Column({ comment:'', type:'varchar', default:'', length:50}) |
| | | share_url: string; |
| | | |
| | | @Column({ comment:'', type:'int', default:null, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 组合模型 |
| | | */ |
| | | @EntityModel('t_config_interface_record') |
| | | export class Interfacerecord extends BaseEntity { |
| | | @Column({ comment:'调用结束时间', type:'datetime'}) |
| | | end_time: Date; |
| | | |
| | | @Column({ comment:'接口调用地址', type:'varchar', default:'', length:50}) |
| | | interface_direct: string; |
| | | |
| | | @Column({ comment:'接口清单ID', type:'varchar', default:'', length:50}) |
| | | interface_id: string; |
| | | |
| | | @Column({ comment:'调用参数,json格式', type:'varchar', default:'', length:50}) |
| | | params: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'请求类型', type:'varchar', default:'', length:50}) |
| | | request_type: string; |
| | | |
| | | @Column({ comment:'调用结果', type:'varchar', default:'', length:50}) |
| | | result: string; |
| | | |
| | | @Column({ comment:'开始时间', type:'datetime'}) |
| | | start_time: Date; |
| | | |
| | | @Column({ comment:'1-启用 0-禁用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 任务消息记录 |
| | | */ |
| | | @EntityModel('t_task_message_record') |
| | | export class Messagerecord extends BaseEntity { |
| | | @Column({ comment:'1-周期任务 0-即时性任务', type:'int', default:null, width:0}) |
| | | is_periodic: number; |
| | | |
| | | @Column({ comment:'消息', type:'varchar', default:'', length:50}) |
| | | message: string; |
| | | |
| | | @Column({ comment:'发送源 ', type:'varchar', default:'', length:50}) |
| | | msg_source: string; |
| | | |
| | | @Column({ comment:'发送目标', type:'varchar', default:'', length:50}) |
| | | msg_target: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'发送时间', type:'datetime'}) |
| | | send_time: Date; |
| | | |
| | | @Column({ comment:'消息状态 1-已发送 0-未发送 默认为0', type:'int', default:0, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'任务来源ID', type:'int', default:null, width:0}) |
| | | task_id: number; |
| | | |
| | | @Column({ comment:'监测记录ID', type:'int', default:null, width:0}) |
| | | task_monitor_id: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 监测采集原数据 |
| | | */ |
| | | @EntityModel('t_monitor_meta_data') |
| | | export class Metadata extends BaseEntity { |
| | | @Column({ comment:'数据文件内容描述', type:'varchar', default:'', length:50}) |
| | | data_content: string; |
| | | |
| | | @Column({ comment:'数据文件路径,url格式,域名可由前端或者服务端配置', type:'varchar', default:'', length:50}) |
| | | data_path: string; |
| | | |
| | | @Column({ comment:'设备ID', type:'varchar', default:'', length:50}) |
| | | device_id: string; |
| | | |
| | | @Column({ comment:'执行记录', type:'int', default:null, width:0}) |
| | | exec_record_id: number; |
| | | |
| | | @Column({ comment:'1-周期任务 0-即时性任务', type:'int', default:null, width:0}) |
| | | is_periodic: number; |
| | | |
| | | @Column({ comment:'逻辑ID', type:'varchar', default:'', length:50}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'状态,1-有效 0-无效 默认为1', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'任务ID', type:'int', default:null, width:0}) |
| | | task_id: number; |
| | | |
| | | @Column({ comment:'监测记录ID', type:'int', default:null, width:0}) |
| | | task_monitor_id: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 组合模型 |
| | | */ |
| | | @EntityModel('t_model_combination') |
| | | export class Modelcombination extends BaseEntity { |
| | | @Column({ comment:'数据内容', type:'varchar', default:'', length:50}) |
| | | data_content: string; |
| | | |
| | | @Column({ comment:'数据文件路径,url格式,域名可由服务端或者前端配置', type:'varchar', default:'', length:50}) |
| | | data_path: string; |
| | | |
| | | @Column({ comment:'1-周期任务 0-即时任务', type:'int', default:null, width:0}) |
| | | is_periodic: number; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'1-启用 0-禁用', type:'int', default:null, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'任务ID,周期任务表或者即时任务表主键', type:'int', default:null, width:0}) |
| | | task_id: number; |
| | | |
| | | @Column({ comment:'监测记录ID', type:'int', default:null, width:0}) |
| | | task_monitor_id: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 静态模型数据 |
| | | */ |
| | | @EntityModel('t_model_static') |
| | | export class Modelstatic extends BaseEntity { |
| | | @Column({ comment:'数据内容', type:'varchar', default:'', length:50}) |
| | | data_content: string; |
| | | |
| | | @Column({ comment:'数据文件路径,存放url', type:'varchar', default:'', length:50}) |
| | | data_path: string; |
| | | |
| | | @Column({ comment:'物理模型的逻辑ID', type:'varchar', default:'', length:50}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'', type:'varchar', default:'', length:50}) |
| | | name: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'状态, 1-启用 0-禁用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 分组任务参数设置表 |
| | | */ |
| | | @EntityModel('t_task_periodic_setting') |
| | | export class Periodicsetting extends BaseEntity { |
| | | @Column({ comment:'周期任务', type:'varchar', default:'null', length:255}) |
| | | crontab_rule: string; |
| | | |
| | | @Column({ comment:'任务结束时间', type:'datetime'}) |
| | | end_time: Date; |
| | | |
| | | @Column({ comment:'设备分组ID', type:'int', default:null, width:0}) |
| | | group_id: number; |
| | | |
| | | @Column({ comment:'设置人', type:'varchar', default:'null', length:255}) |
| | | operator: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'null', length:255}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'状态', type:'tinyint', default:1, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'任务命令格式', type:'varchar', default:'null', length:255}) |
| | | task_command: string; |
| | | |
| | | @Column({ comment:'任务内容描述', type:'varchar', default:'null', length:255}) |
| | | task_content: string; |
| | | |
| | | @Column({ comment:'任务参数', type:'varchar', default:'null', length:255}) |
| | | task_params: string; |
| | | |
| | | @Column({ comment:'任务类型', type:'int', default:null, width:0}) |
| | | task_type: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 盘煤计划 |
| | | */ |
| | | @EntityModel('t_plan_inventory') |
| | | export class Planinventory extends BaseEntity { |
| | | @Column({ comment:'煤种标记', type:'varchar', default:'', length:50}) |
| | | coal_marker: string; |
| | | |
| | | @Column({ comment:'煤堆体积', type:'varchar', default:'', length:50}) |
| | | coal_volume: string; |
| | | |
| | | @Column({ comment:'煤堆重量,单位吨', type:'varchar', default:'', length:50}) |
| | | coal_weight: string; |
| | | |
| | | @Column({ comment:'组合点云ID', type:'int', default:null, width:0}) |
| | | com_model_id: number; |
| | | |
| | | @Column({ comment:'盘煤计划ID', type:'int', default:null, width:0}) |
| | | plan_id: number; |
| | | |
| | | @Column({ comment:'盘煤名称', type:'varchar', default:'', length:50}) |
| | | plan_name: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'1-启用 0-禁用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @EntityModel('t_model_point_cloud') |
| | | export class Pointcloud extends BaseEntity { |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 点云模型 |
| | | */ |
| | | @EntityModel('t_model_point_model') |
| | | export class Pointmodel extends BaseEntity { |
| | | @Column({ comment:'数据内容', type:'varchar', default:'', length:50}) |
| | | data_content: string; |
| | | |
| | | @Column({ comment:'数据文件路径,存放url', type:'varchar', default:'', length:50}) |
| | | data_path: string; |
| | | |
| | | @Column({ comment:'设备物理ID', type:'varchar', default:'', length:50}) |
| | | device_id: string; |
| | | |
| | | @Column({ comment:'1-周期任务 0-即时性任务', type:'int', default:null, width:0}) |
| | | is_periodic: number; |
| | | |
| | | @Column({ comment:'点云数据来源的设备逻辑编号', type:'varchar', default:'', length:50}) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment:'点云名称,格式:以${logic_id#YYYYMMDDHHMMSS}', type:'varchar', default:'', length:50}) |
| | | name: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'状态, 1-启用 0-禁用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'任务ID,周期任务表或者即时任务表主键', type:'int', default:null, width:0}) |
| | | task_id: number; |
| | | |
| | | @Column({ comment:'监测记录id', type:'int', default:null, width:0}) |
| | | task_monitor_id: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 监测统计 |
| | | */ |
| | | @EntityModel('t_monitor_stat_data') |
| | | export class Statdata extends BaseEntity { |
| | | @Column({ comment:'点云计算花费时间,单位毫秒', type:'int', default:null, width:0}) |
| | | avg_caculater_time: number; |
| | | |
| | | @Column({ comment:'平均文件大小', type:'int', default:null, width:0}) |
| | | avg_filesize: number; |
| | | |
| | | @Column({ comment:'平均花费时间,单位毫秒', type:'int', default:null, width:0}) |
| | | avg_task_time: number; |
| | | |
| | | @Column({ comment:'数据传输时间,毫秒', type:'int', default:null, width:0}) |
| | | avg_transmission_time: number; |
| | | |
| | | @Column({ comment:'CPU 占用率,百分比', type:'int', default:null, width:0}) |
| | | cpu_rate: number; |
| | | |
| | | @Column({ comment:'统计截止时间', type:'datetime'}) |
| | | end_time: Date; |
| | | |
| | | @Column({ comment:'内存,', type:'int', default:null, width:0}) |
| | | memory: number; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'统计起始时间', type:'datetime'}) |
| | | start_time: Date; |
| | | |
| | | @Column({ comment:'', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'任务类型: 1-抓图 2-雷达扫描 3-除尘 ', type:'int', default:null, width:0}) |
| | | task_type: number; |
| | | |
| | | @Column({ comment:'统计时间粒度,5-5分钟 10-10分钟 30-30分钟 60-60分钟 1440-1天 43200-1月 ', type:'int', default:null, width:0}) |
| | | time: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 即时任务记录表 |
| | | */ |
| | | @EntityModel('t_task_immediately') |
| | | export class Taskimmediately extends BaseEntity { |
| | | @Column({ comment:'逻辑ID', type:'varchar', default:'', length:50}) |
| | | logic_ids: string; |
| | | |
| | | @Column({ comment:'设置时间', type:'varchar', default:'', length:50}) |
| | | operate_time: string; |
| | | |
| | | @Column({ comment:'操作人', type:'varchar', default:'', length:50}) |
| | | operator: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'0-未执行 1-执行中 2-已执行', type:'int', default:null, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'任务指令', type:'varchar', default:'', length:50}) |
| | | task_command: string; |
| | | |
| | | @Column({ comment:'任务内容描述', type:'varchar', default:'', length:50}) |
| | | task_content: string; |
| | | |
| | | @Column({ comment:'任务参数,如点云参数', type:'varchar', default:'', length:50}) |
| | | task_params: string; |
| | | |
| | | @Column({ comment:'任务类型: 1-抓图 2-雷达扫描 3-除尘 ', type:'int', default:null, width:0}) |
| | | task_type: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 监测任务表 |
| | | */ |
| | | @EntityModel('t_task_monitor') |
| | | export class Taskmonitor extends BaseEntity { |
| | | @Column({ comment:'周期任务周期设置,调度表达式', type:'varchar', default:'', length:50}) |
| | | crontab_rule: string; |
| | | |
| | | @Column({ comment:'1-周期任务 0-即时性任务', type:'int', default:null, width:0}) |
| | | is_periodic: number; |
| | | |
| | | @Column({ comment:'设备逻辑id集合,逗号分隔', type:'varchar', default:'', length:50}) |
| | | logic_ids: string; |
| | | |
| | | @Column({ comment:'', type:'varchar', default:'', length:50}) |
| | | operator: string; |
| | | |
| | | @Column({ comment:'', type:'datetime'}) |
| | | opertate_time: Date; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'0-未执行 1-执行中 2-已执行', type:'int', default:0, width:0}) |
| | | status: number; |
| | | |
| | | @Column({ comment:'', type:'varchar', default:'', length:50}) |
| | | task_command: string; |
| | | |
| | | @Column({ comment:'', type:'varchar', default:'', length:50}) |
| | | task_content: string; |
| | | |
| | | @Column({ comment:'任务ID, 周期任务的主键或者是即时任务的主键', type:'varchar', default:'', length:50}) |
| | | task_id: string; |
| | | |
| | | @Column({ comment:'任务参数', type:'varchar', default:'', length:50}) |
| | | task_params: string; |
| | | |
| | | @Column({ comment:'任务类型: 1-抓图 2-雷达扫描 3-除尘 ', type:'int', default:null, width:0}) |
| | | task_type: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * 斗轮机信息 |
| | | */ |
| | | @EntityModel('t_base_dou_trubine_location') |
| | | export class Trubinelocation extends BaseEntity { |
| | | @Column({ comment:'高度', type:'varchar', default:'', length:50}) |
| | | elevation: string; |
| | | |
| | | @Column({ comment:'方位角', type:'varchar', default:'', length:50}) |
| | | heading_angle: string; |
| | | |
| | | @Column({ comment:'经度', type:'varchar', default:'', length:50}) |
| | | latitude: string; |
| | | |
| | | @Column({ comment:'纬度', type:'varchar', default:'', length:50}) |
| | | longitude: string; |
| | | |
| | | @Column({ comment:'精度', type:'varchar', default:'', length:50}) |
| | | precision: string; |
| | | |
| | | @Column({ comment:'备注', type:'varchar', default:'', length:50}) |
| | | remark: string; |
| | | |
| | | @Column({ comment:'1-启用 0-禁用', type:'int', default:1, width:0}) |
| | | status: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, Double } from 'typeorm'; |
| | | /** |
| | | * |
| | | */ |
| | | @EntityModel('t_user') |
| | | export class Tuser extends BaseEntity { |
| | | @Column({ comment:'年龄', type:'int', default:null, width:0}) |
| | | age: number; |
| | | |
| | | @Column({ comment:'出生日期', type:'datetime'}) |
| | | birthDate: Date; |
| | | |
| | | @Column({ comment:'头像', type:'varchar', default:'null', length:255}) |
| | | headImg: string; |
| | | |
| | | @Column({ comment:'介绍', type:'varchar', default:'null', length:255}) |
| | | introduce: string; |
| | | |
| | | @Column({ comment:'姓名', type:'varchar', default:'null', length:255}) |
| | | name: string; |
| | | |
| | | @Column({ comment:'性别 0-未知 1-男 2-女', type:'tinyint', default:0, width:0}) |
| | | type: number; |
| | | |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Basedeviceinfo } from '../entity/basedeviceinfo'; |
| | | /** |
| | | * 设备信息表 |
| | | */ |
| | | @Provide() |
| | | export class BasedeviceinfoService extends DataService { |
| | | @InjectEntityModel(Basedeviceinfo) |
| | | basedeviceinfo: Repository<Basedeviceinfo> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Basedeviceparams } from '../entity/basedeviceparams'; |
| | | /** |
| | | * 设备参数表 |
| | | */ |
| | | @Provide() |
| | | export class BasedeviceparamsService extends DataService { |
| | | @InjectEntityModel(Basedeviceparams) |
| | | basedeviceparams: Repository<Basedeviceparams> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Basedevicesection } from '../entity/basedevicesection'; |
| | | /** |
| | | * 设备组件 |
| | | */ |
| | | @Provide() |
| | | export class BasedevicesectionService extends DataService { |
| | | @InjectEntityModel(Basedevicesection) |
| | | basedevicesection: Repository<Basedevicesection> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Basedevicestatus } from '../entity/basedevicestatus'; |
| | | /** |
| | | * 设备状态表 |
| | | */ |
| | | @Provide() |
| | | export class BasedevicestatusService extends DataService { |
| | | @InjectEntityModel(Basedevicestatus) |
| | | basedevicestatus: Repository<Basedevicestatus> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Colletdata } from '../entity/colletdata'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @Provide() |
| | | export class ColletdataService extends DataService { |
| | | @InjectEntityModel(Colletdata) |
| | | colletdata: Repository<Colletdata> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Colletmeta } from '../entity/colletmeta'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @Provide() |
| | | export class ColletmetaService extends DataService { |
| | | @InjectEntityModel(Colletmeta) |
| | | colletmeta: Repository<Colletmeta> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Comconfig } from '../entity/comconfig'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @Provide() |
| | | export class ComconfigService extends DataService { |
| | | @InjectEntityModel(Comconfig) |
| | | comconfig: Repository<Comconfig> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Deviceattachment } from '../entity/deviceattachment'; |
| | | /** |
| | | * 设备相关的附件 |
| | | */ |
| | | @Provide() |
| | | export class DeviceattachmentService extends DataService { |
| | | @InjectEntityModel(Deviceattachment) |
| | | deviceattachment: Repository<Deviceattachment> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Devicegroup } from '../entity/devicegroup'; |
| | | /** |
| | | * 设备分组表 |
| | | */ |
| | | @Provide() |
| | | export class DevicegroupService extends DataService { |
| | | @InjectEntityModel(Devicegroup) |
| | | devicegroup: Repository<Devicegroup> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Deviceopreraterecord } from '../entity/deviceopreraterecord'; |
| | | /** |
| | | * 设备运维记录 |
| | | */ |
| | | @Provide() |
| | | export class DeviceopreraterecordService extends DataService { |
| | | @InjectEntityModel(Deviceopreraterecord) |
| | | deviceopreraterecord: Repository<Deviceopreraterecord> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Doutrubine } from '../entity/doutrubine'; |
| | | /** |
| | | * 斗轮机信息 |
| | | */ |
| | | @Provide() |
| | | export class DoutrubineService extends DataService { |
| | | @InjectEntityModel(Doutrubine) |
| | | doutrubine: Repository<Doutrubine> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Execrecord } from '../entity/execrecord'; |
| | | /** |
| | | * 任务执行记录表 |
| | | */ |
| | | @Provide() |
| | | export class ExecrecordService extends DataService { |
| | | @InjectEntityModel(Execrecord) |
| | | execrecord: Repository<Execrecord> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Interfacelist } from '../entity/interfacelist'; |
| | | /** |
| | | * 接口清单 |
| | | */ |
| | | @Provide() |
| | | export class InterfacelistService extends DataService { |
| | | @InjectEntityModel(Interfacelist) |
| | | interfacelist: Repository<Interfacelist> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Interfacerecord } from '../entity/interfacerecord'; |
| | | /** |
| | | * 组合模型 |
| | | */ |
| | | @Provide() |
| | | export class InterfacerecordService extends DataService { |
| | | @InjectEntityModel(Interfacerecord) |
| | | interfacerecord: Repository<Interfacerecord> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Messagerecord } from '../entity/messagerecord'; |
| | | /** |
| | | * 任务消息记录 |
| | | */ |
| | | @Provide() |
| | | export class MessagerecordService extends DataService { |
| | | @InjectEntityModel(Messagerecord) |
| | | messagerecord: Repository<Messagerecord> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Metadata } from '../entity/metadata'; |
| | | /** |
| | | * 监测采集原数据 |
| | | */ |
| | | @Provide() |
| | | export class MetadataService extends DataService { |
| | | @InjectEntityModel(Metadata) |
| | | metadata: Repository<Metadata> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Modelcombination } from '../entity/modelcombination'; |
| | | /** |
| | | * 组合模型 |
| | | */ |
| | | @Provide() |
| | | export class ModelcombinationService extends DataService { |
| | | @InjectEntityModel(Modelcombination) |
| | | modelcombination: Repository<Modelcombination> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Modelstatic } from '../entity/modelstatic'; |
| | | /** |
| | | * 静态模型数据 |
| | | */ |
| | | @Provide() |
| | | export class ModelstaticService extends DataService { |
| | | @InjectEntityModel(Modelstatic) |
| | | modelstatic: Repository<Modelstatic> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Periodicsetting } from '../entity/periodicsetting'; |
| | | /** |
| | | * 分组任务参数设置表 |
| | | */ |
| | | @Provide() |
| | | export class PeriodicsettingService extends DataService { |
| | | @InjectEntityModel(Periodicsetting) |
| | | periodicsetting: Repository<Periodicsetting> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Planinventory } from '../entity/planinventory'; |
| | | /** |
| | | * 盘煤计划 |
| | | */ |
| | | @Provide() |
| | | export class PlaninventoryService extends DataService { |
| | | @InjectEntityModel(Planinventory) |
| | | planinventory: Repository<Planinventory> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Pointcloud } from '../entity/pointcloud'; |
| | | /** |
| | | * 监测元数据 |
| | | */ |
| | | @Provide() |
| | | export class PointcloudService extends DataService { |
| | | @InjectEntityModel(Pointcloud) |
| | | pointcloud: Repository<Pointcloud> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Pointmodel } from '../entity/pointmodel'; |
| | | /** |
| | | * 点云模型 |
| | | */ |
| | | @Provide() |
| | | export class PointmodelService extends DataService { |
| | | @InjectEntityModel(Pointmodel) |
| | | pointmodel: Repository<Pointmodel> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Statdata } from '../entity/statdata'; |
| | | /** |
| | | * 监测统计 |
| | | */ |
| | | @Provide() |
| | | export class StatdataService extends DataService { |
| | | @InjectEntityModel(Statdata) |
| | | statdata: Repository<Statdata> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Taskimmediately } from '../entity/taskimmediately'; |
| | | /** |
| | | * 即时任务记录表 |
| | | */ |
| | | @Provide() |
| | | export class TaskimmediatelyService extends DataService { |
| | | @InjectEntityModel(Taskimmediately) |
| | | taskimmediately: Repository<Taskimmediately> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Taskmonitor } from '../entity/taskmonitor'; |
| | | /** |
| | | * 监测任务表 |
| | | */ |
| | | @Provide() |
| | | export class TaskmonitorService extends DataService { |
| | | @InjectEntityModel(Taskmonitor) |
| | | taskmonitor: Repository<Taskmonitor> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Trubinelocation } from '../entity/trubinelocation'; |
| | | /** |
| | | * 斗轮机信息 |
| | | */ |
| | | @Provide() |
| | | export class TrubinelocationService extends DataService { |
| | | @InjectEntityModel(Trubinelocation) |
| | | trubinelocation: Repository<Trubinelocation> |
| | | } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { BaseService } from '@cool-midway/core'; |
| | | import { InjectEntityModel } from '@midwayjs/orm'; |
| | | import { Repository } from 'typeorm'; |
| | | import { DataService } from '../../base/service/dataapi/dataapi'; |
| | | import { Tuser } from '../entity/tuser'; |
| | | /** |
| | | * |
| | | */ |
| | | @Provide() |
| | | export class TuserService extends DataService { |
| | | @InjectEntityModel(Tuser) |
| | | tuser: Repository<Tuser> |
| | | } |