From 6b57612f6e9f7575d206e82955ffd989faaaf8b3 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期五, 12 九月 2025 13:24:15 +0800
Subject: [PATCH] 同步祈禧代码

---
 WebApi/Gs.QiTaCk/MesItemQtManager.cs                |    4 
 WebApi/Gs.Sys/Services/FmController.cs              |    3 
 WebApi/Gs.Warehouse/Services/MesDepotsManager.cs    |    9 +
 WebApi/Gs.Warehouse/Services/MesAutoRkController.cs |    5 
 WebApi/GS.QC/Service/MesQcExceptionalManager.cs     |  114 +---------------------
 WebApi/Gs.Sales/SalesDeliverManager.cs              |    2 
 WebApi/Gs.Wom/Service/MesScrksqDjManager.cs         |    2 
 WebApi/Gs.Toolbox/ExcelHelper.cs                    |  153 +++++++++---------------------
 WebApi/Gs.Entity/BaseInfo/MesDepots.cs              |    2 
 WebApi/Gs.Wom/Service/MesScrkDjManager.cs           |    2 
 WebApi/GS.QC/Service/MesQaItemsDetect01Manager.cs   |    4 
 11 files changed, 76 insertions(+), 224 deletions(-)

diff --git a/WebApi/GS.QC/Service/MesQaItemsDetect01Manager.cs b/WebApi/GS.QC/Service/MesQaItemsDetect01Manager.cs
index 1c1a94a..8e37230 100644
--- a/WebApi/GS.QC/Service/MesQaItemsDetect01Manager.cs
+++ b/WebApi/GS.QC/Service/MesQaItemsDetect01Manager.cs
@@ -299,7 +299,8 @@
     public ReturnDto<string> EditModel([FromBody] dynamic model)
     {
         Guid? guid = model.guid; //鍒拌揣鍗曚富閿�
-        string fngDesc = model.fngDesc; //澶囨敞
+        string fngDesc = model.fngDesc; //寮傚父鎻忚堪
+        string iqcRemark = model.iqcRemark;
         string ckId=model.ckId;
         var _outMsg = "";
         var _outSum = -1;
@@ -319,6 +320,7 @@
                         new("@inOrderGuid", UtilityHelper.CheckGuid(guid) ? guid: DBNull.Value),
                         new("@fngDesc", fngDesc),
                         new("@ckId", ckId),
+                        new("@iqcRemark", iqcRemark),
                     };
                     parameters[0].Direction = ParameterDirection.Output;
                     parameters[1].Direction = ParameterDirection.Output;
diff --git a/WebApi/GS.QC/Service/MesQcExceptionalManager.cs b/WebApi/GS.QC/Service/MesQcExceptionalManager.cs
index 3dede03..1b1fdb7 100644
--- a/WebApi/GS.QC/Service/MesQcExceptionalManager.cs
+++ b/WebApi/GS.QC/Service/MesQcExceptionalManager.cs
@@ -1,16 +1,15 @@
-锘縰sing Gs.Toolbox;
+锘縰sing System.Data;
+using System.Data.SqlClient;
+using System.Dynamic;
+using Gs.Toolbox;
 using Gs.Toolbox.ApiCore.Abstract.Mvc;
 using Gs.Toolbox.ApiCore.Common.Mvc;
 using Gs.Toolbox.ApiCore.Group;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
-using System.Data;
-using System.Data.SqlClient;
-using System.Dynamic;
-using System.Text;
 using static Gs.Toolbox.UtilityHelper;
 
-namespace Gs.Wom.Service;
+namespace GS.QC.Service;
 
 [ApiGroup(ApiGroupNames.QC)]
 public class MesQcExceptionalManager : IRomteService
@@ -130,7 +129,7 @@
     }
 
     /// <summary>
-    ///   瀹℃牳
+    ///   
     /// </summary>
     /// <param name="mode"></param>
     /// <returns></returns>
@@ -184,107 +183,6 @@
             }
         }
         return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Success, "鎿嶄綔鎴愬姛锛�");
-    }
-
-    /// <summary>
-    /// 澧炲姞鎴栫紪杈戝疄浣�-浠呭鐞嗘槑缁嗘暟鎹殑缂栬緫鎿嶄綔
-    /// </summary>
-    /// <param name="model">鍖呭惈鏄庣粏鍒楄〃鐨勬ā鍨�</param>
-    /// <returns>澶勭悊缁撴灉</returns>
-    [RequestMethod(RequestMethods.POST)]
-    public ReturnDto<ExpandoObject> EditModel([FromBody] dynamic model)
-    {
-        // 鍒濆鍖栧瓧绗︿覆鏋勫缓鍣ㄥ鐞嗘槑缁嗘暟鎹�
-        Guid? guid = model.guid; //涓婚敭
-        var _sb = new StringBuilder();
-        var _split = "|";  // 瀛楁鍒嗛殧绗�
-        var _lineSeparator = "~";  // 琛屽垎闅旂
-
-        // 澶勭悊鏄庣粏鍒楄〃锛岃浆鎹负瀛樺偍杩囩▼鎵�闇�鏍煎紡
-        foreach (var m in model.list)
-        {
-            // 鑾峰彇鏄庣粏椤逛富閿紙鍙负绌猴紝鏂板鏃朵负绌猴級
-            string _guid = m.Guid?.ToString() ?? Guid.Empty.ToString();
-             
-
-            // 鎷兼帴鍗曡鏄庣粏鏁版嵁锛殀鐢宠鏁伴噺|澶囨敞|鏄庣粏GUID
-            var _line = m.BatchQty + _split + m.GfRkqty + _split + m.LfRkqtyz + _split + m.HandResult + _split
-                + m.ChooseType + _split + m.Process + _split
-                + (UtilityHelper.CheckGuid(_guid) ? _guid : Guid.Empty.ToString());
-
-            // 澶氭潯鏄庣粏闂存坊鍔犲垎闅旂
-            if (_sb.Length > 0)
-                _sb.Append(_lineSeparator);
-            _sb.Append(_line);
-        }
-
-        // 鍑嗗杩斿洖缁撴灉瀵硅薄
-        dynamic mObj = new ExpandoObject();
-        mObj.outMsg = "";       // 鎿嶄綔娑堟伅
-        mObj.outSum = -1;       // 鎿嶄綔缁撴灉鐘舵�侊紙-1琛ㄧず澶辫触锛�
-        mObj.outGuid = "";      // 鍙繚鐣欑敤浜庤繑鍥炴槑缁嗙浉鍏崇殑GUID
-        mObj.outNo = "";        // 鍙繚鐣欑敤浜庤繑鍥炴槑缁嗙浉鍏崇殑缂栧彿
-
-        // 璋冪敤瀛樺偍杩囩▼澶勭悊鏄庣粏鏁版嵁
-        using (var conn = new SqlConnection(DbHelperSQL.strConn))
-        {
-            using (var cmd = new SqlCommand("[prc_Qcyc_edt]", conn))  // 寤鸿淇敼瀛樺偍杩囩▼鍚嶄负鏄庣粏涓撶敤
-            {
-                try
-                {
-                    conn.Open();
-                    cmd.CommandType = CommandType.StoredProcedure;
-
-                    // 瀹氫箟瀛樺偍杩囩▼鍙傛暟锛堜粎淇濈暀涓庢槑缁嗙浉鍏崇殑鍙傛暟锛�
-                    SqlParameter[] parameters =
-                    {
-                    new("@outMsg", SqlDbType.NVarChar, 300),    // 杈撳嚭锛氭搷浣滄秷鎭�
-                    new("@outSum", SqlDbType.Int),             // 杈撳嚭锛氱粨鏋滅姸鎬侊紙>0琛ㄧず鎴愬姛锛�
-                    new("@outGuid", SqlDbType.UniqueIdentifier),// 杈撳嚭锛氬彲杩斿洖澶勭悊鍚庣殑鏄庣粏鍏宠仈ID
-                    new("@outNo", SqlDbType.NVarChar, 300),    // 杈撳嚭锛氬彲杩斿洖鏄庣粏鐩稿叧缂栧彿
-                    new("@inOrderGuid",UtilityHelper.CheckGuid(guid)? guid : DBNull.Value),//涓昏〃GUID
-                    new("@inEdtUserGuid", _userGuid),          // 杈撳叆锛氭搷浣滅敤鎴稧UID
-                    new("@inLineList", _sb.ToString())         // 杈撳叆锛氬鐞嗗悗鐨勬槑缁嗗瓧绗︿覆
-                };
-
-                    // 璁剧疆杈撳嚭鍙傛暟鏂瑰悜
-                    parameters[0].Direction = ParameterDirection.Output;
-                    parameters[1].Direction = ParameterDirection.Output;
-                    parameters[2].Direction = ParameterDirection.Output;
-                    parameters[3].Direction = ParameterDirection.Output;
-
-                    // 娣诲姞鍙傛暟鍒板懡浠ゅ璞�
-                    foreach (var parameter in parameters)
-                        cmd.Parameters.Add(parameter);
-
-                    // 鎵ц瀛樺偍杩囩▼
-                    cmd.ExecuteNonQuery();
-
-                    // 浠庤緭鍑哄弬鏁拌幏鍙栫粨鏋�
-                    mObj.outMsg = parameters[0].Value?.ToString() ?? "澶勭悊鎴愬姛";
-                    mObj.outSum = int.TryParse(parameters[1].Value?.ToString(), out int sum) ? sum : -1;
-                    mObj.outGuid = parameters[2].Value?.ToString() ?? "";
-                    mObj.outNo = parameters[3].Value?.ToString() ?? "";
-                }
-                catch (Exception ex)
-                {
-                    // 璁板綍寮傚父鏃ュ織
-                    LogHelper.Debug(ToString(), $"澶勭悊鏄庣粏鏃跺嚭閿欙細{ex.Message}");
-                    mObj.outMsg = ex.Message;
-                    mObj.outSum = -1;
-                }
-                finally
-                {
-                    conn.Close();
-                }
-            }
-        }
-
-        // 鏍规嵁澶勭悊缁撴灉杩斿洖瀵瑰簲鐘舵��
-        if (mObj.outSum <= 0)
-            return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Exception, mObj.outMsg);
-
-        return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Success, mObj.outMsg);
     }
 
 
diff --git a/WebApi/Gs.Entity/BaseInfo/MesDepots.cs b/WebApi/Gs.Entity/BaseInfo/MesDepots.cs
index 8da698f..415efb7 100644
--- a/WebApi/Gs.Entity/BaseInfo/MesDepots.cs
+++ b/WebApi/Gs.Entity/BaseInfo/MesDepots.cs
@@ -245,4 +245,6 @@
     /// </summary>
     [SugarColumn(IsIgnore = true)]
     public string? OrgId { get; set; }
+
+    
 }
\ No newline at end of file
diff --git a/WebApi/Gs.QiTaCk/MesItemQtManager.cs b/WebApi/Gs.QiTaCk/MesItemQtManager.cs
index 0accc3d..4e5a3c9 100644
--- a/WebApi/Gs.QiTaCk/MesItemQtManager.cs
+++ b/WebApi/Gs.QiTaCk/MesItemQtManager.cs
@@ -209,6 +209,7 @@
             string inKcfx = model.inKcfx;//搴撳瓨鏂瑰悜
             string inSource = model.inSource;
             string qtlx = model.qtlx;//鍚庢潵澧炲姞鐨勭被鍨�
+            string wwgys = model.wwgys;//鍚庢潵澧炲姞涓婄殑濮斿渚涘簲鍟�
             var _sb = new StringBuilder();
             var _split = "|";
             foreach (var m in model.list)
@@ -256,7 +257,8 @@
                         new("@inEdtUserGuid", _userGuid),
                         new("@inLineList", _sb.ToString()),
                         new("@inSource", inSource),
-                        new("@qtlx", qtlx)
+                        new("@qtlx", qtlx),
+                       new("@wwgys", wwgys),
                     };
                         parameters[0].Direction = ParameterDirection.Output;
                         parameters[1].Direction = ParameterDirection.Output;
diff --git a/WebApi/Gs.Sales/SalesDeliverManager.cs b/WebApi/Gs.Sales/SalesDeliverManager.cs
index 4ff86b1..7171cbb 100644
--- a/WebApi/Gs.Sales/SalesDeliverManager.cs
+++ b/WebApi/Gs.Sales/SalesDeliverManager.cs
@@ -10,7 +10,7 @@
 using Microsoft.AspNetCore.Mvc;
 using static Gs.Toolbox.UtilityHelper;
 
-namespace Gs.Warehouse.Services;
+namespace Gs.Sales;
 
 
 /// <summary>
diff --git a/WebApi/Gs.Sys/Services/FmController.cs b/WebApi/Gs.Sys/Services/FmController.cs
index 8e5b3a8..974f493 100644
--- a/WebApi/Gs.Sys/Services/FmController.cs
+++ b/WebApi/Gs.Sys/Services/FmController.cs
@@ -204,7 +204,8 @@
             }
             catch (Exception ex)
             {
-                LogHelper.Debug(ToString(), ex.Message);
+                LogHelper.Debug(ToString(), ex.Message+ ",formPath:"+ formPath+ ",_userGuid:"+ _userGuid);
+
             }
             return ReturnDto<string>.QuickReturn(strMsg, ReturnCode.Success, "璇诲彇鎴愬姛锛�");
         }
diff --git a/WebApi/Gs.Toolbox/ExcelHelper.cs b/WebApi/Gs.Toolbox/ExcelHelper.cs
index b654eb7..beee68d 100644
--- a/WebApi/Gs.Toolbox/ExcelHelper.cs
+++ b/WebApi/Gs.Toolbox/ExcelHelper.cs
@@ -1032,9 +1032,6 @@
         }
         setCellVal(sheet, _idx, 0, "鐢熶骇杞﹂棿锛�" + (row0["workShop"]?.ToString() ?? ""));
         sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 0, 5));
-
-        setCellVal(sheet, _idx, 12, "瀹ゆ俯锛�" + (row0["temperature"]?.ToString() ?? ""));
-        sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 12, 17));
         _idx++;
 
         // 绗�3琛岋細浜у搧淇℃伅
@@ -1053,11 +1050,9 @@
         sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 6, 11));
         setCellVal(sheet, _idx, 6, row0["itemModel"]?.ToString() ?? "");
 
-        setCellVal(sheet, _idx, 12, "鐢靛帇");
-        setCellVal(sheet, _idx, 13, row0["voltage"]?.ToString() ?? "");
-
-        setCellVal(sheet, _idx, 14, "绾垮彿");
-        setCellVal(sheet, _idx, 15, row0["lineNo"]?.ToString() ?? "");
+        setCellVal(sheet, _idx, 12, "绾垮彿");
+        sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 13, 15));
+        setCellVal(sheet, _idx, 13, row0["lineNo"]?.ToString() ?? "");
         _idx++;
 
         // 绗�4琛岋細鍟嗘爣绛変俊鎭�
@@ -1127,6 +1122,32 @@
         setCellVal(sheet, _idx, 11, row0["sampleSize3"]?.ToString() ?? "");
         _idx++;
 
+        int num;
+        if(row0["SampleMethod"]?.ToString() == "鍖�閫�")
+        {
+            if (int.TryParse(row0["sampleSize1"]?.ToString(), out int size))
+            {
+                num = size;
+            }
+            else
+            {
+                num = 0;
+            }
+        }
+        else
+        {
+            if (int.TryParse(row0["sampleSize2"]?.ToString(), out int size))
+            {
+                num = size;
+            }
+            else
+            {
+                num = 0;
+            }
+        }
+        if (num > 16)
+            num = 16;
+
         // 绗�7琛岋細妫�楠岄」鐩〃澶�
         IRow headerRow = sheet.CreateRow(_idx);
         headerRow.HeightInPoints = rowHeight;
@@ -1137,10 +1158,8 @@
         }
         setCellVal(sheet, _idx, 0, "椤圭洰");
         setCellVal(sheet, _idx, 1, "鏍囧噯");
-        setCellVal(sheet, _idx, 2, "1");
-        setCellVal(sheet, _idx, 3, "2");
         // 鏍规嵁闇�瑕佺户缁坊鍔犳洿澶氬垪鏍囬锛岃繖閲岀畝鍖栦负涓昏鍒�
-        for (int i = 4; i < 18; i++)
+        for (int i = 2; i < num+2; i++)
         {
             setCellVal(sheet, _idx, i, (i-1).ToString());
         }
@@ -1165,7 +1184,7 @@
                 setCellVal(sheet, _idx, 1, rrr["RPB004"]?.ToString() ?? "");
 
                 // 濉厖16涓祴璇曞��
-                for (int i = 0; i < 16; i++)
+                for (int i = 0; i < num; i++)
                 {
                     string colName = $"RPB{i + 5:D3}"; // RPB005, RPB006, ..., RPB020
                     if (rrr.Table.Columns.Contains(colName))
@@ -1261,7 +1280,7 @@
         }
 
         // 妫�楠屽垽瀹氬尯鍩燂紙3琛屽竷灞�锛�
-        for (int judgeRowIndex = 0; judgeRowIndex < 3; judgeRowIndex++)
+        for (int judgeRowIndex = 0; judgeRowIndex < 2; judgeRowIndex++)
         {
             IRow judgmentRow = sheet.CreateRow(_idx);
             judgmentRow.HeightInPoints = rowHeight;
@@ -1275,103 +1294,25 @@
             {
                 // 绗竴琛岋細妫�楠屽垽瀹�
                 setCellVal(sheet, _idx, 0, "妫�楠屽垽瀹�");
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx + 2, 0, 0)); // 妫�楠屽垽瀹氳法3琛�
+                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx + 1, 0, 0)); // 淇敼涓鸿法2琛岃�屼笉鏄�3琛�
+                setCellVal(sheet, _idx, 1, row0["CheckResult"]?.ToString() ?? "");
+                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 1, 5)); // 鍙悎骞跺綋鍓嶈
 
-                if (row0["CheckResult"]?.ToString() == "鍚堟牸")
-                {
-                    setCellVal(sheet, _idx, 1, "鈭� 鍚堟牸    鈻� 涓嶅悎鏍�");
-                }
-                else if(row0["CheckResult"]?.ToString() == "涓嶅悎鏍�")
-                {
-                    setCellVal(sheet, _idx, 1, "鈻� 鍚堟牸    鈭� 涓嶅悎鏍�");
-                }
-                else
-                {
-                    setCellVal(sheet, _idx, 1, "鈻� 鍚堟牸    鈻� 涓嶅悎鏍�");
-                }
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx + 1, 1, 5)); // 鍚堟牸/涓嶅悎鏍艰法2琛�
-
-                setCellVal(sheet, _idx, 6, "瀹℃牳");
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx + 2, 6, 6)); // 瀹℃牳璺�3琛�
-
-                if (row0["ProcessResults"]?.ToString() == "鏃�")
-                {
-                    setCellVal(sheet, _idx, 7, "鈭� 鏃�    鈻� 杩斿伐");
-                }
-                else if (row0["ProcessResults"]?.ToString() == "杩斿伐")
-                {
-                    setCellVal(sheet, _idx, 7, "鈻� 鏃�    鈭� 杩斿伐");
-                }
-                else
-                {
-                    setCellVal(sheet, _idx, 7, "鈻� 鏃�    鈻� 杩斿伐");
-                }
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 7, 11));
-
-                setCellVal(sheet, _idx, 12, "瀹℃壒");
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx + 2, 12, 12)); // 瀹℃壒璺�3琛�
-
-                if (row0["ProcessResults"]?.ToString() == "鏃�")
-                {
-                    setCellVal(sheet, _idx, 13, "鈭� 鏃�    鈻� 杩斿伐");
-                }
-                else if (row0["ProcessResults"]?.ToString() == "杩斿伐")
-                {
-                    setCellVal(sheet, _idx, 13, "鈻� 鏃�    鈭� 杩斿伐");
-                }
-                else
-                {
-                    setCellVal(sheet, _idx, 13, "鈻� 鏃�    鈻� 杩斿伐");
-                }
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 13, 17));
+                setCellVal(sheet, _idx, 6, "妫�楠岀鍚�");
+                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 7, 10)); // 鍙悎骞跺綋鍓嶈
+                setCellVal(sheet, _idx, 7, row0["JY_NAME"]?.ToString() ?? "");
+                setCellVal(sheet, _idx, 11, "瀹℃牳绛惧悕");
+                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 12, 16)); // 鍙悎骞跺綋鍓嶈
+                setCellVal(sheet, _idx, 12, row0["CHECK_USER"]?.ToString() ?? "");
             }
             else if (judgeRowIndex == 1)
             {
-                if (row0["ProcessResults"]?.ToString() == "璁╂鎺ユ敹")
-                {
-                    setCellVal(sheet, _idx, 7, "鈭� 璁╂鎺ユ敹    鈻� 鐗归噰");
-                }
-                else if (row0["ProcessResults"]?.ToString() == "鐗归噰")
-                {
-                    setCellVal(sheet, _idx, 7, "鈻� 璁╂鎺ユ敹    鈭� 鐗归噰");
-                }
-                else
-                {
-                    setCellVal(sheet, _idx, 7, "鈻� 璁╂鎺ユ敹    鈻� 鐗归噰");
-                }
-                // 绗簩琛岋細璁╂鎺ユ敹閫夐」
-                
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 7, 11));
-
-                if (row0["ProcessResults"]?.ToString() == "璁╂鎺ユ敹")
-                {
-                    setCellVal(sheet, _idx, 13, "鈭� 璁╂鎺ユ敹    鈻� 鐗归噰");
-                }
-                else if (row0["ProcessResults"]?.ToString() == "鐗归噰")
-                {
-                    setCellVal(sheet, _idx, 13, "鈻� 璁╂鎺ユ敹    鈭� 鐗归噰");
-                }
-                else
-                {
-                    setCellVal(sheet, _idx, 13, "鈻� 璁╂鎺ユ敹    鈻� 鐗归噰");
-                }
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 13, 17));
-            }
-            else
-            {
-                // 绛惧悕琛�
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 1, 2));
-                setCellVal(sheet, _idx, 1, $"绛惧悕/鏃ユ湡锛�");
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 3, 5));
-                setCellVal(sheet, _idx, 3, $"{row0["JY_USER"]?.ToString() ?? ""}/{row0["JY_DATE"]?.ToString() ?? ""}");
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 7, 8));
-                setCellVal(sheet, _idx, 7, $"绛惧悕/鏃ユ湡锛�");
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 9, 11));
-                setCellVal(sheet, _idx, 9, $"{row0["CHECK_USER"]?.ToString() ?? ""}/{row0["CHECK_DATE"]?.ToString() ?? ""}");
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 13, 14));
-                setCellVal(sheet, _idx, 13, $"绛惧悕/鏃ユ湡锛�");
-                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 15, 17));
-                setCellVal(sheet, _idx, 15, $"{row0["SP_USER"]?.ToString() ?? ""}/{row0["SP_DATE"]?.ToString() ?? ""}");
+                setCellVal(sheet, _idx, 6, "妫�楠屾棩鏈�");
+                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 7, 10)); // 鍙悎骞跺綋鍓嶈
+                setCellVal(sheet, _idx, 7, row0["JY_DATE"]?.ToString() ?? "");
+                setCellVal(sheet, _idx, 11, "瀹℃牳鏃ユ湡");
+                sheet.AddMergedRegion(new CellRangeAddress(_idx, _idx, 12, 16)); // 鍙悎骞跺綋鍓嶈
+                setCellVal(sheet, _idx, 12, row0["CHECK_DATE"]?.ToString() ?? "");
             }
             _idx++;
         }
diff --git a/WebApi/Gs.Warehouse/Services/MesAutoRkController.cs b/WebApi/Gs.Warehouse/Services/MesAutoRkController.cs
index 0c0f480..0d95879 100644
--- a/WebApi/Gs.Warehouse/Services/MesAutoRkController.cs
+++ b/WebApi/Gs.Warehouse/Services/MesAutoRkController.cs
@@ -1,18 +1,15 @@
 锘縰sing System.Data;
 using System.Data.SqlClient;
 using System.Dynamic;
-using System.Text;
 using Gs.Toolbox;
 using Gs.Toolbox.ApiCore.Abstract.Mvc;
 using Gs.Toolbox.ApiCore.Common.Mvc;
 using Gs.Toolbox.ApiCore.Group;
-using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
-using Newtonsoft.Json.Linq;
 using static Gs.Toolbox.UtilityHelper;
 
-namespace Gs.Wom.WorkService
+namespace Gs.Warehouse.Services
 {
 
     [ApiGroup(ApiGroupNames.WOM)]
diff --git a/WebApi/Gs.Warehouse/Services/MesDepotsManager.cs b/WebApi/Gs.Warehouse/Services/MesDepotsManager.cs
index 07b72ba..3815d20 100644
--- a/WebApi/Gs.Warehouse/Services/MesDepotsManager.cs
+++ b/WebApi/Gs.Warehouse/Services/MesDepotsManager.cs
@@ -99,6 +99,7 @@
         var sortName = string.IsNullOrEmpty(model.sortName) ? "a.PAGE_GROUP" : model.sortName;
         var keyWhere = model.keyWhere;
         string keyType = model.keyType;
+        string keyWord = model.keyWord;
         var sbSql = new StringBuilder();
         sbSql.Append("  SELECT * FROM ");
         sbSql.Append(" (SELECT N'(' +[Org].[FNumber] + N')'  +[Org].[NAME]  AS [FSubsidiary2] ,");
@@ -107,6 +108,14 @@
         sbSql.Append(" [f].[supp_name] AS [SuppLierId] , [g].[departmentname] AS [department2] ,");
         sbSql.Append(" ( CASE  WHEN ( [a].[is_ng] = N'A' ) THEN N'姝e父'  ELSE N'绂佺敤' END ) AS [IsNg] ");
         sbSql.Append(", [a].*,ROW_NUMBER() OVER(ORDER BY org.FNumber asc ,a.depot_code asc) AS RowIndex ");
+        if (string.IsNullOrEmpty(keyWord))
+        {
+            sbSql.Append(",'' as kcQty");
+        }
+        else
+        {
+            sbSql.Append(", isnull((select top 1 搴撳瓨瀵规瘮 from [dbo].[鍗虫椂搴撳瓨宸紓琛╙ where 鐗╂枡ID=" + keyWord + " and 浠撳簱ID=[a].[depot_id]),'('+a.depot_name+')0/0') AS [kcQty]  ");
+        }
         if (string.IsNullOrEmpty(keyType))
         {
             sbSql.Append(",cast(0 as bit) as chkInt");
diff --git a/WebApi/Gs.Wom/Service/MesScrkDjManager.cs b/WebApi/Gs.Wom/Service/MesScrkDjManager.cs
index e6790b8..428ebf4 100644
--- a/WebApi/Gs.Wom/Service/MesScrkDjManager.cs
+++ b/WebApi/Gs.Wom/Service/MesScrkDjManager.cs
@@ -10,7 +10,7 @@
 using static Gs.Toolbox.UtilityHelper;
 
 
-namespace Gs.Warehouse.Services;
+namespace Gs.Wom.Service;
 
 [ApiGroup(ApiGroupNames.PerMission)]
 public class MesScrkDjManager :IRomteService
diff --git a/WebApi/Gs.Wom/Service/MesScrksqDjManager.cs b/WebApi/Gs.Wom/Service/MesScrksqDjManager.cs
index 3b18c66..88c021a 100644
--- a/WebApi/Gs.Wom/Service/MesScrksqDjManager.cs
+++ b/WebApi/Gs.Wom/Service/MesScrksqDjManager.cs
@@ -10,7 +10,7 @@
 using static Gs.Toolbox.UtilityHelper;
 
 
-namespace Gs.Warehouse.Services;
+namespace Gs.Wom.Service;
 
 [ApiGroup(ApiGroupNames.PerMission)]
 public class MesScrksqDjManager :IRomteService

--
Gitblit v1.9.3