From 2da07433d6d40ac44b0388ad95c6598cc996ca4c Mon Sep 17 00:00:00 2001 From: feng <279202647@qq.com> Date: Mon, 23 May 2022 22:11:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E5=9B=A2=E9=98=9F=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HuiYan/teamitemsBusiness.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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); }