| | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.DeptId) || bbb.DeptId == searchEntity.DeptId.Trim()) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.UserName) || bbb.UserName.Contains(searchEntity.UserName.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.BreakThing) || a.BreakThing.Contains(searchEntity.BreakThing.Trim())) |
| | | |
| | | && (string.IsNullOrWhiteSpace(searchEntity.UserId) || a.UserId == searchEntity.UserId.Trim()) |
| | | |
| | | |
| | | |
| | |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public ResultDataEntity<AdmAskGoodDTO> SearchByPagingGoods(AdmBreakPrecedentDTOSearch searchEntity) |
| | | { |
| | | |
| | | |
| | | |
| | | ResultDataEntity<AdmAskGoodDTO> data = new ResultDataEntity<AdmAskGoodDTO>(); |
| | | List<AdmAskGoodDTO> list = new List<AdmAskGoodDTO>(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | DateTime BreakTimestart = DateTime.Now; |
| | | DateTime BreakTimeend = DateTime.Now; |
| | | if (!string.IsNullOrWhiteSpace(searchEntity.BreakTime)) |
| | | { |
| | | string[] BreakTimes = searchEntity.BreakTime.Split("|"); |
| | | DateTime.TryParse(BreakTimes[0], out BreakTimestart); |
| | | DateTime.TryParse(BreakTimes[1], out BreakTimeend); |
| | | BreakTimeend = BreakTimeend.AddDays(1); |
| | | } |
| | | |
| | | ///AdmBreakPrecedents |
| | | var query = (from a in _context.AdmAskGoods |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | join b in _context.AdmGoodsManages |
| | | on a.GoodsId equals b.Id |
| | | into bsssss |
| | | from bbb in bsssss.DefaultIfEmpty() |
| | | |
| | | join k in _context.PltUsers |
| | | on a.Creater equals k.Id |
| | | into ksssss |
| | | from kkk in ksssss.DefaultIfEmpty() |
| | | |
| | | join c in _context.HrDepts |
| | | on kkk.DeptId equals c.Id |
| | | into csssss |
| | | from ccc in csssss.DefaultIfEmpty() |
| | | |
| | | |
| | | |
| | | where a.RecStatus == "A" && a.ShenpiStatus == "A" |
| | | && (string.IsNullOrWhiteSpace(searchEntity.BreakTime) || (a.Createtime >= BreakTimestart && a.Createtime <= BreakTimeend)) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.Goods) || bbb.GoodsName.Contains(searchEntity.Goods.Trim())) |
| | | && (string.IsNullOrWhiteSpace(searchEntity.UserId) || a.Creater == searchEntity.UserId.Trim()) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | select new AdmAskGoodDTO |
| | | { |
| | | Id = a.Id, |
| | | Createtime = a.Createtime, |
| | | CreatetimeName = a.Createtime.ToString("yyyy-MM-dd"), |
| | | GoodsId = a.GoodsId, |
| | | GoodsName = bbb.GoodsName, |
| | | Shuliang = a.Shuliang, |
| | | ShuliangName = a.Shuliang.HasValue? a.Shuliang.Value.ToString("F2"):"0", |
| | | |
| | | |
| | | |
| | | Creater = a.Creater, |
| | | |
| | | |
| | | RecStatus = a.RecStatus, |
| | | Modifier = a.Modifier, |
| | | Modifytime = a.Modifytime, |
| | | } |
| | | ).OrderByDescending(x => x.Createtime).ToList(); |
| | | |
| | | |
| | | |
| | | //if (searchEntity.totalrows == 0) |
| | | searchEntity.totalrows = query.Count(); |
| | | var lianlist = query.Skip((searchEntity.page - 1) * searchEntity.rows).Take(searchEntity.rows).ToList(); |
| | | data.LoadData(searchEntity, lianlist); |
| | | return data; |
| | | } |
| | | } |
| | | } |