From 11750a157df699a29db1350da7599083b4a64374 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 03 九月 2025 14:17:29 +0800
Subject: [PATCH] 其他出库修改为存储过程

---
 Controllers/BaseController.cs |   31 +++++++++----------------------
 1 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/Controllers/BaseController.cs b/Controllers/BaseController.cs
index 3caae53..52ffce2 100644
--- a/Controllers/BaseController.cs
+++ b/Controllers/BaseController.cs
@@ -1,34 +1,21 @@
 锘縰sing Microsoft.AspNetCore.Mvc;
-using System;
+using Microsoft.Extensions.DependencyInjection;
 
 public class BaseController : ControllerBase
 {
-    protected string OrgId
+    private RequestInfo _requestInfo;
+
+    protected RequestInfo RequestInfo
     {
         get
         {
-            var orgId = GetOrgIdFromHeader();
-            if (string.IsNullOrEmpty(orgId))
+            if (_requestInfo == null)
             {
-                throw new ArgumentException("璇锋眰缁勭粐ID涓嶅瓨鍦紒璇锋鏌ヨ姹傚ご涓槸鍚﹀寘鍚湁鏁堢殑OrgId銆�");
+                //蹇呭~椤�
+                //_requestInfo.ValidateRequired("OrgId");
+                _requestInfo = HttpContext.RequestServices.GetService<RequestInfo>();
             }
-            return orgId;
+            return _requestInfo;
         }
-    }
-
-    private string GetOrgIdFromHeader()
-    {
-        if (HttpContext.Request.Headers.TryGetValue("OrgId", out var orgIdValue))
-        {
-            return orgIdValue.ToString();
-        }
-        return null;
-    }
-
-    // 鍙�夛細鎻愪緵涓�涓畨鍏ㄨ幏鍙朞rgId鐨勬柟娉曪紝涓嶆姏鍑哄紓甯歌�屾槸杩斿洖榛樿鍊兼垨null
-    protected bool TryGetOrgId(out string orgId)
-    {
-        orgId = GetOrgIdFromHeader();
-        return !string.IsNullOrEmpty(orgId);
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3