From abe24f3ad638e033c0d13d6332ccae425d7d1ada Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期五, 25 十月 2024 10:07:31 +0800 Subject: [PATCH] 小修改 --- cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs index 9523d94..5dec3a9 100644 --- a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs +++ b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs @@ -101,14 +101,20 @@ { switch (orderDto.OrderStatus) { - case (int)OrderStatuses.fabu: orderDto.OrderStatusName = "鍙戝竷"; break; + case (int)OrderStatuses.fabu: orderDto.OrderStatusName = "鍙戝竷涓�"; break; case (int)OrderStatuses.zhaogongwanbi: orderDto.OrderStatusName = "鎷涘伐瀹屾瘯"; break; case (int)OrderStatuses.jiesuanwanbi: orderDto.OrderStatusName = "缁撶畻瀹屾瘯"; break; default: break; } - var orderBiddings = await orderBiddingRepository.CountAsync(x => x.OrderId == orderDto.Id && x.IsSelected == true && x.IsEn == true && x.IsDeleted == false); - orderDto.WorderCounted = orderBiddings; + var orderBidds = await orderBiddingRepository.GetListAsync(x => x.OrderId == orderDto.Id && x.IsEn == true && x.IsDeleted == false); + + //var orderBiddings = await orderBiddingRepository.CountAsync(x => x.OrderId == orderDto.Id && x.IsSelected == true && x.IsEn == true && x.IsDeleted == false); + orderDto.WorderCounted = orderBidds.Count(x=> x.IsSelected == true); + //var orderBiddingbaomings = await orderBiddingRepository.CountAsync(x => x.OrderId == orderDto.Id && x.IsEn == true && x.IsDeleted == false); + orderDto.BaoMingCount = orderBidds.Count; + // var orderBiddingbaomings = await orderBiddingRepository.CountAsync(x => x.OrderId == orderDto.Id && x.IsEn == true && x.IsDeleted == false); + orderDto.WorkerDaiCount = orderBidds.Count(x => x.IsSelected == null); } @@ -206,6 +212,7 @@ order.WorkerType = orderDto.WorkerType; order.WorkPrice = orderDto.WorkPrice; order.WorkPriceMax = orderDto.WorkPriceMax; + order.Zixinganpai = orderDto.Zixinganpai; order.OrderStatus = 0; order.IsEn = true; order.UpDataBy = NickName; @@ -538,8 +545,8 @@ JoinType.Inner, b.Id == c.OrderBiddingId, JoinType.Inner, b.WorkerUserId == d.UserId )) - .Where((a, b, c, d) => a.IsEn == true && a.IsDeleted == false && b.IsEn == true && b.IsDeleted == false && c.IsEn == true && c.IsDeleted == false - && b.IsSelected == true && userids.Contains(a.OrderUserId)) //a.OrderUserId == userid + .Where((a, b, c, d) => a.IsDeleted == false && b.IsEn == true && b.IsDeleted == false && c.IsEn == true && c.IsDeleted == false + && b.IsSelected == true && userids.Contains(a.OrderUserId)) //a.OrderUserId == userid a.IsEn == true && .WhereIF(page.WordDate.HasValue, (a, b, c, d) => (c.WorkDate == page.WordDate)) .WhereIF(page.WordDateStart.HasValue, (a, b, c, d) => (c.WorkDate >= page.WordDateStart)) .WhereIF(page.WordDateEnd.HasValue, (a, b, c, d) => (c.WorkDate <= page.WordDateEnd)) @@ -558,6 +565,7 @@ WorkPrice = a.WorkPrice, TodaySalary = c.TodaySalary, IsShenPi = c.IsShenPi, + ShenPitime = c.ShenPitime, WorkCount = c.WorkCount, WorkerUserId = b.WorkerUserId, WorkerUserName = d.name, @@ -716,6 +724,14 @@ //{ // throw Oops.Oh("璇ユ嫑宸ョ姸鎬佸凡鏃犳硶鎵撳崱纭锛�"); //} + if (orderBiddingDetail.IsShenPi.HasValue && orderBiddingDetail.IsShenPi == (int)IsShenPis.yishenpi && orderBiddingDetail.ShenPitime.HasValue && orderBiddingDetail.ShenPitime <= DateTime.Now.AddMinutes(-5)) + { + throw Oops.Oh("瀹℃壒鏃堕棿宸茬粡瓒呰繃5鍒嗛挓锛屾棤娉曢噸鏂板鎵癸紒"); + } + + + + var res = false; try { -- Gitblit v1.9.1