guhongwei 3 年之前
父节点
当前提交
504376c99e
共有 3 个文件被更改,包括 95 次插入1 次删除
  1. 28 0
      app/controller/patent/.patentinfo.js
  2. 15 0
      app/model/patent/patentinfo.js
  3. 52 1
      app/service/patent/patentinfo.js

+ 28 - 0
app/controller/patent/.patentinfo.js

@@ -18,6 +18,20 @@ module.exports = {
       "origin",
       "status",
       "trans_status",
+      "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",
     ],
   },
   destroy: {
@@ -44,6 +58,20 @@ module.exports = {
       "origin",
       "status",
       "trans_status",
+      "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",
     ],
   },
   show: {

+ 15 - 0
app/model/patent/patentinfo.js

@@ -23,6 +23,21 @@ const patentinfo = {
   user_id: { type: [ ObjectId ] },
   status: { type: String, required: false, default: '0' }, // 状态
   trans_status: { type: String, required: false, default: '0' }, // 交易状态
+  // 数据新增属性2021-09-06
+  nationality: { type: String }, // 公开国别
+  ipc_type: { type: String }, // ipc主分类
+  onlegal_status: { type: String }, // 当前法律状态
+  legal_status: { type: String }, // 法律状态
+  law_date: { type: String }, // 法律文书日期
+  on_obligee: { type: String }, // 当前权利人
+  apply_address: { type: String }, // 申请人地址(其他)
+  apply_other: { type: String }, // 申请人(其他)
+  law_num: { type: String }, // 法律文书编号
+  first_opendate: { type: String }, // 首次公开日
+  empower_date: { type: String }, // 授权公告日
+  lose_date: { type: String }, // 失效日
+  examine_date: { type: String }, // 实际审查失效日
+  invention_design: { type: String }, // 发明人(设计)其他
 };
 const schema = new Schema(patentinfo, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });

+ 52 - 1
app/service/patent/patentinfo.js

@@ -126,7 +126,27 @@ class PatentinfoService extends CrudService {
           apply_personal = row.getCell(12).value || undefined,
           term = row.getCell(13).value || undefined,
           type = row.getCell(14).value || undefined,
-          number = row.getCell(1).value || undefined;
+          number = row.getCell(1).value || undefined,
+          // 新增专利数据属性2021-09-06
+          nationality = row.getCell(16).value || undefined,
+          ipc_type = row.getCell(17).value || undefined,
+          onlegal_status = row.getCell(18).value || undefined,
+          legal_status = row.getCell(19).value || undefined,
+          law_date =
+            moment(row.getCell(20).value).format('YYYY-MM-DD') || undefined,
+          on_obligee = row.getCell(21).value || undefined,
+          apply_address = row.getCell(22).value || undefined,
+          apply_other = row.getCell(23).value || undefined,
+          law_num = row.getCell(24).value || undefined,
+          first_opendate =
+            moment(row.getCell(25).value).format('YYYY-MM-DD') || undefined,
+          empower_date =
+            moment(row.getCell(26).value).format('YYYY-MM-DD') || undefined,
+          lose_date =
+            moment(row.getCell(27).value).format('YYYY-MM-DD') || undefined,
+          examine_date =
+            moment(row.getCell(28).value).format('YYYY-MM-DD') || undefined,
+          invention_design = row.getCell(29).value || undefined;
         const obj = {
           create_number,
           create_date,
@@ -145,7 +165,23 @@ class PatentinfoService extends CrudService {
           number,
           origin,
           user_id: [ user_id ],
+          // 新增专利数据属性2021-09-06
+          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,
         };
+
         // 此处添加判断条件,不限制则不需要加,直接放过即可
         const { result, notice } = this.tocheckData(obj);
         if (result) {
@@ -341,6 +377,21 @@ class PatentinfoService extends CrudService {
       { 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;
   }