Logic.java 文件源码

java
阅读 40 收藏 0 点赞 0 评论 0

项目:openmaxims-linux 作者:
public CommunityServiceVo populateDataFromScreen(CommunityServiceVo value) 
{
    CommunityServiceVo vo = form.getLocalContext().getSelectedRecord();

    if (vo.getID_CommunityServices() == null)
    {
        vo.setIsCurrentlyActive(Boolean.TRUE);
        vo.setCurrentFrequency(form.ctnServiceDetail().txtCFreq().getValue());
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());


        if (form.ctnServiceDetail().chkSupplyServiceDetail().getValue())
        {
            SuppNetworkServiceProfessionDetailVo voProf = new SuppNetworkServiceProfessionDetailVo();

            voProf.setAddress(form.ctnServiceDetail().txtAddressService().getValue());
            voProf.setName(form.ctnServiceDetail().txtContactPerson().getValue());
            voProf.setServiceLocation(form.ctnServiceDetail().txtAreaLoc().getValue());
            voProf.setWorkPhone(form.ctnServiceDetail().txtPhoneNoService().getValue());
            //supplied area/location
            vo.setSuppliedService(voProf);              
        }
        else
        {                   
            if (form.getLocalContext().getlocationService() != null)
                vo.setLocationService(form.getLocalContext().getlocationService());
            vo.setSuppliedService(null);
        }               
    }
    else
    {
        //only update frequecy and comments, in place and confirm date
        vo.setDischargeFrequency(form.ctnServiceDetail().txtDFreq().getValue());
        vo.setComments(form.ctnServiceDetail().txtCommentsService().getValue());
        vo.setIsServiceInPlace(new Boolean(form.ctnServiceDetail().chkInplace().getValue()));
        vo.setConfirmedDate(form.ctnServiceDetail().dteConfirmDate().getValue());
        vo.setIsDischargeService(new Boolean(form.ctnServiceDetail().chkReqForDis().getValue()));
    }

    //set for update as well
    vo.setAuthoringInformation(form.ctnServiceDetail().customControlAuth().getValue());
    vo.setService(form.ctnServiceDetail().cmbService().getValue());

    //default currently active to true
    if(vo.getIsCurrentlyActive() == null)
        vo.setIsCurrentlyActive(Boolean.TRUE);

    if (vo.getCareContext() == null)
        vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());

    if (vo.getClinicalContact() == null)
        vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());

    return vo;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号