| | |
| | | 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; |
| | |
| | | } |
| | | } |
| | | |
| | | SequenceAttirbute? sequenceAttirbute = propertyInfo.GetCustomAttribute<SequenceAttirbute>(); |
| | | SequenceAttribute? sequenceAttirbute = propertyInfo.GetCustomAttribute<SequenceAttribute>(); |
| | | if (sequenceAttirbute != null) |
| | | { |
| | | if (propertyInfo.GetValue(entityInfo.EntityValue)?.ObjToInt() <= 0) |
| | |
| | | } |
| | | |
| | | |
| | | if (App.User?.UserId > 0) |
| | | //if (App.User?.UserId > 0) |
| | | { |
| | | switch (entityInfo.OperationType) |
| | | { |
| | |
| | | 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) |
| | | { |