Package web.rechelper

Examples of web.rechelper.ReceptionHelper


                rdto.setClient(sheduleReception.getClient());
                rdto.setCollaborator(sheduleReception.getCollaborator());
                rdto.setLpu(sheduleReception.getCollaborator().getLpu());
                rdto.setType(sheduleReception.getWorkType());
                Day day = new Day(sheduleReception.getBegin());
                ReceptionHelper rhBefore = new ReceptionHelper(getDao(), rdto, day.getDate(), day.getEndDate());
                WeekDay weekDay = rhBefore.getModel().get(0);
                List<Ticket> ticketsBefore = weekDay.getTickets();

                getDao().delete(sheduleReception);

                //Ебём мозг 2, нарезаем тикеты после удаления
                ReceptionHelper rhAfter = new ReceptionHelper(getDao(), rdto, day.getDate(), day.getEndDate());
                weekDay = rhAfter.getModel().get(0);
                List<Ticket> ticketsAfter = weekDay.getTickets();

                //Сравниваем списки - получаем свободные тикеты
                ticketsAfter.removeAll(ticketsBefore);
                for (Ticket ticket : ticketsAfter) {
View Full Code Here


            Calendar calendar = day.getCalendar();
            calendar.add(Calendar.DAY_OF_MONTH, 13);
            day = new Day(calendar);
            Date dateEnd = day.getEndDate();

            ReceptionHelper rh = new ReceptionHelper(getDao(), rdto, dateStart, dateEnd);
            List<WeekDay> wModel = rh.getModel();
            for (int i = 0; i < wModel.size() && collabTicketMap.get(collabWorkTypeDTO) == null; i++) {
                WeekDay weekDay = wModel.get(i);
                List<Ticket> tickets = weekDay.getTickets();
                if (tickets != null){
                    for (Ticket ticket : tickets) {
View Full Code Here

        Day beginDay = new Day();
        Calendar calEnd = beginDay.getCalendar();
        calEnd.add(Calendar.WEEK_OF_YEAR, 2);
        calEnd.add(Calendar.MILLISECOND, -1);

        ReceptionHelper rh = new ReceptionHelper(getDao(), dto, beginDay.getDate(), calEnd.getTime());
       
        List<WeekDay> mm = rh.getModel();
        int kk = mm.size();

        HashMap model = new HashMap();
        model.put("uid", uid);

        model.put("days", rh.getModel());
        model.put("pageBreadcrumb",
                initBreadCrumb(dto.getClient(), dto.getType(), dto.getLpu(), dto.getCollaborator(), 0));
       
        return model;
    }
View Full Code Here

        Day day = new Day(cal);
        Calendar dayEnd = day.getCalendar();
        dayEnd.add(Calendar.DAY_OF_MONTH, 1);
        dayEnd.add(Calendar.MILLISECOND, -1);

        ReceptionHelper rh = new ReceptionHelper(getDao(), dto, day.getDate(), dayEnd.getTime());
        List<WeekDay> model = rh.getModel();

        if(model.size() != 1) {
            errors.reject("reception.incorrect.time");
            return showForm(request, errors, getFormView());
        }
View Full Code Here

        ReceptionDayDTO dto = (ReceptionDayDTO) command;
        HashMap model = new HashMap();

        WeekIndex weekIndex = new WeekIndex(new WeekIndex(new Date()).getIndex() + dto.getWeek());
        ReceptionHelper rh = new ReceptionHelper(getDao(), dto,
                weekIndex.getBegin().getTime(), weekIndex.getEnd().getTime());
        List<WeekDay> weekDays = rh.getModel();

        int day = dto.getDay();
        WeekDay weekDay = weekDays.get(day-1 < 0 ? 0 : (day-1) % 7);

        //Создаем таблицу часы минуты
View Full Code Here

            Calendar calendar = day.getCalendar();
            calendar.add(Calendar.DAY_OF_MONTH, 13);
            day = new Day(calendar);
            Date dateEnd = day.getEndDate();

            ReceptionHelper rh = new ReceptionHelper(getDao(), dto, dateStart, dateEnd);
            List<WeekDay> wModel = rh.getModel();
            for (int i = 0; i < wModel.size() && collabTicketMap.get(collaborator) == null; i++) {
                WeekDay weekDay = wModel.get(i);
                List<Ticket> tickets = weekDay.getTickets();
                if (tickets != null){
                    for (Ticket ticket : tickets) {
View Full Code Here

        HashMap model = new HashMap();

        WeekIndex weekIndex = new WeekIndex();
        weekIndex = new WeekIndex(weekIndex.getIndex() + dto.getWeek());
        ReceptionHelper rh = new ReceptionHelper(getDao(), dto,
                weekIndex.getBegin().getTime(), weekIndex.getEnd().getTime());

        model.put("weekdays", rh.getModel());
        model.put("pageBreadcrumb", initBreadCrumb(dto.getClient(), dto.getType(), dto.getLpu(), dto.getCollaborator()));
       
        return model;
    }
View Full Code Here

            return showForm(request, errors, getFormView());
        }

        Day day = new Day(cal);

        ReceptionHelper rh = new ReceptionHelper(getDao(), dto, day.getDate(), day.getEndDate());
        List<WeekDay> model = rh.getModel();

        if(model.size() != 1) {
            errors.reject("reception.incorrect.time");
            return showForm(request, errors, getFormView());
        }
View Full Code Here

TOP

Related Classes of web.rechelper.ReceptionHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.