From ba61740dd99fffa9c20e99cb987eb690268c7c5c Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期四, 18 十二月 2025 17:59:26 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db |    0 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db      |    0 
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/LogHelper/LoggerHelper.cs                                   |  187 +++++++++++++++++++++++++++++++++++++
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs                                             |   40 +++++++-
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs                               |    2 
 项目代码/WIDESEA_WMSClient/src/views/outbound/outPicking.vue                                                |   28 ++++-
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Jobs/QuartzJobMildd.cs                                 |   26 ++--
 7 files changed, 259 insertions(+), 24 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
index 7301271..1d56456 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/outbound/outPicking.vue"
@@ -1379,17 +1379,33 @@
 
 /* Element Plus Loading 閬僵灞傛牱寮忎慨澶� */
 ::v-deep .el-loading-mask {
-    background-color: rgba(255, 255, 255, 0.8);
-    z-index: 2000;
+    background-color: rgba(255, 255, 255, 0.8) !important;
+    z-index: 9999 !important;
+    position: fixed !important;
+    top: 0 !important;
+    left: 0 !important;
+    right: 0 !important;
+    bottom: 0 !important;
+    display: flex !important;
+    justify-content: center !important;
+    align-items: center !important;
 }
 
 ::v-deep .el-loading-spinner {
-    z-index: 2001;
+    z-index: 10000 !important;
+    margin-top: -21px !important;
 }
 
 ::v-deep .el-loading-text {
-    color: #409EFF;
-    font-weight: bold;
-    font-size: 14px;
+    color: #409EFF !important;
+    font-weight: bold !important;
+    font-size: 16px !important;
+    margin-top: 15px !important;
+}
+
+/* 纭繚瀹瑰櫒鐩稿瀹氫綅 */
+.picking-container {
+    position: relative !important;
+    min-height: 100vh;
 }
 </style>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
index 0667523..38462b5 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
index 3e55c8a..84a3942 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/LogHelper/LoggerHelper.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/LogHelper/LoggerHelper.cs"
new file mode 100644
index 0000000..49008cc
--- /dev/null
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/LogHelper/LoggerHelper.cs"
@@ -0,0 +1,187 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEAWCS_Core.LogHelper
+{
+    public class LoggerHelper
+    {
+        // 璇诲啓閿侊紝纭繚澶氱嚎绋嬬幆澧冧笅鏃ュ織鍐欏叆鐨勭嚎绋嬪畨鍏�
+        static ReaderWriterLockSlim LogWriteLock = new ReaderWriterLockSlim();
+
+        // 鏃ュ織鏂囦欢澶硅矾寰�
+        static string folderPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Log");
+
+        // 璁板綍鏃ュ織鐨勯槦鍒�
+        static Queue<string> logQueue = new Queue<string>();
+
+        static LoggerHelper()
+        {
+            try
+            {
+                if (!Directory.Exists(folderPath))
+                {
+                    Directory.CreateDirectory(folderPath);
+                }
+            }
+            catch (Exception ex)
+            {
+                Debug.WriteLine(ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="ex"></param>
+        /// <param name="filePath"></param>
+        public static void WriteError(Exception ex, string filePath = "")
+        {
+            StringBuilder builder = new StringBuilder();
+            builder.Append("閿欒淇℃伅锛�");
+            builder.Append(ex.Message);
+            builder.Append(Environment.NewLine);
+            builder.Append("閿欒婧愶細");
+            builder.Append(ex.Source);
+            builder.Append(Environment.NewLine);
+            builder.Append("閿欒鍫嗘爤锛�");
+            builder.Append(ex.StackTrace);
+            builder.Append(Environment.NewLine);
+            builder.Append("閿欒绫诲瀷锛�");
+            builder.Append(ex.GetType().ToString());
+            builder.Append(Environment.NewLine);
+            builder.Append("閿欒鏂规硶锛�");
+            builder.Append(ex.TargetSite?.ToString());
+            builder.Append(Environment.NewLine);
+            builder.Append(Environment.NewLine);
+
+            WriteLogToFile($"Error_", builder.ToString(), filePath);
+        }
+
+        /// <summary>
+        /// 灏嗘棩蹇楀唴瀹瑰啓鍏ユ寚瀹氭枃浠�
+        /// </summary>
+        /// <param name="fileName">鏃ュ織鏂囦欢鍚�</param>
+        /// <param name="log">瑕佽褰曠殑鏃ュ織鍐呭</param>
+        /// <remarks>
+        /// 璇ユ柟娉曚細纭繚绾跨▼瀹夊叏鍦板啓鍏ユ棩蹇楋紝鑻ョ洰褰曚笉瀛樺湪浼氳嚜鍔ㄥ垱寤猴紝
+        /// 鏃ュ織鍐呭浼氳嚜鍔ㄦ坊鍔犳椂闂存埑骞惰拷鍔犲埌鏂囦欢鏈熬
+        /// </remarks>
+        public static void WriteLogToFile(string fileName, string log, string filePath = "")
+        {
+            try
+            {
+                // 杩涘叆鍐欓攣
+                LogWriteLock.EnterWriteLock();
+
+                string path = string.IsNullOrEmpty(filePath) ? folderPath : filePath;
+
+                // 濡傛灉鏂囦欢澶逛笉瀛樺湪锛屽垯鍒涘缓鏂囦欢澶�
+                if (!Directory.Exists(path))
+                {
+                    Directory.CreateDirectory(path);
+                }
+                // 鑾峰彇鏃ュ織鏂囦欢璺緞
+                string logFilePath = Path.Combine(path, GetLastAccessFileName(fileName, path));
+                // 鑾峰彇褰撳墠鏃堕棿
+                DateTime now = DateTime.Now;
+                // 鏋勯�犳棩蹇楀唴瀹�
+                string logContent = $"銆恵now}銆憑Environment.NewLine}{log}";
+
+                // 灏嗘棩蹇楀唴瀹硅拷鍔犲埌鏃ュ織鏂囦欢涓�
+                File.AppendAllText(logFilePath, logContent);
+
+                WriteCompleted();
+            }
+            catch { }
+            finally
+            {
+                // 閫�鍑哄啓閿�
+                LogWriteLock.ExitWriteLock();
+            }
+        }
+        static int size = 10 * 1024 * 1024;
+
+        /// <summary>
+        /// 鑾峰彇鏈�鍚庝竴涓彲鐢ㄧ殑鏃ュ織鏂囦欢鍚�
+        /// </summary>
+        /// <param name="fileName">鏃ュ織鏂囦欢鍩虹鍚嶇О</param>
+        /// <returns>濡傛灉瀛樺湪鏈揪鍒板ぇ灏忛檺鍒剁殑鏃ュ織鏂囦欢鍒欒繑鍥炶鏂囦欢鍚嶏紝鍚﹀垯杩斿洖鍩轰簬褰撳墠鏃堕棿鐨勬柊鏃ュ織鏂囦欢鍚�</returns>
+        /// <remarks>
+        /// 璇ユ柟娉曚細閬嶅巻鎵�鏈夊凡瀛樺湪鐨勬棩蹇楁枃浠讹紝杩斿洖绗竴涓枃浠跺ぇ灏忔湭瓒呰繃闄愬埗鐨勬枃浠跺悕銆�
+        /// 濡傛灉娌℃湁绗﹀悎鏉′欢鐨勬枃浠讹紝鍒欑敓鎴愪竴涓互褰撳墠鏃堕棿鍛藉悕鐨勬柊鏃ュ織鏂囦欢鍚嶃��
+        /// </remarks>
+        private static string GetLastAccessFileName(string fileName, string path)
+        {
+            foreach (var m in GetExistLogFileNames(fileName, path))
+            {
+                FileInfo fileInfo = new FileInfo(m);
+                if (fileInfo.Length < size)
+                {
+                    return m;
+                }
+            }
+
+            // 杩斿洖涓�涓柊鐨勯粯璁ゅ綋鍓嶆椂闂寸殑鏃ュ織鍚嶇О
+            return $@"{fileName}_{DateTime.Now.ToString("yyyyMMddHHmmss")}.log";
+        }
+
+        /// <summary>
+        /// 鑾峰彇鎸囧畾鏂囦欢鍚嶆ā寮忕殑鎵�鏈夋棩蹇楁枃浠�
+        /// </summary>
+        /// <param name="fileName">鏃ュ織鏂囦欢鍚嶅墠缂�</param>
+        /// <returns>鍖归厤鏂囦欢鍚嶆ā寮忕殑鎵�鏈夋棩蹇楁枃浠惰矾寰勬暟缁�</returns>
+        private static string[] GetExistLogFileNames(string fileName, string path)
+        {
+            string[] fileNames = Directory.GetFiles(path, fileName + "*.log");
+            return fileNames;
+        }
+
+        private static string[] GetExistLogFileNames()
+        {
+            if (!string.IsNullOrEmpty(folderPath))
+                return Directory.GetFiles(folderPath, "Error_*.log");
+            else
+                return new string[] { };
+        }
+
+        private static int controlFileQuantity = 100;
+
+        protected static void WriteCompleted()
+        {
+            if (controlFileQuantity > 1)
+            {
+                try
+                {
+                    string[] files = GetExistLogFileNames();
+                    if (files.Length > controlFileQuantity)
+                    {
+                        List<FileInfo> fileInfos = new List<FileInfo>();
+                        for (int i = 0; i < files.Length; i++)
+                        {
+                            fileInfos.Add(new FileInfo(files[i]));
+                        }
+
+                        fileInfos.Sort(new Comparison<FileInfo>((m, n) =>
+                        {
+                            return m.CreationTime.CompareTo(n.CreationTime);
+                        }));
+
+                        for (int i = 0; i < fileInfos.Count - controlFileQuantity; i++)
+                        {
+                            File.Delete(fileInfos[i].FullName);
+                        }
+                    }
+                }
+                catch
+                {
+
+                }
+            }
+        }
+    }
+}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index c779ed3..b49a2ad 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -1163,6 +1163,8 @@
                     FactoryArea = item.FactoryArea,
                     WarehouseCode = item.WarehouseCode,
                     Barcode = item.Barcode,
+                    CreateDate = item.CreateDate,
+                    Creater = item.Creater,
                     Remark = $"鏁寸鍑哄簱瀹屾垚鍒犻櫎锛屾潯鐮侊細{request.PalletCode}锛屽師鏁伴噺锛歿item.StockQuantity}锛屽嚭搴撴暟閲忥細{item.StockQuantity}锛屾搷浣滆�咃細{request.Operator}"
                 };
                 historyRecords.Add(historyRecord);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Jobs/QuartzJobMildd.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Jobs/QuartzJobMildd.cs"
index cdd7ef8..e179ff3 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Jobs/QuartzJobMildd.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Jobs/QuartzJobMildd.cs"
@@ -21,19 +21,19 @@
             {
                 var allQzServices = new List<TasksQz>()
                 {
-                    new TasksQz()
-                    {
-                         Id = 1,
-                         AssemblyName = "WIDESEA_WMSServer",
-                         ClassName = "AgvTaskJob",
-                         CreateTime = DateTime.Now,
-                         IntervalSecond = 3,
-                         IsDeleted = false,
-                         IsStart = false,
-                         JobGroup = "WIDESEA_WMSServer",
-                         Name = "AgvTaskJob",
-                         TriggerType = 0
-                    },
+                    //new TasksQz()
+                    //{
+                    //     Id = 1,
+                    //     AssemblyName = "WIDESEA_WMSServer",
+                    //     ClassName = "AgvTaskJob",
+                    //     CreateTime = DateTime.Now,
+                    //     IntervalSecond = 3,
+                    //     IsDeleted = false,
+                    //     IsStart = false,
+                    //     JobGroup = "WIDESEA_WMSServer",
+                    //     Name = "AgvTaskJob",
+                    //     TriggerType = 0
+                    //},
                    
                 };
                 foreach (var item in allQzServices)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
index 540eeae..8152876 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
@@ -1,3 +1,7 @@
+using System.Net.Security;
+using System.Reflection;
+using System.Runtime.ConstrainedExecution;
+using System.Text;
 using Autofac;
 using Autofac.Core;
 using Autofac.Extensions.DependencyInjection;
@@ -13,10 +17,6 @@
 using Quartz.Impl;
 using Quartz.Spi;
 using Serilog;
-using System.Net.Security;
-using System.Reflection;
-using System.Runtime.ConstrainedExecution;
-using System.Text;
 using WIDESEA.QuartzJob;
 using WIDESEA_Core;
 using WIDESEA_Core.Authorization;
@@ -31,7 +31,7 @@
 using WIDESEA_WMSServer;
 using WIDESEA_WMSServer.Filter;
 using WIDESEA_WMSServer.Jobs;
-using static Quartz.Logging.OperationName;
+using WIDESEAWCS_Core.LogHelper;
 
 var builder = WebApplication.CreateBuilder(args);
 
@@ -42,6 +42,36 @@
 //  .WriteTo.File("logs/log-.txt", rollingInterval: RollingInterval.Day)
 //  .CreateLogger();
 
+AppDomain.CurrentDomain.FirstChanceException += (sender, e) =>
+{
+    bool flag = e.Exception.TargetSite?.DeclaringType?.Namespace?.StartsWith("WIDESEA") == true;
+
+    if (e.Exception is not OperationCanceledException && flag)
+    {
+        string folderPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $"Log\\Exception");
+        Exception ex = e.Exception;
+        StringBuilder builder = new StringBuilder();
+        builder.Append("错误信息:");
+        builder.Append(ex.Message);
+        builder.Append(Environment.NewLine);
+        builder.Append("错误源:");
+        builder.Append(ex.Source);
+        builder.Append(Environment.NewLine);
+        builder.Append("错误堆栈:");
+        builder.Append(ex.StackTrace);
+        builder.Append(Environment.NewLine);
+        builder.Append("错误类型:");
+        builder.Append(ex.GetType().ToString());
+        builder.Append(Environment.NewLine);
+        builder.Append("错误方法:");
+        builder.Append(ex.TargetSite?.ToString());
+        builder.Append(Environment.NewLine);
+        builder.Append(Environment.NewLine);
+
+        LoggerHelper.WriteError(e.Exception, folderPath);
+    }
+};
+
 Log.Logger = new LoggerConfiguration()
     .MinimumLevel.Information() // 设置全局最低日志级别为 Information
                                 // 重写特定命名空间的日志级别,过滤系统噪音

--
Gitblit v1.9.3