guhongwei 3 роки тому
батько
коміт
7d12c40084
2 змінених файлів з 190 додано та 564 видалено
  1. 146 144
      app/controller/patent/.patentinfo.js
  2. 44 420
      app/service/patent/patentinfo.js

+ 146 - 144
app/controller/patent/.patentinfo.js

@@ -1,174 +1,176 @@
 module.exports = {
   create: {
     requestBody: [
-      'create_number',
-      'create_date',
-      'success_number',
-      'success_date',
-      'inventor',
-      'agent',
-      'agent_personal',
-      'abstract',
-      'address',
-      'name',
-      'apply_personal',
-      'term',
-      'type',
-      'img_url',
-      'nationality',
-      'ipc_type',
-      'onlegal_status',
-      'legal_status',
-      'law_date',
-      'on_obligee',
-      'apply_address',
-      'apply_other',
-      'law_num',
-      'first_opendate',
-      'empower_date',
-      'lose_date',
-      'examine_date',
-      'invention_design',
-      'incopat_link',
-      'first_ask',
-      'first_apply',
-      'apply_city',
-      'business_code',
-      'business_address',
-      'first_inventor',
-      'shared_value',
-      'techol_stable',
-      'techol_advanced',
-      'pct_apply',
-      'pct_publish',
-      'status',
-      'trans_status',
+      "create_number",
+      "create_date",
+      "success_number",
+      "success_date",
+      "inventor",
+      "agent",
+      "agent_personal",
+      "abstract",
+      "address",
+      "name",
+      "apply_personal",
+      "term",
+      "type",
+      "img_url",
+      "nationality",
+      "ipc_type",
+      "onlegal_status",
+      "legal_status",
+      "law_date",
+      "on_obligee",
+      "apply_address",
+      "apply_other",
+      "law_num",
+      "first_opendate",
+      "empower_date",
+      "lose_date",
+      "examine_date",
+      "invention_design",
+      "incopat_link",
+      "first_ask",
+      "first_apply",
+      "apply_city",
+      "business_code",
+      "business_address",
+      "first_inventor",
+      "shared_value",
+      "techol_stable",
+      "techol_advanced",
+      "pct_apply",
+      "pct_publish",
+      "status",
+      "trans_status",
     ],
   },
   destroy: {
-    params: ['!id'],
-    service: 'delete',
+    params: ["!id"],
+    service: "delete",
   },
   update: {
-    params: ['!id'],
+    params: ["!id"],
     requestBody: [
-      'create_number',
-      'create_date',
-      'success_number',
-      'success_date',
-      'inventor',
-      'agent',
-      'agent_personal',
-      'abstract',
-      'address',
-      'name',
-      'apply_personal',
-      'term',
-      'type',
-      'img_url',
-      'nationality',
-      'ipc_type',
-      'onlegal_status',
-      'legal_status',
-      'law_date',
-      'on_obligee',
-      'apply_address',
-      'apply_other',
-      'law_num',
-      'first_opendate',
-      'empower_date',
-      'lose_date',
-      'examine_date',
-      'invention_design',
-      'incopat_link',
-      'first_ask',
-      'first_apply',
-      'apply_city',
-      'business_code',
-      'business_address',
-      'first_inventor',
-      'shared_value',
-      'techol_stable',
-      'techol_advanced',
-      'pct_apply',
-      'pct_publish',
-      'status',
-      'trans_status',
+      "create_number",
+      "create_date",
+      "success_number",
+      "success_date",
+      "inventor",
+      "agent",
+      "agent_personal",
+      "abstract",
+      "address",
+      "name",
+      "apply_personal",
+      "term",
+      "type",
+      "img_url",
+      "nationality",
+      "ipc_type",
+      "onlegal_status",
+      "legal_status",
+      "law_date",
+      "on_obligee",
+      "apply_address",
+      "apply_other",
+      "law_num",
+      "first_opendate",
+      "empower_date",
+      "lose_date",
+      "examine_date",
+      "invention_design",
+      "incopat_link",
+      "first_ask",
+      "first_apply",
+      "apply_city",
+      "business_code",
+      "business_address",
+      "first_inventor",
+      "shared_value",
+      "techol_stable",
+      "techol_advanced",
+      "pct_apply",
+      "pct_publish",
+      "status",
+      "trans_status",
     ],
   },
   show: {
     parameters: {
-      params: ['!id'],
+      params: ["!id"],
     },
-    service: 'fetch',
+    service: "fetch",
   },
   index: {
     parameters: {
       query: {
-        create_number: 'create_number',
-        create_date: 'create_date',
-        success_number: 'success_number',
-        success_date: 'success_date',
-        agent: '%agent%',
-        agent_personal: '%agent_personal%',
-        abstract: '%abstract%',
-        address: '%address%',
-        name: '%name%',
-        apply_personal: '%apply_personal%',
-        term: 'term',
-        type: 'type',
-        nationality: '%nationality%',
-        ipc_type: '%ipc_type%',
-        onlegal_status: '%onlegal_status%',
-        legal_status: '%legal_status%',
-        law_date: 'law_date',
-        on_obligee: '%on_obligee%',
-        apply_address: '%apply_address%',
-        apply_other: '%apply_other%',
-        law_num: '%law_num%',
-        first_opendate: 'first_opendate',
-        empower_date: 'empower_date',
-        lose_date: 'lose_date',
-        examine_date: 'examine_date',
-        invention_design: '%invention_design%',
-        incopat_link: '%incopat_link%',
-        first_ask: '%first_ask%',
-        first_apply: '%first_apply%',
-        apply_city: '%apply_city%',
-        business_code: '%business_code%',
-        business_address: '%business_address%',
-        first_inventor: '%first_inventor%',
-        shared_value: '%shared_value%',
-        techol_stable: '%techol_stable%',
-        techol_advanced: '%techol_advanced%',
-        pct_apply: '%pct_apply%',
-        pct_publish: '%pct_publish%',
-        status: 'status',
-        trans_status: 'trans_status',
-        'create_date@start': 'create_date@start',
-        'create_date@end': 'create_date@end',
-        'success_date@start': 'success_date@start',
-        'success_date@end': 'success_date@end',
-        'empower_date@start': 'empower_date@start',
-        'empower_date@end': 'empower_date@end',
-        key_word: 'key_word',
-        single_inventor: 'single_inventor',
+        create_number: "create_number",
+        create_date: "create_date",
+        success_number: "success_number",
+        success_date: "success_date",
+        agent: "%agent%",
+        agent_personal: "%agent_personal%",
+        abstract: "%abstract%",
+        address: "%address%",
+        name: "%name%",
+        apply_personal: "%apply_personal%",
+        term: "term",
+        type: "type",
+        nationality: "%nationality%",
+        ipc_type: "%ipc_type%",
+        onlegal_status: "%onlegal_status%",
+        legal_status: "%legal_status%",
+        law_date: "law_date",
+        on_obligee: "%on_obligee%",
+        apply_address: "%apply_address%",
+        apply_other: "%apply_other%",
+        law_num: "%law_num%",
+        first_opendate: "first_opendate",
+        empower_date: "empower_date",
+        lose_date: "lose_date",
+        examine_date: "examine_date",
+        invention_design: "%invention_design%",
+        incopat_link: "%incopat_link%",
+        first_ask: "%first_ask%",
+        first_apply: "%first_apply%",
+        apply_city: "%apply_city%",
+        business_code: "%business_code%",
+        business_address: "%business_address%",
+        first_inventor: "%first_inventor%",
+        shared_value: "%shared_value%",
+        techol_stable: "%techol_stable%",
+        techol_advanced: "%techol_advanced%",
+        pct_apply: "%pct_apply%",
+        pct_publish: "%pct_publish%",
+        status: "status",
+        trans_status: "trans_status",
+        "create_date@start": "create_date@start",
+        "create_date@end": "create_date@end",
+        "success_date@start": "success_date@start",
+        "success_date@end": "success_date@end",
+        "empower_date@start": "empower_date@start",
+        "empower_date@end": "empower_date@end",
+        key_word: "key_word",
+        single_inventor: "single_inventor",
+        code: "code",
+        user_id: "user_id",
       },
     },
-    service: 'query',
+    service: "query",
     options: {
-      query: ['skip', 'limit'],
-      sort: ['create_date'],
+      query: ["skip", "limit"],
+      sort: ["create_date"],
       desc: true,
       count: true,
     },
   },
   toImport: {
-    requestBody: ['uri'],
-    service: 'toImport',
+    requestBody: ["uri"],
+    service: "toImport",
   },
   toExport: {
-    requestBody: ['user'],
-    service: 'toExport',
+    requestBody: ["user"],
+    service: "toExport",
   },
 };

+ 44 - 420
app/service/patent/patentinfo.js

@@ -38,10 +38,7 @@ class PatentinfoService extends CrudService {
 
   async query(query, { skip = 0, limit = 0 }) {
     const newquery = await this.resetCode(query);
-    const res = await this.model
-      .find(newquery)
-      .skip(parseInt(skip))
-      .limit(parseInt(limit))
+    const res = await this.model.find(newquery).skip(parseInt(skip)).limit(parseInt(limit))
       .sort({ create_date: -1 });
     return res;
   }
@@ -55,37 +52,20 @@ class PatentinfoService extends CrudService {
     newquery = this.ctx.service.util.util.dealQuery(newquery);
     if (Object.keys(newquery).length <= 0) return newquery;
     const { code, user_id, key_word, single_inventor } = newquery;
-    // const ids = [];
+    let ids = [];
     if (code) {
-      const plist = await this.personalModel.find({ code }, { _id: 1 });
-      const ids = plist.map(i => i._id);
+      const plist = await this.personalModel.find({ code });
+      ids = plist.map(i => i._id);
       if (ids.length > 0) {
         newquery['inventor.user_id'] = { $in: ids };
         delete newquery.code;
       }
-      // const query = { 'inventor.user_id': { $in: pids } };
-      // const plist = await this.personalModel.find({ code });
-      // ids = plist.map(i => i._id);
-      // if (ids.length > 0) {
-      //   newquery['inventor.user_id'] = { $in: ids };
-      //   delete newquery.code;
-      // }
-    }
-    if (user_id) {
-      // newquery['inventor.user_id'] = ObjectId(user_id);
-      newquery.inventor = {
-        $elemMatch: {
-          user_id: ObjectId(user_id),
-        },
-      };
+    } else if (user_id) {
+      newquery['inventor.user_id'] = ObjectId(user_id);
       delete newquery.user_id;
     }
     if (key_word) {
-      newquery.$or = [
-        { name: new RegExp(key_word) },
-        { abstract: new RegExp(key_word) },
-        { first_ask: new RegExp(key_word) },
-      ];
+      newquery.$or = [{ name: new RegExp(key_word) }, { abstract: new RegExp(key_word) }, { first_ask: new RegExp(key_word) }];
       delete newquery.key_word;
     }
     if (single_inventor) {
@@ -103,10 +83,7 @@ class PatentinfoService extends CrudService {
     const query = { 'inventor.user_id': { $in: pids } };
     if (status) query.status = status;
     if (term) query.term = term;
-    const data = await this.model
-      .find(query)
-      .skip(parseInt(skip))
-      .limit(parseInt(limit))
+    const data = await this.model.find(query).skip(parseInt(skip)).limit(parseInt(limit))
       .sort({ 'meta.createdAt': -1 });
     const total = await this.model.count(query);
     return { data, total };
@@ -132,10 +109,7 @@ class PatentinfoService extends CrudService {
     );
     // 2021-11-18 修改导入,根据model文件(和excel顺序一致)的顺序进行取字段
     const models = _.get(this.model, 'schema.obj');
-    const meta = Object.keys(models).map((i, index) => ({
-      key: i,
-      index: index + 2,
-    }));
+    const meta = Object.keys(models).map((i, index) => ({ key: i, index: index + 2 }));
     sheet.eachRow((row, rindex) => {
       if (rindex !== 1) {
         // 组织数据,图片的索引和行索引不一致,准确的说是:图片索引比行索引少1
@@ -149,23 +123,11 @@ class PatentinfoService extends CrudService {
         }
         // 根据meta整理数据
         // 需要日期转换的字段
-        const dateColumnArray = [
-          'create_date',
-          'success_date',
-          'law_date',
-          'first_opendate',
-          'empower_date',
-          'lose_date',
-          'examine_date',
-        ];
+        const dateColumnArray = [ 'create_date', 'success_date', 'law_date', 'first_opendate', 'empower_date', 'lose_date', 'examine_date' ];
         let obj = { img_url: [] };
         for (const m of meta) {
           const { key, index } = m;
-          if (dateColumnArray.includes(key)) {
-            obj[key] = moment(_.get(row.getCell(index), 'value')).format(
-              'YYYY-MM-DD'
-            );
-          } else if (key === 'incopat_link') obj[key] = this.getUrl(_.get(row.getCell(index), 'value'));
+          if (dateColumnArray.includes(key)) obj[key] = moment(_.get(row.getCell(index), 'value')).format('YYYY-MM-DD');
           else obj[key] = _.get(row.getCell(index), 'value');
         }
         obj = _.pickBy(obj, _.identity);
@@ -208,9 +170,7 @@ class PatentinfoService extends CrudService {
     }
     // 根据申请号做添加/修改
     for (const obj of arr) {
-      const has_data = await this.model.count({
-        create_number: obj.create_number,
-      });
+      const has_data = await this.model.count({ create_number: obj.create_number });
       if (!has_data) {
         await this.model.create(obj);
       } else {
@@ -230,11 +190,7 @@ class PatentinfoService extends CrudService {
       tenant: 'live',
     };
     try {
-      await this.ctx.service.util.httpUtil.cpost(
-        '/api/mission',
-        'mission',
-        data
-      );
+      await this.ctx.service.util.httpUtil.cpost('/api/mission', 'mission', data);
     } catch (error) {
       console.log(error);
       throw new BusinessError(ErrorCode.SERVICE_FAULT, '任务创建失败');
@@ -265,11 +221,7 @@ class PatentinfoService extends CrudService {
           status: '1',
           id: missionid,
         };
-        this.ctx.service.util.httpUtil.cpost(
-          '/api/mission/progress',
-          'mission',
-          data
-        );
+        this.ctx.service.util.httpUtil.cpost('/api/mission/progress', 'mission', data);
       } catch (error) {
         this.logger.error(`任务id:${missionid},进度更新失败`);
       }
@@ -280,11 +232,7 @@ class PatentinfoService extends CrudService {
         status: '2',
         uri: downloadPath,
       };
-      await this.ctx.service.util.httpUtil.cpost(
-        `/api/mission/update/${missionid}`,
-        'mission',
-        data
-      );
+      await this.ctx.service.util.httpUtil.cpost(`/api/mission/update/${missionid}`, 'mission', data);
     } catch (error) {
       this.logger.error(`任务id:${missionid},已完成更新失败`);
     }
@@ -393,359 +341,38 @@ class PatentinfoService extends CrudService {
 
   getHeader() {
     const arr = [
-      {
-        header: '申请号',
-        key: 'create_number',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '申请日',
-        key: 'create_date',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '公开(公告)号',
-        key: 'success_number',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '公开(公告)日',
-        key: 'success_date',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '发明人',
-        key: 'inventor',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '代理机构',
-        key: 'agent',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '代理人',
-        key: 'agent_personal',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '摘要',
-        key: 'abstract',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '发明人地址',
-        key: 'address',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '标题',
-        key: 'name',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '申请人',
-        key: 'apply_personal',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '专利有效性',
-        key: 'term',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '专利类型',
-        key: 'type',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '首页附图',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '公开国别',
-        key: 'nationality',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: 'IPC主分类',
-        key: 'ipc_type',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '当前法律状态',
-        key: 'onlegal_status',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '法律状态',
-        key: 'legal_status',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '法律文书日期',
-        key: 'law_date',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '当前权利人',
-        key: 'on_obligee',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '申请人地址(其他)',
-        key: 'apply_address',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '申请人(其他)',
-        key: 'apply_other',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '法律文书编号',
-        key: 'law_num',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '首次公开日',
-        key: 'first_opendate',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '授权公告日',
-        key: 'empower_date',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '失效日',
-        key: 'lose_date',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '实际审查失效日',
-        key: 'examine_date',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
-      {
-        header: '发明人(设计)其他',
-        key: 'invention_design',
-        width: 30,
-        style: {
-          alignment: {
-            wrapText: true,
-            vertical: 'middle',
-            horizontal: 'center',
-          },
-        },
-      },
+      { header: '申请号', key: 'create_number', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '申请日', key: 'create_date', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '公开(公告)号', key: 'success_number', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '公开(公告)日', key: 'success_date', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '发明人', key: 'inventor', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '代理机构', key: 'agent', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '代理人', key: 'agent_personal', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '摘要', key: 'abstract', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '发明人地址', key: 'address', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '标题', key: 'name', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '申请人', key: 'apply_personal', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '专利有效性', key: 'term', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '专利类型', key: 'type', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '首页附图', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '公开国别', key: 'nationality', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: 'IPC主分类', key: 'ipc_type', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '当前法律状态', key: 'onlegal_status', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '法律状态', key: 'legal_status', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '法律文书日期', key: 'law_date', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '当前权利人', key: 'on_obligee', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '申请人地址(其他)', key: 'apply_address', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '申请人(其他)', key: 'apply_other', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '法律文书编号', key: 'law_num', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '首次公开日', key: 'first_opendate', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '授权公告日', key: 'empower_date', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '失效日', key: 'lose_date', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '实际审查失效日', key: 'examine_date', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
+      { header: '发明人(设计)其他', key: 'invention_design', width: 30, style: { alignment: { wrapText: true, vertical: 'middle', horizontal: 'center' } } },
     ];
     return arr;
   }
 
-  /**
-   * 将excel的超链接对象中的url
-   * @param {Object} object excel中的超链接对象
-   */
-  getUrl(object) {
-    let urlStr = _.get(object, 'formula');
-    const s = urlStr.indexOf('(');
-    urlStr = urlStr.substring(s);
-    urlStr = _.trim(_.trim(urlStr, '('), ')');
-    const midArr = urlStr.split(',');
-    const url = _.trim(_.head(midArr), '"');
-    return url;
-  }
-
   async getByCreateNumber({ create_number }) {
     const data = await this.model.findOne({ create_number });
     return data;
@@ -760,10 +387,7 @@ class PatentinfoService extends CrudService {
     if (empower_sort === '0') {
       sort = 'asc';
     }
-    const data = await this.model
-      .find(newQuery)
-      .sort({ empower_date: sort })
-      .skip(parseInt(skip))
+    const data = await this.model.find(newQuery).sort({ empower_date: sort }).skip(parseInt(skip))
       .limit(parseInt(limit));
     const total = await this.model.count(newQuery);
     return { data, total };