lrf402788946 před 3 roky
rodič
revize
466482a42a

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

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

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

@@ -38,7 +38,6 @@ class PatentService extends CrudService {
   }
   }
   async count(query) {
   async count(query) {
     query = await this.resetCode(query);
     query = await this.resetCode(query);
-    console.log(query);
     const res = await this.model.countDocuments(trimData(query)).exec();
     const res = await this.model.countDocuments(trimData(query)).exec();
     return res;
     return res;
   }
   }
@@ -58,8 +57,8 @@ class PatentService extends CrudService {
       const olist = await this.organizationModel.find({ code });
       const olist = await this.organizationModel.find({ code });
       ids = [ ...ids, ...olist.map(i => i._id) ];
       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;
       delete query.code;
     }
     }
     return query;
     return query;

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

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