From da0ff100f529bf04780d718e575bfafe8921419f Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Mon, 28 Aug 2023 15:49:57 +0800 Subject: [PATCH] up --- .../SettleAccount.HttpApi.Host/Startup.cs | 5 +- .../wwwroot/models/_options.js | 27 ++- .../wwwroot/models/vmi/adjust.js | 2 +- .../wwwroot/models/vmi/balance.js | 3 - .../wwwroot/models/vmi/vmi.js | 4 +- .../Entities/BQ/VmiAppService.cs | 109 +++--------- .../Entities/BQ/VmiAsyncBalanceService.cs | 25 +-- .../Entities/BQ/Vmi/VmiBalance.cs | 2 +- .../Entities/BQ/Vmi/VmiLog.cs | 4 +- ...AccountDbContextModelCreatingExtensions.cs | 9 +- ...er.cs => 20230828074927_vmi18.Designer.cs} | 43 +++-- ...42700_vmi18.cs => 20230828074927_vmi18.cs} | 160 +++++++++++++----- .../SettleAccountDbContextModelSnapshot.cs | 38 +++-- 13 files changed, 225 insertions(+), 206 deletions(-) rename code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/{20230828042700_vmi18.Designer.cs => 20230828074927_vmi18.Designer.cs} (99%) rename code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/{20230828042700_vmi18.cs => 20230828074927_vmi18.cs} (51%) diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs index 3d838366..08f12964 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs @@ -1,4 +1,3 @@ -using System; using System.IO.Compression; using System.Linq; using System.Text.RegularExpressions; @@ -10,15 +9,14 @@ using Microsoft.AspNetCore.ResponseCompression; using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.AspNetCore.StaticFiles; -using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using SettleAccount.Job.SignalR; + //using ShardingCore; using Win.Sfs.SettleAccount.Entities.BQ; using Win.Sfs.SettleAccount.Entities.BQ.Syncs; -using Win.Sfs.SettleAccount.EntityFrameworkCore; namespace Win.Sfs.SettleAccount; @@ -30,6 +28,7 @@ public class Startup } public IConfiguration Configuration { get; } + public void ConfigureServices(IServiceCollection services) { services.Configure(options => options.Level = CompressionLevel.Fastest); diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js index a7437960..ac2a6a15 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js @@ -65,19 +65,19 @@ const deliverSubBillType = { type: "string", input: "select", options: [ - { value: 0, label: "无" }, - { value: 1, label: "保险杠BBAC" }, - { value: 2, label: "保险杠HBPO" }, - { value: 3, label: "买单件保险杠BBAC" }, - { value: 4, label: "买单件保险杠HBPO" }, - { value: 5, label: "买单件小件BBAC" }, - { value: 6, label: "买单件小件HBPO" }, - { value: 7, label: "小件BBAC" }, - { value: 8, label: "小件HBPO" }, - { value: 9, label: "JIT直供件BBAC" }, - { value: 10, label: "JIT直供件HBPO" }, - { value: 11, label: "印度件BBAC" }, - { value: 12, label: "北汽4S备件BBAC" }, + { value: "0", label: "无" }, + { value: "1", label: "保险杠BBAC" }, + { value: "2", label: "保险杠HBPO" }, + { value: "3", label: "买单件保险杠BBAC" }, + { value: "4", label: "买单件保险杠HBPO" }, + { value: "5", label: "买单件小件BBAC" }, + { value: "6", label: "买单件小件HBPO" }, + { value: "7", label: "小件BBAC" }, + { value: "8", label: "小件HBPO" }, + { value: "9", label: "JIT直供件BBAC" }, + { value: "10", label: "JIT直供件HBPO" }, + { value: "11", label: "印度件BBAC" }, + { value: "12", label: "北汽4S备件BBAC" }, ], }; @@ -135,7 +135,6 @@ const codeType = { input: "select", options: [ { value: "01", label: "前保" }, - { value: "02", label: "后保" }, { value: "03", label: " 左门槛" }, { value: "04", label: "右门槛" }, { value: "05", label: "扰流板" }, diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/adjust.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/adjust.js index cbafaf56..55eb1f0e 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/adjust.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/adjust.js @@ -6,7 +6,7 @@ const schema = useLogSchema(); const baseUrl = "settleaccount/vmi"; const queryUrl = `${baseUrl}/log`; const detailsUrl = `${baseUrl}/get/%s`; -const createUrl = "settleaccount/vmi/edit-balance"; +const createUrl = "settleaccount/vmi/adjust"; const updateUrl = `${baseUrl}/update/%s`; const deleteUrl = `${baseUrl}/delete-list`; const importUrl = `${baseUrl}/import`; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js index 1bd5598a..dedf8fa2 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js @@ -1,5 +1,4 @@ import useVmi from "./vmi.js"; -import { dayjs } from "element-plus"; const schema = useVmi(); @@ -58,7 +57,6 @@ export default function () { value: null, readOnly: true, title: "发运开始", - default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"), }, { logic: "and", @@ -67,7 +65,6 @@ export default function () { value: null, readOnly: true, title: "发运结束", - default: dayjs().add(1, "month").startOf("day").format("YYYY-MM-DD HH:mm:ss"), }, { logic: "and", diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/vmi.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/vmi.js index e8c48699..2904783d 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/vmi.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/vmi.js @@ -1,4 +1,5 @@ import { deliverBillType, deliverSubBillType, codeType } from "../_options.js"; +import { dayjs } from "element-plus"; function useSchema() { return { @@ -92,7 +93,7 @@ function useSchema() { title: "工厂", type: "string", }, - deliverSubBillType, + deliverSubBillType: Object.assign({ rules: [{ required: true }] }, deliverSubBillType), vinCode: { title: "EDI订单生产码", type: "string", @@ -130,6 +131,7 @@ function useLogSchema() { input: "datetime", clearable: false, readOnly: true, + default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"), }, changedType: { title: "变动类型", diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs index bf20052d..78b66ae9 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs @@ -11,7 +11,6 @@ using System.Reflection; using System.Text.Json; using System.Threading.Tasks; using ClosedXML.Excel; -using LinqToDB.Data; using LinqToDB.EntityFrameworkCore; using Magicodes.ExporterAndImporter.Core; using Magicodes.ExporterAndImporter.Core.Extension; @@ -30,6 +29,7 @@ using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; using Volo.Abp.BlobStoring; using Volo.Abp.DependencyInjection; +using Volo.Abp.Guids; using Volo.Abp.Users; using Volo.Abp.Validation; using Win.Sfs.BaseData.ImportExcelCommon; @@ -42,10 +42,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ; [AllowAnonymous] [Route("api/settleaccount/[controller]/[action]")] -public class VmiAppService : ApplicationService, IJobService, ITransientDependency +public class VmiAppService : Controller, IApplicationService, IJobService, ITransientDependency { public static object backupLock = new object(); private readonly IConfiguration _cfg; + private readonly IGuidGenerator _guidGenerator; private readonly IServiceProvider _serviceProvider; private readonly INormalEfCoreRepository _balanceRepository; private readonly INormalEfCoreRepository _logRepository; @@ -55,6 +56,7 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen public VmiAppService(IConfiguration cfg, IServiceProvider serviceProvider, + IGuidGenerator guidGenerator, INormalEfCoreRepository balanceRepository, INormalEfCoreRepository logRepository, IBlobContainer fileContainer, @@ -62,6 +64,7 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen ICurrentUser currentUser) { this._cfg = cfg; + this._guidGenerator = guidGenerator; this._serviceProvider = serviceProvider; this._balanceRepository = balanceRepository; this._logRepository = logRepository; @@ -71,40 +74,6 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen LinqToDBForEFTools.Initialize(); } - [HttpPost] - public async Task Test(List logs, int size = 1000) - { - using var scope = this._serviceProvider.CreateScope(); - var db = scope.ServiceProvider.GetRequiredService(); - using var dc = db.CreateLinqToDBConnection(); - dc.BeginTransaction(); - try - { - //var skip = 0; - //var count = logs.Count; - //while (count > 0) - //{ - // var batchSize = count > size ? size : count; - // var tempLogs = logs.Skip(skip).Take(batchSize); - // var tempMessages = tempLogs.Select(o => new VmiMessage { Message = JsonSerializer.Serialize(o) }); - // await dc.BulkCopyAsync(new BulkCopyOptions { TableName = "Set_VmiLog" }, tempLogs).ConfigureAwait(false); - // await dc.BulkCopyAsync(new BulkCopyOptions { TableName = "Set_VmiMessage" }, tempMessages).ConfigureAwait(false); - // count -= batchSize; - // skip += batchSize; - //} - await dc.BulkCopyAsync(new BulkCopyOptions { TableName = "Set_VmiMessage", MaxBatchSize = 1 }, new List { - new VmiMessage(Guid.NewGuid()) { Message="1" }, - new VmiMessage(Guid.NewGuid()) { Message="2" } - }).ConfigureAwait(false); - dc.Transaction.Commit(); - } - catch - { - dc.Transaction.Rollback(); - throw; - } - } - /// /// Excel 转 JSON /// @@ -203,7 +172,7 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen /// 快照列表 /// [HttpPost] - public async Task> Snapshot() + public ListResultDto Snapshot() { var connectionString = this._serviceProvider.GetRequiredService().GetConnectionString("SettleAccountService"); using var connection = new SqlConnection(connectionString); @@ -211,7 +180,7 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen var options = new DbContextOptionsBuilder().UseSqlServer(connection).Options; using var db = new SettleAccountDbContext(options); var list = db.Set().AsNoTracking().OrderByDescending(o => o.Start).ToList(); - return list; + return new ListResultDto(list); } /// @@ -310,6 +279,10 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen { query = query.Where(input.Filters.ToLambda()); } + if(input.LogTypes.Count > 0) + { + query = query.Where(o => input.LogTypes.Contains(o.LogType)); + } var totalCount = query.Count(); query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting); var entities = await query.PageBy(input.SkipCount, input.MaxResultCount).ToListAsync().ConfigureAwait(false); @@ -349,7 +322,7 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen /// /// [HttpPost] - public IActionResult EditBalance(VmiLog log) + public IActionResult Adjust([FromBody] VmiLog log) { var connectionString = this._serviceProvider.GetRequiredService().GetConnectionString("SettleAccountService"); using var connection = new SqlConnection(connectionString); @@ -358,8 +331,9 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen try { var options = new DbContextOptionsBuilder().UseSqlServer(connection).Options; - using var db = new SettleAccountDbContext(options); - log.SetId(GuidGenerator.Create()); + using var context = new SettleAccountDbContext(options); + context.Database.UseTransaction(transaction); + log.SetId(this._guidGenerator.Create()); if (log.ChangedQty >= decimal.Zero) { log.Qty = log.ChangedQty; @@ -374,8 +348,9 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen } log.ChangedBy = this._currentUser.UserName; log.ChangedTime = DateTime.Now; - db.Set().Add(log); - db.Set().Add(new VmiMessage(GuidGenerator.Create()) { Message = JsonSerializer.Serialize(log) }); + context.Set().Add(log); + context.Set().Add(new VmiMessage(this._guidGenerator.Create()) { Message = JsonSerializer.Serialize(log) }); + context.SaveChanges(); transaction.Commit(); return new OkResult(); } @@ -399,7 +374,7 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen var list = this.ImportInternal(ms.ToArray()); foreach (var file in list) { - EditBalance(file); + Adjust(file); } } @@ -507,52 +482,6 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen { throw new NotImplementedException(); } - - //private void SetPropertyValue(PropertyInfo property, VmiLog entity, string value) - //{ - // try - // { - // object propertyValue = null; - // if (!string.IsNullOrEmpty(value)) - // { - // propertyValue = Convert.ChangeType(value, property.PropertyType); - // } - // property.SetValue(entity, propertyValue, null); - // } - // catch (Exception) - // { - // throw; - // } - //} - - //private string GetOperator(EnumFilterAction action) - //{ - // var dictonary = new Dictionary() { - // {EnumFilterAction.Equal,"={0}"}, - // {EnumFilterAction.NotEqual,"!={0}"}, - // {EnumFilterAction.SmallThanOrEqual,"<={0}"}, - // {EnumFilterAction.Like,"~/{0}/"}, - // {EnumFilterAction.NotLike,"!~/{0}/"}, - // {EnumFilterAction.BiggerThan,">{0}"}, - // {EnumFilterAction.BiggerThanOrEqual,">={0}"}, - // {EnumFilterAction.SmallThan,"<{0}"}, - // }; - // return dictonary[action]; - //} - - //private object GetValue(PropertyInfo property, string value) - //{ - // if (property.PropertyType == typeof(int) || - // property.PropertyType == typeof(long) || - // property.PropertyType == typeof(float) || - // property.PropertyType == typeof(double) || - // property.PropertyType == typeof(decimal) || - // property.PropertyType == typeof(bool)) - // { - // return value; - // } - // return $"'{value}'"; - //} } public class BackupListRequest : RequestDto diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAsyncBalanceService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAsyncBalanceService.cs index 853be25e..265dcc6a 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAsyncBalanceService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAsyncBalanceService.cs @@ -30,37 +30,41 @@ public class VmiAsyncBalanceService : ApplicationService, IJobService, ITransien public async Task Invoke(IServiceProvider serviceProvider) { - var connectionString = serviceProvider.GetRequiredService().GetConnectionString("SettleAccountService"); using var connection = new SqlConnection(connectionString); connection.Open(); using var transaction = connection.BeginTransaction(); try { + var command = connection.CreateCommand(); + command.Transaction = transaction; var options = new DbContextOptionsBuilder().UseSqlServer(connection).Options; - using var db = new SettleAccountDbContext(options); - var messages = db.Set().Where(o => !o.isConsumed).OrderBy(o => o.Number).ToList(); - var repo = db.Set(); + using var context = new SettleAccountDbContext(options); + context.Database.UseTransaction(transaction); + var messages = context.Set().Where(o => !o.isConsumed).OrderBy(o => o.Number).Take(1000 * 100).ToList(); + var repo = context.Set(); foreach (var message in messages) { var log = JsonSerializer.Deserialize(message.Message); + log.SetId(Guid.Parse(JsonSerializer.Deserialize(message.Message).GetProperty("Id").GetString())); //插入分表 var table = $"Set_VmiLog_{log.ChangedTime.Year}_{(log.ChangedTime.Month - 1) / 3 + 1}"; - var command = connection.CreateCommand(); - command.Transaction = transaction; command.CommandText = $"select OBJECT_ID('{table}', 'U')"; var result = command.ExecuteScalar().ToString(); if (result == string.Empty) { command.CommandText = $"select * into {table} from Set_VmiLog where 1=0;"; - command.CommandText += $"create clustered index IX_{table}_ChangedTime on {table} (ChangedTime);"; - db.Database.ExecuteSqlRaw($"alter table {table} add constraint PK_{table} primary key (Id);"); + command.ExecuteNonQuery(); + command.CommandText = $"create clustered index IX_{table}_ChangedTime on {table} (ChangedTime);"; + command.ExecuteNonQuery(); + command.CommandText = $"alter table {table} add constraint PK_{table} primary key (Id);"; command.ExecuteNonQuery(); } //插入到分表 command.CommandText = $"insert into {table} select * from Set_VmiLog where id ='{log.Id}'"; + command.ExecuteNonQuery(); //插入库存 - var balance = db.Set().FirstOrDefault( + var balance = context.Set().FirstOrDefault( o => o.DeliverBillType == log.DeliverBillType && o.CodeType == log.CodeType && o.DeliverBillType == log.DeliverBillType && @@ -110,11 +114,12 @@ public class VmiAsyncBalanceService : ApplicationService, IJobService, ITransien //添加负库存补货记录 var log2 = new VmiReplenished(); log2.InjectFrom(log); - await db.Set().AddAsync(log2).ConfigureAwait(false); + await context.Set().AddAsync(log2).ConfigureAwait(false); } } message.isConsumed = true; } + context.SaveChanges(); transaction.Commit(); } catch (Exception ex) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs index 90e1b677..6dc1a6eb 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs @@ -16,5 +16,5 @@ public class VmiBalance : VmiBalanceBase public string ConcurrencyStamp { get; set; } public DateTime CreatedTime { get; set; } - public DateTime UpdatedTime { get; set; } + public DateTime UpdatedTime { get; set; } = DateTime.Now; } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs index cceb4d34..87342c7e 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs @@ -30,7 +30,7 @@ public class VmiLog : VmiBalanceBase public string ChangedNumber { get; set; } [Display(Name = "变动时间", Order = 2)] - public DateTime ChangedTime { get; set; }=DateTime.Now; + public DateTime ChangedTime { get; set; } = DateTime.Now; [Display(Name = "变动类型", Order = 3)] public VmiType ChangedType { get; set; } @@ -43,5 +43,5 @@ public class VmiLog : VmiBalanceBase public string ConcurrencyStamp { get; set; } public DateTime CreatedTime { get; set; } - public DateTime UpdatedTime { get; set; } + public DateTime UpdatedTime { get; set; } = DateTime.Now; } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs index a00d8c72..66d09138 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -1311,8 +1311,8 @@ namespace Win.Sfs.SettleAccount { b.ToTable($"{options.TablePrefix}_VmiBalance", options.Schema); b.ConfigureByConvention(); - b.Property(o => o.CreatedTime).ValueGeneratedOnAdd().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); - b.Property(o => o.UpdatedTime).ValueGeneratedOnAddOrUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); + b.Property(o => o.CreatedTime).HasDefaultValueSql("getdate()").ValueGeneratedOnAdd().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); + b.Property(o => o.UpdatedTime).HasDefaultValueSql("getdate()").ValueGeneratedOnAddOrUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); b.Property(o => o.ConcurrencyStamp).HasMaxLength(50).IsConcurrencyToken(); b.HasIndex(o => o.BillTime).IsClustered(); b.HasIndex(o => (new @@ -1332,8 +1332,9 @@ namespace Win.Sfs.SettleAccount { b.ToTable($"{options.TablePrefix}_VmiLog", options.Schema); b.ConfigureByConvention(); - b.Property(o => o.CreatedTime).ValueGeneratedOnAdd().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); - b.Property(o => o.UpdatedTime).ValueGeneratedOnAddOrUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); + b.Property(o => o.ChangedTime).HasDefaultValueSql("getdate()").ValueGeneratedOnAdd().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); + b.Property(o => o.CreatedTime).HasDefaultValueSql("getdate()").ValueGeneratedOnAdd().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); + b.Property(o => o.UpdatedTime).HasDefaultValueSql("getdate()").ValueGeneratedOnAddOrUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore); b.HasIndex(o => o.BillTime).IsClustered(); }); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828042700_vmi18.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828074927_vmi18.Designer.cs similarity index 99% rename from code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828042700_vmi18.Designer.cs rename to code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828074927_vmi18.Designer.cs index f1819cc8..cd8299a6 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828042700_vmi18.Designer.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828074927_vmi18.Designer.cs @@ -11,7 +11,7 @@ using Win.Sfs.SettleAccount; namespace Win.Sfs.SettleAccount.Migrations { [DbContext(typeof(SettleAccountDbContext))] - [Migration("20230828042700_vmi18")] + [Migration("20230828074927_vmi18")] partial class vmi18 { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -934,6 +934,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("LineStationCode") + .HasColumnType("nvarchar(max)"); + b.Property("PN") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4447,7 +4450,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), - ConcurrencyStamp = "25ec0d7c647f42d88882c4187af74201", + ConcurrencyStamp = "894bdd1d59cf4a3192d3a5d9a743b7ea", Cron = "0 0 8 26 *", IsDisabled = false, IsRunning = false, @@ -4457,7 +4460,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), - ConcurrencyStamp = "89413f316dbf4647954b6669de927488", + ConcurrencyStamp = "53ae466323824168bcb3cfbb7690bf07", Cron = "0 0/1 * * * ?", IsDisabled = false, IsRunning = false, @@ -4467,7 +4470,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), - ConcurrencyStamp = "ebb73d81d23c4ed9a6ae59730d163f4b", + ConcurrencyStamp = "5f2e16e5b3ec4e8289be386e1ee02a8e", Cron = "0 0/1 * * * ?", IsDisabled = false, IsRunning = false, @@ -4477,7 +4480,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), - ConcurrencyStamp = "93962cebd40f490b9df08b215b2c7bd2", + ConcurrencyStamp = "87a03d84519644d390b8588932fe5df2", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4487,7 +4490,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), - ConcurrencyStamp = "e581ee4de97a46b1a1c0ba75a101c064", + ConcurrencyStamp = "cd646b7951d1416280aa91e4eba0bdcd", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4497,7 +4500,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), - ConcurrencyStamp = "1fb801f3cbff422082d888ee8b5dab64", + ConcurrencyStamp = "c4ed2f64b0ae4faebfce741f32e24b50", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4507,7 +4510,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), - ConcurrencyStamp = "a7be915b8a5541c58081c668219edfb7", + ConcurrencyStamp = "cdfe54ee987a4f0693ef60530817cb5c", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4517,7 +4520,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), - ConcurrencyStamp = "7bbeaa02b39947c089eda7f4b05babb9", + ConcurrencyStamp = "3818b146b26542e197e47ecef3a3dc5e", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4527,7 +4530,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), - ConcurrencyStamp = "df723d768280494e88d49734cc6e55e5", + ConcurrencyStamp = "b40af7f8fbcf4597b2cc2179cffecf86", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4537,7 +4540,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), - ConcurrencyStamp = "c5b29d7fa18e4b9cb8bc1e354d10c3ac", + ConcurrencyStamp = "fb3db63b74744f1482b0e66505d582e0", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4547,7 +4550,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), - ConcurrencyStamp = "1c542463eb8746db949bcda48eabdbd8", + ConcurrencyStamp = "866a884f080542aeb6c028d1ca3b5323", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4612,7 +4615,8 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("CreatedTime") .ValueGeneratedOnAdd() - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("CustPartCode") .HasColumnType("nvarchar(max)"); @@ -4664,7 +4668,8 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("UpdatedTime") .ValueGeneratedOnAddOrUpdate() - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("VinCode") .HasColumnType("nvarchar(450)"); @@ -4706,7 +4711,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("decimal(18,2)"); b.Property("ChangedTime") - .HasColumnType("datetime2"); + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("ChangedType") .HasColumnType("int"); @@ -4722,7 +4729,8 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("CreatedTime") .ValueGeneratedOnAdd() - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("CustPartCode") .HasColumnType("nvarchar(max)"); @@ -4777,7 +4785,8 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("UpdatedTime") .ValueGeneratedOnAddOrUpdate() - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("VinCode") .HasColumnType("nvarchar(max)"); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828042700_vmi18.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828074927_vmi18.cs similarity index 51% rename from code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828042700_vmi18.cs rename to code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828074927_vmi18.cs index 710bb489..1f7aeac2 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828042700_vmi18.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230828074927_vmi18.cs @@ -7,180 +7,252 @@ namespace Win.Sfs.SettleAccount.Migrations { protected override void Up(MigrationBuilder migrationBuilder) { - migrationBuilder.DropTable( - name: "Set_VmiSyncTask"); + migrationBuilder.AlterColumn( + name: "UpdatedTime", + table: "Set_VmiLog", + type: "datetime2", + nullable: false, + defaultValueSql: "getdate()", + oldClrType: typeof(DateTime), + oldType: "datetime2"); + + migrationBuilder.AlterColumn( + name: "CreatedTime", + table: "Set_VmiLog", + type: "datetime2", + nullable: false, + defaultValueSql: "getdate()", + oldClrType: typeof(DateTime), + oldType: "datetime2"); + + migrationBuilder.AlterColumn( + name: "ChangedTime", + table: "Set_VmiLog", + type: "datetime2", + nullable: false, + defaultValueSql: "getdate()", + oldClrType: typeof(DateTime), + oldType: "datetime2"); + + migrationBuilder.AlterColumn( + name: "UpdatedTime", + table: "Set_VmiBalance", + type: "datetime2", + nullable: false, + defaultValueSql: "getdate()", + oldClrType: typeof(DateTime), + oldType: "datetime2"); + + migrationBuilder.AlterColumn( + name: "CreatedTime", + table: "Set_VmiBalance", + type: "datetime2", + nullable: false, + defaultValueSql: "getdate()", + oldClrType: typeof(DateTime), + oldType: "datetime2"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), - columns: new[] { "ConcurrencyStamp", "Name" }, - values: new object[] { "89413f316dbf4647954b6669de927488", "同步结算库存" }); + column: "ConcurrencyStamp", + value: "53ae466323824168bcb3cfbb7690bf07"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), - columns: new[] { "ConcurrencyStamp", "Name" }, - values: new object[] { "ebb73d81d23c4ed9a6ae59730d163f4b", "事务消息监控" }); + column: "ConcurrencyStamp", + value: "5f2e16e5b3ec4e8289be386e1ee02a8e"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), column: "ConcurrencyStamp", - value: "e581ee4de97a46b1a1c0ba75a101c064"); + value: "cd646b7951d1416280aa91e4eba0bdcd"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), column: "ConcurrencyStamp", - value: "a7be915b8a5541c58081c668219edfb7"); + value: "cdfe54ee987a4f0693ef60530817cb5c"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), column: "ConcurrencyStamp", - value: "1fb801f3cbff422082d888ee8b5dab64"); + value: "c4ed2f64b0ae4faebfce741f32e24b50"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), column: "ConcurrencyStamp", - value: "df723d768280494e88d49734cc6e55e5"); + value: "b40af7f8fbcf4597b2cc2179cffecf86"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), column: "ConcurrencyStamp", - value: "93962cebd40f490b9df08b215b2c7bd2"); + value: "87a03d84519644d390b8588932fe5df2"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), column: "ConcurrencyStamp", - value: "1c542463eb8746db949bcda48eabdbd8"); + value: "866a884f080542aeb6c028d1ca3b5323"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), column: "ConcurrencyStamp", - value: "c5b29d7fa18e4b9cb8bc1e354d10c3ac"); + value: "fb3db63b74744f1482b0e66505d582e0"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), - columns: new[] { "ConcurrencyStamp", "Name" }, - values: new object[] { "25ec0d7c647f42d88882c4187af74201", "库存快照备份" }); + column: "ConcurrencyStamp", + value: "894bdd1d59cf4a3192d3a5d9a743b7ea"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), column: "ConcurrencyStamp", - value: "7bbeaa02b39947c089eda7f4b05babb9"); + value: "3818b146b26542e197e47ecef3a3dc5e"); } protected override void Down(MigrationBuilder migrationBuilder) { - migrationBuilder.CreateTable( - name: "Set_VmiSyncTask", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ConcurrencyStamp = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), - LastUpdate = table.Column(type: "datetime2", nullable: false), - Name = table.Column(type: "nvarchar(max)", nullable: true), - Number = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Set_VmiSyncTask", x => x.Id); - }); + migrationBuilder.AlterColumn( + name: "UpdatedTime", + table: "Set_VmiLog", + type: "datetime2", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "datetime2", + oldDefaultValueSql: "getdate()"); + + migrationBuilder.AlterColumn( + name: "CreatedTime", + table: "Set_VmiLog", + type: "datetime2", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "datetime2", + oldDefaultValueSql: "getdate()"); + + migrationBuilder.AlterColumn( + name: "ChangedTime", + table: "Set_VmiLog", + type: "datetime2", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "datetime2", + oldDefaultValueSql: "getdate()"); + + migrationBuilder.AlterColumn( + name: "UpdatedTime", + table: "Set_VmiBalance", + type: "datetime2", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "datetime2", + oldDefaultValueSql: "getdate()"); + + migrationBuilder.AlterColumn( + name: "CreatedTime", + table: "Set_VmiBalance", + type: "datetime2", + nullable: false, + oldClrType: typeof(DateTime), + oldType: "datetime2", + oldDefaultValueSql: "getdate()"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), - columns: new[] { "ConcurrencyStamp", "Name" }, - values: new object[] { "b282d04b720a4453bac838a6d2702c5e", "同步库存" }); + column: "ConcurrencyStamp", + value: "b6452a12f9814a2ba8097b0a34934cf1"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), - columns: new[] { "ConcurrencyStamp", "Name" }, - values: new object[] { "af7e13c541954124a384db3d957e96f8", "消息监控" }); + column: "ConcurrencyStamp", + value: "e84ff12fed794e3d8eb0d8b6945873ce"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), column: "ConcurrencyStamp", - value: "1c63ae9d135a409da20ef2956f075921"); + value: "f4063fd5bc9a4321941edf1663633d73"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), column: "ConcurrencyStamp", - value: "7d2a76e6327d46f4a93d15d91794de13"); + value: "565a6be9ca2a450aae2dc98b972a32bc"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), column: "ConcurrencyStamp", - value: "448472749b8e4be587a6c8a9079bb4c1"); + value: "f21a6c7a50a5405aaced44507dbdd01b"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), column: "ConcurrencyStamp", - value: "ffca086d0a884f118ec61e00c1ea11cf"); + value: "df201f57bc0448d3909942c81a553597"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), column: "ConcurrencyStamp", - value: "9758552b36a24d20bc4fd3efaa2c828a"); + value: "673b92ac1f384632b35953a8601e92f2"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), column: "ConcurrencyStamp", - value: "7ac5c23ffc254496b3bfeac777aceb78"); + value: "0f62e911f48d4c97a534eab3a6b2ddbd"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), column: "ConcurrencyStamp", - value: "a9ef4db8c8c547ff880badc98ecb3fb7"); + value: "6a1b56ecc53e4c56b036daab195d3a86"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), - columns: new[] { "ConcurrencyStamp", "Name" }, - values: new object[] { "38598fb3653c48be8f63119787de2df8", "库存快照" }); + column: "ConcurrencyStamp", + value: "6e7a483ccf0e41e888beffb1e492f57e"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), column: "ConcurrencyStamp", - value: "298ad96e7d61427ba492ccdb1db7e900"); + value: "b493f376395d40c7ad727a14ec909ee0"); } } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs index 2305e0f9..06ca3f13 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs @@ -4448,7 +4448,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), - ConcurrencyStamp = "6e7a483ccf0e41e888beffb1e492f57e", + ConcurrencyStamp = "894bdd1d59cf4a3192d3a5d9a743b7ea", Cron = "0 0 8 26 *", IsDisabled = false, IsRunning = false, @@ -4458,7 +4458,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), - ConcurrencyStamp = "b6452a12f9814a2ba8097b0a34934cf1", + ConcurrencyStamp = "53ae466323824168bcb3cfbb7690bf07", Cron = "0 0/1 * * * ?", IsDisabled = false, IsRunning = false, @@ -4468,7 +4468,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), - ConcurrencyStamp = "e84ff12fed794e3d8eb0d8b6945873ce", + ConcurrencyStamp = "5f2e16e5b3ec4e8289be386e1ee02a8e", Cron = "0 0/1 * * * ?", IsDisabled = false, IsRunning = false, @@ -4478,7 +4478,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), - ConcurrencyStamp = "673b92ac1f384632b35953a8601e92f2", + ConcurrencyStamp = "87a03d84519644d390b8588932fe5df2", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4488,7 +4488,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), - ConcurrencyStamp = "f4063fd5bc9a4321941edf1663633d73", + ConcurrencyStamp = "cd646b7951d1416280aa91e4eba0bdcd", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4498,7 +4498,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), - ConcurrencyStamp = "f21a6c7a50a5405aaced44507dbdd01b", + ConcurrencyStamp = "c4ed2f64b0ae4faebfce741f32e24b50", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4508,7 +4508,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), - ConcurrencyStamp = "565a6be9ca2a450aae2dc98b972a32bc", + ConcurrencyStamp = "cdfe54ee987a4f0693ef60530817cb5c", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4518,7 +4518,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), - ConcurrencyStamp = "b493f376395d40c7ad727a14ec909ee0", + ConcurrencyStamp = "3818b146b26542e197e47ecef3a3dc5e", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4528,7 +4528,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), - ConcurrencyStamp = "df201f57bc0448d3909942c81a553597", + ConcurrencyStamp = "b40af7f8fbcf4597b2cc2179cffecf86", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4538,7 +4538,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), - ConcurrencyStamp = "6a1b56ecc53e4c56b036daab195d3a86", + ConcurrencyStamp = "fb3db63b74744f1482b0e66505d582e0", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4548,7 +4548,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), - ConcurrencyStamp = "0f62e911f48d4c97a534eab3a6b2ddbd", + ConcurrencyStamp = "866a884f080542aeb6c028d1ca3b5323", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4613,7 +4613,8 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("CreatedTime") .ValueGeneratedOnAdd() - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("CustPartCode") .HasColumnType("nvarchar(max)"); @@ -4665,7 +4666,8 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("UpdatedTime") .ValueGeneratedOnAddOrUpdate() - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("VinCode") .HasColumnType("nvarchar(450)"); @@ -4707,7 +4709,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("decimal(18,2)"); b.Property("ChangedTime") - .HasColumnType("datetime2"); + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("ChangedType") .HasColumnType("int"); @@ -4723,7 +4727,8 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("CreatedTime") .ValueGeneratedOnAdd() - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("CustPartCode") .HasColumnType("nvarchar(max)"); @@ -4778,7 +4783,8 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("UpdatedTime") .ValueGeneratedOnAddOrUpdate() - .HasColumnType("datetime2"); + .HasColumnType("datetime2") + .HasDefaultValueSql("getdate()"); b.Property("VinCode") .HasColumnType("nvarchar(max)");