Exemplo n.º 1
0
 public dynamic JetDoctorOfStation(int?stationId, string searchText, int?pageIndex = 1, int?pageSize = 10)
 {
     try
     {
         if (!stationId.HasValue)
         {
             stationId = TryGet <int?>(() => UserSelf.StationId);
         }
         if (!stationId.HasValue)
         {
             throw new Exception("没有找到工作站Id");
         }
         var rlt     = _stationSvr.GetDoctorsOfStation(stationId.Value, searchText, pageIndex.Value, pageSize.Value);
         var station = _stationSvr.Find(stationId.Value);
         var dd      = MyDynamicResult(true, "获取成功");
         dd.station = new
         {
             station.StationName,
             station.StationLat,
             station.StationLng,
             defStationPic = station.DefStationPic.GetUrlPath(Global.ConfigSettings.StationImagePathRoot)
         };
         dd.doctors = rlt;
         return(dd);
     }
     catch (Exception ex) { return(MyDynamicResult(ex)); }
 }
Exemplo n.º 2
0
 public dynamic JetTreatStationsByIds(string stationIds)
 {
     try
     {
         var finds = _staSvr.Find(stationIds.ToList <int>(',')).Select(m => new
         {
             StationId = m.StationID,
             m.StationName,
             StationImgUrl = m.StationPicH.ahDtUtil().GetStationImg(imgSizeTypes.HorizThumb)
         });
         var d = MyDynamicResult(true, "");
         d.items = finds;
         return(d);
     }
     catch (Exception ex) { return(MyDynamicResult(ex)); }
 }
Exemplo n.º 3
0
 public IActionResult GetStationInfo(int?stationId)
 {
     try
     {
         if (UserSelf == null && stationId == null)
         {
             throw new ComException(ExceptionTypes.Error_Unauthorized, "未登录的用户,需要输入参数:stationId");
         }
         stationId = stationId ?? UserSelf.StationId;
         var mdd = _stationSvr.Find(stationId.Value).ahDtUtil().NewModel <Models.vwCHIS_Code_WorkStation>(m => new
         {
             StationId       = m.StationID,
             ParentStationId = m.ParentStationID,
             m.StationName,
             ParentStationName = m.ParentName,
             m.Address,
             m.Telephone,
             m.Fax,
             m.LegalPerson,
             AreaId  = m.AreaID,
             AgentId = m.AgentID,
             m.IsEnable,
             m.StopDate,
             m.ShowOrder,
             m.Lat,
             m.Lng,
             DrugStoreStationId   = m.DrugStoreStationId ?? m.StationID,
             DrugStoreStationName = _stationSvr.Find(m.DrugStoreStationId ?? m.StationID)?.StationName,
             StationVPicUrl       = m.StationPic.ahDtUtil().GetStationImg(imgSizeTypes.VerticalNormal),
             StationHPicUrl       = m.StationPicH.ahDtUtil().GetStationImg(imgSizeTypes.HorizNormal),
             OtherInfo            = new
             {
                 OpId = m.OpID,
                 m.OpMan,
                 m.OpTime,
                 m.Remark,
                 m.AddressInfo,
                 m.IsCanTreat,
                 m.IsNetPlat,
                 m.IsManageUnit,
                 m.IsTestUnit,
                 m.StationRmk,
                 m.ZipCode,
                 m.StationLng,
                 m.StationLat,
                 m.HotNum,
                 m.IsNotMedicalUnit,
                 m.SickStampUri,
                 m.StationTypeId,
                 m.StationTypeName,
                 m.StationLogPicH,
                 m.StationLogPicV,
                 m.StationKeyCode,
                 m.StationPinYin,
                 m.DefStationPic
             }
         });
         var rlt = MyDynamicResult(mdd);
         return(Ok(rlt));
     }
     catch (Exception ex) { return(Ok(MyDynamicResult(ex))); }
 }