|
@@ -229,8 +229,8 @@ class StudentService extends CrudService {
|
|
let studentList = await this.model.find({ classid });
|
|
let studentList = await this.model.find({ classid });
|
|
// 重置评优,干部全优秀
|
|
// 重置评优,干部全优秀
|
|
studentList = studentList.map(i => {
|
|
studentList = studentList.map(i => {
|
|
- if (i.job.includes('普通')) i.is_fine = '1';
|
|
|
|
- else i.is_fine = '0';
|
|
|
|
|
|
+ if (i.job.includes('普通')) i.is_fine = '0';
|
|
|
|
+ else i.is_fine = '1';
|
|
return i;
|
|
return i;
|
|
});
|
|
});
|
|
// 初始化后取出不需要算的人,他们就这样,没必要算
|
|
// 初始化后取出不需要算的人,他们就这样,没必要算
|
|
@@ -255,8 +255,6 @@ class StudentService extends CrudService {
|
|
// 先判断是否超过第10位,超过就跳出
|
|
// 先判断是否超过第10位,超过就跳出
|
|
if (num > 10) break;
|
|
if (num > 10) break;
|
|
const { score, is_fine } = student;
|
|
const { score, is_fine } = student;
|
|
- // 0分不评优
|
|
|
|
- if (`${score}` === '0') continue;
|
|
|
|
// 最开始初始化过所有人的状态,并且将干部和不能评优的人都过滤出去,所以正常学生应该都是没有评优,如果此处已经是优秀,那么就是和前人同分改的,直接跳过就好
|
|
// 最开始初始化过所有人的状态,并且将干部和不能评优的人都过滤出去,所以正常学生应该都是没有评优,如果此处已经是优秀,那么就是和前人同分改的,直接跳过就好
|
|
if (is_fine === '1') continue;
|
|
if (is_fine === '1') continue;
|
|
// 没有分凑什么热闹
|
|
// 没有分凑什么热闹
|