lrf402788946 3 年之前
父节点
当前提交
466482a42a
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 1 0
      app/controller/dock/.patent.js
  2. 2 3
      app/service/dock/patent.js
  3. 1 1
      app/service/patent/disclosure.js

+ 1 - 0
app/controller/dock/.patent.js

@@ -64,6 +64,7 @@ module.exports = {
         agent_personal: "agent_personal",
         agent: "agent",
         origin: "%origin%",
+        code:"code"
       },
     },
     service: "query",

+ 2 - 3
app/service/dock/patent.js

@@ -38,7 +38,6 @@ class PatentService extends CrudService {
   }
   async count(query) {
     query = await this.resetCode(query);
-    console.log(query);
     const res = await this.model.countDocuments(trimData(query)).exec();
     return res;
   }
@@ -58,8 +57,8 @@ class PatentService extends CrudService {
       const olist = await this.organizationModel.find({ code });
       ids = [ ...ids, ...olist.map(i => i._id) ];
     }
-    if (ids.lenght > 0) {
-      query.user_id = { $elemMatch: ids };
+    if (ids.length > 0) {
+      query.user_id = { $elemMatch: { $in: ids } };
       delete query.code;
     }
     return query;

+ 1 - 1
app/service/patent/disclosure.js

@@ -385,7 +385,7 @@ class DisclosureService extends CrudService {
         project: 'market',
         service: 'patent.disclosure',
         method: 'exportAction',
-        body: { id, ...others },
+        body: { ...others },
       },
       tenant: 'disclosure.export',
       user: id,