From e483ac11616ffc9260d8f491fcc0d66f480b5443 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期四, 16 四月 2026 10:12:52 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/LongTu/FangGangAGV

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs
index e0880c9..f7221b9 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs
@@ -16,7 +16,14 @@
     {
         public static void DataExecuting(object oldValue, DataFilterModel entityInfo)
         {
-            if (entityInfo.EntityValue is BaseEntity baseEntity)
+            if (entityInfo.EntityValue is BaseEntity entity && entityInfo.EntityValue is IBaseHistoryEntity historyEntity)
+            {
+                if (entityInfo.OperationType == DataFilterType.InsertByObject && entityInfo.PropertyName == nameof(BaseEntity.CreateDate))
+                {
+                    historyEntity.InsertTime = DateTime.Now;
+                }
+            }
+            else if (entityInfo.EntityValue is BaseEntity baseEntity)
             {
                 // 鏂板鎿嶄綔
                 if (entityInfo.OperationType == DataFilterType.InsertByObject)

--
Gitblit v1.9.3