| New file |
| | |
| | | import { Application } from 'egg'; |
| | | import { ModuleConfig } from '@cool-midway/core'; |
| | | |
| | | /** |
| | | * 模块配置 |
| | | */ |
| | | export default (app: Application) => { |
| | | return { |
| | | // 模块名称 |
| | | name: 'deviceGroup', |
| | | // 模块描述 |
| | | description: '设备分组', |
| | | // 中间件,只对本模块有效 |
| | | middlewares: [], |
| | | } as ModuleConfig; |
| | | }; |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { DemodeviceGroupEntity } from '../../entity/deviceGroup'; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'info', 'list', 'page'], |
| | | entity: DemodeviceGroupEntity, |
| | | }) |
| | | export class DemoAdmindeviceGroupController extends BaseController { } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { DemodeviceGroupEntity } from '../../entity/deviceGroup'; |
| | | |
| | | /** |
| | | * test |
| | | */ |
| | | @Provide() |
| | | @CoolController( |
| | | { |
| | | api: ['add', 'delete', 'update', 'info', 'list', 'page'], |
| | | entity: DemodeviceGroupEntity |
| | | } |
| | | ) |
| | | export class DemoAppdGController extends BaseController { } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, PrimaryGeneratedColumn } from 'typeorm'; |
| | | |
| | | /** |
| | | * 商品 |
| | | */ |
| | | @EntityModel('devicegroup_fcs') |
| | | export class DemodeviceGroupEntity extends BaseEntity { |
| | | @PrimaryGeneratedColumn({ comment: 'id' }) |
| | | id: number; |
| | | |
| | | @Column({ comment: '逻辑ID' }) |
| | | logic_id: string; |
| | | |
| | | @Column({ comment: '分组设置人员' }) |
| | | configurator: string; |
| | | |
| | | @Column({ comment: '备注', default: "无" }) |
| | | remark: string; |
| | | |
| | | @Column({ comment: '状态', default: 1 }) |
| | | status: boolean; |
| | | } |
| New file |
| | |
| | | import { Application } from 'egg'; |
| | | import { ModuleConfig } from '@cool-midway/core'; |
| | | |
| | | /** |
| | | * 模块配置 |
| | | */ |
| | | export default (app: Application) => { |
| | | return { |
| | | // 模块名称 |
| | | name: 'taskSetting', |
| | | // 模块描述 |
| | | description: '分组任务参数设置表', |
| | | // 中间件,只对本模块有效 |
| | | middlewares: [], |
| | | } as ModuleConfig; |
| | | }; |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { DemotaskSettingEntity } from '../../entity/taskSetting'; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | @Provide() |
| | | @CoolController({ |
| | | api: ['add', 'delete', 'update', 'info', 'list', 'page'], |
| | | entity: DemotaskSettingEntity, |
| | | }) |
| | | export class DemoAdmintaskSettingController extends BaseController { } |
| New file |
| | |
| | | import { Provide } from '@midwayjs/decorator'; |
| | | import { CoolController, BaseController } from '@cool-midway/core'; |
| | | import { DemotaskSettingEntity } from '../../entity/taskSetting'; |
| | | |
| | | /** |
| | | * test |
| | | */ |
| | | @Provide() |
| | | @CoolController( |
| | | { |
| | | api: ['add', 'delete', 'update', 'info', 'list', 'page'], |
| | | entity: DemotaskSettingEntity |
| | | } |
| | | ) |
| | | export class DemoApptSController extends BaseController { } |
| New file |
| | |
| | | import { EntityModel } from '@midwayjs/orm'; |
| | | import { BaseEntity } from '@cool-midway/core'; |
| | | import { Column, PrimaryGeneratedColumn } from 'typeorm'; |
| | | |
| | | /** |
| | | * 商品 |
| | | */ |
| | | @EntityModel('tasksetting_fcs') |
| | | export class DemotaskSettingEntity extends BaseEntity { |
| | | @PrimaryGeneratedColumn({ comment: 'id' }) |
| | | id: number; |
| | | |
| | | @Column({ comment: '设备分组ID' }) |
| | | group_id: string; |
| | | |
| | | @Column({ comment: '周期任务' }) |
| | | crontab_rule: string; |
| | | |
| | | @Column({ comment: '任务类型', default: "无" }) |
| | | task_type: string; |
| | | |
| | | @Column({ comment: '任务内容描述', default: "无" }) |
| | | task_content: string; |
| | | |
| | | @Column({ comment: '任务命令格式', default: "无" }) |
| | | task_command: string; |
| | | |
| | | @Column({ comment: '任务参数', default: "无" }) |
| | | task_params: string; |
| | | |
| | | @Column({ comment: '设置人' }) |
| | | operator: string; |
| | | |
| | | @Column({ comment: '任务结束时间', default: "无" }) |
| | | end_time: string; |
| | | |
| | | @Column({ comment: '备注', default: "无" }) |
| | | remark: string; |
| | | |
| | | @Column({ comment: '状态', default: true }) |
| | | status: boolean; |
| | | } |