Package beans.directory.service.entity

Examples of beans.directory.service.entity.Service


     * Возвращает список расходных материалов
     * @return список расходных материалов
     */
    @Override
    public List<ExpenditureDetails> getExpenditureList(int serviceID) throws ClipsServerException {
        Service service = findEntity(Service.class, serviceID);
        Collection<ExpenditureDefault> list = findEntityList(ExpenditureDefault.class, "service", service);
        List<ExpenditureDetails> res = new ArrayList<ExpenditureDetails>();
        Iterator<ExpenditureDefault> i = list.iterator();
        while(i.hasNext()) {
            ExpenditureDefault j = (ExpenditureDefault) i.next();
View Full Code Here


        } else {
            checkCommandAccessibility(COMMAND_MODIFY_CLINIC);
        }
        if (getId() != 0 && servicePrice.getId() != 0) {
            Contract entity = getExistentEntity();
            Service service = servicePrice.getService();
            Field[] fields = new FindEntity.Field[]{
                        new Field("polis.contract", entity),
                        new Field("service", service)
                    };
            int count = getEntityCount(ServiceRender.class,fields);
View Full Code Here

            auditDoc = new AuditDoc<ServicePrice>(null, getCollaborator());
            servicePrice = new ServicePrice();
            checkModifyServicePrice(servicePrice, details);
            //Проверка - для посещений нельзя указывать тип приема нулл, а также типы приемов, не имеющие кодов
            // для остальных услуг тип приема должна быть нулл
            Service service = findEntity(Service.class, details.serviceID);
            if (service.getServiceGroup().getId() == ServiceGroup.SERVICE_GROUP_VISIT) {
                if (details.receptionTypeID == 0) {
                    throw new EDataIntegrity("При установке цены на посещение не указан тип приема");
                }
                ReceptionType rt = findEntity(ReceptionType.class, details.receptionTypeID);
                if (rt.getExtKey().trim().isEmpty()) {
View Full Code Here

            q.setParameter("contract", entity);
            List notFoundedServices = q.getResultList();
            if (notFoundedServices.size() != 0) {
                String serviceTitles = "";
                for (int i = 0; i < notFoundedServices.size(); i++) {
                    Service service = (Service)notFoundedServices.get(i);
                    serviceTitles += service.getCodeAndTitle() + "\n";
                }
                throw new EDataIntegrity("В договоре отсутствуют необходимые услуги : \n" + serviceTitles);
            }
            AuditDoc<ContractPacket> auditCP = new AuditDoc<ContractPacket>(null, getCollaborator());
            auditDocList.add(auditCP);
View Full Code Here

                throw new EDataIntegrity("В таблице стоимости посещений неверный ID : " + visitPrice.getId());
            }
            rt = visitPrice.getId().substring(0, 3);
            visit = visitPrice.getId().substring(3, 6);
            price = (int) (Float.parseFloat(visitPrice.getPrice())*100);
            Service service = serviceMap.get(visit);
            if (service == null) {
                throw new EDataIntegrity("В базе отсутствует посещение с кодом " + visit +
                        ". Обновите справочник посещений");
            }
            ReceptionType receptionType = rtMap.get(rt);
            if (receptionType == null) {
                throw new EDataIntegrity("В базе отсутствует тип приема с кодом " + visit +
                        ". Обновите справочник типов приемов");
            }


            ServicePrice servicePrice = priceMap.get(visitPrice.getId());
            if (servicePrice == null) {
                ServicePriceDetails d = new ServicePriceDetails();
                d.serviceID = service.getId();
                d.receptionTypeID = receptionType.getId();
                d.price = price; //договорная стоимость услгуи
                d.money = price; //сумма денег оплачиваемая за услугу страховой команией
                ModificationInfo mi = setService(d);
                auditDetList.addAll(mi.getAudit());
View Full Code Here

        //проверяем, если ли связанные услуги
        List serviceList = findEntityList(Service.class, f);
        if(serviceList.size() > 0) {
            String s = "";
            for (int i = 0; i < serviceList.size(); i++) {
                Service service = (Service)serviceList.get(i);
                s += "\n" + service.getCodeAndTitle();
            }
            throw new EDataIntegrity("Удаление невозможно, с данным анализом связаны следующие услуги" + s);
        }
        //проверяем, есть ли связанные осмотры
        Field f2[] { new Field("checkupType", checkupType) };
View Full Code Here

        deleteEntityList(ExpenditureDefault.class, f);
    }

    @Override
    public int getCheckupType(int serviceID) throws ClipsServerException {
        Service service = findEntity(Service.class, serviceID);
        return service.getCheckupType().getId();
    }
View Full Code Here

        return service.getCheckupType().getId();
    }

    @Override
    public void setCheckupType(int serviceID, int checkupTypeID) throws ClipsServerException {
        Service service = findEntity(Service.class, serviceID);
        service.setCheckupType(findEntity(CheckupType.class, checkupTypeID));
        manager.persist(service);
        manager.flush();
        manager.refresh(service);
    }
View Full Code Here

            d.setServiceClass((ServiceClass) entityWith);
            manager.merge(d);
        }
        List entityList1 = findEntityList(Service.class, "serviceClass", entityWhat);
        for (int i = 0; i < entityList1.size(); i++) {
            Service s = (Service) entityList1.get(i);
            s.setServiceClass((ServiceClass) entityWith);
            manager.merge(s);
        }
        removeEntity(entityWhat);
        manager.flush();
    }
View Full Code Here

        }

        for (int i = 0; i < chunk.serviceList.size(); i++) {
           
            ServiceCheckupChunk serviceCheckupChunk = chunk.serviceList.get(i);
            Service s = findEntity(Service.class, serviceCheckupChunk.serviceID);
            ServiceRender referedSerren = findEntity(ServiceRender.class, referedSerrenID);

            AuditDoc<ServiceRender> auditSerren = new AuditDoc<ServiceRender>(null, getCollaborator());
            ServiceRender entity = new ServiceRender();
            entity.setService(s);
View Full Code Here

TOP

Related Classes of beans.directory.service.entity.Service

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.