示例#1
0
        /// <summary>
        /// 根据设备组获取视频巡更的设备
        /// </summary>
        /// <returns></returns>
        public List <Model.CustomModel.VideoInGroupModel> GetVideoPatrolDevice(int groupid)
        {
            List <Model.CustomModel.VideoInGroupModel> videoinfo = new List <Model.CustomModel.VideoInGroupModel>();

            BLL.ServDeviceGroupBLL groupbll = new ServDeviceGroupBLL();
            BLL.ServAreaInfoBLL    areabll  = new ServAreaInfoBLL();

            List <Model.CustomModel.VideoInGroupModel> viewinfolist = groupbll.GetVideoInfoByGroupIdint(groupid);

            foreach (Model.CustomModel.VideoInGroupModel viewmodel in viewinfolist)
            {
                if (viewmodel.is_inbuilding != -1)
                {
                    Model.ServFloorInfoModel floormodel = new ServFloorInfoModel();
                    floormodel     = areabll.GetBuildingInfoByid(viewmodel.is_inbuilding);
                    viewmodel.ext1 = floormodel.floor_name.ToString();
                    viewmodel.ext2 = floormodel.floor_code.ToString();
                    viewmodel.ext3 = floormodel.building_id.ToString();
                    viewmodel.ext4 = floormodel.point1;
                    viewmodel.ext5 = floormodel.point2;
                    viewmodel.ext6 = floormodel.floor_src_2d;
                    viewmodel.ext7 = floormodel.floor_src_25d;
                    viewmodel.ext8 = floormodel.rank.ToString();
                    viewmodel.ext9 = floormodel.id.ToString();
                }
            }

            return(viewinfolist);
        }
示例#2
0
 /// <summary>
 /// 获取楼内图信息
 /// </summary>
 /// <param name="deviceId"></param>
 /// <returns></returns>
 public JsonResult GetMapBuildingInfo(int is_inbuilding)
 {
     try
     {
         BLL.ServAreaInfoBLL      areabll    = new ServAreaInfoBLL();
         Model.ServFloorInfoModel floormodel = new ServFloorInfoModel();
         floormodel = areabll.GetBuildingInfoByid(is_inbuilding);
         return(Json(new { status = 0, msg = floormodel }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new { status = 1, msg = ex.Message }, JsonRequestBehavior.AllowGet));
     }
 }