Java 类ims.emergency.vo.CubicleAllocationShortVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void populateRecordBrowser(CubicleAllocationShortVoCollection tempColl)
{
    if( tempColl == null || tempColl.size() == 0)
        return;

    tempColl.sort(new AllocatedDateComparator(SortOrder.DESCENDING));       
    for(int i = 0; i < tempColl.size();i++)
    {
        CubicleAllocationShortVo tempVo = tempColl.get(i);
        if(tempVo != null)
        {
            String s1 = tempVo.getAllocatedCubicleDateTimeIsNotNull() ? tempVo.getAllocatedCubicleDateTime().toString():"";
            String s2 = tempVo.getCubicleRoomBed() != null ? tempVo.getCubicleRoomBed().getCubicleRoomBedName():"";
            String s3 = (tempVo.getTrackingAreaIsNotNull() && tempVo.getTrackingArea().getAreaDisplayNameIsNotNull()) ? tempVo.getTrackingArea().getAreaDisplayName():"";
            String s4 = tempVo.getAllocatedByIsNotNull() ? tempVo.getAllocatedBy().getName().toString():"";
            String s5 = s1+" - "+s2+" - "+s3+" - "+s4 ;
            form.recbrAllocateCubicle().newRow(tempVo, s5);
        }
    }
    if( form.getLocalContext().getCurrentCubicleAllocationIsNotNull() && form.getLocalContext().getCurrentCubicleAllocation().getID_CubicleAllocationIsNotNull())
        form.recbrAllocateCubicle().setValue(getCunicleShort(tempColl,form.getLocalContext().getCurrentCubicleAllocation()));
    else
        form.recbrAllocateCubicle().setValue(tempColl.get(0));
}
项目:AvoinApotti    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime date1 = null;
    DateTime date2 = null;
    if(ob1 instanceof CubicleAllocationShortVo)
    {
        CubicleAllocationShortVo ps1 = (CubicleAllocationShortVo)ob1;
        date1 = ps1.getAllocatedCubicleDateTime();
    }
    if(ob2 instanceof CubicleAllocationShortVo)
    {
        CubicleAllocationShortVo ps2 = (CubicleAllocationShortVo)ob2;
        date2 = ps2.getAllocatedCubicleDateTime();
    }
    if(date1 != null )
        return  date1.compareTo(date2)*direction;
    if(date2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime date1 = null;
    DateTime date2 = null;
    if(ob1 instanceof CubicleAllocationShortVo)
    {
        CubicleAllocationShortVo ps1 = (CubicleAllocationShortVo)ob1;
        date1 = ps1.getAllocatedCubicleDateTime();
    }
    if(ob2 instanceof CubicleAllocationShortVo)
    {
        CubicleAllocationShortVo ps2 = (CubicleAllocationShortVo)ob2;
        date2 = ps2.getAllocatedCubicleDateTime();
    }
    if(date1 != null )
        return  date1.compareTo(date2)*direction;
    if(date2 != null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
private void populateRecordBrowser(CubicleAllocationShortVoCollection tempColl)
{
    if( tempColl == null || tempColl.size() == 0)
        return;

    tempColl.sort(new AllocatedDateComparator(SortOrder.DESCENDING));       
    for(int i = 0; i < tempColl.size();i++)
    {
        CubicleAllocationShortVo tempVo = tempColl.get(i);
        if(tempVo != null)
        {
            String s1 = tempVo.getAllocatedCubicleDateTimeIsNotNull() ? tempVo.getAllocatedCubicleDateTime().toString():"";
            String s2 = tempVo.getCubicleRoomBed() != null ? tempVo.getCubicleRoomBed().getCubicleRoomBedName():"";
            String s3 = (tempVo.getTrackingAreaIsNotNull() && tempVo.getTrackingArea().getAreaDisplayNameIsNotNull()) ? tempVo.getTrackingArea().getAreaDisplayName():"";
            String s4 = tempVo.getAllocatedByIsNotNull() ? tempVo.getAllocatedBy().getName().toString():"";
            String s5 = s1+" - "+s2+" - "+s3+" - "+s4 ;
            form.recbrAllocateCubicle().newRow(tempVo, s5);
        }
    }
    if( form.getLocalContext().getCurrentCubicleAllocationIsNotNull() && form.getLocalContext().getCurrentCubicleAllocation().getID_CubicleAllocationIsNotNull())
        form.recbrAllocateCubicle().setValue(getCunicleShort(tempColl,form.getLocalContext().getCurrentCubicleAllocation()));
    else
        form.recbrAllocateCubicle().setValue(tempColl.get(0));
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime date1 = null;
    DateTime date2 = null;
    if(ob1 instanceof CubicleAllocationShortVo)
    {
        CubicleAllocationShortVo ps1 = (CubicleAllocationShortVo)ob1;
        date1 = ps1.getAllocatedCubicleDateTime();
    }
    if(ob2 instanceof CubicleAllocationShortVo)
    {
        CubicleAllocationShortVo ps2 = (CubicleAllocationShortVo)ob2;
        date2 = ps2.getAllocatedCubicleDateTime();
    }
    if(date1 != null )
        return  date1.compareTo(date2)*direction;
    if(date2 != null)
        return (-1)*direction;

    return 0;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateRecordBrowser(CubicleAllocationShortVoCollection tempColl)
{
    if( tempColl == null || tempColl.size() == 0)
        return;

    tempColl.sort(new AllocatedDateComparator(SortOrder.DESCENDING));       
    for(int i = 0; i < tempColl.size();i++)
    {
        CubicleAllocationShortVo tempVo = tempColl.get(i);
        if(tempVo != null)
        {
            String s1 = tempVo.getAllocatedCubicleDateTimeIsNotNull() ? tempVo.getAllocatedCubicleDateTime().toString():"";
            String s2 = tempVo.getCubicleRoomBed() != null ? tempVo.getCubicleRoomBed().getCubicleRoomBedName():"";
            String s3 = (tempVo.getTrackingAreaIsNotNull() && tempVo.getTrackingArea().getAreaDisplayNameIsNotNull()) ? tempVo.getTrackingArea().getAreaDisplayName():"";
            String s4 = tempVo.getAllocatedByIsNotNull() ? tempVo.getAllocatedBy().getName().toString():"";
            String s5 = s1+" - "+s2+" - "+s3+" - "+s4 ;
            form.recbrAllocateCubicle().newRow(tempVo, s5);
        }
    }
    if( form.getLocalContext().getCurrentCubicleAllocationIsNotNull() && form.getLocalContext().getCurrentCubicleAllocation().getID_CubicleAllocationIsNotNull())
        form.recbrAllocateCubicle().setValue(getCunicleShort(tempColl,form.getLocalContext().getCurrentCubicleAllocation()));
    else
        form.recbrAllocateCubicle().setValue(tempColl.get(0));
}
项目:openmaxims-linux    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime date1 = null;
    DateTime date2 = null;
    if(ob1 instanceof CubicleAllocationShortVo)
    {
        CubicleAllocationShortVo ps1 = (CubicleAllocationShortVo)ob1;
        date1 = ps1.getAllocatedCubicleDateTime();
    }
    if(ob2 instanceof CubicleAllocationShortVo)
    {
        CubicleAllocationShortVo ps2 = (CubicleAllocationShortVo)ob2;
        date2 = ps2.getAllocatedCubicleDateTime();
    }
    if(date1 != null )
        return  date1.compareTo(date2)*direction;
    if(date2 != null)
        return (-1)*direction;

    return 0;
}
项目:AvoinApotti    文件:Logic.java   
private CubicleAllocationShortVo getCunicleShort(CubicleAllocationShortVoCollection tempColl,CubicleAllocationVo cubic)
{
    if(tempColl == null || tempColl.size() == 0 )
        return null;
    for(int i = 0; i < tempColl.size();i++)
    {
        CubicleAllocationShortVo tempVo = tempColl.get(i);
        if(tempVo!= null)
        {
            if(cubic.getID_CubicleAllocationIsNotNull() && cubic.getID_CubicleAllocation().equals(tempVo.getID_CubicleAllocation()))
                return tempVo;
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateRecordBrowser(CubicleAllocationShortVoCollection tempColl)
{
    if( tempColl == null || tempColl.size() == 0)
        return;

    tempColl.sort(new AllocatedDateComparator(SortOrder.DESCENDING));       
    for(int i = 0; i < tempColl.size();i++)
    {
        CubicleAllocationShortVo tempVo = tempColl.get(i);
        if(tempVo != null)
        {
            String s1 = tempVo.getAllocatedCubicleDateTimeIsNotNull() ? tempVo.getAllocatedCubicleDateTime().toString():"";
            String s2 = tempVo.getCubicleRoomBed() != null ? tempVo.getCubicleRoomBed().getCubicleRoomBedName():"";
            String s3 = (tempVo.getTrackingAreaIsNotNull() && tempVo.getTrackingArea().getAreaDisplayNameIsNotNull()) ? tempVo.getTrackingArea().getAreaDisplayName():"";
            String s4 = tempVo.getAllocatedByIsNotNull() ? tempVo.getAllocatedBy().getName().toString():"";
            String s5 = s1+" - "+s2+" - "+s3+" - "+s4 ;

            //WDEV-20720
            if (form.getLocalContext().getCurrentTracking().getCurrentCubicle()!=null && form.getLocalContext().getCurrentTracking().getCurrentCubicle().getID_CubicleAllocation().equals(tempVo.getID_CubicleAllocation()))
            {
                form.recbrAllocateCubicle().newRow(tempVo, s5, Color.Green);
            }
            else
            {
                form.recbrAllocateCubicle().newRow(tempVo, s5);
            }
        }
    }
    if( form.getLocalContext().getCurrentCubicleAllocationIsNotNull() && form.getLocalContext().getCurrentCubicleAllocation().getID_CubicleAllocationIsNotNull())
        form.recbrAllocateCubicle().setValue(getCunicleShort(tempColl,form.getLocalContext().getCurrentCubicleAllocation()));
    else
        form.recbrAllocateCubicle().setValue(tempColl.get(0));
}
项目:openMAXIMS    文件:Logic.java   
private CubicleAllocationShortVo getCunicleShort(CubicleAllocationShortVoCollection tempColl,CubicleAllocationVo cubic)
{
    if(tempColl == null || tempColl.size() == 0 )
        return null;
    for(int i = 0; i < tempColl.size();i++)
    {
        CubicleAllocationShortVo tempVo = tempColl.get(i);
        if(tempVo!= null)
        {
            if(cubic.getID_CubicleAllocationIsNotNull() && cubic.getID_CubicleAllocation().equals(tempVo.getID_CubicleAllocation()))
                return tempVo;
        }
    }
    return null;
}
项目:openMAXIMS    文件:AllocateCubicleImpl.java   
public void markCubicleAsRIEAndSaveTracking(CubicleAllocationShortVo cubicle, TrackingForAllocateCubicleVo tracking, FormName formName, Integer patientId, Integer careContextId, String rieMessage) throws StaleObjectException
{
    if(cubicle == null)
        throw new CodingRuntimeException("Cannot RIE a null CubicleAllocationShortVo.");

    markAsRie(cubicle, formName, patientId, null, careContextId, rieMessage);

    if(tracking != null)
    {
        DomainFactory factory = getDomainFactory();
        factory.save(TrackingForAllocateCubicleVoAssembler.extractTracking(factory, tracking));
    }
}
项目:openMAXIMS    文件:Logic.java   
private CubicleAllocationShortVo getCunicleShort(CubicleAllocationShortVoCollection tempColl,CubicleAllocationVo cubic)
{
    if(tempColl == null || tempColl.size() == 0 )
        return null;
    for(int i = 0; i < tempColl.size();i++)
    {
        CubicleAllocationShortVo tempVo = tempColl.get(i);
        if(tempVo!= null)
        {
            if(cubic.getID_CubicleAllocationIsNotNull() && cubic.getID_CubicleAllocation().equals(tempVo.getID_CubicleAllocation()))
                return tempVo;
        }
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private CubicleAllocationShortVo getCunicleShort(CubicleAllocationShortVoCollection tempColl,CubicleAllocationVo cubic)
{
    if(tempColl == null || tempColl.size() == 0 )
        return null;
    for(int i = 0; i < tempColl.size();i++)
    {
        CubicleAllocationShortVo tempVo = tempColl.get(i);
        if(tempVo!= null)
        {
            if(cubic.getID_CubicleAllocationIsNotNull() && cubic.getID_CubicleAllocation().equals(tempVo.getID_CubicleAllocation()))
                return tempVo;
        }
    }
    return null;
}