From 5a72c00dca19dd6dd9be9db9e14f00f512f93f02 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 29 十月 2024 13:10:22 +0800 Subject: [PATCH] 小修改 --- cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs | 24 +++++++++++++++++++++--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs index 6026127..ec6c8b1 100644 --- a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs +++ b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs @@ -101,7 +101,7 @@ { 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; @@ -212,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; @@ -225,6 +226,14 @@ } else { + if (orderDto.OldId > 0) + { + //鍒犻櫎鏃х殑涓嬫灦璁㈠崟 + var order1 = await orderRes.GetByIdAsync(orderDto.OldId); + order1.IsDeleted = true; + res = await orderRes.UpdateAsync(order1); + } + var order = _mapper.Map<Order>(orderDto); order.UpDataBy = NickName; order.UpDataTime = DateTime.Now; @@ -544,8 +553,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)) @@ -564,6 +573,7 @@ WorkPrice = a.WorkPrice, TodaySalary = c.TodaySalary, IsShenPi = c.IsShenPi, + ShenPitime = c.ShenPitime, WorkCount = c.WorkCount, WorkerUserId = b.WorkerUserId, WorkerUserName = d.name, @@ -722,6 +732,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