Package domain

Examples of domain.Lpu


    @Deprecated
    private long time;

    public ReceptionLine(SheduleReception reception) {
        this.reception = reception;
        Lpu lpuObj = reception.getCollaborator().getLpu();
        this.lpu = lpuObj.getTitleShort();
        this.addressLpu = lpuObj.getAddress() != null ? lpuObj.getAddress().getAsStringShort() : "";
        this.collaborator = reception.getCollaborator();
        this.register =  (reception.getRegister() != null
                ? new SimpleDateFormat("kk:mm").format(reception.getRegister())
                : "");
View Full Code Here


    @Override
    protected ModelAndView handle(HttpServletRequest request,
            HttpServletResponse response, Object command, BindException errors) throws Exception {

        Lpu lpu = CH.getOptional(getDao(), Lpu.class, request.getParameter("lpu"));
        if (lpu == null) {
            return IncomingParamsValidator.redirectTo("/operator/index.htm", null, null, lpu, null);
        }

        CollaboratorDTO dto = (CollaboratorDTO) command;
View Full Code Here

    @Override
    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
        Client client = CH.getOptional(getDao(), Client.class, request.getParameter("client"));
        Collaborator collab = CH.getOptional(getDao(), Collaborator.class, request.getParameter("collaborator"));
        WorkType type = CH.getOptional(getDao(), WorkType.class, request.getParameter("type"));
        Lpu lpu = CH.getOptional(getDao(), Lpu.class, request.getParameter("lpu"));
        if (collab == null) {
            return IncomingParamsValidator.redirectTo("/operator/collaborator.htm", client, type, lpu, collab);
        }
        if ((lpu == null) && (type == null)) {
            return IncomingParamsValidator.redirectTo("/operator/index.htm", client, type, lpu, collab);
View Full Code Here

    @Override
    protected void onBind(HttpServletRequest request, Object command, BindException errors) throws Exception {
        IndexDTO dto = (IndexDTO) command;
        if(dto.getLpu() != null) {
            Lpu lpu = dto.getLpu();
            dto.setLpuStr(lpu.getTitle().trim());
        }
    }
View Full Code Here

    @Override
    protected ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {

        Client client = CH.getOptional(getDao(), Client.class, request.getParameter("client"));
        WorkType type = CH.getOptional(getDao(), WorkType.class, request.getParameter("type"));
        Lpu lpu = CH.getOptional(getDao(), Lpu.class, request.getParameter("lpu"));
        Collaborator collab = CH.getOptional(getDao(), Collaborator.class, request.getParameter("collaborator"));

        if (client == null) {
            return IncomingParamsValidator.redirectTo("/reception/index.htm", client, type, lpu, collab);
        } else if (collab == null) {
View Full Code Here

        model.put("client", client);
        model.put("type", type);

        List<Lpu> lpus = type != null ? getDao().getLpuByWorkType(type) : getDao().getAviableLpu();
        if (client.getDistrict() != null){
            Lpu userLpu = client.getDistrict().getLpu();
            model.put("userLpu", userLpu);
            model.put("userLpuAddress", userLpu.getAddress().getAsStringShort());
            for (int i = 0; i < lpus.size(); i++) {
                Lpu lpu = lpus.get(i);
                if (lpu.getId() == userLpu.getId()){
                    lpus.remove(i);
                    break;
                }
            }
        }

        List<LpuRenderDTO> lines = new ArrayList<LpuRenderDTO>();
        for (Lpu lpu : lpus) {
            lines.add(new LpuRenderDTO(lpu, lpu.getAddress().getAsStringShort()));
        }

        model.put("lpus", lines);

        String nextUrl = type == null ? "/reception/work.htm": "/reception/collaborator.htm";
View Full Code Here

    //        values = values.length() > 0 ? values.substring(1) : "";
            }else{
                values += "=0;не выбран=0;не выбран=0;не выбран=0";
            }
        }else if (lpuId != null) {
            Lpu lpu = CH.getOptional(getDao(), Lpu.class, lpuId);
            List<District> districtList = getDao().getDistrictList(lpu);
            values +="0;не указан";
            for (District district : districtList) {
                values += ";" + district.getId() + ";" + district;
            }
View Full Code Here

    private DAO dao;

    public List<DistrictConvertor> getDistrictList(int lpuId){
        ArrayList<DistrictConvertor> districts = new ArrayList<DistrictConvertor>();
        districts.add(new DistrictConvertor());
        Lpu lpu = getDao().getById(Lpu.class, lpuId);
        if (lpu != null){
            List<District> districtList = getDao().getDistrictList(lpu);
            for (District district : districtList) {
                districts.add(new DistrictConvertor(district));
            }
View Full Code Here

    }

    public DistrictConvertor getDefaultDistrict(int streetId, String building){
        District district = AddressManager.getDefaultDistrict(getDao(), streetId, building);
        if (district != null){
            Lpu lpu = district.getLpu();
            DistrictConvertor dc = new DistrictConvertor(district);
            dc.setLpu(new LpuConvertor(lpu));
            return dc;
        }else{
            return null;
View Full Code Here

    @Override
    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
       
        Client client = CH.getOptional(getDao(), Client.class, request.getParameter("client"));
        Lpu lpu = CH.getOptional(getDao(), Lpu.class, request.getParameter("lpu"));
        if (client == null) {
            return IncomingParamsValidator.redirectTo("/reception/index.htm", client, null, null, null);
        }

        HashMap model = new HashMap();
View Full Code Here

TOP

Related Classes of domain.Lpu

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.