if (executionPeriod.getBeginDate().before(advise.getStartExecutionPeriod().getEndDate())) {
if (executionPeriod.getBeginDate().before(advise.getStartExecutionPeriod().getBeginDate())) {
        public void afterAdd(TeacherAdviseService teacherAdviseServices, Advise advise) {            ExecutionPeriod executionPeriod = teacherAdviseServices.getTeacherService()                .getExecutionPeriod();            if (executionPeriod.getEndDate().after(advise.getEndExecutionPeriod().getEndDate())) {                advise.setEndExecutionPeriod(executionPeriod);            }            if (executionPeriod.getBeginDate().before(advise.getStartExecutionPeriod().getEndDate())) {                advise.setStartExecutionPeriod(executionPeriod);            }        }