Java 类ims.core.vo.SignatoryShiftDetailsVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private SignatoryShiftDetailsVo findIfShiftDetailsAlreadyRecorded(DailyTimePeriods value, SignatoryShiftDetailsVoCollection signatoryShifts)
{
    // See if this time period is in a configured shift which has already
    // been instansiated......
    DailyTimePeriods timStartTimeTofind = getDailyTimePeriodStartTime(value, form.getLocalContext().getSavedDailyPatternConfig());

    if (signatoryShifts != null && signatoryShifts.size() > 0)
    {
        for (int i = 0; i < signatoryShifts.size(); i++)
        {
            if (signatoryShifts.get(i).getStartTimeIsNotNull() && signatoryShifts.get(i).getStartTime().equals(timStartTimeTofind))
                return signatoryShifts.get(i);
        }
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void updateControlsState() 
{
    form.getContextMenus().getFluidBalanceNEW_FLUIDItem().setVisible(true);
    form.getContextMenus().getFluidBalanceUPDATE_FLUIDItem().setVisible(form.grdDetails().getValue() instanceof FluidBalanceInstanceVo);
    form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo);

    //Cant be a student nurse
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null && mos.getHcpIsNotNull())
    {
        if (mos.getHcp() instanceof NurseVo)
        {
            if (HcpDisType.STUDENTNURSE.equals(((NurseVo) mos.getHcp()).getNurseType()))
                form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
        }
    }

    //Check is already confirmed
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo && ((SignatoryShiftDetailsVo)form.grdDetails().getValue()).getDateTimeSignedIsNotNull())
        form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
}
项目:AvoinApotti    文件:Logic.java   
private void populateDataFromScreen() 
{
    SignatoryShiftDetailsVo voChosenSignatoryShiftDetails = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    DateTime dtNow = new DateTime();
    voChosenSignatoryShiftDetails.setSignedOffBy(form.qmbConfirmed().getValue());
    voChosenSignatoryShiftDetails.setDateTimeSigned(dtNow);

    for (int i = 0 ; i < voDFB.getFluidBalanceInstances().size() ; i++)
    {
        if (voDFB.getFluidBalanceInstances().get(i).getSignatoryShiftIsNotNull() 
                && voDFB.getFluidBalanceInstances().get(i).getSignatoryShift().equals(voChosenSignatoryShiftDetails))
        {
            FluidBalanceInstanceVo voFluid = voDFB.getFluidBalanceInstances().get(i);

            voFluid.setConfirmingDateTime(dtNow);
            voFluid.setConfirmingHCP(form.qmbConfirmed().getValue());
            voFluid.setIsConfirmed(Boolean.TRUE);

            voDFB.getFluidBalanceInstances().set(i, voFluid);
        }
    }

    form.getLocalContext().setCurrentDailyFluidBalanceVo(voDFB);
}
项目:openMAXIMS    文件:Logic.java   
private SignatoryShiftDetailsVo findIfShiftDetailsAlreadyRecorded(DailyTimePeriods value, SignatoryShiftDetailsVoCollection signatoryShifts)
{
    // See if this time period is in a configured shift which has already
    // been instansiated......
    DailyTimePeriods timStartTimeTofind = getDailyTimePeriodStartTime(value, form.getLocalContext().getSavedDailyPatternConfig());

    if (signatoryShifts != null && signatoryShifts.size() > 0)
    {
        for (int i = 0; i < signatoryShifts.size(); i++)
        {
            if (signatoryShifts.get(i).getStartTimeIsNotNull() && signatoryShifts.get(i).getStartTime().equals(timStartTimeTofind))
                return signatoryShifts.get(i);
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState() 
{
    form.getContextMenus().getFluidBalanceNEW_FLUIDItem().setVisible(true);
    form.getContextMenus().getFluidBalanceUPDATE_FLUIDItem().setVisible(form.grdDetails().getValue() instanceof FluidBalanceInstanceVo);
    form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo);

    //Cant be a student nurse
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null && mos.getHcpIsNotNull())
    {
        if (mos.getHcp() instanceof NurseVo)
        {
            if (HcpDisType.STUDENTNURSE.equals(((NurseVo) mos.getHcp()).getNurseType()))
                form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
        }
    }

    //Check is already confirmed
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo && ((SignatoryShiftDetailsVo)form.grdDetails().getValue()).getDateTimeSignedIsNotNull())
        form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
}
项目:openMAXIMS    文件:Logic.java   
private void populateDataFromScreen() 
{
    SignatoryShiftDetailsVo voChosenSignatoryShiftDetails = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    DateTime dtNow = new DateTime();
    voChosenSignatoryShiftDetails.setSignedOffBy(form.qmbConfirmed().getValue());
    voChosenSignatoryShiftDetails.setDateTimeSigned(dtNow);

    for (int i = 0 ; i < voDFB.getFluidBalanceInstances().size() ; i++)
    {
        if (voDFB.getFluidBalanceInstances().get(i).getSignatoryShiftIsNotNull() 
                && voDFB.getFluidBalanceInstances().get(i).getSignatoryShift().equals(voChosenSignatoryShiftDetails))
        {
            FluidBalanceInstanceVo voFluid = voDFB.getFluidBalanceInstances().get(i);

            voFluid.setConfirmingDateTime(dtNow);
            voFluid.setConfirmingHCP(form.qmbConfirmed().getValue());
            voFluid.setIsConfirmed(Boolean.TRUE);

            voDFB.getFluidBalanceInstances().set(i, voFluid);
        }
    }

    form.getLocalContext().setCurrentDailyFluidBalanceVo(voDFB);
}
项目:openMAXIMS    文件:Logic.java   
private SignatoryShiftDetailsVo findIfShiftDetailsAlreadyRecorded(DailyTimePeriods value, SignatoryShiftDetailsVoCollection signatoryShifts)
{
    // See if this time period is in a configured shift which has already
    // been instansiated......
    DailyTimePeriods timStartTimeTofind = getDailyTimePeriodStartTime(value, form.getLocalContext().getSavedDailyPatternConfig());

    if (signatoryShifts != null && signatoryShifts.size() > 0)
    {
        for (int i = 0; i < signatoryShifts.size(); i++)
        {
            if (signatoryShifts.get(i).getStartTimeIsNotNull() && signatoryShifts.get(i).getStartTime().equals(timStartTimeTofind))
                return signatoryShifts.get(i);
        }
    }
    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void updateControlsState() 
{
    form.getContextMenus().getFluidBalanceNEW_FLUIDItem().setVisible(true);
    form.getContextMenus().getFluidBalanceUPDATE_FLUIDItem().setVisible(form.grdDetails().getValue() instanceof FluidBalanceInstanceVo);
    form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo);

    //Cant be a student nurse
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null && mos.getHcpIsNotNull())
    {
        if (mos.getHcp() instanceof NurseVo)
        {
            if (HcpDisType.STUDENTNURSE.equals(((NurseVo) mos.getHcp()).getNurseType()))
                form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
        }
    }

    //Check is already confirmed
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo && ((SignatoryShiftDetailsVo)form.grdDetails().getValue()).getDateTimeSignedIsNotNull())
        form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
}
项目:openMAXIMS    文件:Logic.java   
private void populateDataFromScreen() 
{
    SignatoryShiftDetailsVo voChosenSignatoryShiftDetails = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    DateTime dtNow = new DateTime();
    voChosenSignatoryShiftDetails.setSignedOffBy(form.qmbConfirmed().getValue());
    voChosenSignatoryShiftDetails.setDateTimeSigned(dtNow);

    for (int i = 0 ; i < voDFB.getFluidBalanceInstances().size() ; i++)
    {
        if (voDFB.getFluidBalanceInstances().get(i).getSignatoryShiftIsNotNull() 
                && voDFB.getFluidBalanceInstances().get(i).getSignatoryShift().equals(voChosenSignatoryShiftDetails))
        {
            FluidBalanceInstanceVo voFluid = voDFB.getFluidBalanceInstances().get(i);

            voFluid.setConfirmingDateTime(dtNow);
            voFluid.setConfirmingHCP(form.qmbConfirmed().getValue());
            voFluid.setIsConfirmed(Boolean.TRUE);

            voDFB.getFluidBalanceInstances().set(i, voFluid);
        }
    }

    form.getLocalContext().setCurrentDailyFluidBalanceVo(voDFB);
}
项目:openmaxims-linux    文件:Logic.java   
private SignatoryShiftDetailsVo findIfShiftDetailsAlreadyRecorded(DailyTimePeriods value, SignatoryShiftDetailsVoCollection signatoryShifts)
{
    // See if this time period is in a configured shift which has already
    // been instansiated......
    DailyTimePeriods timStartTimeTofind = getDailyTimePeriodStartTime(value, form.getLocalContext().getSavedDailyPatternConfig());

    if (signatoryShifts != null && signatoryShifts.size() > 0)
    {
        for (int i = 0; i < signatoryShifts.size(); i++)
        {
            if (signatoryShifts.get(i).getStartTimeIsNotNull() && signatoryShifts.get(i).getStartTime().equals(timStartTimeTofind))
                return signatoryShifts.get(i);
        }
    }
    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void updateControlsState() 
{
    form.getContextMenus().getFluidBalanceNEW_FLUIDItem().setVisible(true);
    form.getContextMenus().getFluidBalanceUPDATE_FLUIDItem().setVisible(form.grdDetails().getValue() instanceof FluidBalanceInstanceVo);
    form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo);

    //Cant be a student nurse
    MemberOfStaffShortVo mos = (MemberOfStaffShortVo)domain.getMosUser();
    if (mos != null && mos.getHcpIsNotNull())
    {
        if (mos.getHcp() instanceof NurseVo)
        {
            if (HcpDisType.STUDENTNURSE.equals(((NurseVo) mos.getHcp()).getNurseType()))
                form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
        }
    }

    //Check is already confirmed
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo && ((SignatoryShiftDetailsVo)form.grdDetails().getValue()).getDateTimeSignedIsNotNull())
        form.getContextMenus().getFluidBalanceCONFIRMItem().setVisible(false);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateDataFromScreen() 
{
    SignatoryShiftDetailsVo voChosenSignatoryShiftDetails = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    DateTime dtNow = new DateTime();
    voChosenSignatoryShiftDetails.setSignedOffBy(form.qmbConfirmed().getValue());
    voChosenSignatoryShiftDetails.setDateTimeSigned(dtNow);

    for (int i = 0 ; i < voDFB.getFluidBalanceInstances().size() ; i++)
    {
        if (voDFB.getFluidBalanceInstances().get(i).getSignatoryShiftIsNotNull() 
                && voDFB.getFluidBalanceInstances().get(i).getSignatoryShift().equals(voChosenSignatoryShiftDetails))
        {
            FluidBalanceInstanceVo voFluid = voDFB.getFluidBalanceInstances().get(i);

            voFluid.setConfirmingDateTime(dtNow);
            voFluid.setConfirmingHCP(form.qmbConfirmed().getValue());
            voFluid.setIsConfirmed(Boolean.TRUE);

            voDFB.getFluidBalanceInstances().set(i, voFluid);
        }
    }

    form.getLocalContext().setCurrentDailyFluidBalanceVo(voDFB);
}
项目:AvoinApotti    文件:Logic.java   
private void confirmShift() 
{
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo)
    {
        form.getGlobalContext().Core.setChosenSignatoryShiftDetailsVo((SignatoryShiftDetailsVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceConfirm);
    }
}
项目:AvoinApotti    文件:Logic.java   
private boolean isFluidBalanceInThisShift(SignatoryShiftDetailsVo voShift, FluidBalanceInstanceVo voFluidBalInstance) 
{
    DailyPatternConfigVo configVo = form.getGlobalContext().Core.getCurrentDailyPatternConfigVo();

    if (configVo.getSignatoryPeriodIsNotNull())
    {
        for (int j = 0 ; j < configVo.getSignatoryPeriod().size() ; j++)
        {
            SignatoryPeriodConfigVo voPeriod = configVo.getSignatoryPeriod().get(j);
            if (voPeriod.getTimePeriodsIsNotNull())
            {
                for (int i = 0 ; i < voPeriod.getTimePeriods().size() ; i++)
                {
                    if (voShift.getStartTimeIsNotNull() && voShift.getStartTime().equals(voPeriod.getTimePeriods().get(i)))
                    {
                        //Shift Found now see if the FluidBalanceInstanceVo is in this shift
                        for (int k = 0 ; k < voPeriod.getTimePeriods().size() ; k++)
                        {
                            if (voFluidBalInstance.getTimePeriodIsNotNull() && voFluidBalInstance.getTimePeriod().equals(voPeriod.getTimePeriods().get(k)))
                                return true;
                        }
                    }
                }
            }
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private boolean isFluidBalanceInThisShift(SignatoryShiftDetailsVo voShift, FluidBalanceInstanceVo voFluidBalInstance) 
{
    DailyPatternConfigVo configVo = form.getGlobalContext().Core.getCurrentDailyPatternConfigVo();

    if (configVo.getSignatoryPeriodIsNotNull())
    {
        for (int j = 0 ; j < configVo.getSignatoryPeriod().size() ; j++)
        {
            SignatoryPeriodConfigVo voPeriod = configVo.getSignatoryPeriod().get(j);
            if (voPeriod.getTimePeriodsIsNotNull())
            {
                for (int i = 0 ; i < voPeriod.getTimePeriods().size() ; i++)
                {
                    if (voShift.getStartTimeIsNotNull() && voShift.getStartTime().equals(voPeriod.getTimePeriods().get(i)))
                    {
                        //This is the correct configured Shift, save it to use creating the missing periods message
                        if (form.getLocalContext().getCurrentSignatoryPeriodConfigVo() == null)
                            form.getLocalContext().setCurrentSignatoryPeriodConfigVo(voPeriod);

                        //Shift Found now see if the FluidBalanceInstanceVo is in this shift
                        for (int k = 0 ; k < voPeriod.getTimePeriods().size() ; k++)
                        {
                            if (voFluidBalInstance.getTimePeriodIsNotNull() && voFluidBalInstance.getTimePeriod().equals(voPeriod.getTimePeriods().get(k)))
                                return true;
                        }
                    }
                }
            }
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void confirmShift() 
{
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo)
    {
        form.getGlobalContext().Core.setChosenSignatoryShiftDetailsVo((SignatoryShiftDetailsVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceConfirm);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean isFluidBalanceInThisShift(SignatoryShiftDetailsVo voShift, FluidBalanceInstanceVo voFluidBalInstance) 
{
    DailyPatternConfigVo configVo = form.getGlobalContext().Core.getCurrentDailyPatternConfigVo();

    if (configVo.getSignatoryPeriodIsNotNull())
    {
        for (int j = 0 ; j < configVo.getSignatoryPeriod().size() ; j++)
        {
            SignatoryPeriodConfigVo voPeriod = configVo.getSignatoryPeriod().get(j);
            if (voPeriod.getTimePeriodsIsNotNull())
            {
                for (int i = 0 ; i < voPeriod.getTimePeriods().size() ; i++)
                {
                    if (voShift.getStartTimeIsNotNull() && voShift.getStartTime().equals(voPeriod.getTimePeriods().get(i)))
                    {
                        //Shift Found now see if the FluidBalanceInstanceVo is in this shift
                        for (int k = 0 ; k < voPeriod.getTimePeriods().size() ; k++)
                        {
                            if (voFluidBalInstance.getTimePeriodIsNotNull() && voFluidBalInstance.getTimePeriod().equals(voPeriod.getTimePeriods().get(k)))
                                return true;
                        }
                    }
                }
            }
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isFluidBalanceInThisShift(SignatoryShiftDetailsVo voShift, FluidBalanceInstanceVo voFluidBalInstance) 
{
    DailyPatternConfigVo configVo = form.getGlobalContext().Core.getCurrentDailyPatternConfigVo();

    if (configVo.getSignatoryPeriodIsNotNull())
    {
        for (int j = 0 ; j < configVo.getSignatoryPeriod().size() ; j++)
        {
            SignatoryPeriodConfigVo voPeriod = configVo.getSignatoryPeriod().get(j);
            if (voPeriod.getTimePeriodsIsNotNull())
            {
                for (int i = 0 ; i < voPeriod.getTimePeriods().size() ; i++)
                {
                    if (voShift.getStartTimeIsNotNull() && voShift.getStartTime().equals(voPeriod.getTimePeriods().get(i)))
                    {
                        //This is the correct configured Shift, save it to use creating the missing periods message
                        if (form.getLocalContext().getCurrentSignatoryPeriodConfigVo() == null)
                            form.getLocalContext().setCurrentSignatoryPeriodConfigVo(voPeriod);

                        //Shift Found now see if the FluidBalanceInstanceVo is in this shift
                        for (int k = 0 ; k < voPeriod.getTimePeriods().size() ; k++)
                        {
                            if (voFluidBalInstance.getTimePeriodIsNotNull() && voFluidBalInstance.getTimePeriod().equals(voPeriod.getTimePeriods().get(k)))
                                return true;
                        }
                    }
                }
            }
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private void confirmShift() 
{
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo)
    {
        form.getGlobalContext().Core.setChosenSignatoryShiftDetailsVo((SignatoryShiftDetailsVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceConfirm);
    }
}
项目:openMAXIMS    文件:Logic.java   
private boolean isFluidBalanceInThisShift(SignatoryShiftDetailsVo voShift, FluidBalanceInstanceVo voFluidBalInstance) 
{
    DailyPatternConfigVo configVo = form.getGlobalContext().Core.getCurrentDailyPatternConfigVo();

    if (configVo.getSignatoryPeriodIsNotNull())
    {
        for (int j = 0 ; j < configVo.getSignatoryPeriod().size() ; j++)
        {
            SignatoryPeriodConfigVo voPeriod = configVo.getSignatoryPeriod().get(j);
            if (voPeriod.getTimePeriodsIsNotNull())
            {
                for (int i = 0 ; i < voPeriod.getTimePeriods().size() ; i++)
                {
                    if (voShift.getStartTimeIsNotNull() && voShift.getStartTime().equals(voPeriod.getTimePeriods().get(i)))
                    {
                        //Shift Found now see if the FluidBalanceInstanceVo is in this shift
                        for (int k = 0 ; k < voPeriod.getTimePeriods().size() ; k++)
                        {
                            if (voFluidBalInstance.getTimePeriodIsNotNull() && voFluidBalInstance.getTimePeriod().equals(voPeriod.getTimePeriods().get(k)))
                                return true;
                        }
                    }
                }
            }
        }
    }

    return false;
}
项目:openMAXIMS    文件:Logic.java   
private boolean isFluidBalanceInThisShift(SignatoryShiftDetailsVo voShift, FluidBalanceInstanceVo voFluidBalInstance) 
{
    DailyPatternConfigVo configVo = form.getGlobalContext().Core.getCurrentDailyPatternConfigVo();

    if (configVo.getSignatoryPeriodIsNotNull())
    {
        for (int j = 0 ; j < configVo.getSignatoryPeriod().size() ; j++)
        {
            SignatoryPeriodConfigVo voPeriod = configVo.getSignatoryPeriod().get(j);
            if (voPeriod.getTimePeriodsIsNotNull())
            {
                for (int i = 0 ; i < voPeriod.getTimePeriods().size() ; i++)
                {
                    if (voShift.getStartTimeIsNotNull() && voShift.getStartTime().equals(voPeriod.getTimePeriods().get(i)))
                    {
                        //This is the correct configured Shift, save it to use creating the missing periods message
                        if (form.getLocalContext().getCurrentSignatoryPeriodConfigVo() == null)
                            form.getLocalContext().setCurrentSignatoryPeriodConfigVo(voPeriod);

                        //Shift Found now see if the FluidBalanceInstanceVo is in this shift
                        for (int k = 0 ; k < voPeriod.getTimePeriods().size() ; k++)
                        {
                            if (voFluidBalInstance.getTimePeriodIsNotNull() && voFluidBalInstance.getTimePeriod().equals(voPeriod.getTimePeriods().get(k)))
                                return true;
                        }
                    }
                }
            }
        }
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private void confirmShift() 
{
    if (form.grdDetails().getValue() instanceof SignatoryShiftDetailsVo)
    {
        form.getGlobalContext().Core.setChosenSignatoryShiftDetailsVo((SignatoryShiftDetailsVo)form.grdDetails().getSelectedRow().getValue());
        form.getGlobalContext().Core.setCurrentDailyFluidBalanceVo((DailyFluidBalanceVo)form.grdDetails().getSelectedRow().getParentRow().getValue());

        engine.open(form.getForms().Core.FluidBalanceConfirm);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isFluidBalanceInThisShift(SignatoryShiftDetailsVo voShift, FluidBalanceInstanceVo voFluidBalInstance) 
{
    DailyPatternConfigVo configVo = form.getGlobalContext().Core.getCurrentDailyPatternConfigVo();

    if (configVo.getSignatoryPeriodIsNotNull())
    {
        for (int j = 0 ; j < configVo.getSignatoryPeriod().size() ; j++)
        {
            SignatoryPeriodConfigVo voPeriod = configVo.getSignatoryPeriod().get(j);
            if (voPeriod.getTimePeriodsIsNotNull())
            {
                for (int i = 0 ; i < voPeriod.getTimePeriods().size() ; i++)
                {
                    if (voShift.getStartTimeIsNotNull() && voShift.getStartTime().equals(voPeriod.getTimePeriods().get(i)))
                    {
                        //Shift Found now see if the FluidBalanceInstanceVo is in this shift
                        for (int k = 0 ; k < voPeriod.getTimePeriods().size() ; k++)
                        {
                            if (voFluidBalInstance.getTimePeriodIsNotNull() && voFluidBalInstance.getTimePeriod().equals(voPeriod.getTimePeriods().get(k)))
                                return true;
                        }
                    }
                }
            }
        }
    }

    return false;
}
项目:openmaxims-linux    文件:Logic.java   
private boolean isFluidBalanceInThisShift(SignatoryShiftDetailsVo voShift, FluidBalanceInstanceVo voFluidBalInstance) 
{
    DailyPatternConfigVo configVo = form.getGlobalContext().Core.getCurrentDailyPatternConfigVo();

    if (configVo.getSignatoryPeriodIsNotNull())
    {
        for (int j = 0 ; j < configVo.getSignatoryPeriod().size() ; j++)
        {
            SignatoryPeriodConfigVo voPeriod = configVo.getSignatoryPeriod().get(j);
            if (voPeriod.getTimePeriodsIsNotNull())
            {
                for (int i = 0 ; i < voPeriod.getTimePeriods().size() ; i++)
                {
                    if (voShift.getStartTimeIsNotNull() && voShift.getStartTime().equals(voPeriod.getTimePeriods().get(i)))
                    {
                        //This is the correct configured Shift, save it to use creating the missing periods message
                        if (form.getLocalContext().getCurrentSignatoryPeriodConfigVo() == null)
                            form.getLocalContext().setCurrentSignatoryPeriodConfigVo(voPeriod);

                        //Shift Found now see if the FluidBalanceInstanceVo is in this shift
                        for (int k = 0 ; k < voPeriod.getTimePeriods().size() ; k++)
                        {
                            if (voFluidBalInstance.getTimePeriodIsNotNull() && voFluidBalInstance.getTimePeriod().equals(voPeriod.getTimePeriods().get(k)))
                                return true;
                        }
                    }
                }
            }
        }
    }

    return false;
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData() 
{
    GenForm.grdShiftRow rowShift = null;
    GenForm.grdShiftRow rowInstance = null;

    SignatoryShiftDetailsVo voShift = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    clearLocalContexts();

    //display parent
    if(voShift != null && voDFB != null)
    {
        rowShift = form.grdShift().getRows().newRow();
        rowShift.setValue(voShift);

        if(voShift.getStartTimeIsNotNull())
            rowShift.setColDate(getConfiguredTime(voShift.getStartTime()) + "  " + getConfiguredTime(voShift.getEndTime()));

        rowShift.setValue(voShift);

        FluidBalanceInstanceVoCollection voInstanceColl = voDFB.getFluidBalanceInstances();
        if (voInstanceColl != null)
        {
            voInstanceColl.sort(SortOrder.ASCENDING);
            for(int j = 0 ; j < voInstanceColl.size() ; j++)
            {
                if (isFluidBalanceInThisShift(voShift, voInstanceColl.get(j)) )
                {
                    rowInstance = rowShift.getRows().newRow();
                    FluidBalanceInstanceVo voFluidBalInst = voInstanceColl.get(j);

                    if(voFluidBalInst.getFluidBalanceDate() != null && voFluidBalInst.getStartTime() != null)
                        rowInstance.setColDate(voFluidBalInst.getFluidBalanceDate().toString() + "  " + voFluidBalInst.getStartTime().toString());
                    if(voFluidBalInst.getTotalIntake() != null)
                        rowInstance.setColTotalIn(voFluidBalInst.getTotalIntake().toString() + " / " + calculateTotalInput(voFluidBalInst));
                    if(voFluidBalInst.getTotalOutput() != null)
                        rowInstance.setColTotalOut(voFluidBalInst.getTotalOutput().toString()+ " / " + calculateTotalOutput(voFluidBalInst));
                    if(voFluidBalInst.getBalanceIsNotNull()) 
                        rowInstance.setColBalance(calculateTotalBalance(voFluidBalInst.getBalance()));

                    if(voFluidBalInst.getVentilationChartIsNotNull())
                        rowInstance.setBackColor(Color.AliceBlue);

                    rowInstance.setValue(voFluidBalInst);
                }
            }
            if(rowInstance != null)
                rowInstance.setBold(true);
        }
        form.grdShift().sort(0, SortOrder.DESCENDING);
        form.grdShift().expandAll();

        form.htmMissingPeriods().setHTML(createMissingPeriodsMessage(voDFB.getFluidBalanceInstances()));
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData() 
{
    GenForm.grdShiftRow rowShift = null;
    GenForm.grdShiftRow rowInstance = null;

    SignatoryShiftDetailsVo voShift = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    clearLocalContexts();

    //display parent
    if(voShift != null && voDFB != null)
    {
        rowShift = form.grdShift().getRows().newRow();
        rowShift.setValue(voShift);

        if(voShift.getStartTimeIsNotNull())
            rowShift.setColDate(getConfiguredTime(voShift.getStartTime()) + "  " + getConfiguredTime(voShift.getEndTime()));

        rowShift.setValue(voShift);

        FluidBalanceInstanceVoCollection voInstanceColl = voDFB.getFluidBalanceInstances();
        if (voInstanceColl != null)
        {
            voInstanceColl.sort(SortOrder.ASCENDING);
            for(int j = 0 ; j < voInstanceColl.size() ; j++)
            {
                if (isFluidBalanceInThisShift(voShift, voInstanceColl.get(j)) )
                {
                    rowInstance = rowShift.getRows().newRow();
                    FluidBalanceInstanceVo voFluidBalInst = voInstanceColl.get(j);

                    if(voFluidBalInst.getFluidBalanceDate() != null && voFluidBalInst.getStartTime() != null)
                        rowInstance.setColDate(voFluidBalInst.getFluidBalanceDate().toString() + "  " + voFluidBalInst.getStartTime().toString());
                    if(voFluidBalInst.getTotalIntake() != null)
                        rowInstance.setColTotalIn(voFluidBalInst.getTotalIntake().toString() + " / " + calculateTotalInput(voFluidBalInst));
                    if(voFluidBalInst.getTotalOutput() != null)
                        rowInstance.setColTotalOut(voFluidBalInst.getTotalOutput().toString()+ " / " + calculateTotalOutput(voFluidBalInst));
                    if(voFluidBalInst.getBalanceIsNotNull()) 
                        rowInstance.setColBalance(calculateTotalBalance(voFluidBalInst.getBalance()));

                    if(voFluidBalInst.getVentilationChartIsNotNull())
                        rowInstance.setBackColor(Color.AliceBlue);

                    rowInstance.setValue(voFluidBalInst);
                }
            }
            if(rowInstance != null)
                rowInstance.setBold(true);
        }
        form.grdShift().sort(0, SortOrder.DESCENDING);
        form.grdShift().expandAll();

        form.htmMissingPeriods().setHTML(createMissingPeriodsMessage(voDFB.getFluidBalanceInstances()));
    }
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData() 
{
    GenForm.grdShiftRow rowShift = null;
    GenForm.grdShiftRow rowInstance = null;

    SignatoryShiftDetailsVo voShift = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    clearLocalContexts();

    //display parent
    if(voShift != null && voDFB != null)
    {
        rowShift = form.grdShift().getRows().newRow();
        rowShift.setValue(voShift);

        if(voShift.getStartTimeIsNotNull())
            rowShift.setColDate(getConfiguredTime(voShift.getStartTime()) + "  " + getConfiguredTime(voShift.getEndTime()));

        rowShift.setValue(voShift);

        FluidBalanceInstanceVoCollection voInstanceColl = voDFB.getFluidBalanceInstances();
        if (voInstanceColl != null)
        {
            voInstanceColl.sort(SortOrder.ASCENDING);
            for(int j = 0 ; j < voInstanceColl.size() ; j++)
            {
                if (isFluidBalanceInThisShift(voShift, voInstanceColl.get(j)) )
                {
                    rowInstance = rowShift.getRows().newRow();
                    FluidBalanceInstanceVo voFluidBalInst = voInstanceColl.get(j);

                    if(voFluidBalInst.getFluidBalanceDate() != null && voFluidBalInst.getStartTime() != null)
                        rowInstance.setColDate(voFluidBalInst.getFluidBalanceDate().toString() + "  " + voFluidBalInst.getStartTime().toString());
                    if(voFluidBalInst.getTotalIntake() != null)
                        rowInstance.setColTotalIn(voFluidBalInst.getTotalIntake().toString() + " / " + calculateTotalInput(voFluidBalInst));
                    if(voFluidBalInst.getTotalOutput() != null)
                        rowInstance.setColTotalOut(voFluidBalInst.getTotalOutput().toString()+ " / " + calculateTotalOutput(voFluidBalInst));
                    if(voFluidBalInst.getBalanceIsNotNull()) 
                        rowInstance.setColBalance(calculateTotalBalance(voFluidBalInst.getBalance()));

                    if(voFluidBalInst.getVentilationChartIsNotNull())
                        rowInstance.setBackColor(Color.AliceBlue);

                    rowInstance.setValue(voFluidBalInst);
                }
            }
            if(rowInstance != null)
                rowInstance.setBold(true);
        }
        form.grdShift().sort(0, SortOrder.DESCENDING);
        form.grdShift().expandAll();

        form.htmMissingPeriods().setHTML(createMissingPeriodsMessage(voDFB.getFluidBalanceInstances()));
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromData() 
{
    GenForm.grdShiftRow rowShift = null;
    GenForm.grdShiftRow rowInstance = null;

    SignatoryShiftDetailsVo voShift = form.getGlobalContext().Core.getChosenSignatoryShiftDetailsVo();
    DailyFluidBalanceVo voDFB = form.getGlobalContext().Core.getCurrentDailyFluidBalanceVo();

    clearLocalContexts();

    //display parent
    if(voShift != null && voDFB != null)
    {
        rowShift = form.grdShift().getRows().newRow();
        rowShift.setValue(voShift);

        if(voShift.getStartTimeIsNotNull())
            rowShift.setColDate(getConfiguredTime(voShift.getStartTime()) + "  " + getConfiguredTime(voShift.getEndTime()));

        rowShift.setValue(voShift);

        FluidBalanceInstanceVoCollection voInstanceColl = voDFB.getFluidBalanceInstances();
        if (voInstanceColl != null)
        {
            voInstanceColl.sort(SortOrder.ASCENDING);
            for(int j = 0 ; j < voInstanceColl.size() ; j++)
            {
                if (isFluidBalanceInThisShift(voShift, voInstanceColl.get(j)) )
                {
                    rowInstance = rowShift.getRows().newRow();
                    FluidBalanceInstanceVo voFluidBalInst = voInstanceColl.get(j);

                    if(voFluidBalInst.getFluidBalanceDate() != null && voFluidBalInst.getStartTime() != null)
                        rowInstance.setColDate(voFluidBalInst.getFluidBalanceDate().toString() + "  " + voFluidBalInst.getStartTime().toString());
                    if(voFluidBalInst.getTotalIntake() != null)
                        rowInstance.setColTotalIn(voFluidBalInst.getTotalIntake().toString() + " / " + calculateTotalInput(voFluidBalInst));
                    if(voFluidBalInst.getTotalOutput() != null)
                        rowInstance.setColTotalOut(voFluidBalInst.getTotalOutput().toString()+ " / " + calculateTotalOutput(voFluidBalInst));
                    if(voFluidBalInst.getBalanceIsNotNull()) 
                        rowInstance.setColBalance(calculateTotalBalance(voFluidBalInst.getBalance()));

                    if(voFluidBalInst.getVentilationChartIsNotNull())
                        rowInstance.setBackColor(Color.AliceBlue);

                    rowInstance.setValue(voFluidBalInst);
                }
            }
            if(rowInstance != null)
                rowInstance.setBold(true);
        }
        form.grdShift().sort(0, SortOrder.DESCENDING);
        form.grdShift().expandAll();

        form.htmMissingPeriods().setHTML(createMissingPeriodsMessage(voDFB.getFluidBalanceInstances()));
    }
}