|
@@ -25,13 +25,15 @@ class PatentassessService extends CrudService {
|
|
|
* @property info 其他数据,当做多个备注,记录使用
|
|
|
*/
|
|
|
async check({ id, status, remark, report }) {
|
|
|
+ console.log(report);
|
|
|
const data = { status, report };
|
|
|
+ console.log(data);
|
|
|
if (status === '4') data['meta.state'] = 1;
|
|
|
await this.model.updateOne({ _id: ObjectId(id) }, data);
|
|
|
// 换成对应的状态码,record在下面
|
|
|
return await this.record({ id, method: status, remark, report });
|
|
|
}
|
|
|
- async record({ id, method, remark, report }) {
|
|
|
+ async record({ id, method, remark }) {
|
|
|
let word = '';
|
|
|
switch (`${method}`) {
|
|
|
case 'create':
|
|
@@ -63,7 +65,6 @@ class PatentassessService extends CrudService {
|
|
|
remark,
|
|
|
};
|
|
|
data.record.push(obj);
|
|
|
- data.report = report;
|
|
|
const res = await data.save();
|
|
|
this.toNotice(id, method);
|
|
|
return res;
|
|
@@ -101,14 +102,12 @@ class PatentassessService extends CrudService {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- const obj = { to, content };
|
|
|
- await this.notice.create(obj);
|
|
|
- // if (code !== '2') {
|
|
|
- // const obj = { to, content };
|
|
|
- // await this.notice.create(obj);
|
|
|
- // } else {
|
|
|
- // await this.notice.insertMany(arr);
|
|
|
- // }
|
|
|
+ if (code !== '2') {
|
|
|
+ const obj = { to, content };
|
|
|
+ await this.notice.create(obj);
|
|
|
+ } else {
|
|
|
+ await this.notice.insertMany(arr);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|