From 08a02f3c7990c563e6c770c1957e929377a3083f Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 19 二月 2025 13:39:33 +0800 Subject: [PATCH] 删除投递 --- cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs index e2557db..843f03c 100644 --- a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs +++ b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs @@ -453,6 +453,62 @@ /// <summary> + /// 鍏徃鍒犻櫎涓�涓姇閫掔殑宸ヤ汉 + /// </summary> + /// <returns></returns> + [Authorize] + [HttpPost] + public async Task<bool> saveDeltoudi(QueRenDto queRenDto) + { + + var UserID = App.User?.FindFirstValue("UserID"); + int userid = 0; + string NickName = App.User?.FindFirstValue("NickName"); + if (!string.IsNullOrEmpty(UserID)) + { + userid = int.Parse(UserID); + } + + var orderBiddingRes = new BaseRepository<OrderBidding>(); + var orderRes = new BaseRepository<Order>(); + + var orderBidding = await orderBiddingRes.GetByIdAsync(queRenDto.OrderBiddingId); + if (orderBidding == null || orderBidding.IsEn != true || orderBidding.IsDeleted == true) + { + throw Oops.Oh("璇ユ姇閫掑凡缁忔棤鏁堬紒"); + } + //if (orderBidding.IsSelected == true) + //{ + // throw Oops.Oh("璇ユ姇閫掑凡缁忓鏍革紝涓嶈兘涓嶅綍鐢紒"); + //} + + //var order = await orderRes.GetByIdAsync(orderBidding.OrderId); + //if (order == null || order.OrderStatus > 0) + //{ + // throw Oops.Oh("璇ユ嫑宸ョ姸鎬佸凡缁忔棤娉曟姇閫掞紒"); + //} + + + + + + bool res; + + orderBidding.IsDeleted = true; + //orderBidding.Selectedtime = DateTime.Now; + orderBidding.UpDataBy = NickName; + orderBidding.UpDataTime = DateTime.Now; + + + res = await orderBiddingRes.UpdateAsync(orderBidding); + + + + return res; + } + + + /// <summary> /// 鍏徃鍙栨秷閫夋嫨宸ヤ汉 /// </summary> /// <returns></returns> -- Gitblit v1.9.1