Package clips.delegate.directory.filtered

Examples of clips.delegate.directory.filtered.DirectoryServiceItem$ServicesActions


        DirectoryService dirService =
                (DirectoryService) DirectoryLocator.getDirectory(DirectoryService.class, false);
       
        DirectoryServicesGroupItem parent = null;
        DirectoryServicesGroupItem group = null;
        DirectoryServiceItem service = null;
       
        String line = input.readLine();
        while (line != null) {
            if (!line.trim().isEmpty()) {
                int pos = line.indexOf('|');
                if (pos > -1) {
                    String code = line.substring(0, pos);
                    String title = line.substring(pos + 1);
                    if (code.length() == 2) {
                        ServiceGroupDetails parDetails = new ServiceGroupDetails();
                        parDetails.code = code;
                        parDetails.parentItem = 0;
                        parDetails.title = title;
                       
                        parent = new DirectoryServicesGroupItem(parDetails);
                        dirGroup.getItems().append(parent);
                       
                        System.out.println(code + " " + title);
                    }
                    else if (code.length() == 6) {
                        code = code.substring(3, 6);
                       
                        ServiceGroupDetails grDetails = new ServiceGroupDetails();
                        grDetails.code = code;
                        grDetails.parentItem = parent.getID();
                        grDetails.title = title;
                       
                        group = new DirectoryServicesGroupItem(grDetails);
                        dirGroup.getItems().append(group);
                       
                        System.out.println("   " +code + " " + title);
                    }
                    else if (code.length() == 9) {
                        code = code.substring(7);
                       
                        ServiceDetails servDetails = new ServiceDetails();
                        servDetails.checkupType = 0;
                        servDetails.code = code;
                        servDetails.defaultDuration = 0;
                        servDetails.description = "";
                        servDetails.serviceClass = 1;
                        servDetails.serviceGroup = group.getID();
                        servDetails.title = title;
                       
                        service = new DirectoryServiceItem(servDetails);
                        dirService.getItems().append(service);
                       
                        System.out.println("      " +code + " " + title);
                    }
                }
View Full Code Here


        DirectoryService dirService =
                (DirectoryService) DirectoryLocator.getDirectory(DirectoryService.class, false);
       
        Map<String, DirectoryServiceItem> serviceMap = new HashMap<String, DirectoryServiceItem>();
        for (int i = 0; i < dirService.getItems().size(); i++) {
            DirectoryServiceItem item = dirService.getItems().get(i);
            serviceMap.put(item.getFullCode(), item);
        }
       
        Map<String, DirectoryDoctorActionItem> actionMap = new HashMap<String, DirectoryDoctorActionItem>();
        DirectoryItemRO[] actionArr = dirAction.toArray(false, true);
        for (int i = 0; i < actionArr.length; i++) {
            DirectoryDoctorActionItem item = (DirectoryDoctorActionItem) actionArr[i];
            actionMap.put(item.getGroupCode(), item);
        }
       
        DirectoryServiceItem pservice = null;
        DirectoryServiceItem cservice = null;
        DirectoryDoctorActionItem action = null;
       
        String line = input.readLine();
        while (line != null) {
            if (!line.trim().isEmpty()) {
                int pos = line.indexOf('|');
                if (pos > -1) {
                    String code = line.substring(0, pos);
                    String title = line.substring(pos + 1);
                    String c;
                    if (code.startsWith("@")) {
                        pservice = null;
                        c = code.substring(2);
                        pservice = serviceMap.get(c);
                        if (pservice == null) {
                            System.out.println("!!!!!Услуга: " + c + "  " + title);
                        }
                        else {
                            System.out.println("Услуга: " + pservice.getFullCode() + "  " + pservice.getTitle());
                        }
                    }
                    else if (code.startsWith("B")) {
                        cservice = null;
                        c = code.substring(1);
                        cservice = serviceMap.get(c);                       
                        if (cservice == null) {
                            System.out.println("   !!!!!Услуга: " + c + "  " + title);
                        }
                        else {
                            ServiceToServiceDetails details = new ServiceToServiceDetails(0);
                            details.pserviceId = pservice.getID();
                            details.cserviceId = cservice.getID();
                            ChildServiceData child = new ChildServiceData(details);
                            pservice.getChildServices().append(child);
                        }
                    }
                    else if (code.startsWith("A")) {
View Full Code Here

        isVisit = (serviceGroup != null && serviceGroup.getID() == ServiceGroup.SERVICE_GROUP_VISIT);
        Selector<DirectoryServiceItem> services = svc.getFilteredItems(serviceGroup);

        for (DirectoryReceptionTypeItem receptionType : dirRecType.getItemsList()) {
            for (int i = 0; i < services.size(); i++) {
                DirectoryServiceItem service = services.get(i);
                if (isVisit) {
                    if (receptionType.getID() != 0 && !receptionType.getExtKey().isEmpty()) {
                        //В посещениях отображаем только типы приемов, имеющие внешний ключ
                        Pair<DirectoryServiceItem, DirectoryReceptionTypeItem> pair = new Pair<DirectoryServiceItem, DirectoryReceptionTypeItem>();
                        pair.first = service;
View Full Code Here

   
    @Override
    protected void modifyErrorTableCellRendererComponent(JTable table, Object value, int row, int col) throws ClipsException {
        JLabel render = render();
        TableModelPacketServices model = (TableModelPacketServices) table.getModel();
        DirectoryServiceItem service = (DirectoryServiceItem) model.getValueAt(row, TableModelPacketServices.COL_SERVICE);
        boolean founded = false;
        for (int i = 0; i < contractServiceList.size(); i++) {
            ServisePriceData servisePriceData = contractServiceList.get(i);
            if (service == servisePriceData.getService()) {
                founded = true;
View Full Code Here

        //nullitem
        serviceList.add(dirService.getItemFromID(0));
        //нужные итемы
        SelectorEditableExceptional<DirectoryServiceItem> servItems = dirService.getItems();
        for (int i = 0; i < servItems.size(); i++) {
            DirectoryServiceItem item = servItems.get(i);
            if (item.getID() != 0 && !item.getCode().trim().isEmpty()
                    && item.getGroup().getID() == ServiceGroup.SERVICE_GROUP_VISIT) {
                serviceList.add(item);
            }
        }
        for (int i = 0; i < tempMapperList.size(); i++) {
            TempMapperChunk d = tempMapperList.get(i);
            DirectoryServiceItem item = dirService.getItemFromID(d.service1ID);
            serviceList.add(item);
        }
        jComboService = new JComboBox(serviceList.toArray());
        DirectorySpeciality dirSpec = DirectoryLocator.getDirectory(DirectorySpeciality.class);
        jComboSpec = new JComboBox(dirSpec.toArray(true));
View Full Code Here

        System.out.println("Запись больничных в базу");
        DirectoryService dirService = DirectoryLocator.getDirectory(DirectoryService.class);
        HashMap<String, DirectoryServiceItem> serviceMap = new HashMap<String, DirectoryServiceItem>();
        SelectorEditableExceptional<DirectoryServiceItem> servItems = dirService.getItems();
        for (int i = 0; i < servItems.size(); i++) {
            DirectoryServiceItem item = servItems.get(i);
            if (item.getID() != 0 && !item.getCode().trim().isEmpty()
                    && item.getGroup().getID() == ServiceGroup.SERVICE_GROUP_VISIT) {
                serviceMap.put(item.getCode().trim(), item);
            }
        }

        Set<Entry<Integer, SstData>> sstSet = sstMap.entrySet();
        float size = sstSet.size();
View Full Code Here

        DirectoryTraumaType dirTraumaType = DirectoryLocator.getDirectory(DirectoryTraumaType.class);


        SelectorEditableExceptional<DirectoryServiceItem> servItems = dirService.getItems();
        for (int i = 0; i < servItems.size(); i++) {
            DirectoryServiceItem item = servItems.get(i);
            if (item.getID() != 0 && !item.getCode().trim().isEmpty()
                    && item.getGroup().getID() == ServiceGroup.SERVICE_GROUP_VISIT) {
                serviceMap.put(item.getCode().trim(), item);
            }
        }


        System.out.println("Запись в базу");
View Full Code Here

    }

    @Override
    public Object getValueAt(int row, int col) {
        try {
            DirectoryServiceItem service = services.get(row);
            if (col == COL_SERVICE) {
                return service.toString();
            } else if (col == COL_SERV_CLASS) {
                return service.getServiceClass();
            } else if (col == COL_DURATION) {
                return service.getDefaultDuration();
            } else if (col == COL_DESCRIPTION) {
                return service.getDescription();
            } else if (col == COL_CHECKUP) {
                return service.getCheckUpType() != null ? service.getCheckUpType() : "";
            } else if (col == COL_REQ_TYPE) {
                return service.getReqType() != null ? service.getReqType() : "";
            } else if (col == COL_VISIT_TYPE) {
                return service.getVisitType() != null ? service.getVisitType() : "";
            } else {
                return null;
            }
        } catch (ClipsException ex) {
            return new ErrorValue(ex);
View Full Code Here

    }

    @Override
    public void setValueAt(Object aValue, int row, int col) {
        try {
            DirectoryServiceItem service = services.get(row);
            if (col == COL_SERVICE) {
                service.setTitle(aValue.toString());
            } else if (col == COL_DURATION) {
                service.setDefaultDuration((Integer) aValue);
            } else if (col == COL_DESCRIPTION) {
                service.setDescription(aValue.toString());
            } else if (col == COL_SERV_CLASS) {
                service.setServiceClass((DirectoryServiceClassItem) aValue);
            } else if (col == COL_REQ_TYPE) {
                service.setReqType((DirectoryReqTypeItem) aValue);
            } else if (col == COL_VISIT_TYPE) {
                service.setVisitType((DirectoryVisitTypeItem) aValue);
            }
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
    }
View Full Code Here

            d.code = tfGroupCode.getText();
            d.serviceClass = servClass.getID();
            d.defaultDuration = 0;
            d.description = "";
            d.serviceGroup = group.getID();
            service = new DirectoryServiceItem(d);
            setDlgResult(ModalDialog.DLG_OK);
            dispose();
        }
        else {
            MessageBox.showWarning(MessageBox.W_NEED_TO_SET_FIELDS);
View Full Code Here

TOP

Related Classes of clips.delegate.directory.filtered.DirectoryServiceItem$ServicesActions

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.