From d86bc04d0b34f2b7d9ddbd30ee703b51d48876e8 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 05 二月 2025 09:51:15 +0800 Subject: [PATCH] 修改审核中员工排在前边 --- cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs | 31 ++++++++++++++++++++----------- 1 files changed, 20 insertions(+), 11 deletions(-) diff --git a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs index 2ef7988..e2557db 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; @@ -226,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; @@ -545,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)) @@ -565,6 +573,7 @@ WorkPrice = a.WorkPrice, TodaySalary = c.TodaySalary, IsShenPi = c.IsShenPi, + ShenPitime = c.ShenPitime, WorkCount = c.WorkCount, WorkerUserId = b.WorkerUserId, WorkerUserName = d.name, @@ -618,17 +627,17 @@ } } - + //褰撳墠鏈夋晥鐨勫伐浠� + var orderBiddingWorkPrices = await orderBiddingWorkPriceRepository.GetListAsync(x => x.OrderBiddingId == dakaDto.OrderBiddingId && x.IsEn == true && x.IsDeleted == false && x.EffectTime <= dakaDto.WorkDate); + var orderBiddingWorkPrice = orderBiddingWorkPrices.OrderByDescending(x => x.Id).FirstOrDefault(); + if (orderBiddingWorkPrice != null) + { + dakaDto.WorkPrice = orderBiddingWorkPrice.WorkPrice; + } //濡傛灉褰撳ぉ杩樻病鏈夊~鍐欑敵璇凤紝鍒欒绠楀伐浣滄椂闂村拰宸ヨ祫 if (dakaDto.IsShenPi == 0) { - //褰撳墠鏈夋晥鐨勫伐浠� - var orderBiddingWorkPrices = await orderBiddingWorkPriceRepository.GetListAsync(x=>x.OrderBiddingId == dakaDto.OrderBiddingId && x.IsEn == true && x.IsDeleted == false && x.EffectTime <= dakaDto.WorkDate ); - var orderBiddingWorkPrice = orderBiddingWorkPrices.OrderByDescending(x => x.Id).FirstOrDefault(); - if (orderBiddingWorkPrice != null) - { - dakaDto.WorkPrice = orderBiddingWorkPrice.WorkPrice; - } + dakaDto.WorkTime = hours + (minutes / 60); if (dakaDto.WorkerType == 0) -- Gitblit v1.9.1