guhongwei 3 years ago
parent
commit
a8b29cfe48
1 changed files with 4 additions and 3 deletions
  1. 4 3
      app/service/patent/patentassess.js

+ 4 - 3
app/service/patent/patentassess.js

@@ -24,14 +24,14 @@ class PatentassessService extends CrudService {
    * @property status 交底书要改变成的状态
    * @property info 其他数据,当做多个备注,记录使用
    */
-  async check({ id, status, remark }) {
+  async check({ id, status, remark, report }) {
     const data = { status };
     if (status === '4') data['meta.state'] = 1;
     await this.model.updateOne({ _id: ObjectId(id) }, data);
     // 换成对应的状态码,record在下面
-    return await this.record({ id, method: status, remark });
+    return await this.record({ id, method: status, remark, report });
   }
-  async record({ id, method, remark }) {
+  async record({ id, method, remark, report }) {
     let word = '';
     switch (`${method}`) {
       case 'create':
@@ -63,6 +63,7 @@ class PatentassessService extends CrudService {
       remark,
     };
     data.record.push(obj);
+    data.report = report;
     const res = await data.save();
     this.toNotice(id, method);
     return res;