lrf402788946 преди 4 години
родител
ревизия
ad50521f4b
променени са 2 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 1 1
      app/controller/.student.js
  2. 6 1
      app/service/student.js

+ 1 - 1
app/controller/.student.js

@@ -145,7 +145,7 @@ module.exports = {
     service: "exportStudent",
   },
   toExport: {
-    requestBody: ["planid", "termid", "batchid", "classid", "model"],
+    requestBody: ["planid", "termid", "batchid", "classid", "model", 'isComming'],
     service: "toExport",
   },
   arrangeNumber: {

+ 6 - 1
app/service/student.js

@@ -587,11 +587,16 @@ class StudentService extends CrudService {
       model = _.compact(model);
       // 请求数据
       // 修改条件,termid变成数组了,需要一个一个查出来
-      const { planid, termid, batchid, classid } = data;
+      const { planid, termid, batchid, classid, isComming } = data;
       const queryObject = {};
       if (planid) queryObject.planid = planid;
       if (batchid) queryObject.batchid = batchid;
       if (classid) queryObject.classid = classid;
+      if (isComming) {
+        // 因为isComming有3种,0=>没来;1=>来了;2=>来了又退了.而已参培的类型应该是不为0,而不是单纯的1,只管来没来,不管走没走,毕竟吃饭了,得交钱
+        if (isComming !== '0') queryObject.isComming = { $ne: '0' };
+        else queryObject.isComming = isComming;
+      }
       let studentList = [];
       for (const t of termid) {
         queryObject.termid = t;