瀏覽代碼

修改接口

zs 2 年之前
父節點
當前提交
4bf886f9d6
共有 36 個文件被更改,包括 2428 次插入0 次删除
  1. 89 0
      src/controller/applyflair.controller.ts
  2. 89 0
      src/controller/contactoffice.controller.ts
  3. 89 0
      src/controller/notice.controller.ts
  4. 89 0
      src/controller/relevantdownload.controller.ts
  5. 89 0
      src/controller/scientistsettle.controller.ts
  6. 89 0
      src/controller/studio.controller.ts
  7. 89 0
      src/controller/techoldemand.controller.ts
  8. 89 0
      src/controller/techolsupport.controller.ts
  9. 89 0
      src/controller/yearreport.controller.ts
  10. 29 0
      src/entity/applyflair.entity.ts
  11. 19 0
      src/entity/contactoffice.entity.ts
  12. 27 0
      src/entity/notice.entity.ts
  13. 27 0
      src/entity/relevantdownload.entity.ts
  14. 41 0
      src/entity/scientistsettle.entity.ts
  15. 47 0
      src/entity/studio.entity.ts
  16. 55 0
      src/entity/techoldemand.entity.ts
  17. 51 0
      src/entity/techolsupport.entity.ts
  18. 29 0
      src/entity/yearreport.entity.ts
  19. 115 0
      src/interface/applyflair.interface.ts
  20. 75 0
      src/interface/contactoffice.interface.ts
  21. 101 0
      src/interface/notice.interface.ts
  22. 91 0
      src/interface/relevantdownload.interface.ts
  23. 154 0
      src/interface/scientistsettle.interface.ts
  24. 172 0
      src/interface/studio.interface.ts
  25. 162 0
      src/interface/techoldemand.interface.ts
  26. 149 0
      src/interface/techolsupport.interface.ts
  27. 115 0
      src/interface/yearreport.interface.ts
  28. 11 0
      src/service/applyflair.service.ts
  29. 21 0
      src/service/contactoffice.service.ts
  30. 11 0
      src/service/notice.service.ts
  31. 11 0
      src/service/relevantdownload.service.ts
  32. 39 0
      src/service/scientistsettle.service.ts
  33. 42 0
      src/service/studio.service.ts
  34. 11 0
      src/service/techoldemand.service.ts
  35. 11 0
      src/service/techolsupport.service.ts
  36. 11 0
      src/service/yearreport.service.ts

+ 89 - 0
src/controller/applyflair.controller.ts

@@ -0,0 +1,89 @@
+import {
+  Body,
+  Controller,
+  Del,
+  Get,
+  Inject,
+  Param,
+  Post,
+  Query,
+} from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { ApplyflairService } from '../service/applyflair.service';
+import {
+  CDTO_applyflair,
+  CVO_applyflair,
+  FVO_applyflair,
+  QDTO_applyflair,
+  QVO_applyflair,
+  UDTO_applyflair,
+  UVAO_applyflair,
+} from '../interface/applyflair.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['申请保留资质'])
+@Controller('/applyflair')
+export class ApplyflairController extends BaseController {
+  @Inject()
+  service: ApplyflairService;
+
+  @Post('/')
+  @Validate()
+  @ApiResponse({ type: CVO_applyflair })
+  async create(@Body() data: CDTO_applyflair) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_applyflair(dbData);
+    return result;
+  }
+  @Get('/')
+  @ApiQuery({ name: 'query' })
+  @ApiResponse({ type: QVO_applyflair })
+  async query(
+    @Query() filter: QDTO_applyflair,
+    @Query('skip') skip: number,
+    @Query('limit') limit: number
+  ) {
+    const list = await this.service.query(filter, { skip, limit });
+    const data = [];
+    for (const i of list) {
+      const newData = new QVO_applyflair(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+  @Get('/:id')
+  @ApiResponse({ type: FVO_applyflair })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_applyflair(data);
+    return result;
+  }
+
+  @Post('/:id')
+  @Validate()
+  @ApiResponse({ type: UVAO_applyflair })
+  async update(@Param('id') id: string, @Body() body: UDTO_applyflair) {
+    const result = await this.service.updateOne(id, body);
+    return result;
+  }
+
+  @Del('/:id')
+  @Validate()
+  async delete(@Param('id') id: string) {
+    await this.service.delete(id);
+    return 'ok';
+  }
+  async createMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async updateMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async deleteMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+}

+ 89 - 0
src/controller/contactoffice.controller.ts

@@ -0,0 +1,89 @@
+import {
+  Body,
+  Controller,
+  Del,
+  Get,
+  Inject,
+  Param,
+  Post,
+  Query,
+} from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { ContactofficeService } from '../service/contactoffice.service';
+import {
+  CDTO_contactoffice,
+  CVO_contactoffice,
+  FVO_contactoffice,
+  QDTO_contactoffice,
+  QVO_contactoffice,
+  UDTO_contactoffice,
+  UVAO_contactoffice,
+} from '../interface/contactoffice.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['联系处室'])
+@Controller('/contactoffice')
+export class ContactofficeController extends BaseController {
+  @Inject()
+  service: ContactofficeService;
+
+  @Post('/')
+  @Validate()
+  @ApiResponse({ type: CVO_contactoffice })
+  async create(@Body() data: CDTO_contactoffice) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_contactoffice(dbData);
+    return result;
+  }
+  @Get('/')
+  @ApiQuery({ name: 'query' })
+  @ApiResponse({ type: QVO_contactoffice })
+  async query(
+    @Query() filter: QDTO_contactoffice,
+    @Query('skip') skip: number,
+    @Query('limit') limit: number
+  ) {
+    const list = await this.service.query(filter, { skip, limit });
+    const data = [];
+    for (const i of list) {
+      const newData = new QVO_contactoffice(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+  @Get('/:id')
+  @ApiResponse({ type: FVO_contactoffice })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_contactoffice(data);
+    return result;
+  }
+
+  @Post('/:id')
+  @Validate()
+  @ApiResponse({ type: UVAO_contactoffice })
+  async update(@Param('id') id: string, @Body() body: UDTO_contactoffice) {
+    const result = await this.service.updateOne(id, body);
+    return result;
+  }
+
+  @Del('/:id')
+  @Validate()
+  async delete(@Param('id') id: string) {
+    await this.service.delete(id);
+    return 'ok';
+  }
+  async createMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async updateMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async deleteMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+}

+ 89 - 0
src/controller/notice.controller.ts

@@ -0,0 +1,89 @@
+import {
+  Body,
+  Controller,
+  Del,
+  Get,
+  Inject,
+  Param,
+  Post,
+  Query,
+} from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { NoticeService } from '../service/notice.service';
+import {
+  CDTO_notice,
+  CVO_notice,
+  FVO_notice,
+  QDTO_notice,
+  QVO_notice,
+  UDTO_notice,
+  UVAO_notice,
+} from '../interface/notice.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['通知公告'])
+@Controller('/notice')
+export class NoticeController extends BaseController {
+  @Inject()
+  service: NoticeService;
+
+  @Post('/')
+  @Validate()
+  @ApiResponse({ type: CVO_notice })
+  async create(@Body() data: CDTO_notice) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_notice(dbData);
+    return result;
+  }
+  @Get('/')
+  @ApiQuery({ name: 'query' })
+  @ApiResponse({ type: QVO_notice })
+  async query(
+    @Query() filter: QDTO_notice,
+    @Query('skip') skip: number,
+    @Query('limit') limit: number
+  ) {
+    const list = await this.service.query(filter, { skip, limit });
+    const data = [];
+    for (const i of list) {
+      const newData = new QVO_notice(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+  @Get('/:id')
+  @ApiResponse({ type: FVO_notice })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_notice(data);
+    return result;
+  }
+
+  @Post('/:id')
+  @Validate()
+  @ApiResponse({ type: UVAO_notice })
+  async update(@Param('id') id: string, @Body() body: UDTO_notice) {
+    const result = await this.service.updateOne(id, body);
+    return result;
+  }
+
+  @Del('/:id')
+  @Validate()
+  async delete(@Param('id') id: string) {
+    await this.service.delete(id);
+    return 'ok';
+  }
+  async createMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async updateMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async deleteMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+}

+ 89 - 0
src/controller/relevantdownload.controller.ts

@@ -0,0 +1,89 @@
+import {
+  Body,
+  Controller,
+  Del,
+  Get,
+  Inject,
+  Param,
+  Post,
+  Query,
+} from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { RelevantdownloadService } from '../service/relevantdownload.service';
+import {
+  CDTO_relevantdownload,
+  CVO_relevantdownload,
+  FVO_relevantdownload,
+  QDTO_relevantdownload,
+  QVO_relevantdownload,
+  UDTO_relevantdownload,
+  UVAO_relevantdownload,
+} from '../interface/relevantdownload.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['相关下载'])
+@Controller('/relevantdownload')
+export class RelevantdownloadController extends BaseController {
+  @Inject()
+  service: RelevantdownloadService;
+
+  @Post('/')
+  @Validate()
+  @ApiResponse({ type: CVO_relevantdownload })
+  async create(@Body() data: CDTO_relevantdownload) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_relevantdownload(dbData);
+    return result;
+  }
+  @Get('/')
+  @ApiQuery({ name: 'query' })
+  @ApiResponse({ type: QVO_relevantdownload })
+  async query(
+    @Query() filter: QDTO_relevantdownload,
+    @Query('skip') skip: number,
+    @Query('limit') limit: number
+  ) {
+    const list = await this.service.query(filter, { skip, limit });
+    const data = [];
+    for (const i of list) {
+      const newData = new QVO_relevantdownload(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+  @Get('/:id')
+  @ApiResponse({ type: FVO_relevantdownload })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_relevantdownload(data);
+    return result;
+  }
+
+  @Post('/:id')
+  @Validate()
+  @ApiResponse({ type: UVAO_relevantdownload })
+  async update(@Param('id') id: string, @Body() body: UDTO_relevantdownload) {
+    const result = await this.service.updateOne(id, body);
+    return result;
+  }
+
+  @Del('/:id')
+  @Validate()
+  async delete(@Param('id') id: string) {
+    await this.service.delete(id);
+    return 'ok';
+  }
+  async createMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async updateMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async deleteMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+}

+ 89 - 0
src/controller/scientistsettle.controller.ts

@@ -0,0 +1,89 @@
+import {
+  Body,
+  Controller,
+  Del,
+  Get,
+  Inject,
+  Param,
+  Post,
+  Query,
+} from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { ScientistsettleService } from '../service/scientistsettle.service';
+import {
+  CDTO_scientistsettle,
+  CVO_scientistsettle,
+  FVO_scientistsettle,
+  QDTO_scientistsettle,
+  QVO_scientistsettle,
+  UDTO_scientistsettle,
+  UVAO_scientistsettle,
+} from '../interface/scientistsettle.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['入驻科学家工作室'])
+@Controller('/scientistsettle')
+export class ScientistsettleController extends BaseController {
+  @Inject()
+  service: ScientistsettleService;
+
+  @Post('/')
+  @Validate()
+  @ApiResponse({ type: CVO_scientistsettle })
+  async create(@Body() data: CDTO_scientistsettle) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_scientistsettle(dbData);
+    return result;
+  }
+  @Get('/')
+  @ApiQuery({ name: 'query' })
+  @ApiResponse({ type: QVO_scientistsettle })
+  async query(
+    @Query() filter: QDTO_scientistsettle,
+    @Query('skip') skip: number,
+    @Query('limit') limit: number
+  ) {
+    const list = await this.service.query(filter, { skip, limit });
+    const data = [];
+    for (const i of list) {
+      const newData = new QVO_scientistsettle(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+  @Get('/:id')
+  @ApiResponse({ type: FVO_scientistsettle })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_scientistsettle(data);
+    return result;
+  }
+
+  @Post('/:id')
+  @Validate()
+  @ApiResponse({ type: UVAO_scientistsettle })
+  async update(@Param('id') id: string, @Body() body: UDTO_scientistsettle) {
+    const result = await this.service.updateOne(id, body);
+    return result;
+  }
+
+  @Del('/:id')
+  @Validate()
+  async delete(@Param('id') id: string) {
+    await this.service.delete(id);
+    return 'ok';
+  }
+  async createMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async updateMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async deleteMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+}

+ 89 - 0
src/controller/studio.controller.ts

@@ -0,0 +1,89 @@
+import {
+  Body,
+  Controller,
+  Del,
+  Get,
+  Inject,
+  Param,
+  Post,
+  Query,
+} from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { StudioService } from '../service/studio.service';
+import {
+  CDTO_studio,
+  CVO_studio,
+  FVO_studio,
+  QDTO_studio,
+  QVO_studio,
+  UDTO_studio,
+  UVAO_studio,
+} from '../interface/studio.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['工作室'])
+@Controller('/studio')
+export class StudioController extends BaseController {
+  @Inject()
+  service: StudioService;
+
+  @Post('/')
+  @Validate()
+  @ApiResponse({ type: CVO_studio })
+  async create(@Body() data: CDTO_studio) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_studio(dbData);
+    return result;
+  }
+  @Get('/')
+  @ApiQuery({ name: 'query' })
+  @ApiResponse({ type: QVO_studio })
+  async query(
+    @Query() filter: QDTO_studio,
+    @Query('skip') skip: number,
+    @Query('limit') limit: number
+  ) {
+    const list = await this.service.query(filter, { skip, limit });
+    const data = [];
+    for (const i of list) {
+      const newData = new QVO_studio(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+  @Get('/:id')
+  @ApiResponse({ type: FVO_studio })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_studio(data);
+    return result;
+  }
+
+  @Post('/:id')
+  @Validate()
+  @ApiResponse({ type: UVAO_studio })
+  async update(@Param('id') id: string, @Body() body: UDTO_studio) {
+    const result = await this.service.updateOne(id, body);
+    return result;
+  }
+
+  @Del('/:id')
+  @Validate()
+  async delete(@Param('id') id: string) {
+    await this.service.delete(id);
+    return 'ok';
+  }
+  async createMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async updateMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async deleteMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+}

+ 89 - 0
src/controller/techoldemand.controller.ts

@@ -0,0 +1,89 @@
+import {
+  Body,
+  Controller,
+  Del,
+  Get,
+  Inject,
+  Param,
+  Post,
+  Query,
+} from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { TecholdemandService } from '../service/techoldemand.service';
+import {
+  CDTO_techoldemand,
+  CVO_techoldemand,
+  FVO_techoldemand,
+  QDTO_techoldemand,
+  QVO_techoldemand,
+  UDTO_techoldemand,
+  UVAO_techoldemand,
+} from '../interface/techoldemand.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['技术需求'])
+@Controller('/techoldemand')
+export class TecholdemandController extends BaseController {
+  @Inject()
+  service: TecholdemandService;
+
+  @Post('/')
+  @Validate()
+  @ApiResponse({ type: CVO_techoldemand })
+  async create(@Body() data: CDTO_techoldemand) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_techoldemand(dbData);
+    return result;
+  }
+  @Get('/')
+  @ApiQuery({ name: 'query' })
+  @ApiResponse({ type: QVO_techoldemand })
+  async query(
+    @Query() filter: QDTO_techoldemand,
+    @Query('skip') skip: number,
+    @Query('limit') limit: number
+  ) {
+    const list = await this.service.query(filter, { skip, limit });
+    const data = [];
+    for (const i of list) {
+      const newData = new QVO_techoldemand(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+  @Get('/:id')
+  @ApiResponse({ type: FVO_techoldemand })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_techoldemand(data);
+    return result;
+  }
+
+  @Post('/:id')
+  @Validate()
+  @ApiResponse({ type: UVAO_techoldemand })
+  async update(@Param('id') id: string, @Body() body: UDTO_techoldemand) {
+    const result = await this.service.updateOne(id, body);
+    return result;
+  }
+
+  @Del('/:id')
+  @Validate()
+  async delete(@Param('id') id: string) {
+    await this.service.delete(id);
+    return 'ok';
+  }
+  async createMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async updateMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async deleteMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+}

+ 89 - 0
src/controller/techolsupport.controller.ts

@@ -0,0 +1,89 @@
+import {
+  Body,
+  Controller,
+  Del,
+  Get,
+  Inject,
+  Param,
+  Post,
+  Query,
+} from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { TecholsupportService } from '../service/techolsupport.service';
+import {
+  CDTO_techolsupport,
+  CVO_techolsupport,
+  FVO_techolsupport,
+  QDTO_techolsupport,
+  QVO_techolsupport,
+  UDTO_techolsupport,
+  UVAO_techolsupport,
+} from '../interface/techolsupport.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['技术支持'])
+@Controller('/techolsupport')
+export class TecholsupportController extends BaseController {
+  @Inject()
+  service: TecholsupportService;
+
+  @Post('/')
+  @Validate()
+  @ApiResponse({ type: CVO_techolsupport })
+  async create(@Body() data: CDTO_techolsupport) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_techolsupport(dbData);
+    return result;
+  }
+  @Get('/')
+  @ApiQuery({ name: 'query' })
+  @ApiResponse({ type: QVO_techolsupport })
+  async query(
+    @Query() filter: QDTO_techolsupport,
+    @Query('skip') skip: number,
+    @Query('limit') limit: number
+  ) {
+    const list = await this.service.query(filter, { skip, limit });
+    const data = [];
+    for (const i of list) {
+      const newData = new QVO_techolsupport(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+  @Get('/:id')
+  @ApiResponse({ type: FVO_techolsupport })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_techolsupport(data);
+    return result;
+  }
+
+  @Post('/:id')
+  @Validate()
+  @ApiResponse({ type: UVAO_techolsupport })
+  async update(@Param('id') id: string, @Body() body: UDTO_techolsupport) {
+    const result = await this.service.updateOne(id, body);
+    return result;
+  }
+
+  @Del('/:id')
+  @Validate()
+  async delete(@Param('id') id: string) {
+    await this.service.delete(id);
+    return 'ok';
+  }
+  async createMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async updateMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async deleteMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+}

+ 89 - 0
src/controller/yearreport.controller.ts

@@ -0,0 +1,89 @@
+import {
+  Body,
+  Controller,
+  Del,
+  Get,
+  Inject,
+  Param,
+  Post,
+  Query,
+} from '@midwayjs/decorator';
+import { BaseController } from 'free-midway-component';
+import { YearreportService } from '../service/yearreport.service';
+import {
+  CDTO_yearreport,
+  CVO_yearreport,
+  FVO_yearreport,
+  QDTO_yearreport,
+  QVO_yearreport,
+  UDTO_yearreport,
+  UVAO_yearreport,
+} from '../interface/yearreport.interface';
+import { ApiResponse, ApiTags, ApiQuery } from '@midwayjs/swagger';
+import { Validate } from '@midwayjs/validate';
+@ApiTags(['年度报告'])
+@Controller('/yearreport')
+export class YearreportController extends BaseController {
+  @Inject()
+  service: YearreportService;
+
+  @Post('/')
+  @Validate()
+  @ApiResponse({ type: CVO_yearreport })
+  async create(@Body() data: CDTO_yearreport) {
+    const dbData = await this.service.create(data);
+    const result = new CVO_yearreport(dbData);
+    return result;
+  }
+  @Get('/')
+  @ApiQuery({ name: 'query' })
+  @ApiResponse({ type: QVO_yearreport })
+  async query(
+    @Query() filter: QDTO_yearreport,
+    @Query('skip') skip: number,
+    @Query('limit') limit: number
+  ) {
+    const list = await this.service.query(filter, { skip, limit });
+    const data = [];
+    for (const i of list) {
+      const newData = new QVO_yearreport(i);
+      data.push(newData);
+    }
+    const total = await this.service.count(filter);
+    return { data, total };
+  }
+
+  @Get('/:id')
+  @ApiResponse({ type: FVO_yearreport })
+  async fetch(@Param('id') id: string) {
+    const data = await this.service.fetch(id);
+    const result = new FVO_yearreport(data);
+    return result;
+  }
+
+  @Post('/:id')
+  @Validate()
+  @ApiResponse({ type: UVAO_yearreport })
+  async update(@Param('id') id: string, @Body() body: UDTO_yearreport) {
+    const result = await this.service.updateOne(id, body);
+    return result;
+  }
+
+  @Del('/:id')
+  @Validate()
+  async delete(@Param('id') id: string) {
+    await this.service.delete(id);
+    return 'ok';
+  }
+  async createMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async updateMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+
+  async deleteMany(...args: any[]) {
+    throw new Error('Method not implemented.');
+  }
+}

+ 29 - 0
src/entity/applyflair.entity.ts

@@ -0,0 +1,29 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'applyflair' },
+})
+export class Applyflair extends BaseModel {
+  @prop({ required: false, index: true, zh: '绑定用户' })
+  user_id: string;
+  @prop({ required: false, index: true, zh: '依托单位名称' })
+  company_name: string;
+  @prop({ required: false, index: true, zh: '工作室id' })
+  studio_id: string;
+  @prop({ required: false, index: true, zh: '工作室名称' })
+  studio_name: string;
+  @prop({ required: false, index: false, zh: '评估文件' })
+  file: Array<any>;
+  @prop({ required: false, index: true, zh: '申请时间' })
+  apply_time: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '状态',
+    remark: '字典表:status',
+    default: '0',
+  })
+  status: string;
+  @prop({ required: false, index: false, zh: '记录' })
+  record: Array<any>;
+}

+ 19 - 0
src/entity/contactoffice.entity.ts

@@ -0,0 +1,19 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'contactoffice' },
+})
+export class Contactoffice extends BaseModel {
+  @prop({ required: false, index: true, zh: '绑定用户' })
+  user_id: string;
+  @prop({ required: false, index: false, zh: '信息内容' })
+  content: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '是否启用',
+    remark: '字典表',
+    default: '0',
+  })
+  is_use: string;
+}

+ 27 - 0
src/entity/notice.entity.ts

@@ -0,0 +1,27 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'notice' },
+})
+export class Notice extends BaseModel {
+  @prop({ required: false, index: true, zh: '绑定用户' })
+  user_id: string;
+  @prop({ required: false, index: true, zh: '标题' })
+  title: string;
+  @prop({ required: false, index: true, zh: '发布时间' })
+  date: string;
+  @prop({ required: false, index: true, zh: '来源' })
+  origin: string;
+  @prop({ required: false, index: false, zh: '文件' })
+  file: Array<any>;
+  @prop({ required: false, index: false, zh: '内容' })
+  content: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '是否启用',
+    remark: '字典表:is_use',
+    default: '0',
+  })
+  is_use: string;
+}

+ 27 - 0
src/entity/relevantdownload.entity.ts

@@ -0,0 +1,27 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'relevantdownload' },
+})
+export class Relevantdownload extends BaseModel {
+  @prop({ required: false, index: false, zh: '绑定用户' })
+  user_id: string;
+  @prop({ required: false, index: false, zh: '标题' })
+  title: string;
+  @prop({ required: false, index: false, zh: '发布时间' })
+  date: string;
+  @prop({ required: false, index: false, zh: '来源' })
+  origin: string;
+  @prop({ required: false, index: false, zh: '文件' })
+  file: Array<any>;
+  @prop({ required: false, index: false, zh: '内容' })
+  content: string;
+  @prop({
+    required: false,
+    index: false,
+    zh: '是否启用',
+    remark: '字典表:is_use',
+    default: '0',
+  })
+  is_use: string;
+}

+ 41 - 0
src/entity/scientistsettle.entity.ts

@@ -0,0 +1,41 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'scientistsettle' },
+})
+export class Scientistsettle extends BaseModel {
+  @prop({ required: false, index: true, zh: '绑定用户' })
+  user_id: string;
+  @prop({ required: false, index: true, zh: '科学家信息id' })
+  scientist_id: string;
+  @prop({ required: false, index: true, zh: '科学家姓名' })
+  scientist_name: string;
+  @prop({ required: false, index: true, zh: '工作单位' })
+  company: string;
+  @prop({ required: false, index: true, zh: '职称' })
+  zc: string;
+  @prop({ required: false, index: false, zh: '专业领域' })
+  fields: Array<any>;
+  @prop({ required: false, index: false, zh: '研究方向' })
+  direction: Array<any>;
+  @prop({ required: false, index: true, zh: '依托单位id' })
+  company_id: string;
+  @prop({ required: false, index: true, zh: '依托单位名称' })
+  company_name: string;
+  @prop({ required: false, index: true, zh: '科学家工作室id' })
+  studio_id: string;
+  @prop({ required: false, index: false, zh: '文件' })
+  settle_file: Array<any>;
+  @prop({ required: false, index: false, zh: '团队成员' })
+  team: Array<any>;
+  @prop({
+    required: false,
+    index: true,
+    zh: '状态',
+    remark: '字典表:status',
+    default: '0',
+  })
+  status: string;
+  @prop({ required: false, index: false, zh: '记录' })
+  record: Array<any>;
+}

+ 47 - 0
src/entity/studio.entity.ts

@@ -0,0 +1,47 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'studio' },
+})
+export class Studio extends BaseModel {
+  @prop({ required: false, index: true, zh: '绑定用户' })
+  user_id: string;
+  @prop({ required: false, index: true, zh: '依托单位id' })
+  company_id: string;
+  @prop({ required: false, index: true, zh: '依托单位名称' })
+  company_name: string;
+  @prop({ required: false, index: false, zh: '专业领域' })
+  zy_fields: Array<any>;
+  @prop({ required: false, index: true, zh: '申报日期' })
+  apply_time: string;
+  @prop({ required: false, index: true, zh: '工作室名称(申报)' })
+  apply_name: string;
+  @prop({ required: false, index: true, zh: '工作室名称(正式)' })
+  name: string;
+  @prop({ required: false, index: true, zh: '科学家绑定用户' })
+  scientist_id: string;
+  @prop({ required: false, index: true, zh: '科学家信息' })
+  scientistinfo_id: string;
+  @prop({ required: false, index: true, zh: '科学家姓名' })
+  scientist_name: string;
+  @prop({ required: false, index: false, zh: '合作领域' })
+  hz_fields: Array<any>;
+  @prop({ required: false, index: false, zh: '合作方向' })
+  hz_direction: Array<any>;
+  @prop({ required: false, index: false, zh: '入驻协议' })
+  settle_file: Array<any>;
+  @prop({ required: false, index: false, zh: '科学家所在单位同意入驻证明材料' })
+  unit_settle_file: Array<any>;
+  @prop({ required: false, index: false, zh: '建设方案' })
+  build_file: Array<any>;
+  @prop({
+    required: false,
+    index: true,
+    zh: '状态',
+    remark: '字典表:studio_status',
+    default: '0',
+  })
+  status: string;
+  @prop({ required: false, index: false, zh: '记录' })
+  record: Array<any>;
+}

+ 55 - 0
src/entity/techoldemand.entity.ts

@@ -0,0 +1,55 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'techoldemand' },
+})
+export class Techoldemand extends BaseModel {
+  @prop({ required: false, index: true, zh: '绑定用户' })
+  user_id: string;
+  @prop({ required: false, index: true, zh: '依托单位名称' })
+  company_name: string;
+  @prop({ required: false, index: true, zh: '联系方式' })
+  phone: string;
+  @prop({ required: false, index: true, zh: '入驻科学家id' })
+  scientist_id: string;
+  @prop({ required: false, index: true, zh: '科学家姓名' })
+  scientist_name: string;
+  @prop({ required: false, index: true, zh: '标题' })
+  title: string;
+  @prop({ required: false, index: true, zh: '发布时间' })
+  date: string;
+  @prop({ required: false, index: false, zh: '专业领域' })
+  fields: Array<any>;
+  @prop({ required: false, index: false, zh: '文件信息' })
+  file: Array<any>;
+  @prop({ required: false, index: false, zh: '信息内容' })
+  content: string;
+  @prop({ required: false, index: true, zh: '截止时间' })
+  stop_date: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '是否启用',
+    remark: '字典表:is_use',
+    default: '0',
+  })
+  is_use: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '状态',
+    remark: '字典表:status',
+    default: '0',
+  })
+  status: string;
+  @prop({ required: false, index: false, zh: '记录' })
+  record: Array<any>;
+  @prop({
+    required: false,
+    index: false,
+    zh: '对接状态',
+    remark: '字典表:demand_dock_status',
+    default: '0',
+  })
+  dock_status: string;
+}

+ 51 - 0
src/entity/techolsupport.entity.ts

@@ -0,0 +1,51 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'techolsupport' },
+})
+export class Techolsupport extends BaseModel {
+  @prop({ required: false, index: true, zh: '绑定用户' })
+  user_id: string;
+  @prop({ required: false, index: true, zh: '科学家姓名' })
+  scientist_name: string;
+  @prop({ required: false, index: true, zh: '单位名称' })
+  company_name: string;
+  @prop({ required: false, index: true, zh: '联系方式' })
+  phone: string;
+  @prop({ required: false, index: true, zh: '标题' })
+  title: string;
+  @prop({ required: false, index: true, zh: '发布时间' })
+  date: string;
+  @prop({ required: false, index: false, zh: '行业领域' })
+  fields: Array<any>;
+  @prop({ required: false, index: false, zh: '文件信息' })
+  file: Array<any>;
+  @prop({ required: false, index: false, zh: '信息内容' })
+  content: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '是否启用',
+    remark: '字典表:is_use',
+    default: '0',
+  })
+  is_use: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '状态',
+    remark: '字典表:status',
+    default: '0',
+  })
+  status: string;
+  @prop({ required: false, index: false, zh: '记录' })
+  record: Array<any>;
+  @prop({
+    required: false,
+    index: true,
+    zh: '对接状态',
+    remark: '字典表:demand_dock_status',
+    default: '0',
+  })
+  dock_status: string;
+}

+ 29 - 0
src/entity/yearreport.entity.ts

@@ -0,0 +1,29 @@
+import { modelOptions, prop } from '@typegoose/typegoose';
+import { BaseModel } from 'free-midway-component';
+@modelOptions({
+  schemaOptions: { collection: 'yearreport' },
+})
+export class Yearreport extends BaseModel {
+  @prop({ required: false, index: true, zh: '绑定用户' })
+  user_id: string;
+  @prop({ required: false, index: true, zh: '依托单位名称' })
+  company_name: string;
+  @prop({ required: false, index: true, zh: '工作室id' })
+  studio_id: string;
+  @prop({ required: false, index: true, zh: '工作室名称' })
+  studio_name: string;
+  @prop({ required: false, index: false, zh: '报告文件' })
+  file: Array<any>;
+  @prop({ required: false, index: true, zh: '申请时间' })
+  apply_time: string;
+  @prop({
+    required: false,
+    index: true,
+    zh: '状态',
+    remark: '字典表:status',
+    default: '0',
+  })
+  status: string;
+  @prop({ required: false, index: false, zh: '记录' })
+  record: Array<any>;
+}

+ 115 - 0
src/interface/applyflair.interface.ts

@@ -0,0 +1,115 @@
+import { Rule, RuleType } from '@midwayjs/validate';
+import { ApiProperty } from '@midwayjs/swagger';
+import { SearchBase } from 'free-midway-component';
+import get = require('lodash/get');
+const dealVO = (cla, data) => {
+  for (const key in cla) {
+    const val = get(data, key);
+    if (val || val === 0) cla[key] = val;
+  }
+};
+export class FVO_applyflair {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '工作室id' })
+  'studio_id': string = undefined;
+  @ApiProperty({ description: '工作室名称' })
+  'studio_name': string = undefined;
+  @ApiProperty({ description: '评估文件' })
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '申请时间' })
+  'apply_time': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  'record': Array<any> = undefined;
+}
+
+export class QDTO_applyflair extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = [
+      'user_id',
+      'company_name',
+      'studio_id',
+      'studio_name',
+      'apply_time',
+      'status',
+    ];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '工作室id' })
+  'studio_id': string = undefined;
+  @ApiProperty({ description: '工作室名称' })
+  'studio_name': string = undefined;
+  @ApiProperty({ description: '申请时间' })
+  'apply_time': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+}
+
+export class QVO_applyflair extends FVO_applyflair {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class CDTO_applyflair {
+  @ApiProperty({ description: '绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  @Rule(RuleType['string']().empty(''))
+  'company_name': string = undefined;
+  @ApiProperty({ description: '工作室id' })
+  @Rule(RuleType['string']().empty(''))
+  'studio_id': string = undefined;
+  @ApiProperty({ description: '工作室名称' })
+  @Rule(RuleType['string']().empty(''))
+  'studio_name': string = undefined;
+  @ApiProperty({ description: '评估文件' })
+  @Rule(RuleType['array']().empty(''))
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '申请时间' })
+  @Rule(RuleType['string']().empty(''))
+  'apply_time': string = undefined;
+  @ApiProperty({ description: '状态' })
+  @Rule(RuleType['string']().empty(''))
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  @Rule(RuleType['array']().empty(''))
+  'record': Array<any> = undefined;
+}
+
+export class CVO_applyflair extends FVO_applyflair {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class UDTO_applyflair extends CDTO_applyflair {
+  @ApiProperty({ description: '数据id' })
+  @Rule(RuleType['string']().empty(''))
+  _id: string = undefined;
+}
+
+export class UVAO_applyflair extends FVO_applyflair {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 75 - 0
src/interface/contactoffice.interface.ts

@@ -0,0 +1,75 @@
+import { Rule, RuleType } from '@midwayjs/validate';
+import { ApiProperty } from '@midwayjs/swagger';
+import { SearchBase } from 'free-midway-component';
+import get = require('lodash/get');
+const dealVO = (cla, data) => {
+  for (const key in cla) {
+    const val = get(data, key);
+    if (val || val === 0) cla[key] = val;
+  }
+};
+export class FVO_contactoffice {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '信息内容' })
+  'content': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  'is_use': string = undefined;
+}
+
+export class QDTO_contactoffice extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = ['user_id', 'is_use'];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  'is_use': string = undefined;
+}
+
+export class QVO_contactoffice extends FVO_contactoffice {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class CDTO_contactoffice {
+  @ApiProperty({ description: '绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'user_id': string = undefined;
+  @ApiProperty({ description: '信息内容' })
+  @Rule(RuleType['string']().empty(''))
+  'content': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  @Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
+}
+
+export class CVO_contactoffice extends FVO_contactoffice {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class UDTO_contactoffice extends CDTO_contactoffice {
+  @ApiProperty({ description: '数据id' })
+  @Rule(RuleType['string']().empty(''))
+  _id: string = undefined;
+}
+
+export class UVAO_contactoffice extends FVO_contactoffice {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 101 - 0
src/interface/notice.interface.ts

@@ -0,0 +1,101 @@
+import { Rule, RuleType } from '@midwayjs/validate';
+import { ApiProperty } from '@midwayjs/swagger';
+import { SearchBase } from 'free-midway-component';
+import get = require('lodash/get');
+const dealVO = (cla, data) => {
+  for (const key in cla) {
+    const val = get(data, key);
+    if (val || val === 0) cla[key] = val;
+  }
+};
+export class FVO_notice {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '标题' })
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  'date': string = undefined;
+  @ApiProperty({ description: '来源' })
+  'origin': string = undefined;
+  @ApiProperty({ description: '文件' })
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '内容' })
+  'content': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  'is_use': string = undefined;
+}
+
+export class QDTO_notice extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = ['user_id', 'title', 'date', 'origin', 'is_use'];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '标题' })
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  'date': string = undefined;
+  @ApiProperty({ description: '来源' })
+  'origin': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  'is_use': string = undefined;
+}
+
+export class QVO_notice extends FVO_notice {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class CDTO_notice {
+  @ApiProperty({ description: '绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'user_id': string = undefined;
+  @ApiProperty({ description: '标题' })
+  @Rule(RuleType['string']().empty(''))
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  @Rule(RuleType['string']().empty(''))
+  'date': string = undefined;
+  @ApiProperty({ description: '来源' })
+  @Rule(RuleType['string']().empty(''))
+  'origin': string = undefined;
+  @ApiProperty({ description: '文件' })
+  @Rule(RuleType['array']().empty(''))
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '内容' })
+  @Rule(RuleType['string']().empty(''))
+  'content': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  @Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
+}
+
+export class CVO_notice extends FVO_notice {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class UDTO_notice extends CDTO_notice {
+  @ApiProperty({ description: '数据id' })
+  @Rule(RuleType['string']().empty(''))
+  _id: string = undefined;
+}
+
+export class UVAO_notice extends FVO_notice {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 91 - 0
src/interface/relevantdownload.interface.ts

@@ -0,0 +1,91 @@
+import { Rule, RuleType } from '@midwayjs/validate';
+import { ApiProperty } from '@midwayjs/swagger';
+import { SearchBase } from 'free-midway-component';
+import get = require('lodash/get');
+const dealVO = (cla, data) => {
+  for (const key in cla) {
+    const val = get(data, key);
+    if (val || val === 0) cla[key] = val;
+  }
+};
+export class FVO_relevantdownload {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '标题' })
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  'date': string = undefined;
+  @ApiProperty({ description: '来源' })
+  'origin': string = undefined;
+  @ApiProperty({ description: '文件' })
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '内容' })
+  'content': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  'is_use': string = undefined;
+}
+
+export class QDTO_relevantdownload extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = [];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+}
+
+export class QVO_relevantdownload extends FVO_relevantdownload {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class CDTO_relevantdownload {
+  @ApiProperty({ description: '绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'user_id': string = undefined;
+  @ApiProperty({ description: '标题' })
+  @Rule(RuleType['string']().empty(''))
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  @Rule(RuleType['string']().empty(''))
+  'date': string = undefined;
+  @ApiProperty({ description: '来源' })
+  @Rule(RuleType['string']().empty(''))
+  'origin': string = undefined;
+  @ApiProperty({ description: '文件' })
+  @Rule(RuleType['array']().empty(''))
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '内容' })
+  @Rule(RuleType['string']().empty(''))
+  'content': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  @Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
+}
+
+export class CVO_relevantdownload extends FVO_relevantdownload {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class UDTO_relevantdownload extends CDTO_relevantdownload {
+  @ApiProperty({ description: '数据id' })
+  @Rule(RuleType['string']().empty(''))
+  _id: string = undefined;
+}
+
+export class UVAO_relevantdownload extends FVO_relevantdownload {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 154 - 0
src/interface/scientistsettle.interface.ts

@@ -0,0 +1,154 @@
+import { Rule, RuleType } from '@midwayjs/validate';
+import { ApiProperty } from '@midwayjs/swagger';
+import { SearchBase } from 'free-midway-component';
+import get = require('lodash/get');
+const dealVO = (cla, data) => {
+  for (const key in cla) {
+    const val = get(data, key);
+    if (val || val === 0) cla[key] = val;
+  }
+};
+export class FVO_scientistsettle {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '科学家信息id' })
+  'scientist_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '工作单位' })
+  'company': string = undefined;
+  @ApiProperty({ description: '职称' })
+  'zc': string = undefined;
+  @ApiProperty({ description: '专业领域' })
+  'fields': Array<any> = undefined;
+  @ApiProperty({ description: '研究方向' })
+  'direction': Array<any> = undefined;
+  @ApiProperty({ description: '依托单位id' })
+  'company_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '科学家工作室id' })
+  'studio_id': string = undefined;
+  @ApiProperty({ description: '文件' })
+  'settle_file': Array<any> = undefined;
+  @ApiProperty({ description: '团队成员' })
+  'team': Array<any> = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  'record': Array<any> = undefined;
+}
+
+export class QDTO_scientistsettle extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = [
+      'user_id',
+      'scientist_id',
+      'scientist_name',
+      'company',
+      'zc',
+      'company_id',
+      'company_name',
+      'studio_id',
+      'status',
+    ];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '科学家信息id' })
+  'scientist_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '工作单位' })
+  'company': string = undefined;
+  @ApiProperty({ description: '职称' })
+  'zc': string = undefined;
+  @ApiProperty({ description: '依托单位id' })
+  'company_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '科学家工作室id' })
+  'studio_id': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+}
+
+export class QVO_scientistsettle extends FVO_scientistsettle {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class CDTO_scientistsettle {
+  @ApiProperty({ description: '绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'user_id': string = undefined;
+  @ApiProperty({ description: '科学家信息id' })
+  @Rule(RuleType['string']().empty(''))
+  'scientist_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  @Rule(RuleType['string']().empty(''))
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '工作单位' })
+  @Rule(RuleType['string']().empty(''))
+  'company': string = undefined;
+  @ApiProperty({ description: '职称' })
+  @Rule(RuleType['string']().empty(''))
+  'zc': string = undefined;
+  @ApiProperty({ description: '专业领域' })
+  @Rule(RuleType['array']().empty(''))
+  'fields': Array<any> = undefined;
+  @ApiProperty({ description: '研究方向' })
+  @Rule(RuleType['array']().empty(''))
+  'direction': Array<any> = undefined;
+  @ApiProperty({ description: '依托单位id' })
+  @Rule(RuleType['string']().empty(''))
+  'company_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  @Rule(RuleType['string']().empty(''))
+  'company_name': string = undefined;
+  @ApiProperty({ description: '科学家工作室id' })
+  @Rule(RuleType['string']().empty(''))
+  'studio_id': string = undefined;
+  @ApiProperty({ description: '文件' })
+  @Rule(RuleType['array']().empty(''))
+  'settle_file': Array<any> = undefined;
+  @ApiProperty({ description: '团队成员' })
+  @Rule(RuleType['array']().empty(''))
+  'team': Array<any> = undefined;
+  @ApiProperty({ description: '状态' })
+  @Rule(RuleType['string']().empty(''))
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  @Rule(RuleType['array']().empty(''))
+  'record': Array<any> = undefined;
+}
+
+export class CVO_scientistsettle extends FVO_scientistsettle {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class UDTO_scientistsettle extends CDTO_scientistsettle {
+  @ApiProperty({ description: '数据id' })
+  @Rule(RuleType['string']().empty(''))
+  _id: string = undefined;
+}
+
+export class UVAO_scientistsettle extends FVO_scientistsettle {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 172 - 0
src/interface/studio.interface.ts

@@ -0,0 +1,172 @@
+import { Rule, RuleType } from '@midwayjs/validate';
+import { ApiProperty } from '@midwayjs/swagger';
+import { SearchBase } from 'free-midway-component';
+import get = require('lodash/get');
+const dealVO = (cla, data) => {
+  for (const key in cla) {
+    const val = get(data, key);
+    if (val || val === 0) cla[key] = val;
+  }
+};
+export class FVO_studio {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位id' })
+  'company_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '专业领域' })
+  'zy_fields': Array<any> = undefined;
+  @ApiProperty({ description: '申报日期' })
+  'apply_time': string = undefined;
+  @ApiProperty({ description: '工作室名称(申报)' })
+  'apply_name': string = undefined;
+  @ApiProperty({ description: '工作室名称(正式)' })
+  'name': string = undefined;
+  @ApiProperty({ description: '科学家绑定用户' })
+  'scientist_id': string = undefined;
+  @ApiProperty({ description: '科学家信息' })
+  'scientistinfo_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '合作领域' })
+  'hz_fields': Array<any> = undefined;
+  @ApiProperty({ description: '合作方向' })
+  'hz_direction': Array<any> = undefined;
+  @ApiProperty({ description: '入驻协议' })
+  'settle_file': Array<any> = undefined;
+  @ApiProperty({ description: '科学家所在单位同意入驻证明材料' })
+  'unit_settle_file': Array<any> = undefined;
+  @ApiProperty({ description: '建设方案' })
+  'build_file': Array<any> = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  'record': Array<any> = undefined;
+}
+
+export class QDTO_studio extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = [
+      'user_id',
+      'company_id',
+      'company_name',
+      'apply_time',
+      'apply_name',
+      'name',
+      'scientist_id',
+      'scientistinfo_id',
+      'scientist_name',
+      'status',
+    ];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位id' })
+  'company_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '申报日期' })
+  'apply_time': string = undefined;
+  @ApiProperty({ description: '工作室名称(申报)' })
+  'apply_name': string = undefined;
+  @ApiProperty({ description: '工作室名称(正式)' })
+  'name': string = undefined;
+  @ApiProperty({ description: '科学家绑定用户' })
+  'scientist_id': string = undefined;
+  @ApiProperty({ description: '科学家信息' })
+  'scientistinfo_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+}
+
+export class QVO_studio extends FVO_studio {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class CDTO_studio {
+  @ApiProperty({ description: '绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位id' })
+  @Rule(RuleType['string']().empty(''))
+  'company_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  @Rule(RuleType['string']().empty(''))
+  'company_name': string = undefined;
+  @ApiProperty({ description: '专业领域' })
+  @Rule(RuleType['array']().empty(''))
+  'zy_fields': Array<any> = undefined;
+  @ApiProperty({ description: '申报日期' })
+  @Rule(RuleType['string']().empty(''))
+  'apply_time': string = undefined;
+  @ApiProperty({ description: '工作室名称(申报)' })
+  @Rule(RuleType['string']().empty(''))
+  'apply_name': string = undefined;
+  @ApiProperty({ description: '工作室名称(正式)' })
+  @Rule(RuleType['string']().empty(''))
+  'name': string = undefined;
+  @ApiProperty({ description: '科学家绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'scientist_id': string = undefined;
+  @ApiProperty({ description: '科学家信息' })
+  @Rule(RuleType['string']().empty(''))
+  'scientistinfo_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  @Rule(RuleType['string']().empty(''))
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '合作领域' })
+  @Rule(RuleType['array']().empty(''))
+  'hz_fields': Array<any> = undefined;
+  @ApiProperty({ description: '合作方向' })
+  @Rule(RuleType['array']().empty(''))
+  'hz_direction': Array<any> = undefined;
+  @ApiProperty({ description: '入驻协议' })
+  @Rule(RuleType['array']().empty(''))
+  'settle_file': Array<any> = undefined;
+  @ApiProperty({ description: '科学家所在单位同意入驻证明材料' })
+  @Rule(RuleType['array']().empty(''))
+  'unit_settle_file': Array<any> = undefined;
+  @ApiProperty({ description: '建设方案' })
+  @Rule(RuleType['array']().empty(''))
+  'build_file': Array<any> = undefined;
+  @ApiProperty({ description: '状态' })
+  @Rule(RuleType['string']().empty(''))
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  @Rule(RuleType['array']().empty(''))
+  'record': Array<any> = undefined;
+}
+
+export class CVO_studio extends FVO_studio {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class UDTO_studio extends CDTO_studio {
+  @ApiProperty({ description: '数据id' })
+  @Rule(RuleType['string']().empty(''))
+  _id: string = undefined;
+}
+
+export class UVAO_studio extends FVO_studio {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 162 - 0
src/interface/techoldemand.interface.ts

@@ -0,0 +1,162 @@
+import { Rule, RuleType } from '@midwayjs/validate';
+import { ApiProperty } from '@midwayjs/swagger';
+import { SearchBase } from 'free-midway-component';
+import get = require('lodash/get');
+const dealVO = (cla, data) => {
+  for (const key in cla) {
+    const val = get(data, key);
+    if (val || val === 0) cla[key] = val;
+  }
+};
+export class FVO_techoldemand {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '联系方式' })
+  'phone': string = undefined;
+  @ApiProperty({ description: '入驻科学家id' })
+  'scientist_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '标题' })
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  'date': string = undefined;
+  @ApiProperty({ description: '专业领域' })
+  'fields': Array<any> = undefined;
+  @ApiProperty({ description: '文件信息' })
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '信息内容' })
+  'content': string = undefined;
+  @ApiProperty({ description: '截止时间' })
+  'stop_date': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  'is_use': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  'record': Array<any> = undefined;
+  @ApiProperty({ description: '对接状态' })
+  'dock_status': string = undefined;
+}
+
+export class QDTO_techoldemand extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = [
+      'user_id',
+      'company_name',
+      'phone',
+      'scientist_id',
+      'scientist_name',
+      'title',
+      'date',
+      'stop_date',
+      'is_use',
+      'status',
+    ];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '联系方式' })
+  'phone': string = undefined;
+  @ApiProperty({ description: '入驻科学家id' })
+  'scientist_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '标题' })
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  'date': string = undefined;
+  @ApiProperty({ description: '截止时间' })
+  'stop_date': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  'is_use': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+}
+
+export class QVO_techoldemand extends FVO_techoldemand {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class CDTO_techoldemand {
+  @ApiProperty({ description: '绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  @Rule(RuleType['string']().empty(''))
+  'company_name': string = undefined;
+  @ApiProperty({ description: '联系方式' })
+  @Rule(RuleType['string']().empty(''))
+  'phone': string = undefined;
+  @ApiProperty({ description: '入驻科学家id' })
+  @Rule(RuleType['string']().empty(''))
+  'scientist_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  @Rule(RuleType['string']().empty(''))
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '标题' })
+  @Rule(RuleType['string']().empty(''))
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  @Rule(RuleType['string']().empty(''))
+  'date': string = undefined;
+  @ApiProperty({ description: '专业领域' })
+  @Rule(RuleType['array']().empty(''))
+  'fields': Array<any> = undefined;
+  @ApiProperty({ description: '文件信息' })
+  @Rule(RuleType['array']().empty(''))
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '信息内容' })
+  @Rule(RuleType['string']().empty(''))
+  'content': string = undefined;
+  @ApiProperty({ description: '截止时间' })
+  @Rule(RuleType['string']().empty(''))
+  'stop_date': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  @Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
+  @ApiProperty({ description: '状态' })
+  @Rule(RuleType['string']().empty(''))
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  @Rule(RuleType['array']().empty(''))
+  'record': Array<any> = undefined;
+  @ApiProperty({ description: '对接状态' })
+  @Rule(RuleType['string']().empty(''))
+  'dock_status': string = undefined;
+}
+
+export class CVO_techoldemand extends FVO_techoldemand {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class UDTO_techoldemand extends CDTO_techoldemand {
+  @ApiProperty({ description: '数据id' })
+  @Rule(RuleType['string']().empty(''))
+  _id: string = undefined;
+}
+
+export class UVAO_techoldemand extends FVO_techoldemand {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 149 - 0
src/interface/techolsupport.interface.ts

@@ -0,0 +1,149 @@
+import { Rule, RuleType } from '@midwayjs/validate';
+import { ApiProperty } from '@midwayjs/swagger';
+import { SearchBase } from 'free-midway-component';
+import get = require('lodash/get');
+const dealVO = (cla, data) => {
+  for (const key in cla) {
+    const val = get(data, key);
+    if (val || val === 0) cla[key] = val;
+  }
+};
+export class FVO_techolsupport {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '联系方式' })
+  'phone': string = undefined;
+  @ApiProperty({ description: '标题' })
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  'date': string = undefined;
+  @ApiProperty({ description: '行业领域' })
+  'fields': Array<any> = undefined;
+  @ApiProperty({ description: '文件信息' })
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '信息内容' })
+  'content': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  'is_use': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  'record': Array<any> = undefined;
+  @ApiProperty({ description: '对接状态' })
+  'dock_status': string = undefined;
+}
+
+export class QDTO_techolsupport extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = [
+      'user_id',
+      'scientist_name',
+      'company_name',
+      'phone',
+      'title',
+      'date',
+      'is_use',
+      'status',
+      'dock_status',
+    ];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '联系方式' })
+  'phone': string = undefined;
+  @ApiProperty({ description: '标题' })
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  'date': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  'is_use': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+  @ApiProperty({ description: '对接状态' })
+  'dock_status': string = undefined;
+}
+
+export class QVO_techolsupport extends FVO_techolsupport {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class CDTO_techolsupport {
+  @ApiProperty({ description: '绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'user_id': string = undefined;
+  @ApiProperty({ description: '科学家姓名' })
+  @Rule(RuleType['string']().empty(''))
+  'scientist_name': string = undefined;
+  @ApiProperty({ description: '单位名称' })
+  @Rule(RuleType['string']().empty(''))
+  'company_name': string = undefined;
+  @ApiProperty({ description: '联系方式' })
+  @Rule(RuleType['string']().empty(''))
+  'phone': string = undefined;
+  @ApiProperty({ description: '标题' })
+  @Rule(RuleType['string']().empty(''))
+  'title': string = undefined;
+  @ApiProperty({ description: '发布时间' })
+  @Rule(RuleType['string']().empty(''))
+  'date': string = undefined;
+  @ApiProperty({ description: '行业领域' })
+  @Rule(RuleType['array']().empty(''))
+  'fields': Array<any> = undefined;
+  @ApiProperty({ description: '文件信息' })
+  @Rule(RuleType['array']().empty(''))
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '信息内容' })
+  @Rule(RuleType['string']().empty(''))
+  'content': string = undefined;
+  @ApiProperty({ description: '是否启用' })
+  @Rule(RuleType['string']().empty(''))
+  'is_use': string = undefined;
+  @ApiProperty({ description: '状态' })
+  @Rule(RuleType['string']().empty(''))
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  @Rule(RuleType['array']().empty(''))
+  'record': Array<any> = undefined;
+  @ApiProperty({ description: '对接状态' })
+  @Rule(RuleType['string']().empty(''))
+  'dock_status': string = undefined;
+}
+
+export class CVO_techolsupport extends FVO_techolsupport {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class UDTO_techolsupport extends CDTO_techolsupport {
+  @ApiProperty({ description: '数据id' })
+  @Rule(RuleType['string']().empty(''))
+  _id: string = undefined;
+}
+
+export class UVAO_techolsupport extends FVO_techolsupport {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 115 - 0
src/interface/yearreport.interface.ts

@@ -0,0 +1,115 @@
+import { Rule, RuleType } from '@midwayjs/validate';
+import { ApiProperty } from '@midwayjs/swagger';
+import { SearchBase } from 'free-midway-component';
+import get = require('lodash/get');
+const dealVO = (cla, data) => {
+  for (const key in cla) {
+    const val = get(data, key);
+    if (val || val === 0) cla[key] = val;
+  }
+};
+export class FVO_yearreport {
+  constructor(data: object) {
+    dealVO(this, data);
+  }
+  @ApiProperty({ description: '数据id' })
+  _id: string = undefined;
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '工作室id' })
+  'studio_id': string = undefined;
+  @ApiProperty({ description: '工作室名称' })
+  'studio_name': string = undefined;
+  @ApiProperty({ description: '报告文件' })
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '申请时间' })
+  'apply_time': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  'record': Array<any> = undefined;
+}
+
+export class QDTO_yearreport extends SearchBase {
+  constructor() {
+    const like_prop = [];
+    const props = [
+      'user_id',
+      'company_name',
+      'studio_id',
+      'studio_name',
+      'apply_time',
+      'status',
+    ];
+    const mapping = [];
+    super({ like_prop, props, mapping });
+  }
+  @ApiProperty({ description: '绑定用户' })
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  'company_name': string = undefined;
+  @ApiProperty({ description: '工作室id' })
+  'studio_id': string = undefined;
+  @ApiProperty({ description: '工作室名称' })
+  'studio_name': string = undefined;
+  @ApiProperty({ description: '申请时间' })
+  'apply_time': string = undefined;
+  @ApiProperty({ description: '状态' })
+  'status': string = undefined;
+}
+
+export class QVO_yearreport extends FVO_yearreport {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class CDTO_yearreport {
+  @ApiProperty({ description: '绑定用户' })
+  @Rule(RuleType['string']().empty(''))
+  'user_id': string = undefined;
+  @ApiProperty({ description: '依托单位名称' })
+  @Rule(RuleType['string']().empty(''))
+  'company_name': string = undefined;
+  @ApiProperty({ description: '工作室id' })
+  @Rule(RuleType['string']().empty(''))
+  'studio_id': string = undefined;
+  @ApiProperty({ description: '工作室名称' })
+  @Rule(RuleType['string']().empty(''))
+  'studio_name': string = undefined;
+  @ApiProperty({ description: '报告文件' })
+  @Rule(RuleType['array']().empty(''))
+  'file': Array<any> = undefined;
+  @ApiProperty({ description: '申请时间' })
+  @Rule(RuleType['string']().empty(''))
+  'apply_time': string = undefined;
+  @ApiProperty({ description: '状态' })
+  @Rule(RuleType['string']().empty(''))
+  'status': string = undefined;
+  @ApiProperty({ description: '记录' })
+  @Rule(RuleType['array']().empty(''))
+  'record': Array<any> = undefined;
+}
+
+export class CVO_yearreport extends FVO_yearreport {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}
+
+export class UDTO_yearreport extends CDTO_yearreport {
+  @ApiProperty({ description: '数据id' })
+  @Rule(RuleType['string']().empty(''))
+  _id: string = undefined;
+}
+
+export class UVAO_yearreport extends FVO_yearreport {
+  constructor(data: object) {
+    super(data);
+    dealVO(this, data);
+  }
+}

+ 11 - 0
src/service/applyflair.service.ts

@@ -0,0 +1,11 @@
+import { Provide } from '@midwayjs/decorator';
+import { InjectEntityModel } from '@midwayjs/typegoose';
+import { ReturnModelType } from '@typegoose/typegoose';
+import { BaseService } from 'free-midway-component';
+import { Applyflair } from '../entity/applyflair.entity';
+type modelType = ReturnModelType<typeof Applyflair>;
+@Provide()
+export class ApplyflairService extends BaseService<modelType> {
+  @InjectEntityModel(Applyflair)
+  model: modelType;
+}

+ 21 - 0
src/service/contactoffice.service.ts

@@ -0,0 +1,21 @@
+import { Provide } from '@midwayjs/decorator';
+import { InjectEntityModel } from '@midwayjs/typegoose';
+import { ReturnModelType } from '@typegoose/typegoose';
+import { BaseService } from 'free-midway-component';
+import { Contactoffice } from '../entity/contactoffice.entity';
+type modelType = ReturnModelType<typeof Contactoffice>;
+@Provide()
+export class ContactofficeService extends BaseService<modelType> {
+  @InjectEntityModel(Contactoffice)
+  model: modelType;
+  async query(filter, { skip, limit }): Promise<Array<any>> {
+    let res = {};
+    const arr = [];
+    const data = await this.model.findOne(filter);
+    if (data) {
+      res = data;
+    }
+    arr.push(res);
+    return arr;
+  }
+}

+ 11 - 0
src/service/notice.service.ts

@@ -0,0 +1,11 @@
+import { Provide } from '@midwayjs/decorator';
+import { InjectEntityModel } from '@midwayjs/typegoose';
+import { ReturnModelType } from '@typegoose/typegoose';
+import { BaseService } from 'free-midway-component';
+import { Notice } from '../entity/notice.entity';
+type modelType = ReturnModelType<typeof Notice>;
+@Provide()
+export class NoticeService extends BaseService<modelType> {
+  @InjectEntityModel(Notice)
+  model: modelType;
+}

+ 11 - 0
src/service/relevantdownload.service.ts

@@ -0,0 +1,11 @@
+import { Provide } from '@midwayjs/decorator';
+import { InjectEntityModel } from '@midwayjs/typegoose';
+import { ReturnModelType } from '@typegoose/typegoose';
+import { BaseService } from 'free-midway-component';
+import { Relevantdownload } from '../entity/relevantdownload.entity';
+type modelType = ReturnModelType<typeof Relevantdownload>;
+@Provide()
+export class RelevantdownloadService extends BaseService<modelType> {
+  @InjectEntityModel(Relevantdownload)
+  model: modelType;
+}

+ 39 - 0
src/service/scientistsettle.service.ts

@@ -0,0 +1,39 @@
+import { Provide } from '@midwayjs/decorator';
+import { InjectEntityModel } from '@midwayjs/typegoose';
+import { ReturnModelType } from '@typegoose/typegoose';
+import {
+  BaseService,
+  ServiceError,
+  FrameworkErrorEnum,
+} from 'free-midway-component';
+import { Scientistsettle } from '../entity/scientistsettle.entity';
+type modelType = ReturnModelType<typeof Scientistsettle>;
+@Provide()
+export class ScientistsettleService extends BaseService<modelType> {
+  @InjectEntityModel(Scientistsettle)
+  model: modelType;
+  async create(body) {
+    const data = await this.model.findOne({ studio_id: body.studio_id });
+    if (data) {
+      if (data.user_id === body.user_id) {
+        throw new ServiceError(
+          '已有入驻数据,不可重复入驻',
+          FrameworkErrorEnum.DATA_EXISTED
+        );
+      } else {
+        if (data.status === '1') {
+          throw new ServiceError(
+            FrameworkErrorEnum.DATA_EXISTED,
+            '已有人入驻此科学家工作室,不可入驻'
+          );
+        } else {
+          const res = await this.model.create(body);
+          return res;
+        }
+      }
+    } else {
+      const res = await this.model.create(body);
+      return res;
+    }
+  }
+}

+ 42 - 0
src/service/studio.service.ts

@@ -0,0 +1,42 @@
+import { Provide } from '@midwayjs/decorator';
+import { InjectEntityModel } from '@midwayjs/typegoose';
+import { ReturnModelType } from '@typegoose/typegoose';
+import {
+  BaseService,
+  ServiceError,
+  FrameworkErrorEnum,
+} from 'free-midway-component';
+import { Studio } from '../entity/studio.entity';
+import { Types } from 'mongoose';
+const ObjectId = Types.ObjectId;
+type modelType = ReturnModelType<typeof Studio>;
+@Provide()
+export class StudioService extends BaseService<modelType> {
+  @InjectEntityModel(Studio)
+  model: modelType;
+  async create(body) {
+    const data = await this.model.findOne({ name: body.name });
+    if (!data) {
+      const res = await this.model.create(body);
+      return res;
+    }
+    throw new ServiceError(
+      FrameworkErrorEnum.DATA_EXISTED,
+      '工作室名称已被占用'
+    );
+  }
+  async update(body) {
+    const data = await this.model.findOne({ name: body.name });
+    if (data) {
+      if (String(data._id) === body.id) {
+        return this.model.updateOne({ _id: new ObjectId(body.id) }, body);
+      }
+      throw new ServiceError(
+        FrameworkErrorEnum.DATA_EXISTED,
+        '工作室名称已被占用'
+      );
+    } else {
+      return this.model.updateOne({ _id: new ObjectId(body.id) }, body);
+    }
+  }
+}

+ 11 - 0
src/service/techoldemand.service.ts

@@ -0,0 +1,11 @@
+import { Provide } from '@midwayjs/decorator';
+import { InjectEntityModel } from '@midwayjs/typegoose';
+import { ReturnModelType } from '@typegoose/typegoose';
+import { BaseService } from 'free-midway-component';
+import { Techoldemand } from '../entity/techoldemand.entity';
+type modelType = ReturnModelType<typeof Techoldemand>;
+@Provide()
+export class TecholdemandService extends BaseService<modelType> {
+  @InjectEntityModel(Techoldemand)
+  model: modelType;
+}

+ 11 - 0
src/service/techolsupport.service.ts

@@ -0,0 +1,11 @@
+import { Provide } from '@midwayjs/decorator';
+import { InjectEntityModel } from '@midwayjs/typegoose';
+import { ReturnModelType } from '@typegoose/typegoose';
+import { BaseService } from 'free-midway-component';
+import { Techolsupport } from '../entity/techolsupport.entity';
+type modelType = ReturnModelType<typeof Techolsupport>;
+@Provide()
+export class TecholsupportService extends BaseService<modelType> {
+  @InjectEntityModel(Techolsupport)
+  model: modelType;
+}

+ 11 - 0
src/service/yearreport.service.ts

@@ -0,0 +1,11 @@
+import { Provide } from '@midwayjs/decorator';
+import { InjectEntityModel } from '@midwayjs/typegoose';
+import { ReturnModelType } from '@typegoose/typegoose';
+import { BaseService } from 'free-midway-component';
+import { Yearreport } from '../entity/yearreport.entity';
+type modelType = ReturnModelType<typeof Yearreport>;
+@Provide()
+export class YearreportService extends BaseService<modelType> {
+  @InjectEntityModel(Yearreport)
+  model: modelType;
+}