| | |
| | | StuStudent stuStudent = findUnique(hql.toString(), args, StuStudent.class); |
| | | |
| | | if(stuStudent!=null && classId!=null){ |
| | | StringBuffer ClaHql=new StringBuffer("from ClsClass where classId=? and deleteFlag is false"); |
| | | |
| | | List<Object> claArgs = CollectionUtils.newList(classId); |
| | | |
| | | ClsClass cLaClass = findUnique(ClaHql.toString(), claArgs, ClsClass.class); |
| | | |
| | | cLaClass.setStudentCount(cLaClass.getStudentCount()+1); |
| | | |
| | | stuStudent.setClassId(classId); |
| | | |
| | | save(stuStudent); |
| | | }else { |
| | | return new Result(false,"班级不存在或学生不存在"); |
| | | } |
| | | } |
| | | |
| | | return new Result(true); |
| | | return new Result(true,"分班成功"); |
| | | |
| | | } |
| | | |
| | |
| | | String[] headers = { "姓名", "性别" ,"手机号" ,"身份证"}; |
| | | List<StuStudent> dataset = new ArrayList<StuStudent>(); |
| | | for (StuStudent stuStudent: |
| | | stuStudents) { |
| | | stuStudents) { |
| | | StuStudent u = new StuStudent(); |
| | | u.setName(stuStudent.getName()); |
| | | u.setSex(stuStudent.getSex()); |
| | |
| | | @Override |
| | | public Result loopStudentIds(String[] studentIds) { |
| | | for (String studentId: |
| | | studentIds) { |
| | | studentIds) { |
| | | auditStudent(studentId); |
| | | } |
| | | return new Result(true); |