| | |
| | | package com.qxueyou.scc.admin.schoolRoll; |
| | | |
| | | import com.qxueyou.scc.admin.classes.model.ClsClass; |
| | | import com.qxueyou.scc.base.model.Result; |
| | | import com.qxueyou.scc.teach.student.model.StuStudent; |
| | | import io.swagger.models.auth.In; |
| | | |
| | |
| | | |
| | | int findSchoolRollListCount(String keyword,String status); |
| | | |
| | | String updateSchool(String StudentId,String ClassId); |
| | | Result updateSchool(String [] studentIds,String classId); |
| | | |
| | | void deriveStudentMessage(); |
| | | |
| | | Boolean auditStudent(String Student); |
| | | Result loopStudentIds(String[] studentIds); |
| | | |
| | | List<ClsClass> findClass(); |
| | | } |
| | |
| | | package com.qxueyou.scc.admin.schoolRoll.impl; |
| | | |
| | | import cn.hutool.core.date.LocalDateTimeUtil; |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import com.qxueyou.scc.admin.classes.model.ClsClass; |
| | | import com.qxueyou.scc.admin.schoolRoll.ISchoolRollService; |
| | | import com.qxueyou.scc.base.model.ExcelExportParam; |
| | | import com.qxueyou.scc.base.model.Pager; |
| | |
| | | import com.qxueyou.scc.base.util.ClientUtils; |
| | | import com.qxueyou.scc.base.util.CollectionUtils; |
| | | import com.qxueyou.scc.base.util.ExcelExportUtils; |
| | | import com.qxueyou.scc.base.util.TraceUtils; |
| | | import com.qxueyou.scc.teach.student.model.StuStudent; |
| | | import com.qxueyou.scc.user.model.UserRegistration; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public String updateSchool(String StudentId, String ClassId) { |
| | | StringBuffer hql=new StringBuffer("from StuStudent where studentId=? and deleteFlag is false"); |
| | | public Result updateSchool(String [] studentIds, String classId) { |
| | | for (String studentId: |
| | | studentIds) { |
| | | StringBuffer hql=new StringBuffer("from StuStudent where studentId=? and deleteFlag is false"); |
| | | |
| | | List<Object> args = CollectionUtils.newList(StudentId); |
| | | List<Object> args = CollectionUtils.newList(studentId); |
| | | |
| | | StuStudent stuStudent = findUnique(hql.toString(), args, StuStudent.class); |
| | | StuStudent stuStudent = findUnique(hql.toString(), args, StuStudent.class); |
| | | |
| | | if(stuStudent!=null && ClassId!=null){ |
| | | stuStudent.setClassId(ClassId); |
| | | save(stuStudent); |
| | | return "true"; |
| | | if(stuStudent!=null && classId!=null){ |
| | | stuStudent.setClassId(classId); |
| | | save(stuStudent); |
| | | }else { |
| | | return new Result(false,"班级不存在或学生不存在"); |
| | | } |
| | | } |
| | | |
| | | return "false"; |
| | | return new Result(true); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Boolean auditStudent(String Student) { |
| | | StringBuffer hql=new StringBuffer("from StuStudent where studentId=? and deleteFlag is false"); |
| | | public Result loopStudentIds(String[] studentIds) { |
| | | for (String studentId: |
| | | studentIds) { |
| | | auditStudent(studentId); |
| | | } |
| | | return new Result(true); |
| | | } |
| | | |
| | | List<Object> arg = CollectionUtils.newList(Student); |
| | | private Result auditStudent(String studentId) { |
| | | StuStudent student = read(StuStudent.class, studentId); |
| | | TraceUtils.setUpdateTrace(student); |
| | | String currentTime = LocalDateTimeUtil.format(LocalDateTime.now(), "yyMMddHHmmssSSS"); |
| | | |
| | | StuStudent stuStudent = findUnique(hql.toString(), arg, StuStudent.class); |
| | | String examCardNo = currentTime.concat(RandomUtil.randomNumbers(1)); |
| | | |
| | | stuStudent.setStatus(StuStudent.STATUS_ACTIVE); |
| | | student.setStudentNumber(examCardNo); |
| | | student.setStatus(StuStudent.STATUS_ACTIVE); |
| | | save(student); |
| | | |
| | | Result save = save(stuStudent); |
| | | return new Result(true); |
| | | } |
| | | |
| | | return save.isSuccess(); |
| | | @Override |
| | | public List<ClsClass> findClass() { |
| | | StringBuffer hql=new StringBuffer("from ClsClass where deleteFlag is false"); |
| | | |
| | | List<Object> arg = CollectionUtils.newList(); |
| | | |
| | | List<ClsClass> clsClasses = find(hql.toString(), arg, ClsClass.class); |
| | | |
| | | return clsClasses; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.qxueyou.scc.controller; |
| | | |
| | | import com.qxueyou.scc.admin.classes.model.ClsClass; |
| | | import com.qxueyou.scc.admin.schoolRoll.ISchoolRollService; |
| | | import com.qxueyou.scc.base.model.Pager; |
| | | import com.qxueyou.scc.base.model.Result; |
| | |
| | | |
| | | return new Result(true,"success", CollectionUtils.newObjectMap("schoolRollList", |
| | | QBeanUtils.listBean2ListMap(schoolRollList, |
| | | CollectionUtils.newStringMap("name", "studentName", "studentNo", "studentNo","sex","sex", "status", |
| | | "status", "createTime", "createTime")), |
| | | CollectionUtils.newStringMap("name", "studentName","studentId","studentId", "studentNo", "studentNo","sex","sex", "status", |
| | | "status", "createTime", "createTime","mobilePhone","mobilePhone","studentNumber","studentNumber")), |
| | | "schoolrollCount", count)); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "给学员分配班级", notes = "") |
| | | @PutMapping(value = "/updateSchoolClass") |
| | | public String updateSchoolClass(String StudentId,String ClassId) { |
| | | return iSchoolRollService.updateSchool(StudentId, ClassId); |
| | | @GetMapping(value = "/updateSchoolClass") |
| | | public Result updateSchoolClass(String [] studentIds,String classId) { |
| | | return iSchoolRollService.updateSchool(studentIds, classId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "审核学员并生成学号", notes = "") |
| | | @PutMapping(value = "/auditStudent") |
| | | public Boolean auditStudent(String StudentId) { |
| | | return iSchoolRollService.auditStudent(StudentId); |
| | | @GetMapping(value = "/auditStudent") |
| | | public Result auditStudent(String studentIds) { |
| | | return iSchoolRollService.loopStudentIds(studentIds.split(",")); |
| | | } |
| | | |
| | | /** |
| | |
| | | iSchoolRollService.deriveStudentMessage(); |
| | | } |
| | | |
| | | /** |
| | | * 查询班级 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "查询班级", notes = "") |
| | | @GetMapping(value = "/findClass") |
| | | public Result findClass() { |
| | | List<ClsClass> aClass = iSchoolRollService.findClass(); |
| | | return new Result(true,"success",CollectionUtils.newObjectMap("schoolRollList", QBeanUtils.listBean2ListMap(aClass, |
| | | CollectionUtils.newStringMap("name","classname","classId","classId")) |
| | | )); |
| | | } |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | Result doStartExam(String examBatchId, String classId,String studentUserId); |
| | | |
| | | Result doStartReExam(String examId,String studentUserId); |
| | | |
| | | /** |
| | |
| | | } else { |
| | | OrgText orgText = orgTextService.getOrgText(exerciseCompleteInfoId, OrgText.TABLE_WRITING_EXERCISE); |
| | | orgText.setContent(content); |
| | | orgText.setCreator(ClientUtils.getUserName()); |
| | | this.save(orgText); |
| | | } |
| | | |
| | | if (submitType > 0) { |
| | | exerciseCompleteInfo.setSubmitTime(new Date()); |
| | | exerciseCompleteInfo.setCompleteStatus(ExerciseCompleteInfo.STATUS_COMMIT); |
| | | exerciseCompleteInfo.setCreator(ClientUtils.getUserName()); |
| | | } |
| | | |
| | | this.save(exerciseCompleteInfo); |
| | |
| | | log.setStatus(status); |
| | | log.setUrl(url); |
| | | |
| | | |
| | | this.save(log); |
| | | |
| | | return log.getExerciseDataLogId(); |
| | |
| | | private String mobilePhone; |
| | | private BigDecimal studyDuration; |
| | | private BigDecimal score; |
| | | private String studentNumber; |
| | | private String attendanceStatus; |
| | | |
| | | public StuStudent() { |
| | | } |
| | | |
| | | public StuStudent(String studentId, Date createTime, Date updateTime, String creator, String createId, |
| | | boolean deleteFlag) { |
| | | boolean deleteFlag,String studentNumber) { |
| | | this.studentId = studentId; |
| | | this.createTime = createTime; |
| | | this.updateTime = updateTime; |
| | | this.creator = creator; |
| | | this.createId = createId; |
| | | this.deleteFlag = deleteFlag; |
| | | this.studentNumber=studentNumber; |
| | | } |
| | | |
| | | public StuStudent(String studentId, Date createTime, Date updateTime, String creator, String createId, |
| | | String updator, String updateId, boolean deleteFlag, String userId, String name, String classId, |
| | | String tenantId, String status, String attendanceStatus) { |
| | | String tenantId, String status, String attendanceStatus,String studentNumber) { |
| | | this.studentId = studentId; |
| | | this.createTime = createTime; |
| | | this.updateTime = updateTime; |
| | |
| | | this.tenantId = tenantId; |
| | | this.status = status; |
| | | this.attendanceStatus = attendanceStatus; |
| | | this.studentNumber=studentNumber; |
| | | } |
| | | |
| | | @Id |
| | |
| | | public void setSubjectId(String subjectId) { |
| | | this.subjectId = subjectId; |
| | | } |
| | | |
| | | |
| | | |
| | | @Column(name = "STUDENTSUMBER", length=30) |
| | | public String getStudentNumber() { |
| | | return studentNumber; |
| | | } |
| | | |
| | | public void setStudentNumber(String studentNumber) { |
| | | this.studentNumber = studentNumber; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.qxueyou.scc.teach.student.service.impl; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import cn.hutool.core.date.LocalDateTimeUtil; |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import com.qxueyou.scc.admin.classes.model.ClsClass; |
| | | import com.qxueyou.scc.exam.model.ExamResultV; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | } |
| | | |
| | | TraceUtils.setUpdateTrace(student); |
| | | String currentTime = LocalDateTimeUtil.format(LocalDateTime.now(), "yyMMddHHmmssSSS"); |
| | | |
| | | String examCardNo = currentTime.concat(RandomUtil.randomNumbers(1)); |
| | | |
| | | student.setStudentNumber(examCardNo); |
| | | student.setStatus(status); |
| | | save(student); |
| | | |