|
@@ -424,7 +424,7 @@ class StudentService extends CrudService {
|
|
|
for (const id of ids) {
|
|
|
const cla = await this.ctx.service.class.fetch({ id });
|
|
|
if (!cla) continue;
|
|
|
- if (type !== 'insurance') { cla.date = moment(cla.startdate).add(1, 'd').format('YYYY-MM-DD'); }
|
|
|
+ if (type === 'insurance') { cla.date = moment(cla.startdate).add(1, 'd').format('YYYY-MM-DD'); }
|
|
|
classList.push(cla);
|
|
|
}
|
|
|
studentList = studentList.map(i => {
|
|
@@ -435,7 +435,9 @@ class StudentService extends CrudService {
|
|
|
const meta = this.metaBx(type);
|
|
|
let fn = '学生名单';
|
|
|
const head = _.head(classList);
|
|
|
- if (head) fn = `${head.term}期-${head.batch}批${fn}`;
|
|
|
+ if (head) {
|
|
|
+ if (type === 'class') { fn = `${head.term}期-${head.batch}批-${head.name}${fn}`; } else fn = `${head.term}期-${head.batch}批${fn}`;
|
|
|
+ }
|
|
|
return await this.ctx.service.util.toExcel(studentList, meta, fn);
|
|
|
}
|
|
|
|