From 5856a6e5de198436bc112923609db21c9a45fd10 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 01 七月 2025 15:58:42 +0800
Subject: [PATCH] 增加公司收藏工人的功能

---
 cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs |  103 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 103 insertions(+), 0 deletions(-)

diff --git a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
index e2557db..72105d6 100644
--- a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
+++ b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs
@@ -337,6 +337,53 @@
 
 
 
+        /// <summary>
+        /// 鍏徃鏀惰棌宸ヤ汉
+        /// </summary>
+        /// <returns></returns>
+        [Authorize]
+        [HttpPost]
+        public async Task<bool> ShoucangGongren(ShoucangDto shoucangDto)
+        {
+
+            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 orderBidding = await orderBiddingRes.GetByIdAsync(shoucangDto.OrderBiddingId);
+            if (orderBidding == null || orderBidding.IsEn != true || orderBidding.IsDeleted == true)
+            {
+                throw Oops.Oh("璇ユ姇閫掑凡缁忔棤鏁堬紒");
+            } 
+
+          
+
+
+
+            bool res;
+
+            orderBidding.IsCollect = shoucangDto.IsCollect;
+        
+            orderBidding.UpDataBy = NickName;
+            orderBidding.UpDataTime = DateTime.Now;
+
+
+            res = await orderBiddingRes.UpdateAsync(orderBidding);
+
+            
+
+            return res;
+        }
+
+
+
+
 
         /// <summary>
         /// 鍏徃淇敼宸ヤ汉宸ヤ环
@@ -453,6 +500,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