From 3dc164dc1ff1d08d29ec7ea5beabaf93a300a70b Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 09 一月 2025 09:55:07 +0800
Subject: [PATCH] 辅料仓功能添加(空箱入库,空箱出库,AGV任务完成,组盘入库,拣选入库,入平库),WMS前端界面优化
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs | 46 ++++++++--------------------------------------
1 files changed, 8 insertions(+), 38 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs"
index aa8cc06..50c68e1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs"
@@ -66,26 +66,21 @@
int seq = sugarClient.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceAttirbute.SequenceName}").ObjToInt();
propertyInfo.SetValue(entityInfo.EntityValue, seq, null);
}
-
}
}
if (entityInfo.EntityValue is BaseEntity baseEntity)
{
// 鏂板鎿嶄綔
- if (entityInfo.OperationType == DataFilterType.InsertByObject)
+ if (entityInfo.OperationType == DataFilterType.InsertByObject && entityInfo.PropertyName == nameof(BaseEntity.CreateDate))
{
- if (entityInfo.PropertyName == nameof(BaseEntity.CreateDate))
- {
- baseEntity.CreateDate = DateTime.Now;
- }
+ baseEntity.CreateDate = DateTime.Now;
}
- if (entityInfo.OperationType == DataFilterType.UpdateByObject)
+ if (entityInfo.OperationType == DataFilterType.UpdateByObject && entityInfo.PropertyName == nameof(BaseEntity.ModifyDate))
{
baseEntity.ModifyDate = DateTime.Now;
}
-
//if (App.User?.UserId > 0)
{
@@ -100,17 +95,13 @@
}
}
}
- }
- private static void UpdateConfigData(dynamic ruleConfig)
- {
- try
+ if (entityInfo.EntityValue is IBaseHistoryEntity baseHistoryEntity)
{
-
- }
- catch (Exception ex)
- {
-
+ if (entityInfo.OperationType == DataFilterType.InsertByObject && entityInfo.PropertyName == nameof(IBaseHistoryEntity.InsertTime))
+ {
+ baseHistoryEntity.InsertTime = DateTime.Now;
+ }
}
}
@@ -159,27 +150,6 @@
sugarClient.Updateable(keyValuePairs).AS(MainDb.CodeRuleConfig).WhereColumns(nameof(ruleConfig.Id)).ExecuteCommand();
}
return code;
- }
-
- private static string GetWholeSql(SugarParameter[] paramArr, string sql)
- {
- foreach (var param in paramArr)
- {
- sql = sql.Replace(param.ParameterName, $@"'{param.Value.ObjToString()}'");
- }
-
- return sql;
- }
-
- private static string GetParas(SugarParameter[] pars)
- {
- string key = "銆怱QL鍙傛暟銆戯細";
- foreach (var param in pars)
- {
- key += $"{param.ParameterName}:{param.Value}\n";
- }
-
- return key;
}
}
}
--
Gitblit v1.9.3