示例#1
0
        public PageResult <SystemDto> GetSystemDto(PageQueryCondition <ProtocolQuerySystem, PageQuery> query)
        {
            PredicateGroup group = new PredicateGroup();

            if (!string.IsNullOrEmpty(query.Condition.SystemId))
            {
                group.Predicates.Add(Predicates.Field <Department>(d => d.Id, Operator.Eq, query.Condition.SystemId));
            }
            if (!string.IsNullOrEmpty(query.Condition.SystemName))
            {
                group.Predicates.Add(Predicates.Field <Department>(d => d.Name, Operator.Eq, query.Condition.SystemName));
            }
            return(Unit.SystemRepository.GetSystem(group, query.Query).ToPageModel <GIS.Authority.Entity.System, SystemDto>());
        }
        public PageResult <OrganizationDto> GetOrganizeDto(PageQueryCondition <ProtocolQueryOrganize, PageQuery> query)
        {
            PredicateGroup group = new PredicateGroup();

            group.Operator = GroupOperator.And;
            if (!string.IsNullOrEmpty(query.Condition.SystemId))
            {
                group.Predicates.Add(Predicates.Field <Department>(d => d.Id, Operator.Eq, query.Condition.SystemId));
            }
            if (!string.IsNullOrEmpty(query.Condition.OrganizeName))
            {
                group.Predicates.Add(Predicates.Field <Department>(d => d.Name, Operator.Eq, query.Condition.OrganizeName));
            }
            return(Unit.OrganizeRepositiry.GetOrganize(group, query.Query).ToPageModel <GIS.Authority.Entity.Organization, OrganizationDto>());
        }
示例#3
0
        public PageResult <DepartmentDto> GetDepartmentDto(PageQueryCondition <ProtocolQueryDepartment, PageQuery> query)
        {
            PredicateGroup group = new PredicateGroup();

            if (!string.IsNullOrEmpty(query.Condition.DepartmentId))
            {
                group.Predicates.Add(Predicates.Field <Department>(d => d.Id, Operator.Eq, query.Condition.DepartmentId));
            }
            if (!string.IsNullOrEmpty(query.Condition.OrganizeId))
            {
                group.Predicates.Add(Predicates.Field <Department>(d => d.OrganizationId, Operator.Eq, query.Condition.OrganizeId));
            }
            if (!string.IsNullOrEmpty(query.Condition.DepartmentName))
            {
                group.Predicates.Add(Predicates.Field <Department>(d => d.Name, Operator.Eq, query.Condition.DepartmentName));
            }
            return(Unit.DepartmentRepository.GetDepartment(group, query.Query).ToPageModel <Department, DepartmentDto>());
        }
        public PageResult <RoleDto> GetRoleGroupDto(PageQueryCondition <ProtocolQueryRole, PageQuery> query)
        {
            PredicateGroup group = new PredicateGroup();

            group.Operator = GroupOperator.And;
            if (!string.IsNullOrEmpty(query.Condition.OrganizeId))
            {
                group.Predicates.Add(Predicates.Field <Role>(d => d.OrganizationId, Operator.Eq, query.Condition.OrganizeId));
            }
            if (!string.IsNullOrEmpty(query.Condition.OrganizeId))
            {
                group.Predicates.Add(Predicates.Field <Role>(d => d.Id, Operator.Eq, query.Condition.RoleId));
            }
            if (!string.IsNullOrEmpty(query.Condition.RoleName))
            {
                group.Predicates.Add(Predicates.Field <Role>(d => d.Name, Operator.Like, query.Condition.RoleName));
            }
            return(Unit.RoleRepository.GetRole(group, query.Query).ToPageModel <GIS.Authority.Entity.Role, RoleDto>());
        }
        public PageResult <UserAccountDto> GetUserAccountDto(PageQueryCondition <ProtocolQueryUserAccount, PageQuery> query)
        {
            PredicateGroup group = new PredicateGroup();

            group.Operator = GroupOperator.And;
            if (!string.IsNullOrEmpty(query.Condition.OrganizeId))
            {
                group.Predicates.Add(Predicates.Field <UserAccount>(d => d.OrganizationId, Operator.Eq, query.Condition.OrganizeId));
            }
            if (!string.IsNullOrEmpty(query.Condition.DepartmentId))
            {
                group.Predicates.Add(Predicates.Field <UserAccount>(d => d.DepartmentId, Operator.Eq, query.Condition.DepartmentId));
            }
            if (!string.IsNullOrEmpty(query.Condition.UserId))
            {
                group.Predicates.Add(Predicates.Field <UserAccount>(d => d.Id, Operator.Eq, query.Condition.UserId));
            }
            if (!string.IsNullOrEmpty(query.Condition.Filter))
            {
                group.Predicates.Add(Predicates.Field <UserAccount>(d => d.Name, Operator.Like, query.Condition.Filter));
            }
            return(Unit.UserRepository.GetUserAccount(group, query.Query).ToPageModel <GIS.Authority.Entity.UserAccount, UserAccountDto>());
        }