From 960b33fa24c47a330e51a2c24859d681ae62caeb Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期四, 16 四月 2026 10:09:49 +0800
Subject: [PATCH] 重构任务与库存模型,增强日志管理与区域接口
---
Code Management/WCS/WIDESEA_WCSServer/WIDESEAWCS_Core/AOP/SqlSugarAop.cs | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Code Management/WCS/WIDESEA_WCSServer/WIDESEAWCS_Core/AOP/SqlSugarAop.cs b/Code Management/WCS/WIDESEA_WCSServer/WIDESEAWCS_Core/AOP/SqlSugarAop.cs
index 7382007..4c3ce6c 100644
--- a/Code Management/WCS/WIDESEA_WCSServer/WIDESEAWCS_Core/AOP/SqlSugarAop.cs
+++ b/Code Management/WCS/WIDESEA_WCSServer/WIDESEAWCS_Core/AOP/SqlSugarAop.cs
@@ -5,6 +5,7 @@
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core.DB.Models;
using WIDESEAWCS_Core.Const;
using WIDESEAWCS_Core.DB.Models;
using WIDESEAWCS_Core.Helper;
@@ -17,7 +18,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