Exemple #1
0
        /// <summary>
        /// 查看详情
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public ResponseCookBanquet GetBanquetDetail(Guid Id)
        {
            var data = Kily.Set <CookBanquet>().Where(t => t.Id == Id).Select(t => new ResponseCookBanquet()
            {
                Id           = t.Id,
                HoldName     = t.HoldName,
                Phone        = t.Phone,
                TypePath     = t.TypePath,
                Address      = t.Address,
                HoldDay      = t.HoldDay,
                HoldTime     = t.HoldTime,
                HoldType     = t.HoldType,
                Helper       = t.Helper,
                Water        = t.Water,
                Disinfection = t.Disinfection,
                Facility     = t.Facility,
                Poisonous    = t.Poisonous,
                Processing   = t.Processing,
                Ingredients  = t.Ingredients,
                CookBook     = t.CookBook,
                Stauts       = t.Stauts,
                ResultImg    = t.ResultImg,
                HoldTheme    = t.HoldTheme,
                HoldFoo      = t.HoldFoo,
                HoldTotal    = t.HoldTotal,
                DeskNum      = t.DeskNum
            }).AsNoTracking().FirstOrDefault();

            return(data);
        }
Exemple #2
0
        /// <summary>
        /// 加盟缴费分页
        /// </summary>
        /// <param name="pageParam"></param>
        /// <returns></returns>
        public PagedResult <ResponseAdminAttach> GetJoinPayPage(PageParamList <RequestAdminAttach> pageParam)
        {
            IQueryable <SystemAdminAttach> AdminAttach = Kily.Set <SystemAdminAttach>();
            IQueryable <SystemAdmin>       Admin       = Kily.Set <SystemAdmin>();

            if (!string.IsNullOrEmpty(pageParam.QueryParam.Account))
            {
                Admin = Admin.Where(t => t.Account.Equals(pageParam.QueryParam.Account));
            }
            var data = Admin.OrderBy(t => t.CreateTime).GroupJoin(AdminAttach, t => t.Id, x => x.AdminId, (t, x) => new ResponseAdminAttach()
            {
                AdminId         = t.Id,
                CompanyName     = t.CompanyName,
                TrueName        = t.TrueName,
                AccountType     = t.AccountType,
                AccountTypeName = AttrExtension.GetSingleDescription <AccountEnum, DescriptionAttribute>(t.AccountType),
                IdCard          = t.IdCard,
                Phone           = t.Phone,
                Email           = t.Email,
                StartTime       = x.FirstOrDefault().StartTime,
                EndTime         = x.FirstOrDefault().EndTime,
                IsPay           = x.FirstOrDefault().IsPay,
                Money           = x.FirstOrDefault().Money,
                PayUser         = x.FirstOrDefault().PayUser,
                IsDelete        = t.IsDelete
            }).AsNoTracking().ToPagedResult(pageParam.pageNumber, pageParam.pageSize);

            return(data);
        }
Exemple #3
0
        /// <summary>
        /// 获取产品详情
        /// </summary>
        /// <param name="pageParam"></param>
        /// <returns></returns>
        public object GetProductDetail(Guid ID)
        {
            IQueryable <EnterpriseGoods>         goods      = Kily.Set <EnterpriseGoods>().Where(t => t.IsDelete == false).Where(t => t.AuditType == AuditEnum.AuditSuccess && t.Id == ID);
            IQueryable <EnterpriseProductSeries> queryables = Kily.Set <EnterpriseProductSeries>().Where(t => t.IsDelete == false);
            IQueryable <EnterpriseInfo>          queryable  = Kily.Set <EnterpriseInfo>().Where(t => t.AuditType == AuditEnum.AuditSuccess);
            var data = goods.Join(queryable, t => t.CompanyId, x => x.Id, (t, x) => new
            {
                Id                = t.Id,
                ProductName       = t.ProductName,
                CompanyId         = t.CompanyId,
                CompanyName       = x.CompanyName,
                ProductType       = t.ProductType,
                ExpiredDate       = t.ExpiredDate + "天",
                Image             = t.Image,
                Price             = t.Price,
                SellWebNet        = t.SellWebNet,
                LineCode          = t.LineCode,
                Remark            = t.Remark,
                Spec              = t.Spec,
                Unit              = t.Unit,
                ProductAddress    = x.ProductionAddress,
                ProductSeriesName = (queryables.Where(o => o.Id == t.ProductSeriesId).FirstOrDefault() ?? new EnterpriseProductSeries()).SeriesName, //产品系列
                BasePoint         = (queryables.Where(o => o.Id == t.ProductSeriesId).FirstOrDefault() ?? new EnterpriseProductSeries()).Standard    //执行标准
            }).FirstOrDefault();

            return(data);
        }
Exemple #4
0
        /// <summary>
        /// 厨师登录
        /// </summary>
        /// <param name="LoginValidate"></param>
        /// <returns></returns>
        public ResponseCookInfo CookLogin(RequestValidate LoginValidate)
        {
            IQueryable <CookVip> queryable = Kily.Set <CookVip>()
                                             .Where(t => t.Account.Equals(LoginValidate.Account) || t.Phone.Equals(LoginValidate.Account))
                                             .Where(t => t.PassWord.Equals(LoginValidate.PassWord))
                                             .Where(t => t.IsDelete == false);
            IQueryable <CookInfo> queryables = Kily.Set <CookInfo>();
            var data = queryable.GroupJoin(queryables, t => t.Id, x => x.CookId, (t, x) => new ResponseCookInfo()
            {
                Id         = t.Id,
                CookId     = t.Id,
                Sexlab     = x.FirstOrDefault().Sexlab,
                Account    = t.Account,
                PassWord   = t.PassWord,
                Address    = x.FirstOrDefault().Address,
                Birthday   = x.FirstOrDefault().Birthday,
                CardOffice = x.FirstOrDefault().CardOffice,
                ExpiredDay = x.FirstOrDefault().ExpiredDay,
                IdCardNo   = x.FirstOrDefault().IdCardNo,
                Phone      = t.Phone,
                TrueName   = x.FirstOrDefault().TrueName,
                Nation     = x.FirstOrDefault().Nation,
                TypePath   = x.FirstOrDefault().TypePath,
                StartTime  = t.StartTime,
                EndTime    = t.EndTime,
                RoleId     = t.RoleId,
                TableName  = typeof(ResponseCookInfo).Name
            }).AsNoTracking().FirstOrDefault();

            return(data);
        }
Exemple #5
0
        /// <summary>
        /// 餐饮系统注册
        /// </summary>
        /// <param name="Param"></param>
        /// <returns></returns>
        public string RegistRepastAccount(RequestMerchant Param)
        {
            Param.AuditType = AuditEnum.WaitAduit;
            RepastRoleAuthor Author = Kily.Set <RepastRoleAuthor>().Where(t => t.IsDelete == false).Where(t => t.AuthorName.Contains("基本")).OrderBy(t => t.CreateTime).FirstOrDefault();

            Param.DingRoleId = Author.Id;
            RepastInfo Info     = Param.MapToEntity <RepastInfo>();
            var        IsReplay = Kily.Set <RepastInfo>().Where(t => t.Account == Param.Account).FirstOrDefault();

            if (IsReplay != null)
            {
                return("账号已经被注册");
            }
            var IsReplays = Kily.Set <RepastInfo>().Where(t => t.MerchantName == Param.MerchantName).FirstOrDefault();

            if (IsReplays != null)
            {
                return("企业已经注册,请勿重复注册");
            }
            if (!NormalUtil.CheckStringChineseUn(Info.Account))
            {
                if (Insert <RepastInfo>(Info))
                {
                    return(ServiceMessage.INSERTSUCCESS);
                }
                else
                {
                    return(ServiceMessage.INSERTFAIL);
                }
            }
            else
            {
                return("账号不能包含中文和特殊字符");
            }
        }
Exemple #6
0
        /// <summary>
        /// 厨师信息
        /// </summary>
        /// <param name="pageParam"></param>
        /// <returns></returns>
        public PagedResult <ResponseCookInfo> GetCookInfoPage(PageParamList <RequestCookInfo> pageParam)
        {
            IQueryable <CookInfo> queryable = Kily.Set <CookInfo>().OrderByDescending(t => t.CreateTime);

            if (!string.IsNullOrEmpty(pageParam.QueryParam.AreaTree))
            {
                queryable = queryable.Where(t => t.TypePath.Contains(pageParam.QueryParam.AreaTree));
            }
            if (UserInfo().AccountType == AccountEnum.Province)
            {
                queryable = queryable.Where(t => t.TypePath.Contains(UserInfo().Province));
            }
            if (UserInfo().AccountType == AccountEnum.City)
            {
                queryable = queryable.Where(t => t.TypePath.Contains(UserInfo().City));
            }
            if (UserInfo().AccountType == AccountEnum.Area)
            {
                queryable = queryable.Where(t => t.TypePath.Contains(UserInfo().Area));
            }
            if (UserInfo().AccountType == AccountEnum.Village)
            {
                queryable = queryable.Where(t => t.TypePath.Contains(UserInfo().Town));
            }
            var data = queryable.Select(t => new ResponseCookInfo()
            {
                Id            = t.Id,
                TrueName      = t.TrueName,
                IdCardNo      = t.IdCardNo,
                AuditTypeName = AttrExtension.GetSingleDescription <DescriptionAttribute>(t.AuditType),
                TableName     = t.GetType().Name
            }).ToPagedResult(pageParam.pageNumber, pageParam.pageSize);

            return(data);
        }
Exemple #7
0
        public object GetAllSupply(Guid CompanyId, int type)
        {
            //var Types = (SellerEnum)type;
            var Esupper = Kily.Set <EnterpriseSeller>().Where(t => t.SellerType.GetHashCode() == type && t.IsDelete == false)
                          .Where(t => t.CompanyId == CompanyId)
                          .Select(t => new
            {
                CompanyName    = t.SupplierName,
                CompanyCode    = t.Code,
                CompanyUser    = t.DutyMan,
                CompanyTel     = t.LinkPhone,
                CompanyAddress = t.Address,
                CompanyFace    = t.OkayCard
            }).ToList();
            var Rsupper = Kily.Set <RepastSupplier>().Where(t => t.InfoId == CompanyId).Select(t => new
            {
                CompanyName    = t.SupplierName,
                CompanyCode    = "",
                CompanyUser    = t.SupplierUser,
                CompanyTel     = t.LinkPhone,
                CompanyAddress = t.Address,
                CompanyFace    = t.RunCard
            }).ToList();

            Esupper.AddRange(Rsupper);
            return(Esupper);
        }
Exemple #8
0
        /// <summary>
        /// 搜索产品列表
        /// </summary>
        /// <param name="pageParam"></param>
        /// <returns></returns>
        public object GetProductSearch(string KeyWords, int PageIndex, int PageSize)
        {
            IQueryable <EnterpriseGoods>         goods      = Kily.Set <EnterpriseGoods>().Where(t => t.IsDelete == false).Where(t => t.AuditType == AuditEnum.AuditSuccess).Where(o => o.Image.Length > 0 && o.LineCode.Length > 0);
            IQueryable <EnterpriseProductSeries> queryables = Kily.Set <EnterpriseProductSeries>().Where(t => t.IsDelete == false);

            if (!string.IsNullOrEmpty(KeyWords))
            {
                goods = goods.Where(t => t.ProductName.Contains(KeyWords));
            }
            IQueryable <EnterpriseInfo> queryable = Kily.Set <EnterpriseInfo>().Where(t => t.AuditType == AuditEnum.AuditSuccess);
            var data = goods.Join(queryable, t => t.CompanyId, x => x.Id, (t, x) => new
            {
                Id                = t.Id,
                ProductName       = t.ProductName,
                CompanyId         = t.CompanyId,
                CompanyName       = x.CompanyName,
                ProductType       = t.ProductType,
                ExpiredDate       = t.ExpiredDate + "天",
                Image             = "http://system.cfda.vip" + t.Image.Split(new char[] { ',' }, StringSplitOptions.None)[0],
                Price             = t.Price,
                SellWebNet        = t.SellWebNet,
                LineCode          = t.LineCode,
                Remark            = t.Remark,
                Spec              = t.Spec,
                Unit              = t.Unit,
                ProductAddress    = x.ProductionAddress,
                ProductSeriesName = (queryables.Where(o => o.Id == t.ProductSeriesId).FirstOrDefault() ?? new EnterpriseProductSeries()).SeriesName, //产品系列
                BasePoint         = (queryables.Where(o => o.Id == t.ProductSeriesId).FirstOrDefault() ?? new EnterpriseProductSeries()).Standard    //执行标准
            }).ToPagedResult(PageIndex, PageSize);

            return(data);
        }
Exemple #9
0
        /// <summary>
        /// 获取导航菜单
        /// </summary>
        /// <returns></returns>
        public IList <ResponseCookMenu> GetCookMenu()
        {
            IQueryable <CookMenu> queryable = Kily.Set <CookMenu>().Where(t => t.Level == MenuEnum.LevelOne).Where(t => t.IsDelete == false).AsNoTracking().AsQueryable().OrderBy(t => t.CreateTime);
            CookRoleAuthor        AuthorWeb = Kily.Set <CookRoleAuthor>().Where(t => t.IsDelete == false).
                                              Where(t => t.Id == CookInfo().RoleId).AsNoTracking().FirstOrDefault();

            queryable = queryable.Where(t => AuthorWeb.AuthorMenuPath.Contains(t.Id.ToString())).AsNoTracking();
            var data = queryable.OrderBy(t => t.CreateTime).Select(t => new ResponseCookMenu()
            {
                Id              = t.Id,
                MenuId          = t.MenuId,
                ParentId        = t.ParentId,
                MenuAddress     = t.MenuAddress,
                MenuName        = t.MenuName,
                HasChildrenNode = t.HasChildrenNode,
                MenuIcon        = t.MenuIcon,
                MenuChildren    = Kily.Set <CookMenu>()
                                  .Where(x => x.ParentId == t.MenuId)
                                  .Where(x => x.Level != MenuEnum.LevelOne)
                                  .Where(x => x.IsDelete == false)
                                  .Where(x => AuthorWeb.AuthorMenuPath.Contains(x.Id.ToString()))
                                  .OrderBy(x => x.CreateTime).Select(x => new ResponseCookMenu()
                {
                    Id              = x.Id,
                    MenuId          = x.MenuId,
                    ParentId        = x.ParentId,
                    MenuAddress     = x.MenuAddress,
                    MenuName        = x.MenuName,
                    HasChildrenNode = x.HasChildrenNode,
                    MenuIcon        = x.MenuIcon
                }).ToList()
            }).ToList();

            return(data);
        }
Exemple #10
0
        /// <summary>
        /// 审核标签
        /// </summary>
        /// <param name="Param"></param>
        /// <returns></returns>
        public string AuditCode(RequestAudit Param)
        {
            Param.AuditName = UserInfo().TrueName;
            SystemAudit Audit = Param.MapToEntity <SystemAudit>();

            if (Insert <SystemAudit>(Audit))
            {
                EnterpriseTagApply TagApply = Kily.Set <EnterpriseTagApply>().Where(t => t.IsDelete == false).Where(t => t.Id == Param.TableId).FirstOrDefault();
                TagApply.AuditType = Param.AuditType;
                TagApply.IsPay     = true;
                List <string> Fields = new List <string>()
                {
                    "AuditType", "IsPay"
                };
                if (UpdateField <EnterpriseTagApply>(TagApply, null, Fields))
                {
                    return(ServiceMessage.HANDLESUCCESS);
                }
                else
                {
                    return(ServiceMessage.HANDLEFAIL);
                }
            }
            else
            {
                return(ServiceMessage.INSERTFAIL);
            }
        }
Exemple #11
0
        /// <summary>
        /// 物码缴费
        /// </summary>
        /// <param name="pageParam"></param>
        /// <returns></returns>
        public PagedResult <ResponseEnterpriseApply> GetTagAuditPage(PageParamList <RequestEnterpriseApply> pageParam)
        {
            IQueryable <EnterpriseTagApply> queryable  = Kily.Set <EnterpriseTagApply>().Where(t => t.IsDelete == false);
            IQueryable <EnterpriseInfo>     queryables = Kily.Set <EnterpriseInfo>();

            if (!string.IsNullOrEmpty(pageParam.QueryParam.AreaTree))
            {
                queryables = queryables.Where(t => t.TypePath.Contains(pageParam.QueryParam.AreaTree));
            }
            if (!string.IsNullOrEmpty(pageParam.QueryParam.BatchNo))
            {
                queryable = queryable.Where(t => t.BatchNo.Contains(pageParam.QueryParam.BatchNo));
            }
            var data = queryable.Join(queryables, t => t.CompanyId, y => y.Id, (t, y) => new ResponseEnterpriseApply()
            {
                Id            = t.Id,
                BatchNo       = t.BatchNo,
                TagTypeName   = AttrExtension.GetSingleDescription <TagEnum, DescriptionAttribute>(t.TagType),
                ApplyNum      = t.ApplyNum,
                ApplyMoney    = t.ApplyMoney,
                Payment       = t.Payment,
                IsPay         = t.IsPay,
                PaytTicket    = t.PaytTicket,
                AuditTypeName = AttrExtension.GetSingleDescription <AuditEnum, DescriptionAttribute>(t.AuditType),
                TableName     = t.GetType().Name
            }).ToPagedResult(pageParam.pageNumber, pageParam.pageSize);

            return(data);
        }
Exemple #12
0
        /// <summary>
        /// 企业认证
        /// </summary>
        /// <param name="pageParam"></param>
        /// <returns></returns>
        public PagedResult <ResponseEnterpriseIdent> IdentEnterprisePay(PageParamList <RequestEnterpriseIdent> pageParam)
        {
            IQueryable <EnterpriseIdent> queryable = Kily.Set <EnterpriseIdent>().Where(t => t.IsDelete == false);

            queryable = queryable.Where(t => t.AuditType >= AuditEnum.AuditSuccess);
            if (!string.IsNullOrEmpty(pageParam.QueryParam.CompanyName))
            {
                queryable = queryable.Where(t => t.CompanyName.Contains(pageParam.QueryParam.CompanyName));
            }
            var data = queryable.OrderByDescending(t => t.CreateTime)
                       .Select(x => new ResponseEnterpriseIdent()
            {
                Id             = x.Id,
                IdentNo        = x.IdentNo,
                CompanyName    = x.CompanyName,
                IdentStarName  = AttrExtension.GetSingleDescription <IdentEnum, DescriptionAttribute>(x.IdentStar),
                LinkPhone      = x.LinkPhone,
                AuditTypeName  = AttrExtension.GetSingleDescription <AuditEnum, DescriptionAttribute>(x.AuditType),
                TableName      = x.GetType().Name,
                IdentStartTime = x.IdentStartTime,
                IdentEndTime   = x.IdentEndTime
            }).AsNoTracking().ToPagedResult(pageParam.pageNumber, pageParam.pageSize);

            return(data);
        }
Exemple #13
0
        /// <summary>
        /// 获取权限菜单树
        /// </summary>
        /// <returns></returns>
        public IList <ResponseParentTree> GetGovtTree()
        {
            IQueryable <ResponseParentTree> queryable = Kily.Set <GovtMenu>().Where(t => t.IsDelete == false)
                                                        .Where(t => t.Level == MenuEnum.LevelOne)
                                                        .AsNoTracking().Select(t => new ResponseParentTree()
            {
                Id           = t.Id,
                Text         = t.MenuName,
                Color        = "black",
                BackClolor   = "white",
                SelectedIcon = "fa fa-refresh fa-spin",
                Nodes        = Kily.Set <GovtMenu>().Where(x => x.IsDelete == false)
                               .Where(x => x.Level != MenuEnum.LevelOne)
                               .Where(x => x.ParentId == t.MenuId).AsNoTracking()
                               .Select(x => new ResponseChildTree()
                {
                    Id           = x.Id,
                    Text         = x.MenuName,
                    Color        = "black",
                    BackClolor   = "white",
                    SelectedIcon = "fa fa-refresh fa-spin",
                }).AsQueryable()
            }).AsQueryable();
            var data = queryable.ToList();

            return(data);
        }
Exemple #14
0
 /// <summary>
 /// 获取角色列表
 /// </summary>
 /// <param name="Id"></param>
 /// <returns></returns>
 public IList <ResponseRepastRoleAuthor> GetRoleAuthorList()
 {
     return(Kily.Set <RepastRoleAuthor>().Select(t => new ResponseRepastRoleAuthor()
     {
         Id = t.Id,
         MerchantRoleName = t.AuthorName
     }).ToList());
 }
Exemple #15
0
 public object RepastThing(Guid CompanyId)
 {
     return(Kily.Set <RepastBillTicket>().Where(t => t.InfoId == CompanyId && t.IsDelete == false).OrderByDescending(o => o.UpTime).Select(t => new
     {
         ThingName = t.Theme,
         Remark = t.Content.Replace("/upload/", "http://system.cfda.vip/upload/"),
         BuyTime = t.UpTime.Value
     }).Take(9).ToList());
 }
Exemple #16
0
 /// <summary>
 /// 角色详情
 /// </summary>
 /// <param name="Id"></param>
 /// <returns></returns>
 public ResponseRepastRoleAuthor GetRepastRoleAuthorDetail(Guid Id)
 {
     return(Kily.Set <RepastRoleAuthor>().Where(t => t.Id == Id).Select(t => new ResponseRepastRoleAuthor()
     {
         Id = t.Id,
         MerchantRoleName = t.AuthorName,
         AuthorMenuPath = t.AuthorMenuPath
     }).AsNoTracking().FirstOrDefault());
 }
Exemple #17
0
        /// <summary>
        /// 确认缴费并分配角色
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public string CheckPayment(Guid Id)
        {
            var            exp    = ExpressionExtension.GetExpression <CookRoleAuthor>("AuthorName", "基本", ExpressionEnum.NotLike);
            CookRoleAuthor author = Kily.Set <CookRoleAuthor>().Where(exp).Where(t => t.IsDelete == false).AsNoTracking().FirstOrDefault();
            CookVip        vip    = Kily.Set <CookVip>().Where(t => t.Id == Id).FirstOrDefault();

            vip.RoleId = author.Id;
            return(UpdateField(vip, "RoleId") ? ServiceMessage.UPDATESUCCESS : ServiceMessage.UPDATEFAIL);
        }
Exemple #18
0
 public object RepastWeek(Guid CompanyId)
 {
     return(Kily.Set <RepastFoodMenu>().Where(t => t.InfoId == CompanyId && t.IsDelete == false).OrderByDescending(o => o.UpTime).Select(t => new
     {
         Title = t.FoodMenuName,
         Content = t.Content.Replace("/upload/", "http://system.cfda.vip/upload/"),
         DateTime = t.UpTime.Value
     }).Take(9).ToList());
 }
Exemple #19
0
 /// <summary>
 /// 检测订单是否过期
 /// </summary>
 /// <returns></returns>
 public async Task CheckOrderExpire()
 {
     Kily.Set <SystemOrder>().Where(t => t.ExpireTime > DateTime.Now).ToList().ForEach(t =>
     {
         t.IsExpire = true;
         UpdateField(t, "IsExpire");
     });
     await Task.CompletedTask;
 }
Exemple #20
0
        /// <summary>
        /// 数据统计
        /// </summary>
        /// <returns></returns>
        public Object GetDataCount()
        {
            IQueryable <CookBanquet> queryable  = Kily.Set <CookBanquet>().Where(t => t.CookId == CookInfo().Id).AsNoTracking();
            IQueryable <CookHelper>  queryables = Kily.Set <CookHelper>().Where(t => t.CookId == CookInfo().Id).AsNoTracking();
            int Banquet = queryable.Select(t => t.Id).Count();
            int Helper  = queryables.Select(t => t.Id).Count();

            return(new { Banquet, Helper });
        }
Exemple #21
0
        /// <summary>
        /// 帮厨列表
        /// </summary>
        /// <returns></returns>
        public IList <ResponseCookHelper> GetHelperList()
        {
            var data = Kily.Set <CookHelper>().Where(t => t.CookId == CookInfo().Id).OrderByDescending(t => t.CreateTime).Select(t => new ResponseCookHelper()
            {
                Id         = t.Id,
                HelperName = t.HelperName,
            }).ToList();

            return(data);
        }
Exemple #22
0
 public object RepastCheck(Guid CompanyId)
 {
     return(Kily.Set <RepastDraw>().Where(t => t.InfoId == CompanyId && t.IsDelete == false).OrderByDescending(o => o.DrawTime).Select(t => new
     {
         Title = t.DrawUnit,
         Person = t.DrawUser,
         Remark = t.Remark.Replace("/upload/", "http://system.cfda.vip/upload/").Replace("/editor/", "http://system.cfda.vip/editor/"),
         DateTime = t.DrawTime.Value
     }).Take(9).ToList());
 }
Exemple #23
0
        /// <summary>
        /// 审核厨师信息
        /// </summary>
        /// <param name="Param"></param>
        /// <returns></returns>
        public string AuditCookInfo(RequestAudit Param)
        {
            CookInfo info = Kily.Set <CookInfo>().Where(t => t.Id == Param.TableId).FirstOrDefault();

            info.AuditType = Param.AuditType;
            UpdateField(info, "AuditType");
            SystemAudit audit = Param.MapToEntity <SystemAudit>();

            return(Insert(audit) ? ServiceMessage.INSERTSUCCESS : ServiceMessage.INSERTFAIL);
        }
Exemple #24
0
 public object RepastMarket(Guid CompanyId)
 {
     return(Kily.Set <RepastUnitInsRecord>().Where(t => t.InfoId == CompanyId && t.IsDelete == false).OrderByDescending(o => o.InsTime).Select(t => new
     {
         Title = t.InsTheme,
         Person = t.InsUser,
         Remark = t.InsContent.Replace("/upload/", "http://system.cfda.vip/upload/").Replace("/editor/", "http://system.cfda.vip/editor/"),
         DateTime = t.InsTime.Value
     }).Take(9).ToList());
 }
Exemple #25
0
 public object RepastSelfCheck(Guid CompanyId)
 {
     return(Kily.Set <GovtTemplateChild>().Where(t => t.Id == CompanyId && t.IsDelete == false).OrderByDescending(o => o.CreateTime).Select(t => new
     {
         Title = t.TemplateName,
         Person = t.UpdateUser,
         Remark = t.TemplateContent.Replace("/upload/", "http://system.cfda.vip/upload/").Replace("/editor/", "http://system.cfda.vip/editor/"),
         DateTime = t.CreateTime.Value
     }).Take(9).ToList());
 }
Exemple #26
0
        /// <summary>
        /// 父级菜单
        /// </summary>
        /// <returns></returns>
        public IList <ResponseRepastMenu> AddDiningParentMenu()
        {
            var query = Kily.Set <RepastMenu>().Where(t => t.Level == MenuEnum.LevelOne).Where(t => t.ParentId == null).AsNoTracking().AsQueryable();
            var data  = query.Select(t => new ResponseRepastMenu()
            {
                MenuId   = t.MenuId,
                MenuName = t.MenuName
            }).ToList();

            return(data);
        }
Exemple #27
0
 public object GetAllSample(Guid CompanyId)
 {
     return(Kily.Set <RepastSample>().Where(t => t.InfoId == CompanyId && t.IsDelete == false).OrderByDescending(o => o.SampleTime).Select(t => new
     {
         FoodsName = t.DishName,
         SavePerson = t.OperatUser,
         SaveTime = t.SampleTime.Value.ToString("yyyy年MM月dd日"),
         ReportImg = t.SampleImg,
         t.Remark
     }).Take(12).ToList());
 }
Exemple #28
0
 public object RepastDuck(Guid CompanyId)
 {
     return(Kily.Set <RepastDuck>().Where(t => t.InfoId == CompanyId && t.IsDelete == false).OrderByDescending(o => o.HandleTime).Select(t => new
     {
         BadType = t.HandleWays,
         BadPhone = t.Phone,
         BadTime = t.HandleTime.Value.ToString("yyyy年MM月dd日"),
         ReportImg = t.HandleImg,
         BadRemark = t.Remark,
         BadPerson = t.HandleUser
     }).Take(12).ToList());
 }
Exemple #29
0
        /// <summary>
        /// 获取邀请码
        /// </summary>
        /// <param name="Area"></param>
        /// <returns></returns>
        public object GetInviteCode(string Area)
        {
            List <EnterpriseInviteCode> InviteCodes = Kily.Set <EnterpriseInviteCode>().Where(t => t.UseTypePath.Equals(Area))
                                                      .Where(t => t.IsDelete == false)
                                                      .Where(t => t.EffectiveSt <= DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")))
                                                      .Where(t => t.EffectiveEt >= DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"))).ToList();
            EnterpriseInviteCode InviteCode = InviteCodes[(new Random()).Next(InviteCodes.Count)];

            InviteCode.IsDelete = true;
            UpdateField <EnterpriseInviteCode>(InviteCode, "IsDelete");
            return(Convert.ToBase64String(Encoding.Default.GetBytes(InviteCode.InviteCode)));
        }
Exemple #30
0
 public object RepastProduct(Guid CompanyId)
 {
     return(Kily.Set <RepastArticleInStock>().Where(t => t.InfoId == CompanyId)
            .Join(Kily.Set <RepastTypeName>(), t => t.NameId, x => x.Id, (t, x) => new { t, x }).Select(t => new ResponseRepastTypeName
     {
         TypeNames = t.x.TypeNames,
         Spec = t.x.Spec,
         ProImg = t.x.ProImg,
         Types = t.x.Types,
         Remark = t.t.Remark
     }).ToList());
 }