FutureAppointmentDetailsImpl.java 文件源码

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

项目:openMAXIMS 作者:
public ServiceAndFunctionForFutureApptsVo getServiceAndFunctionForAppt(Booking_AppointmentRefVo appointment)
{
    if(appointment == null || appointment.getID_Booking_Appointment() == null)
        return null;

    ServiceAndFunctionForFutureApptsVo voServiceAndSlot = null;

    String hql = "select serviceFunc, session.service from Booking_Appointment as appt left join appt.session as session left join appt.serviceFunction as serviceFunc where (appt.id = :idAppt)";
    List items = getDomainFactory().find(hql, new String[]{"idAppt"}, new Object[]{appointment.getID_Booking_Appointment()});

    if(items != null && items.size() > 0)
    {
        Iterator it = items.iterator(); 

        if(it.hasNext())
        {
            Object[] item = (Object[]) it.next();
            ServiceFunction doServiceFunction = (ServiceFunction) item[0];
            Service doService = (Service) item[1];

            ServiceLiteVo service = ServiceLiteVoAssembler.create(doService);
            ServiceFunctionLiteVo serviceFunct = ServiceFunctionLiteVoAssembler.create(doServiceFunction);

            voServiceAndSlot = new ServiceAndFunctionForFutureApptsVo();
            voServiceAndSlot.setService(service);
            voServiceAndSlot.setFunction(serviceFunct);
        }
    }

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


问题


面经


文章

微信
公众号

扫码关注公众号