Package framework.generic

Examples of framework.generic.ClipsServerException


        checkCommandAccessibility(COMMAND_READ);
        begin = DateTimeUtils.getDateOnly(begin);
        end = DateTimeUtils.getDateOnly(end);
        if (end.before(begin)) {
            throw new ClipsServerException("Дата окончания выборки меньше даты начала");
        }
        Calendar cal = GregorianCalendar.getInstance();
        cal.setTime(end);
        cal.add(Calendar.DAY_OF_YEAR, 1);
        end = cal.getTime();
View Full Code Here


        q.setParameter("current", GregorianCalendar.getInstance().getTime());
        List list = q.getResultList();

        Contract contract;
        if (list.size() == 0) {
            throw new ClipsServerException("Не найдено ни одного действующего договора ОМС");
        } else if (list.size() > 1) {
            throw new ClipsServerException("Найдено " + list.size() + " полисов в действующем договоре ОМС");
        } else {
            contract = (Contract) list.get(0);
        }

View Full Code Here

    @Override
    public DloDrugSectionDetails getItemByCode(int code) throws ClipsServerException {
        Field[] f = new Field[]{new Field("code", this)};
        List<DloDrugSection> sections = findEntityList(DloDrugSection.class, f);
        if (sections.size() > 1) {
            throw new ClipsServerException("Найдено несколько разделов перечня по коду");
        }
        else if (sections.isEmpty()) {
            throw new ClipsServerException("Не найден раздел перечня по коду");
        }
        return sections.get(0).getDetails(this);
    }
View Full Code Here

        lpu.setTitle(d.title);
        lpu.setTitleShort(d.title_short);

        if (d.lpuCode == null) {
            throw new ClipsServerException("Не указан код ЛПУ в кодировке ТФОМС");
        }
        lpu.setLpuCode(d.lpuCode);

        if (d.ogrn == null) {
            throw new ClipsServerException("Не указан ОГРН код ЛПУ");
        }
        lpu.setOgrn(d.ogrn);

        if (d.chiefDoctor == 0) {
            throw new ClipsServerException("Не указан главврач ЛПУ");
        }
        lpu.setChiefDoctor(findEntity(Collaborator.class, d.chiefDoctor));

        if (d.accountant == 0) {
            throw new ClipsServerException("Не указан бухгалтер ЛПУ");
        }
        lpu.setAccountant(findEntity(Collaborator.class, d.accountant));
       
        if (d.clinicType == 0) {
            throw new ClipsServerException("Не указан тип ЛПУ");
        }
        if (d.insurer == 0) {
            throw new ClipsServerException("Не указана страховая компания по умолчанию");
        }
        if (d.subdivisionCode == null) {
            throw new ClipsServerException("Не указан код подразделение ЛПУ");
        }
        if (d.branch == null) {
            throw new ClipsServerException("Не указан код филиала РФОМС");
        }

        lpu.setPhone(d.phone == null ? "" : d.phone);
        lpu.setFax(d.fax == null ? "" : d.fax);
        lpu.setEmail(d.email == null ? "" : d.email);
View Full Code Here

   
   
    @Override
    public List<ContractDetails> getContractList(ContractFilter filter) throws ClipsServerException{
        if (filter.lpuID == 0) {
            throw new ClipsServerException("В фильтре договоров отсутствует поликлиника");
        }
        checkCommandAccessibility(COMMAND_READ);
    String            sql = "select a from " + Contract.class.getSimpleName() + " a";

    ArrayList<String>      fieldList = new ArrayList<String>();
View Full Code Here

                entity.setFunctions(d.functionsID == 0 ? null : findEntity(CollaboratorFunctions.class, d.functionsID));
            }
        }

        if (d.uet == 0) {
            throw new ClipsServerException("Не указана условная единица трудоемкости\n" +
                    "(УЕТ = 1 для не стоматологических приемов)");
        }
        if (cf != null) {
            ReceptionType recType = cf.getReceptionType();
            String code = recType.getExtKey();
            if (!code.contains("29") && d.uet != ServiceRender.DEFAULT_UET) {
                throw new ClipsServerException("Для не стоматологического приема указан УЕТ отличный от единицы");
            }
        }
        entity.setUet(d.uet);
        entity.setReceived(d.received);
View Full Code Here

            List<AuditDetails> auditInfo = persistAudit(auditDocList);
            return new ModificationInfo(entity.getId(), auditInfo);
        } catch (ClipsServerException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new ClipsServerException("Ошибка удаления", ex);
        }
    }
View Full Code Here

            q.setParameter("receptionType", entity.getFunctions().getReceptionType());
        }
   
        List<ServicePrice> servicePriceList = q.getResultList();
        if (servicePriceList.size() < 1) {
            throw new ClipsServerException("Не найдены цены на услугу в договоре");
        }
        if (servicePriceList.size() > 1) {
            throw new ClipsServerException("Найдены различные цены на услугу в договоре");
        }
        ServicePrice cs = servicePriceList.get(0);
        ServicePriceDetails details = cs.getDetails((RightChecker) this);
        int price = details.price;
        int money = details.money;
View Full Code Here

                Laboratory lab = (Laboratory) i.next();
                lab.getCheckupTypes().remove(checkupType);
                manager.merge(lab);
            }
        } catch (Exception ex) {
            throw new ClipsServerException("Попытка удаления лабораторий не удалась: ", ex);
        }
    }
View Full Code Here

            AuditDoc auditDoc, List<AuditDoc> audit) throws ClipsServerException {
        super.onUpdate(entity, details, auditDoc, audit);
        PrescriptionDloDetails d = (PrescriptionDloDetails) details;

        if (d.drugID == 0) {
            throw new ClipsServerException("Не указано лекарственное средство");
        }

        if (d.diagnosisId == 0) {
            throw new ClipsServerException("Необходимо указать диагноз");
        }

        if (d.financeID == 0) {
            throw new ClipsServerException("Не указан источник финансирования");
        }

        if(entity.getId() != 0) {
            if(entity.getServiceRender().getId() != d.serviceRenderID) {
                throw new ESecurity("Cмена услуги недопустима");
View Full Code Here

TOP

Related Classes of framework.generic.ClipsServerException

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.