示例#1
0
        private UserInspect GetSuperVisorUserInspect(int userId)
        {
            var userInspect = cacheUserInspect.Get(PkPmCacheKeys.InspectByUserIdFmt.Fmt(userId));

            if (userInspect != null)
            {
                return(userInspect);
            }
            else
            {
                var user = _repUser.GetById(userId);
                //数据权限监督人员全部从 usercode 获取
                string inspectId = user.UserCode;

                if (inspectId.IsNullOrEmpty())
                {
                    inspectId = pkpmConfigService.DefaultInpsect;// defaultInpsect;
                }

                UserInspect newUserInspect = new UserInspect()
                {
                    InspectId = inspectId
                };

                cacheUserInspect.Put(PkPmCacheKeys.InspectByUserIdFmt.Fmt(userId), newUserInspect);
                return(newUserInspect);
            }
        }
示例#2
0
 public void Create(UserInspect entity)
 {
     throw new NotImplementedException();
 }