|
|
@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
public class TeacherOpenCourseStudentSigninServiceImpl implements TeacherOpenCourseStudentSigninService {
|
|
|
|
public class TeacherOpenCourseStudentSigninServiceImpl implements TeacherOpenCourseStudentSigninService {
|
|
|
@ -443,6 +444,8 @@ public class TeacherOpenCourseStudentSigninServiceImpl implements TeacherOpenCou
|
|
|
|
teacherSigninSettingDTO.setSignCount(countByClass - missSizeManual);
|
|
|
|
teacherSigninSettingDTO.setSignCount(countByClass - missSizeManual);
|
|
|
|
teacherSigninSettingDTO.setMissStudent(missSizeManual);
|
|
|
|
teacherSigninSettingDTO.setMissStudent(missSizeManual);
|
|
|
|
teacherSigninSettingDTO.setTotalAttendRate(roundedResult);
|
|
|
|
teacherSigninSettingDTO.setTotalAttendRate(roundedResult);
|
|
|
|
|
|
|
|
teacherSigninSettingDTO.setClassName(classString(teacherSigninSettingDTO.getSchoolClassIds()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
teacherSigninSettingDTOS.add(teacherSigninSettingDTO);
|
|
|
|
teacherSigninSettingDTOS.add(teacherSigninSettingDTO);
|
|
|
|
|
|
|
|
|
|
|
@ -485,7 +488,7 @@ public class TeacherOpenCourseStudentSigninServiceImpl implements TeacherOpenCou
|
|
|
|
totalAttendRate = +roundedResult;
|
|
|
|
totalAttendRate = +roundedResult;
|
|
|
|
|
|
|
|
|
|
|
|
teacherSigninSettingDTO.setTotalAttendRate(roundedResult);
|
|
|
|
teacherSigninSettingDTO.setTotalAttendRate(roundedResult);
|
|
|
|
|
|
|
|
teacherSigninSettingDTO.setClassName(classString(teacherSigninSettingDTO.getSchoolClassIds()));
|
|
|
|
teacherSigninSettingDTOS.add(teacherSigninSettingDTO);
|
|
|
|
teacherSigninSettingDTOS.add(teacherSigninSettingDTO);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
@ -499,7 +502,7 @@ public class TeacherOpenCourseStudentSigninServiceImpl implements TeacherOpenCou
|
|
|
|
teacherSigninSettingDTO.setTotalAttendRate(0.0);
|
|
|
|
teacherSigninSettingDTO.setTotalAttendRate(0.0);
|
|
|
|
|
|
|
|
|
|
|
|
teacherSigninSettingDTO.setSum(countByClass);
|
|
|
|
teacherSigninSettingDTO.setSum(countByClass);
|
|
|
|
|
|
|
|
teacherSigninSettingDTO.setClassName(classString(teacherSigninSettingDTO.getSchoolClassIds()));
|
|
|
|
teacherSigninSettingDTOS.add(teacherSigninSettingDTO);
|
|
|
|
teacherSigninSettingDTOS.add(teacherSigninSettingDTO);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -517,6 +520,21 @@ public class TeacherOpenCourseStudentSigninServiceImpl implements TeacherOpenCou
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询班级数据
|
|
|
|
|
|
|
|
public String classString(String str) {
|
|
|
|
|
|
|
|
String[] strings = str.split(",");
|
|
|
|
|
|
|
|
StuUserExample stuUserExample = new StuUserExample();
|
|
|
|
|
|
|
|
stuUserExample.createCriteria().andClassIdIn(Arrays.asList(strings));
|
|
|
|
|
|
|
|
List<StuUser> stuUserList = stuUserMapper.selectByExample(stuUserExample);
|
|
|
|
|
|
|
|
Stream<String> distinct = stuUserList.stream().map(StuUser::getClassName).distinct();
|
|
|
|
|
|
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
|
|
|
|
|
|
distinct.forEach(stuUser -> {
|
|
|
|
|
|
|
|
stringBuilder.append(stuUser+",");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return stringBuilder.toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//班级下拉框
|
|
|
|
//班级下拉框
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ResultEntity getClassListByNameOrSchoolId(String schoolId, String studentId,
|
|
|
|
public ResultEntity getClassListByNameOrSchoolId(String schoolId, String studentId,
|
|
|
@ -700,6 +718,23 @@ public class TeacherOpenCourseStudentSigninServiceImpl implements TeacherOpenCou
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//缺勤理由设置
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public ResultEntity absenceUpdateBy(Long teacherOpenCourseStudentSigninLogId, String absenceReason) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TeacherOpenCourseStudentSigninLog teacherOpenCourseStudentSigninLog =
|
|
|
|
|
|
|
|
teacherOpenCourseStudentSigninLogMapper.selectByPrimaryKey(teacherOpenCourseStudentSigninLogId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
teacherOpenCourseStudentSigninLog.setTeacherOpenCourseStudentSigninLogRemark(absenceReason);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
teacherOpenCourseStudentSigninLogMapper.updateByPrimaryKeySelective(teacherOpenCourseStudentSigninLog);
|
|
|
|
|
|
|
|
return new ResultEntity<>(HttpStatus.OK);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//实际数据结果集
|
|
|
|
//实际数据结果集
|
|
|
|
private List<StuImportExcelDTO> resultList(String studentId, String type, String classId, Integer page, Integer size, Date signTime,
|
|
|
|
private List<StuImportExcelDTO> resultList(String studentId, String type, String classId, Integer page, Integer size, Date signTime,
|
|
|
|