IDepartment department = persistentTeacher.readTeacherByUsername(username).getCurrentWorkingDepartment();
IDepartment department = persistentTeacher.readTeacherByUsername(username).getLastWorkingDepartment();
	public List run(String username, Integer executionYearID) throws FenixServiceException {				DistributionTeacherServicesByTeachersDTO returnDTO = new DistributionTeacherServicesByTeachersDTO();				List<ITeacher> teachers;				List<IExecutionPeriod> executionPeriodList;				try {										ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();						IPersistentTeacher persistentTeacher = sp.getIPersistentTeacher();												IPersistentExecutionPeriod persistentExecutionPeriod = sp.getIPersistentExecutionPeriod();						executionPeriodList = persistentExecutionPeriod.readByExecutionYear(executionYearID);									IDepartment department = persistentTeacher.readTeacherByUsername(username).getCurrentWorkingDepartment();						teachers = department.getTeachers();					} catch (ExcepcaoPersistencia e) {            throw new FenixServiceException(e);        }											/* Information about teacher */		Double hoursSpentByTeacher;								for(ITeacher teacher : teachers){			returnDTO.addTeacher(teacher.getIdInternal(), teacher.getTeacherNumber(), teacher.getCategory().getCode(), teacher.getPerson().getNome(), 0, 0d);						for(IProfessorship professorShip : teacher.getProfessorships()){				IExecutionCourse executionCourse = professorShip.getExecutionCourse();								if(!executionPeriodList.contains(executionCourse.getExecutionPeriod())){					continue;				}								Set<String> curricularYears = new HashSet<String>();				Set<String> degreeNames = new HashSet<String>();				for(ICurricularCourse curricularCourse : executionCourse.getAssociatedCurricularCourses()){					degreeNames.add(curricularCourse.getDegreeCurricularPlan().getDegree().getSigla());										for (ICurricularCourseScope curricularCourseScope : curricularCourse.getScopes()) {						 ICurricularSemester curricularSemester = curricularCourseScope.getCurricularSemester();						 curricularYears.add(curricularSemester.getCurricularYear().getYear().toString());					}				}								hoursSpentByTeacher = StrictMath.ceil(teacher.getHoursLecturedOnExecutionCourse(executionCourse));								returnDTO.addExecutionCourseToTeacher(teacher.getIdInternal(), executionCourse.getIdInternal(), 						executionCourse.getNome(), 						hoursSpentByTeacher.intValue(), degreeNames, curricularYears, executionCourse.getExecutionPeriod().getName());							}		}							ArrayList<TeacherDistributionServiceEntryDTO> returnArraylist = new ArrayList<TeacherDistributionServiceEntryDTO>();				for(TeacherDistributionServiceEntryDTO teacher: returnDTO.getTeachersMap().values()) {			returnArraylist.add(teacher);		}				Collections.sort(returnArraylist);				return returnArraylist;	}