From 70f22c9c06c7dfe2a2a83c0d2fcc79892dba7d8f Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期三, 18 十二月 2024 17:08:29 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 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 dac84c9..aa8cc06 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"
@@ -8,6 +8,7 @@
 using System.Text;
 using System.Threading.Tasks;
 using WIDESEA_Core.Attributes;
+using WIDESEA_Core.CodeConfigEnum;
 using WIDESEA_Core.Const;
 using WIDESEA_Core.DB;
 using WIDESEA_Core.DB.Models;
@@ -44,7 +45,7 @@
                     }
                 }
 
-                SequenceAttirbute? sequenceAttirbute = propertyInfo.GetCustomAttribute<SequenceAttirbute>();
+                SequenceAttribute? sequenceAttirbute = propertyInfo.GetCustomAttribute<SequenceAttribute>();
                 if (sequenceAttirbute != null)
                 {
                     if (propertyInfo.GetValue(entityInfo.EntityValue)?.ObjToInt() <= 0)
@@ -86,7 +87,7 @@
                 }
 
 
-                if (App.User?.UserId > 0)
+                //if (App.User?.UserId > 0)
                 {
                     switch (entityInfo.OperationType)
                     {
@@ -142,11 +143,11 @@
                 ruleConfig.ModifyDate = DateTime.Now;
 
                 code = ruleConfig.Format;
-                code = code.Replace($"[{CodeFormat.YYYY}]", now.Year.ToString().PadLeft(4, '0'));
-                code = code.Replace($"[{CodeFormat.MM}]", now.Month.ToString().PadLeft(2, '0'));
-                code = code.Replace($"[{CodeFormat.DD}]", now.Day.ToString().PadLeft(2, '0'));
-                code = code.Replace($"[{CodeFormat.ST}]", ruleConfig.StartStr.ToString());
-                code = code.Replace($"[{CodeFormat.NUM}]", ruleConfig.CurrentVal.ToString().PadLeft(ruleConfig.Length ?? 0, '0'));
+                code = code.Replace($"[{CodeFormatTypeEnum.YYYY}]", now.Year.ToString().PadLeft(4, '0'));
+                code = code.Replace($"[{CodeFormatTypeEnum.MM}]", now.Month.ToString().PadLeft(2, '0'));
+                code = code.Replace($"[{CodeFormatTypeEnum.DD}]", now.Day.ToString().PadLeft(2, '0'));
+                code = code.Replace($"[{CodeFormatTypeEnum.ST}]", ruleConfig.StartStr.ToString());
+                code = code.Replace($"[{CodeFormatTypeEnum.NUM}]", ruleConfig.CurrentVal.ToString().PadLeft(ruleConfig.Length ?? 0, '0'));
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3