|
@@ -21,7 +21,7 @@ class SchoolService extends CrudService {
|
|
|
}
|
|
|
|
|
|
async stuimport(data) {
|
|
|
- const { filepath, termid, schid, type } = data;
|
|
|
+ const { filepath, termid, schid, type, batchid } = data;
|
|
|
assert(filepath, 'filepath不能为空');
|
|
|
assert(termid, 'termid不能为空');
|
|
|
assert(schid, 'schid不能为空');
|
|
@@ -46,7 +46,8 @@ class SchoolService extends CrudService {
|
|
|
schid,
|
|
|
planid,
|
|
|
planyearid,
|
|
|
- type
|
|
|
+ type,
|
|
|
+ batchid
|
|
|
);
|
|
|
// 将得到的数据校验
|
|
|
const datacheck = await this.datacheck(studatas);
|
|
@@ -70,6 +71,7 @@ class SchoolService extends CrudService {
|
|
|
planid: plan.id,
|
|
|
termid,
|
|
|
term: trem_.term,
|
|
|
+ batchid,
|
|
|
filepath,
|
|
|
studs: JSON.stringify(studatas),
|
|
|
plannum: num_,
|
|
@@ -91,6 +93,7 @@ class SchoolService extends CrudService {
|
|
|
planid: plan.id,
|
|
|
termid,
|
|
|
term: trem_.term,
|
|
|
+ batchid,
|
|
|
filepath,
|
|
|
studs: JSON.stringify(studatas),
|
|
|
plannum: num_,
|
|
@@ -152,7 +155,7 @@ class SchoolService extends CrudService {
|
|
|
}
|
|
|
|
|
|
// 获取导入的XLSX文件中的数据
|
|
|
- async getImportXLSXData(filepath, termid, schid, planid, planyearid, type) {
|
|
|
+ async getImportXLSXData(filepath, termid, schid, planid, planyearid, type, batchid) {
|
|
|
console.log(filepath);
|
|
|
const file = await this.ctx.curl(filepath);
|
|
|
const workbook = XLSX.read(file.data);
|
|
@@ -209,6 +212,7 @@ class SchoolService extends CrudService {
|
|
|
edua_system: data[theadRule[17]],
|
|
|
diy: diy_,
|
|
|
termid,
|
|
|
+ batchid,
|
|
|
schid,
|
|
|
planid,
|
|
|
planyearid,
|