Jelajahi Sumber

截止日期

guhongwei 3 tahun lalu
induk
melakukan
1d41d92151
2 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 1 1
      app/model/patent/patentearly.js
  2. 3 0
      app/service/patent/patentearly.js

+ 1 - 1
app/model/patent/patentearly.js

@@ -8,7 +8,7 @@ const patentearly = {
   parent_id: { type: ObjectId }, // 专利id
   name: { type: String }, // 专利名称
   inventor: { type: String }, // 发明人
-  lose_date: { type: String }, // 失效日
+  lose_date: { type: String }, // 截止时间
   content: { type: String }, // 预警消息
   early_num: { type: String }, // 预警次数,1:三个月,2:两个月,3:一个月
   user_id: { type: [ ObjectId ] }, // 接收人id

+ 3 - 0
app/service/patent/patentearly.js

@@ -123,6 +123,8 @@ class PatentearlyService extends CrudService {
           const users = user_id.map(i => i.user_id);
           // 判断预警次数
           const early_num = toDay === start ? 1 : toDay === start_two ? 2 : toDay === start_thr ? 3 : '';
+          // 截止日期
+          const lose_date = end;
           const content = '您可能需缴年费了,具体以缴费通知书为准 ';
           const nobj = {
             ..._.omit(i, [ '_id', 'id', 'users' ]),
@@ -130,6 +132,7 @@ class PatentearlyService extends CrudService {
             parent_id: i._id,
             user_id: users,
             early_num,
+            lose_date,
           };
           this.model.create(nobj);
           // 2021-11-04添加 向 patentexamine 表中添加数据