public Basic.Framework.Web.BasicResponse LoadAreaCache(Sys.Safety.Request.PersonCache.AreaCacheLoadRequest AreaCacheRequest) { AreaCache.AreaCacheInstance.Load(); IAreaRuleService areaRuleService = ServiceFactory.Create <IAreaRuleService>(); IR_ArearestrictedpersonService r_ArearestrictedpersonService = ServiceFactory.Create <IR_ArearestrictedpersonService>(); //加载区域定义基本信息之后,加载区域定义拓展属性 var areaDefineList = AreaCache.AreaCacheInstance.Query(); if (areaDefineList.Any()) { //区域设备类型定义限制信息 var areaRuleList = areaRuleService.GetAreaRuleList(new AreaRuleGetListRequest()).Data; var arearestrictedpersonList = r_ArearestrictedpersonService.GetArearestrictedpersonList(new Sys.Safety.Request.Arearestrictedperson.R_ArearestrictedpersonGetListRequest()).Data; areaDefineList.ForEach(nwModule => { var tempareaRuleList = areaRuleList.FindAll(p => p.Areaid == nwModule.Areaid); var tempRestrictedpersonInfoList = arearestrictedpersonList.FindAll(p => p.AreaId == nwModule.Areaid); nwModule.AreaRuleInfoList = tempareaRuleList; nwModule.RestrictedpersonInfoList = tempRestrictedpersonInfoList; }); AreaCache.AreaCacheInstance.UpdateItems(areaDefineList); } return(new BasicResponse()); }
public BasicResponse <List <AreaRuleInfo> > GetAreaRuleList(Sys.Safety.Request.Area.AreaRuleGetListRequest areaRuleRequest) { return(alarmHandleService.GetAreaRuleList(areaRuleRequest)); }