public Map<String, Object> checkWrittenAudit(Student student) { Map<String, Object> hm = null; if (student.getWrittenTestCompletionDate() != null) { if (student.getWrittenCompletionSchoolNumber() != null) { hm = new HashMap<String, Object>(); hm.put("studentFk", student.getStudentPk()); hm.put("completionDate", student.getWrittenTestCompletionDate()); int fk = student.getWrittenCompletionSchoolNumber().intValue(); // the values of dl employees if ((fk >= 1 && fk <= 499) || (fk >= 6001 && fk <= 6500)) { hm.put("writtenScore", new Integer(101)); hm.put("schoolNumber", new Integer(0)); } else { if (student.getWrittenTestScore() != null) { hm.put("writtenScore", student.getWrittenTestScore()); } else { hm.put("writtenScore", new Integer(0)); } hm.put("schoolNumber", student.getWrittenCompletionSchoolNumber()); } } } return hm; }
private Student setAllSchoolNumbers(Student student) throws DaoException { if (student.getSchoolFk() != null) { String number = getSchoolNumber(student.getSchoolFk()); Integer schoolNumber = Integer.valueOf(number); log.debug("allSchoolNumbers schoolNumber is " + schoolNumber); if (student.getBtwCompletionSchoolNumber() == null) { student.setBtwCompletionSchoolNumber(schoolNumber); } if (student.getClassroomCompletionSchoolNumber() == null) { student.setClassroomCompletionSchoolNumber(schoolNumber); } if (student.getObservationCompletionSchoolNumber() == null) { student.setObservationCompletionSchoolNumber(schoolNumber); } if (student.getRoadCompletionSchoolNumber() == null) { student.setRoadCompletionSchoolNumber(schoolNumber); } if (student.getWrittenCompletionSchoolNumber() == null) { student.setWrittenCompletionSchoolNumber(schoolNumber); } } return student; }