Package beans.doctor.sicklist.entity

Examples of beans.doctor.sicklist.entity.SickLong


          if (oldDetail.date.compareTo(compareDate) > 0){
            throw new EDataIntegrity("Больничный должен быть продлен как минимум на один день");
          }
        }
                //Сохранение новой сущности продления
                SickLong sickLong = new SickLong();
                AuditDoc<SickLong> auditDoc = new AuditDoc<SickLong>(sickLong, getCollaborator());
                sickLong.setSicklist(entity);
        if (sickLongDetails.collID != getCollaboratorId() && !isSuperUser()){
          throw new ESecurity("Запрещено указывать другого пользователя при продлении");
        }
                sickLong.setCollaborator(findEntity(Collaborator.class, sickLongDetails.collID));
                sickLong.setDate(sickLongDetails.date);
                sickLong.setSerren(findEntity(ServiceRender.class, sickLongDetails.serrenID));
                entity.addSickLong(sickLong);
                //saveEntity(sickLong);
                checkAudit(auditDocList, auditDoc, sickLong);
            }
        }
View Full Code Here


                return framework.utils.Comparator.compareDates(o1.getDateToWork(), o2.getDateToWork());
            }
        });


        SickLong sickLong = null;
        if (!sicklongList.isEmpty()) {
            sickLong = sicklongList.get(sicklongList.size() - 1);
        }
        Sicklist sicklist = null;
        if (!sickLists.isEmpty()) {
            sicklist = sickLists.get(sickLists.size() - 1);
        }
        if (sickLong == null && sicklist == null) {
            return null;
        } else if (sickLong == null) {
            return sicklist.getDetails(this);
        } else if (sicklist == null) {
            return sickLong.getSicklist().getDetails(this);
        } else if (sickLong.getDate().after(sicklist.getDateToWork())) {
            return sickLong.getSicklist().getDetails(this);
        } else {
            return sicklist.getDetails(this);
        }
    }
View Full Code Here

TOP

Related Classes of beans.doctor.sicklist.entity.SickLong

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.