| | |
| | | SearchList = SearchList.And(x => x.PlanDataType == 17); |
| | | //SearchList = SearchList.And(x => x.ApprovalStatus == PlanStatusType.unApproval); |
| | | //SearchList = SearchList.And(x => x.OaWorkPlanShenpis.Where(y => y.Buzhou == 1 && y.ApprovalStaffId == Permissions.MemberId).Count()<=0); |
| | | SearchList = SearchList.And(x => x.DepartId == Permissions.DepartId); |
| | | //SearchList = SearchList.And(x => x.DepartId == Permissions.DepartId); 部门筛选 |
| | | if (!string.IsNullOrEmpty(param.StaffName)) |
| | | { |
| | | SearchList = SearchList.And(x => x.SentStaff.Name.Contains(param.StaffName)); |
| | |
| | | { |
| | | throw Oops.Oh("没有权限"); |
| | | } |
| | | return await _SugarClient.Queryable<OaWorkPlan>().Includes(x => x.OaWorkPlanShenpis.Where(y => y.Buzhou == 1).ToList(), y => y.ApprovalStaff).Includes(x => x.SentStaff).Includes(x => x.Depart).Includes(x => x.WorkPlanAttachments).Where(x=>x.Keyid==id).FirstAsync(); |
| | | return await _SugarClient.Queryable<OaWorkPlan>().Includes(x => x.OaWorkPlanShenpis.Where(y => y.Buzhou == 1).ToList(), y => y.ApprovalStaff).Includes(x => x.SentStaff).Includes(x => x.Depart).Includes(x => x.WorkPlanAttachments).Where(x=>x.Keyid==id).Mapper(x=> |
| | | { |
| | | if (x.ApprovalStatus == PlanStatusType.unApproval) |
| | | { |
| | | var oashenpi = x.OaWorkPlanShenpis?.Where(x=>x.ApprovalStaffId==Permissions.MemberId).FirstOrDefault(); |
| | | if (oashenpi != null) |
| | | x.ApprovalStatus = oashenpi.ApprovalStatus; |
| | | |
| | | |
| | | } |
| | | ; |
| | | }).FirstAsync(); |
| | | } |
| | | |
| | | /// <summary> |