liuyu 4 years ago
parent
commit
15d652e85a
2 changed files with 5 additions and 1 deletions
  1. 2 1
      app/model/schtime.js
  2. 3 0
      app/service/schtime.js

+ 2 - 1
app/model/schtime.js

@@ -4,8 +4,9 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 
 const arrange = new Schema({
   termid: { type: String, required: false, maxLength: 200 }, // 期id
+  term: { type: String, required: false, maxLength: 200 }, // 期
   batchid: { type: String, required: false, maxLength: 200 }, // 批次id
-  batchnum: { type: String, required: false, maxLength: 200 }, // 批次
+  batch: { type: String, required: false, maxLength: 200 }, // 批次
   number: { type: String, required: false, maxLength: 200 }, // 人数
   type: { type: String, required: false, maxLength: 200 }, // 类别
   carnum: { type: String, required: false, maxLength: 200 }, // 派车数量

+ 3 - 0
app/service/schtime.js

@@ -32,6 +32,9 @@ class SchtimeService extends CrudService {
         for (const terminfo of termInfo) {
           const updateinfo = (_.filter(updatearray, item => item.id === terminfo.id))[0];
           terminfo.termid = updateinfo.termid;
+          if (updateinfo.term) terminfo.term = updateinfo.term;
+          if (updateinfo.batch) terminfo.batch = updateinfo.batch;
+          if (updateinfo.batchid) terminfo.batchid = updateinfo.batchid;
           if (updateinfo.number) terminfo.number = updateinfo.number;
           if (updateinfo.type) terminfo.type = updateinfo.type;
           if (updateinfo.carnum) terminfo.carnum = updateinfo.carnum;