移动系统liao
2025-03-19 16b063870156db78148440971ab46c649e3e6018
cylsg/cylsg.Application/CyOS/CyOSStaffController.cs
@@ -500,9 +500,9 @@
                throw Oops.Oh("没有权限");
            }
            Expression<Func<OA_DeliverPlan, bool>> SearchList = (x) => true;
            Expression<Func<OA_DeliverPlanPaiche, bool>> SearchList = (x) => true;
            SearchList = SearchList.And(x => x.FirmId == _OAServices.firmId);
            SearchList = SearchList.And(x => x.Creater == Permissions.MemberId);//只看自己
            SearchList = SearchList.And(x => x.BusinessManagerId == Permissions.KeyId);//只看自己 客户经理是自己
            SearchList = SearchList.And(x => x.ShifouDelivery !=2);//过滤有效
            if (Param.DeliverKeyID!=null)
            {
@@ -515,11 +515,11 @@
            }
            if (Param.TimeStart != null)
            {
                SearchList = SearchList.And(x => x.CreateTime > Param.TimeStart);
                SearchList = SearchList.And(x => x.DeliverTime >= Param.TimeStart.Value.Date);
            }
            if (Param.TimeEnd != null)
            {
                SearchList = SearchList.And(x => x.CreateTime < Param.TimeEnd.Value.AddDays(1));
                SearchList = SearchList.And(x => x.DeliverTime < Param.TimeEnd.Value.Date.AddDays(1));
            }
            if (Param.DeliveredState != null)
            {
@@ -535,7 +535,7 @@
            //强制增加员工过滤
            RefAsync<int> totle = 0;
            var data = await _SugarClient.Queryable<OA_DeliverPlan>().Includes(x => x.Driver)
            var data = await _SugarClient.Queryable<OA_DeliverPlanPaiche>().Includes(x => x.Driver).Includes(x=>x.DeliverPlans)
                .Where(SearchList).OrderByDescending(x => x.CreateTime.Value.Date).OrderBy(x=>SqlFunc.Asc(x.Sort)).ToPageListAsync(Param.page.PageIndex, Param.page.PageSize, totle);
            Param.page.TotalCount = totle;
@@ -557,15 +557,15 @@
        /// </summary>
        /// <param name="KeyId"></param>
        /// <returns></returns>
        public async Task<OA_DeliverPlan> GetDeliverPlanInfo(Guid KeyId)
        public async Task<OA_DeliverPlanPaiche> GetDeliverPlanInfo(Guid KeyId)
        {
            if (!await CheckRols())
            {
                throw Oops.Oh("没有权限");
            }
            return await _SugarClient.Queryable<OA_DeliverPlan>().Includes(x => x.Attachments).Includes(x=>x.Driver).Includes(x=>x.Manager)
                .Where(x => x.Creater == Permissions.MemberId && x.Keyid == KeyId && x.ShifouDelivery != 2).FirstAsync();
            return await _SugarClient.Queryable<OA_DeliverPlanPaiche>().Includes(x => x.Attachments).Includes(x=>x.Driver).Includes(x=>x.DeliverPlans)
                .Where(x => x.BusinessManagerId == Permissions.KeyId && x.Keyid == KeyId && x.ShifouDelivery != 2).FirstAsync();
        }
@@ -679,7 +679,7 @@
        /// <summary>
        /// 数据列表
        /// </summary>
        public List<OA_DeliverPlan> Data { get; set; }
        public List<OA_DeliverPlanPaiche> Data { get; set; }
        /// <summary>
        /// 页面参数