public async Task <TData <List <BaseInfoEntity> > > GetList(BaseInfoListParam param) { TData <List <BaseInfoEntity> > obj = new TData <List <BaseInfoEntity> >(); obj.Data = await baseInfoService.GetList(param); obj.Total = obj.Data.Count; obj.Tag = 1; return(obj); }
public async Task <TData <List <HospMonitorInLinePeopleViewModel> > > GetInLineDetailsList(InlinePeopleListParam param, Pagination pagination = null) { TData <List <HospMonitorInLinePeopleViewModel> > obj = new TData <List <HospMonitorInLinePeopleViewModel> >(); List <InlinePeopleEntity> inlinePeopleEntities = null; if (pagination != null) { inlinePeopleEntities = await inlinePeopleService.GetPageList(param, pagination); } else { inlinePeopleEntities = await inlinePeopleService.GetList(param); } if (inlinePeopleEntities == null) { obj.Tag = 0; obj.Message = "查询失败"; return(obj); } BaseInfoListParam baseInfoListParam = new BaseInfoListParam { sId = param.sId, sName = param.sName }; List <BaseInfoEntity> baseInfoEntities = await baseInfoService.GetList(baseInfoListParam); #region 左外连 //obj.Data = (from inline in inlinePeopleEntities // join baseInfo in baseInfoEntities on inline.sId equals baseInfo.sId into InLineDetails // from details in InLineDetails.DefaultIfEmpty() // select new HospMonitorInLinePeopleViewModel // { // Id = inline.Id.ToString(), // sId = details?.sId, // nType = inline.nType, // dtCheckIn = inline.dtCheckIn, // sPatientId = inline.sPatientId, // sName = details?.sName, // sPhone = details?.sPhone, // sAddress = details?.sAddress, // sBedNo = details?.sBedNo, // sArea = details?.sArea, // sDoc = details?.sDoc, // sSex = details?.sSex, // sAge = details?.sAge, // sRemarks = details?.sRemarks, // sExtend = details?.sExtend // }).ToList(); #endregion #region 内联 obj.Data = (from inline in inlinePeopleEntities join baseInfo in baseInfoEntities on inline.sId equals baseInfo.sId select new HospMonitorInLinePeopleViewModel { Id = inline.Id.ToString(), sId = inline?.sId, nType = inline.nType, dtCheckIn = inline.dtCheckIn, sPatientId = inline.sPatientId, sName = baseInfo?.sName, sPhone = baseInfo?.sPhone, sAddress = baseInfo?.sAddress, sBedNo = baseInfo?.sBedNo, sArea = baseInfo?.sArea, sDoc = baseInfo?.sDoc, sSex = baseInfo?.sSex, sAge = baseInfo?.sAge, sRemarks = baseInfo?.sRemarks, sExtend = baseInfo?.sExtend }).ToList(); #endregion obj.Total = pagination?.TotalCount ?? 0; obj.Tag = 1; return(obj); }