From 67e7737c88cbe47f595f9f4abfa8ab0f1082b056 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期三, 05 二月 2025 09:37:28 +0800
Subject: [PATCH] no message
---
cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs | 39 ++++++++++++++++++++++++++++-----------
1 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
index 8c9fd2a..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)
@@ -723,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