'use strict'; const { CrudService } = require('naf-framework-mongoose-free/lib/service'); const { BusinessError, ErrorCode } = require('naf-core').Error; const _ = require('lodash'); const assert = require('assert'); const { ObjectId } = require('mongoose').Types; // 评估报告 class ReportService extends CrudService { constructor(ctx) { super(ctx, 'report'); this.model = this.ctx.model.Patent.Report; } async checkReport(ids) { ids = ids.map(i => ObjectId(i)); const list = await this.model.find({ disclosure_id: { $in: ids } }, { disclosure_id: 1 }); return list; } } module.exports = ReportService;