lrf402788946 4 yıl önce
ebeveyn
işleme
20ca284d73
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      app/service/school.js

+ 2 - 2
app/service/school.js

@@ -92,7 +92,7 @@ class SchoolService extends CrudService {
     let school_name;
     const sch = await this.ctx.model.School.findOne({ code: schid });
     if (sch) school_name = sch.name;
-    const fullUrl = 'http://127.0.0.1' + filepath; // this.ctx.app.config.baseUrl http://127.0.0.1 http://jytz.jilinjobs.cn
+    const fullUrl = 'http://jytz.jilinjobs.cn' + filepath; // this.ctx.app.config.baseUrl http://127.0.0.1 http://jytz.jilinjobs.cn
     let studentList = await this.getDataFromExcel(fullUrl);
     const checkRes = await this.checkData(studentList);
     const { errorcode } = checkRes;
@@ -156,6 +156,7 @@ class SchoolService extends CrudService {
 
       await this.smodel.insertMany(studentList);
     }
+    return 'ok';
   }
 
   // 取得学校预计人数
@@ -194,7 +195,6 @@ class SchoolService extends CrudService {
       }
 
     });
-    console.log(cols);
     const excelIsRigth = cols.find(f => f.colIndex);
     if (!excelIsRigth) throw new BusinessError(ErrorCode.DATA_INVALID, 'Excel表格格式不正确,请使用系统提供的模板!');
     // 删除掉第一行