diff --git a/src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs b/src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs index 94510db..dd0fb79 100644 --- a/src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs +++ b/src/Coldairarrow.Business/HuiYan/teamitemsBusiness.cs @@ -310,7 +310,8 @@ namespace Coldairarrow.Business.HuiYan TeamId = b.TeamId, TeamUserId = b.UserId, TeamDate = b.CreateTime, - TeamOverDate = b.UpdateDate + TeamOverDate = b.UpdateDate, + PriceTaskCreateDate = b.PriceTaskCreateDate == null ? null : b.PriceTaskCreateDate.Value }; select = select.BuildExtendSelectExpre(); @@ -320,20 +321,25 @@ namespace Coldairarrow.Business.HuiYan var q = from a in q_titem.AsExpandable() join b in Db.GetIQueryable() on a.Id equals b.TeamItemId into ab from b in ab.DefaultIfEmpty() - select @select.Invoke(b==null?new pricetasklog():b, a); + select @select.Invoke(type==1?b:(b==null?new pricetasklog():b), a); + + var where = LinqHelper.True(); - where = where.And(c => c.CreateTime >= start && c.CreateTime <= end); + start = new DateTime(start.Year, start.Month, start.Day); + end = new DateTime(end.Year, end.Month, end.Day, 23, 59, 59); //团队 if (type == 0) { + where = where.And(c => c.PriceTaskCreateDate >= start && c.PriceTaskCreateDate <= end); where = where.And(c => c.TeamId == _operator.TeamId); } //比价 - else + else { + where = where.And(c => c.CreateTime >= start && c.CreateTime <= end); where = where.And(c => c.UserId == _operator.UserId); }