Browse Source

update

master
wanggang 1 year ago
parent
commit
7af54c3c39
  1. 32
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/AuthServer/AuthServerHostModule.cs
  2. 30
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs
  3. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js
  4. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  5. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  6. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js
  7. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  8. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
  9. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
  10. 82
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
  11. 78
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs
  12. 83
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalanceBase.cs
  13. 79
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs
  14. 36
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiReplenished.cs
  15. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiShardingRecord.cs
  16. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/SettleAccount.Domain.csproj
  17. 38
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/OrderVirtualTableRoute.cs
  18. 13
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContext.cs
  19. 5686
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825061422_vmi15.Designer.cs
  20. 499
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825061422_vmi15.cs
  21. 5842
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825063729_vmi16.Designer.cs
  22. 849
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825063729_vmi16.cs
  23. 161
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
  24. 1
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/SettleAccount.EntityFrameworkCore.csproj

32
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/AuthServer/AuthServerHostModule.cs

@ -67,22 +67,22 @@ namespace AuthServer.Host
// options.Configuration = configuration["Redis:Configuration"];
//});
context.Services.AddCors(options =>
{
options.AddPolicy(DefaultCorsPolicyName,
builder =>
{
builder.WithOrigins(configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray())
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
//context.Services.AddCors(options =>
//{
// options.AddPolicy(DefaultCorsPolicyName,
// builder =>
// {
// builder.WithOrigins(configuration["App:CorsOrigins"]
// .Split(",", StringSplitOptions.RemoveEmptyEntries)
// .Select(o => o.RemovePostFix("/"))
// .ToArray())
// .WithAbpExposedHeaders()
// .SetIsOriginAllowedToAllowWildcardSubdomains()
// .AllowAnyHeader()
// .AllowAnyMethod()
// .AllowCredentials();
// });
//});
Configure<AbpAuditingOptions>(options =>
{

30
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs

@ -1,3 +1,4 @@
using System;
using System.IO.Compression;
using System.Linq;
using System.Text.RegularExpressions;
@ -9,16 +10,26 @@ 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;
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.Configure<GzipCompressionProviderOptions>(options => options.Level = CompressionLevel.Fastest);
@ -44,7 +55,24 @@ public class Startup
services.AddSignalR(o => o.EnableDetailedErrors = true);
JobHostdService.AddService(services);
services.AddSingleton<JobHostdService>();
services.AddHostedService(o => o.GetRequiredService<JobHostdService>());
//services.AddHostedService(o => o.GetRequiredService<JobHostdService>());
services.AddShardingDbContext<SettleAccountDbContext>()
.UseRouteConfig(options => options.AddShardingTableRoute<OrderVirtualTableRoute>())
.UseConfig(op =>
{
op.UseShardingQuery((connStr, builder) =>
{
builder.UseSqlServer(connStr);
});
op.UseShardingTransaction((connection, builder) =>
{
//connection is delegate input param
builder.UseSqlServer(connection);
});
//use your data base connection string
op.AddDefaultDataSource("SettleAccountService",Configuration.GetConnectionString("SettleAccountService"));
})
.AddShardingCore();
services.AddRouting(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
services.AddMvc(options => options.Conventions.Add(new RouteTokenTransformerConvention(new SlugifyParameterTransformer())));
services.AddApplication<SettleAccountHttpApiHostModule>();

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js

@ -9,7 +9,7 @@ import { dayjs } from "element-plus";
export default {
components: { ElConfigProvider },
template: html`
<el-config-provider :locale="localeMap.get($i18n.locale)">
<el-config-provider :locale="localeMap.get($i18n.locale)" size="small">
<router-view></router-view>
</el-config-provider>
`,

6
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js

@ -25,13 +25,13 @@ export default {
</el-select>
</template>
<template v-else-if="getInput(schema)==='tabs'">
<el-tabs type="card" v-model="model[prop]" style="height:32px;margin:0;" class="form">
<el-tabs type="card" v-model="model[prop]" style="height:24px;margin:0;" class="form">
<el-tab-pane label="全部" key="all" :name="''" />
<el-tab-pane v-for="item in options" :label="item.label" :name="item.value" />
</el-tabs>
</template>
<template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'||getInput(schema)==='datetimerange'">
<el-date-picker v-model="model[prop]" :type="schema.input" :value-format="schema.format??'YYYY-MM-DD HH:mm:ss'" size="small" />
<el-date-picker v-model="model[prop]" :type="schema.input" :value-format="schema.format??'YYYY-MM-DD HH:mm:ss'" />
</template>
<template v-else-if="getInput(schema)==='number'">
<el-input :disabled="getDisabled()" :placeholder="schema.placeholder??schema.title" v-model="model[prop]" type="number" />
@ -89,7 +89,7 @@ export default {
styles: html`<style>
.form .el-tabs__header,
.form .el-tabs__item {
height: 32px;
height: 24px;
}
</style>`,
props: ["modelValue", "schema", "prop", "isReadOnly", "mode"],

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js

@ -145,6 +145,7 @@ export default {
<div style="height:52px;padding-top:20px;">
<el-scrollbar>
<el-pagination
small
v-model:currentPage="pageModel.pageIndex"
v-model:page-size="pageModel.pageSize"
:total="pageModel.total"

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js

@ -26,7 +26,6 @@ const schema = {
invGroupNum: {
title: "发票分组号",
type: "number",
link: true,
},
businessType,
state,

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js

@ -371,7 +371,7 @@ export default [
(_, q) => q.filters.some((o) => o.column === "state" && o.value === 2) && q.filters.some((o) => o.column === "invoiceState" && o.value === 1)
),
createButton("export-group", "title=导出发票分组&pattern=paged"),
createButton("approval", "title=发票重开"),
//createButton("approval", "title=发票重开"),
createButton(
"reject",
"title=退回&isTop=true",

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css

@ -97,7 +97,7 @@ a.logo {
.el-form--inline .el-form-item__content {
min-width: 192px;
/* height: 32px; */
min-height: 24px;
}
.el-table .cell {

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

@ -244,7 +244,7 @@ export default {
};
const columns3 = {
type: "object",
title: "结分组包含不可结算零件",
title: "结分组零件",
properties: {
invGroupNum: {
type: "string",
@ -256,11 +256,11 @@ export default {
},
lu: {
type: "string",
title: "可结算分组号",
title: "零件号",
},
lu1: {
extend1: {
type: "string",
title: "不可结算分组号",
title: "状态",
},
},
};

82
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
@ -25,6 +26,7 @@ using Omu.ValueInjecter;
using Polly;
using RestSharp.Extensions;
using SettleAccount.Job.SignalR;
using SqlSugar;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.BlobStoring;
@ -370,16 +372,40 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen
}
/// <summary>
/// 库存余额查询
/// 1.库存余额查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<PagedResultDto<VmiBalance>> Balance(RequestDto input)
{
var entities = await _balanceRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
var totalCount = await _balanceRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
var db = GetSqlSugarDbClient();
var query = db.Queryable<VmiBalance>().AS("Set_VmiBalance").Where(input.Filters.ToLambda<VmiBalance>());
var totalCount = query.Count();
query = string.IsNullOrEmpty(input.Sorting) ? query : query.OrderBy(input.Sorting);
var entities = await query.Skip(input.SkipCount).Take(input.MaxResultCount).ToListAsync().ConfigureAwait(false);
return new PagedResultDto<VmiBalance>(totalCount, entities);
//var entities = await _balanceRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
//var totalCount = await _balanceRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
//return new PagedResultDto<VmiBalance>(totalCount, entities);
}
private SqlSugarClient GetSqlSugarDbClient()
{
return new SqlSugarClient(new ConnectionConfig()
{
ConnectionString = this._cfg.GetConnectionString("SettleAccountService"),
DbType = DbType.SqlServer,
IsAutoCloseConnection = true,
MoreSettings = new ConnMoreSettings
{
IsWithNoLockQuery = true
},
}, db => {
db.Aop.OnLogExecuted = (sql,args)=> {
Debug.WriteLine(sql);
};
});
}
/// <summary>
@ -396,17 +422,25 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen
}
/// <summary>
/// 库存事务查询
/// 2.库存事务查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<PagedResultDto<VmiLog>> Log(LogRequestDto input)
{
var entities = await _logRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
var totalCount = await _logRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
var db = GetSqlSugarDbClient();
var query = db.Queryable<VmiLog>().AS("Set_VmiLog").Where(input.Filters.ToLambda<VmiLog>());
var totalCount = query.Count();
query = string.IsNullOrEmpty(input.Sorting) ? query : query.OrderBy(input.Sorting);
var entities = await query.Skip(input.SkipCount).Take(input.MaxResultCount).ToListAsync().ConfigureAwait(false);
return new PagedResultDto<VmiLog>(totalCount, entities);
//return QueryLogFromTSDb(input);
//var entities = await _logRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
//var totalCount = await _logRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
//return new PagedResultDto<VmiLog>(totalCount, entities);
// GetSqlSugarDbClient().Queryable<VmiLog>().SplitTable()
}
/// <summary>
@ -465,7 +499,7 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen
}
/// <summary>
/// 人工调整
/// 4.寄售库存调整
/// </summary>
/// <param name="log"></param>
/// <returns></returns>
@ -516,25 +550,31 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen
}
/// <summary>
/// 时点库存查询
/// 3.时点库存查询
/// </summary>
[HttpPost]
public async Task<PagedResultDto<VmiBalance>> Backup(BackupListRequest input)
{
using var scope = this._serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var name = input.Name;
var sql = $"select * from {name}";
var query = db.Set<VmiBalance>().FromSqlRaw(sql);
var filters = input.Filters.ToLambda<VmiBalance>();
if (input.Filters.Count > 0)
{
query = query.Where(input.Filters.ToLambda<VmiBalance>());
}
var db = GetSqlSugarDbClient();
var query = db.Queryable<VmiBalance>().AS(input.Name).Where(input.Filters.ToLambda<VmiBalance>());
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);
query = string.IsNullOrEmpty(input.Sorting) ? query : query.OrderBy(input.Sorting);
var entities = await query.Skip(input.SkipCount).Take(input.MaxResultCount).ToListAsync().ConfigureAwait(false);
return new PagedResultDto<VmiBalance>(totalCount, entities);
//using var scope = this._serviceProvider.CreateScope();
//var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
//var name = input.Name;
//var sql = $"select * from {name}";
//var query = db.Set<VmiBalance>().FromSqlRaw(sql);
//var filters = input.Filters.ToLambda<VmiBalance>();
//if (input.Filters.Count > 0)
//{
// query = query.Where(input.Filters.ToLambda<VmiBalance>());
//}
//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);
//return new PagedResultDto<VmiBalance>(totalCount, entities);
}
/// <summary>

78
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs

@ -1,14 +1,12 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
/// <summary>
/// ERP库位+零件号+生产码
/// </summary>
public class VmiBalance : Entity<Guid>
//[SugarTable("Set_VmiBalance")]
public class VmiBalance : VmiBalanceBase
{
public VmiBalance()
{
@ -20,79 +18,7 @@ public class VmiBalance : Entity<Guid>
ConcurrencyStamp = Guid.NewGuid().ToString("N");
}
//同步时间戳
public DateTime LastUpdate { get; set; }
public string ConcurrencyStamp { get; set; }
[Display(Name = "LU零件号", Order = 6)]
public string RealPartCode { get; set; }
[Display(Name = "客户零件号", Order = 7)]
public string CustPartCode { get; set; }
[Display(Name = "生产码类型", Order = 8)]
public string CodeType { get; set; }
[Display(Name = "发货类型", Order = 9)]
public EnumDeliverBjBmpBillType? DeliverBillType { get; set; }
[Display(Name = "数量", Order = 10)]
public decimal Qty { get; set; }
[Display(Name = "发运日期", Order = 11)]
public DateTime? BillTime { get; set; }
[Display(Name = "订单日期", Order = 12)]
public DateTime? AssembleData { get; set; }
[Display(Name = "ERP库位", Order = 13)]
public string ErpToLoc { get; set; }
[Display(Name = "EDI顺序号", Order = 14)]
public string Seq { get; set; }
[Display(Name = "客户订单号", Order = 15)]
public string OrderNum { get; set; }
[Display(Name = "塑件唯一码", Order = 16)]
public string UniqueCode { get; set; }
[Display(Name = "EDI总成号", Order = 17)]
public string MatchNumber { get; set; }
[Display(Name = "PJIS生产顺序号", Order = 18)]
public string PjsNum { get; set; }
[Display(Name = "实际生产码", Order = 19)]
public string RealCode { get; set; }
[Display(Name = "配置码", Order = 20)]
public string Configcode { get; set; }
[Display(Name = "工厂", Order = 21)]
public string factory { get; set; }
[Display(Name = "发货子类型", Order = 22)]
public EnumDeliverSubBillType? DeliverSubBillType { get; set; }
[Display(Name = "EDI订单生产码", Order = 23)]
public string VinCode { get; set; }
[Display(Name = "结算生产码", Order = 24)]
public string SettlementVinCode { get; set; }
[Display(Name = "结算生产码", Order = 25)]
public string SettlementPartCode { get; set; }
[Display(Name = "是否补货", Order = 26)]
public bool? IsReplenished { get; set; }
[Display(Name = "备注", Order = 27)]
public string ReMark { get; set; }
//审计
public DateTime CreatedTime { get; set; }
public DateTime UpdatedTime { get; set; }
}

83
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalanceBase.cs

@ -0,0 +1,83 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public abstract class VmiBalanceBase : Entity<Guid>
{
public VmiBalanceBase()
{
}
public VmiBalanceBase(Guid id) : base(id)
{
}
[Display(Name = "LU零件号", Order = 6)]
public string RealPartCode { get; set; }
[Display(Name = "客户零件号", Order = 7)]
public string CustPartCode { get; set; }
[Display(Name = "生产码类型", Order = 8)]
public string CodeType { get; set; }
[Display(Name = "发货类型", Order = 9)]
public EnumDeliverBjBmpBillType? DeliverBillType { get; set; }
[Display(Name = "数量", Order = 10)]
public decimal Qty { get; set; }
[Display(Name = "发运日期", Order = 11)]
public DateTime? BillTime { get; set; }
[Display(Name = "订单日期", Order = 12)]
public DateTime? AssembleData { get; set; }
[Display(Name = "ERP库位", Order = 13)]
public string ErpToLoc { get; set; }
[Display(Name = "EDI顺序号", Order = 14)]
public string Seq { get; set; }
[Display(Name = "客户订单号", Order = 15)]
public string OrderNum { get; set; }
[Display(Name = "塑件唯一码", Order = 16)]
public string UniqueCode { get; set; }
[Display(Name = "EDI总成号", Order = 17)]
public string MatchNumber { get; set; }
[Display(Name = "PJIS生产顺序号", Order = 18)]
public string PjsNum { get; set; }
[Display(Name = "实际生产码", Order = 19)]
public string RealCode { get; set; }
[Display(Name = "配置码", Order = 20)]
public string Configcode { get; set; }
[Display(Name = "工厂", Order = 21)]
public string factory { get; set; }
[Display(Name = "发货子类型", Order = 22)]
public EnumDeliverSubBillType? DeliverSubBillType { get; set; }
[Display(Name = "EDI订单生产码", Order = 23)]
public string VinCode { get; set; }
[Display(Name = "结算生产码", Order = 24)]
public string SettlementVinCode { get; set; }
[Display(Name = "结算生产码", Order = 25)]
public string SettlementPartCode { get; set; }
[Display(Name = "是否补货", Order = 26)]
public bool? IsReplenished { get; set; }
[Display(Name = "备注", Order = 27)]
public string ReMark { get; set; }
}

79
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs

@ -1,21 +1,21 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
/// <summary>
/// 寄售库存操作记录
/// 库存事务
/// </summary>
public class VmiLog : Entity<Guid>
public class VmiLog : VmiBalanceBase
{
public VmiLog()
{
ConcurrencyStamp = Guid.NewGuid().ToString("N");
}
public VmiLog(Guid id) : base(id)
{
ConcurrencyStamp = Guid.NewGuid().ToString("N");
}
[Display(Name = "库存事务分类", Order = 0)]
@ -36,76 +36,7 @@ public class VmiLog : Entity<Guid>
[Display(Name = "库存变动", Order = 5)]
public decimal ChangedQty { get; set; }
//库存余额
[Display(Name = "LU零件号", Order = 6)]
public string RealPartCode { get; set; }
[Display(Name = "客户零件号", Order = 7)]
public string CustPartCode { get; set; }
[Display(Name = "生产码类型", Order = 8)]
public string CodeType { get; set; }
[Display(Name = "发货类型", Order = 9)]
public EnumDeliverBjBmpBillType? DeliverBillType { get; set; }
[Display(Name = "数量", Order = 10)]
public decimal Qty { get; set; }
[Display(Name = "发运日期", Order = 11)]
public DateTime? BillTime { get; set; }
[Display(Name = "订单日期", Order = 12)]
public DateTime? AssembleData { get; set; }
[Display(Name = "ERP库位", Order = 13)]
public string ErpToLoc { get; set; }
[Display(Name = "EDI顺序号", Order = 14)]
public string Seq { get; set; }
[Display(Name = "客户订单号", Order = 15)]
public string OrderNum { get; set; }
[Display(Name = "塑件唯一码", Order = 16)]
public string UniqueCode { get; set; }
[Display(Name = "EDI总成号", Order = 17)]
public string MatchNumber { get; set; }
[Display(Name = "PJIS生产顺序号", Order = 18)]
public string PjsNum { get; set; }
[Display(Name = "实际生产码", Order = 19)]
public string RealCode { get; set; }
[Display(Name = "配置码", Order = 20)]
public string Configcode { get; set; }
[Display(Name = "工厂", Order = 21)]
public string factory { get; set; }
[Display(Name = "发货子类型", Order = 22)]
public EnumDeliverSubBillType? DeliverSubBillType { get; set; }
[Display(Name = "EDI订单生产码", Order = 23)]
public string VinCode { get; set; }
[Display(Name = "结算生产码", Order = 24)]
public string SettlementVinCode { get; set; }
[Display(Name = "结算生产码", Order = 25)]
public string SettlementPartCode { get; set; }
[Display(Name = "是否补货", Order = 26)]
public bool? IsReplenished { get; set; }
[Display(Name = "备注", Order = 27)]
public string ReMark { get; set; }
//审计
public string ConcurrencyStamp { get; set; }
public DateTime CreatedTime { get; set; }
public DateTime UpdatedTime { get; set; }
}

36
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiReplenished.cs

@ -1,5 +1,39 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public class VmiReplenished : VmiLog
public class VmiReplenished : VmiBalanceBase
{
public VmiReplenished()
{
ConcurrencyStamp = Guid.NewGuid().ToString("N");
}
public VmiReplenished(Guid id) : base(id)
{
ConcurrencyStamp = Guid.NewGuid().ToString("N");
}
[Display(Name = "库存事务分类", Order = 0)]
public VmiLogType LogType { get; set; }
[Display(Name = "变动单号", Order = 1)]
public string ChangedNumber { get; set; }
[Display(Name = "变动时间", Order = 2)]
public DateTime ChangedTime { get; set; }
[Display(Name = "变动类型", Order = 3)]
public VmiType ChangedType { get; set; }
[Display(Name = "便动人", Order = 4)]
public string ChangedBy { get; set; }
[Display(Name = "库存变动", Order = 5)]
public decimal ChangedQty { get; set; }
public string ConcurrencyStamp { get; set; }
public DateTime CreatedTime { get; set; }
public DateTime UpdatedTime { get; set; }
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiShardingRecord.cs

@ -7,4 +7,6 @@ public class VmiShardingRecord : Entity<Guid>
{
public string MainTable { get; set; }
public string ShardingTable { get; set; }
public DateTime Start { get; set; }
public DateTime End { get; set; }
}

1
code/src/Modules/SettleAccount/src/SettleAccount.Domain/SettleAccount.Domain.csproj

@ -42,6 +42,7 @@
<PackageReference Include="EFCore.BulkExtensions" Version="5.2.8" />
<PackageReference Include="Magicodes.IE.Csv" Version="2.5.4.6" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.5.4.6" />
<PackageReference Include="SqlSugar" Version="5.1.4.102" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="4.3.3" />
<PackageReference Include="Volo.Abp.BackgroundJobs.HangFire" Version="4.3.3" />
<PackageReference Include="Volo.Abp.BlobStoring" Version="4.3.3" />

38
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/OrderVirtualTableRoute.cs

@ -0,0 +1,38 @@
using System;
using ShardingCore.Core.EntityMetadatas;
using ShardingCore.VirtualRoutes.Months;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
namespace Win.Sfs.SettleAccount.EntityFrameworkCore;
public class OrderVirtualTableRoute : AbstractSimpleShardingMonthKeyDateTimeVirtualTableRoute<VmiLog>
{
/// <summary>
/// fixed value don't use DateTime.Now because if if application restart this value where change
/// </summary>
/// <returns></returns>
public override DateTime GetBeginTime()
{
return new DateTime(2023, 1, 1);
}
/// <summary>
/// configure sharding property
/// </summary>
/// <param name="builder"></param>
public override void Configure(EntityMetadataTableBuilder<VmiLog> builder)
{
builder.ShardingProperty(o => o.CreatedTime);
}
/// <summary>
/// enable auto create table job
/// </summary>
/// <returns></returns>
public override bool AutoCreateTableByTime()
{
return true;
}
}

13
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContext.cs

@ -1,11 +1,13 @@
using Microsoft.EntityFrameworkCore;
using ShardingCore.Core.VirtualRoutes.TableRoutes.RouteTails.Abstractions;
using ShardingCore.Sharding.Abstractions;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace Win.Sfs.SettleAccount
{
[ConnectionStringName("SettleAccountService")]
public class SettleAccountDbContext : AbpDbContext<SettleAccountDbContext>, ISettleAccountDbContext
public class SettleAccountDbContext : AbpDbContext<SettleAccountDbContext>, ISettleAccountDbContext, IShardingDbContext, IShardingTableDbContext
{
/* Add DbSet for each Aggregate Root here. Example:
* public DbSet<Question> Questions { get; set; }
@ -15,14 +17,19 @@ namespace Win.Sfs.SettleAccount
: base(options)
{
this.Database.SetCommandTimeout(System.TimeSpan.FromMinutes(30));
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.ConfigureSettleAccount();
}
public IShardingDbContextExecutor GetShardingExecutor()
{
throw new System.NotImplementedException();
}
public IRouteTail RouteTail { get; set; }
}
}

5686
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825061422_vmi15.Designer.cs

File diff suppressed because it is too large

499
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825061422_vmi15.cs

@ -0,0 +1,499 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class vmi15 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("67c5b578-8110-4674-ac1e-c3da0814244a"));
migrationBuilder.DropColumn(
name: "AssembleData",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "BillTime",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CodeType",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "Configcode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CreatedTime",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CustPartCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "DeliverBillType",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "DeliverSubBillType",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "ErpToLoc",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "IsReplenished",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "MatchNumber",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "OrderNum",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "PjsNum",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "Qty",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "ReMark",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "RealCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "RealPartCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "Seq",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "SettlementPartCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "SettlementVinCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "UniqueCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "UpdatedTime",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "VinCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "factory",
table: "Set_VmiLog");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "4e46d864aae4482e8881952792c6825d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "ed9901e7e6e9410586a3af9111d2bb59");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "964f6aa5b6304936a93f8504f317c82e");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "79faaa6f20934b64942a91a524a87af3");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "82ac7a04c0fe4c2992bd99c8a6e73be7");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "1c2bfef188904011b6aca9ed6af49f44");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "cc3b71fcf18245349951c249c5b56e86");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "c8069ed240614eb4a9872d260d8839b8");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "c273b5a9dcbd4fc4ba7d33f6ef464ed7");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "5c56e915398d4e8d92644d811a98c5df");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "8069a183435141cfa0398fe295ec652c");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "e2266fce0ce94b9082a705bb6528b36c");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "54450a20639f479887d74e798aa0f00b");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "LastUpdate", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("9053e8f6-6f09-42ba-9502-2e7a2f9105c3"), null, null, null, "82e1f152724a4a9882aab30e6cc337cb", null, null, 1, null, "ErpToLoc", null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "OrderNum", null, 0m, null, null, "PartCode", null, null, null, null, "VinCode", null });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
column: "ConcurrencyStamp",
value: "ed9c903f9b4146aeb682f9e60ebff821");
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
column: "ConcurrencyStamp",
value: "b84bb2ea7bf040368718c5d9063144bf");
migrationBuilder.AddForeignKey(
name: "FK_Set_VmiLog_Set_VmiBalance_Id",
table: "Set_VmiLog",
column: "Id",
principalTable: "Set_VmiBalance",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Set_VmiLog_Set_VmiBalance_Id",
table: "Set_VmiLog");
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("9053e8f6-6f09-42ba-9502-2e7a2f9105c3"));
migrationBuilder.AddColumn<DateTime>(
name: "AssembleData",
table: "Set_VmiLog",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "BillTime",
table: "Set_VmiLog",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CodeType",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Configcode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreatedTime",
table: "Set_VmiLog",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "CustPartCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverBillType",
table: "Set_VmiLog",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverSubBillType",
table: "Set_VmiLog",
type: "int",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ErpToLoc",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsReplenished",
table: "Set_VmiLog",
type: "bit",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "MatchNumber",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "OrderNum",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PjsNum",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "Qty",
table: "Set_VmiLog",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "ReMark",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RealCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RealPartCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Seq",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SettlementPartCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SettlementVinCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "UniqueCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedTime",
table: "Set_VmiLog",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "VinCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "factory",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "800892b9cac64cb69669dc937238d39d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "4794bc4fa2ad409ea64cdd2404983475");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "0efcdccaa94d4e7fb550794d50efa9ab");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "1e3131d9f8454d96b0429796010752d3");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "5f427300bdfd44a19eaf54fddde31db1");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "a4c7d3ff7e3b4578bc2332f114c7a6bb");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "3ab808a6104c483496414711259c375b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "4d161eb0a7154f1db4cf7dcca4ffceea");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "9186efa28e7242bf94451f40834c2160");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "742b38d034d94d4685b7f074f35cd3ce");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "98dff4b93f1e4b0ba88a556ab20e7973");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "e25c06d5cdd34b2bbf909e8c655f94fc");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "602c85109f6743a6949bb260b3846ca7");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "LastUpdate", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("67c5b578-8110-4674-ac1e-c3da0814244a"), null, null, null, "71adabfbf9a74d35985c08ecba2dd537", null, null, 1, null, "ErpToLoc", null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "OrderNum", null, 0m, null, null, "PartCode", null, null, null, null, "VinCode", null });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
column: "ConcurrencyStamp",
value: "09290251f9914e5385fbae2fa00c4734");
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
column: "ConcurrencyStamp",
value: "cecf7d9ac9924ac99b3665395406b3af");
}
}
}

5842
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825063729_vmi16.Designer.cs

File diff suppressed because it is too large

849
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825063729_vmi16.cs

@ -0,0 +1,849 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class vmi16 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Set_VmiLog_Set_VmiBalance_Id",
table: "Set_VmiLog");
migrationBuilder.DropForeignKey(
name: "FK_Set_VmiReplenished_Set_VmiLog_Id",
table: "Set_VmiReplenished");
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("9053e8f6-6f09-42ba-9502-2e7a2f9105c3"));
migrationBuilder.DropColumn(
name: "LastUpdate",
table: "Set_VmiBalance");
migrationBuilder.AddColumn<DateTime>(
name: "AssembleData",
table: "Set_VmiReplenished",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "BillTime",
table: "Set_VmiReplenished",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ChangedBy",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ChangedNumber",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "ChangedQty",
table: "Set_VmiReplenished",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<DateTime>(
name: "ChangedTime",
table: "Set_VmiReplenished",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<int>(
name: "ChangedType",
table: "Set_VmiReplenished",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "CodeType",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Configcode",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreatedTime",
table: "Set_VmiReplenished",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "CustPartCode",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverBillType",
table: "Set_VmiReplenished",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverSubBillType",
table: "Set_VmiReplenished",
type: "int",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ErpToLoc",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsReplenished",
table: "Set_VmiReplenished",
type: "bit",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "LogType",
table: "Set_VmiReplenished",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "MatchNumber",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "OrderNum",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PjsNum",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "Qty",
table: "Set_VmiReplenished",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "ReMark",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RealCode",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RealPartCode",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Seq",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SettlementPartCode",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SettlementVinCode",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "UniqueCode",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedTime",
table: "Set_VmiReplenished",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "VinCode",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "factory",
table: "Set_VmiReplenished",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "AssembleData",
table: "Set_VmiLog",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "BillTime",
table: "Set_VmiLog",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CodeType",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ConcurrencyStamp",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Configcode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreatedTime",
table: "Set_VmiLog",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "CustPartCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverBillType",
table: "Set_VmiLog",
type: "int",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverSubBillType",
table: "Set_VmiLog",
type: "int",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ErpToLoc",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsReplenished",
table: "Set_VmiLog",
type: "bit",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "MatchNumber",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "OrderNum",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PjsNum",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<decimal>(
name: "Qty",
table: "Set_VmiLog",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<string>(
name: "ReMark",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RealCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "RealPartCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Seq",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SettlementPartCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SettlementVinCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "UniqueCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "UpdatedTime",
table: "Set_VmiLog",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "VinCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "factory",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "cda3828abfa24e43a7ff9dced0aceaeb");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "ebb669926c1d4ab988edfe14269e4b20");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "03159d6b06554bf99cfbbb15d476e386");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "73e9bf92fae34390a12c393f6ed8d163");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "b22b285ec9aa48c8b7ed2aa1f9dd7af6");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "12581a5c89da4c8587f2696f8b02ce62");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "456fe904f19a46349489730351148e28");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "15d1504855924d95abde0dc835de555d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "f5d16790a44b4367aeeec82ab1a35fd4");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "11cf3dd1955c4da29aa430ed0b9bafdb");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "cedf8a69b6474171b18c5fe227b78d26");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "87fd77d7f0e04c4da372a75168619afc");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "6cdaca1650424494980e906bb44eab0f");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("f12dd04d-4189-4f24-9501-038a2846b84a"), null, null, null, "1200fe51a7b84cfda12141b184958098", null, null, 1, null, "ErpToLoc", null, null, "OrderNum", null, 0m, null, null, "PartCode", null, null, null, null, "VinCode", null });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
column: "ConcurrencyStamp",
value: "b301dcf7075a41768ced27af9a124f2f");
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
column: "ConcurrencyStamp",
value: "1606b33f2487461fb72fb38851576947");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("f12dd04d-4189-4f24-9501-038a2846b84a"));
migrationBuilder.DropColumn(
name: "AssembleData",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "BillTime",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "ChangedBy",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "ChangedNumber",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "ChangedQty",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "ChangedTime",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "ChangedType",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "CodeType",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "Configcode",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "CreatedTime",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "CustPartCode",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "DeliverBillType",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "DeliverSubBillType",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "ErpToLoc",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "IsReplenished",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "LogType",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "MatchNumber",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "OrderNum",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "PjsNum",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "Qty",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "ReMark",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "RealCode",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "RealPartCode",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "Seq",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "SettlementPartCode",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "SettlementVinCode",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "UniqueCode",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "UpdatedTime",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "VinCode",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "factory",
table: "Set_VmiReplenished");
migrationBuilder.DropColumn(
name: "AssembleData",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "BillTime",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CodeType",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "ConcurrencyStamp",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "Configcode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CreatedTime",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CustPartCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "DeliverBillType",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "DeliverSubBillType",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "ErpToLoc",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "IsReplenished",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "MatchNumber",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "OrderNum",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "PjsNum",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "Qty",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "ReMark",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "RealCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "RealPartCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "Seq",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "SettlementPartCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "SettlementVinCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "UniqueCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "UpdatedTime",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "VinCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "factory",
table: "Set_VmiLog");
migrationBuilder.AddColumn<DateTime>(
name: "LastUpdate",
table: "Set_VmiBalance",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "4e46d864aae4482e8881952792c6825d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "ed9901e7e6e9410586a3af9111d2bb59");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "964f6aa5b6304936a93f8504f317c82e");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "79faaa6f20934b64942a91a524a87af3");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "82ac7a04c0fe4c2992bd99c8a6e73be7");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "1c2bfef188904011b6aca9ed6af49f44");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "cc3b71fcf18245349951c249c5b56e86");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "c8069ed240614eb4a9872d260d8839b8");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "c273b5a9dcbd4fc4ba7d33f6ef464ed7");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "5c56e915398d4e8d92644d811a98c5df");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "8069a183435141cfa0398fe295ec652c");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "e2266fce0ce94b9082a705bb6528b36c");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "54450a20639f479887d74e798aa0f00b");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "LastUpdate", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("9053e8f6-6f09-42ba-9502-2e7a2f9105c3"), null, null, null, "82e1f152724a4a9882aab30e6cc337cb", null, null, 1, null, "ErpToLoc", null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, "OrderNum", null, 0m, null, null, "PartCode", null, null, null, null, "VinCode", null });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
column: "ConcurrencyStamp",
value: "ed9c903f9b4146aeb682f9e60ebff821");
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
column: "ConcurrencyStamp",
value: "b84bb2ea7bf040368718c5d9063144bf");
migrationBuilder.AddForeignKey(
name: "FK_Set_VmiLog_Set_VmiBalance_Id",
table: "Set_VmiLog",
column: "Id",
principalTable: "Set_VmiBalance",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Set_VmiReplenished_Set_VmiLog_Id",
table: "Set_VmiReplenished",
column: "Id",
principalTable: "Set_VmiLog",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}

161
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

@ -4415,7 +4415,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
ConcurrencyStamp = "e25c06d5cdd34b2bbf909e8c655f94fc",
ConcurrencyStamp = "87fd77d7f0e04c4da372a75168619afc",
Cron = "0 0 8 26 *",
IsDisabled = false,
IsRunning = false,
@ -4425,7 +4425,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
ConcurrencyStamp = "800892b9cac64cb69669dc937238d39d",
ConcurrencyStamp = "cda3828abfa24e43a7ff9dced0aceaeb",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4435,7 +4435,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
ConcurrencyStamp = "4794bc4fa2ad409ea64cdd2404983475",
ConcurrencyStamp = "ebb669926c1d4ab988edfe14269e4b20",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4445,7 +4445,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
ConcurrencyStamp = "a4c7d3ff7e3b4578bc2332f114c7a6bb",
ConcurrencyStamp = "12581a5c89da4c8587f2696f8b02ce62",
Cron = "0 0/5 * * * ? *",
IsDisabled = false,
IsRunning = false,
@ -4455,7 +4455,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
ConcurrencyStamp = "98dff4b93f1e4b0ba88a556ab20e7973",
ConcurrencyStamp = "cedf8a69b6474171b18c5fe227b78d26",
Cron = "0 0/5 * * * ? *",
IsDisabled = false,
IsRunning = false,
@ -4465,7 +4465,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
ConcurrencyStamp = "4d161eb0a7154f1db4cf7dcca4ffceea",
ConcurrencyStamp = "15d1504855924d95abde0dc835de555d",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4475,7 +4475,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
ConcurrencyStamp = "0efcdccaa94d4e7fb550794d50efa9ab",
ConcurrencyStamp = "03159d6b06554bf99cfbbb15d476e386",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4485,7 +4485,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
ConcurrencyStamp = "5f427300bdfd44a19eaf54fddde31db1",
ConcurrencyStamp = "b22b285ec9aa48c8b7ed2aa1f9dd7af6",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4495,7 +4495,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
ConcurrencyStamp = "1e3131d9f8454d96b0429796010752d3",
ConcurrencyStamp = "73e9bf92fae34390a12c393f6ed8d163",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4505,7 +4505,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
ConcurrencyStamp = "602c85109f6743a6949bb260b3846ca7",
ConcurrencyStamp = "6cdaca1650424494980e906bb44eab0f",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4515,7 +4515,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
ConcurrencyStamp = "3ab808a6104c483496414711259c375b",
ConcurrencyStamp = "456fe904f19a46349489730351148e28",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4525,7 +4525,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
ConcurrencyStamp = "742b38d034d94d4685b7f074f35cd3ce",
ConcurrencyStamp = "11cf3dd1955c4da29aa430ed0b9bafdb",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4535,7 +4535,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
ConcurrencyStamp = "9186efa28e7242bf94451f40834c2160",
ConcurrencyStamp = "f5d16790a44b4367aeeec82ab1a35fd4",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4617,9 +4617,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<bool?>("IsReplenished")
.HasColumnType("bit");
b.Property<DateTime>("LastUpdate")
.HasColumnType("datetime2");
b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)");
@ -4674,12 +4671,11 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("67c5b578-8110-4674-ac1e-c3da0814244a"),
ConcurrencyStamp = "71adabfbf9a74d35985c08ecba2dd537",
Id = new Guid("f12dd04d-4189-4f24-9501-038a2846b84a"),
ConcurrencyStamp = "1200fe51a7b84cfda12141b184958098",
CreatedTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
DeliverBillType = 1,
ErpToLoc = "ErpToLoc",
LastUpdate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
OrderNum = "OrderNum",
Qty = 0m,
RealPartCode = "PartCode",
@ -4718,6 +4714,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("CodeType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<string>("Configcode")
.HasColumnType("nvarchar(max)");
@ -4821,6 +4820,110 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_VmiMessage");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiReplenished", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("AssembleData")
.HasColumnType("datetime2");
b.Property<DateTime?>("BillTime")
.HasColumnType("datetime2");
b.Property<string>("ChangedBy")
.HasColumnType("nvarchar(max)");
b.Property<string>("ChangedNumber")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("ChangedQty")
.HasColumnType("decimal(18,2)");
b.Property<DateTime>("ChangedTime")
.HasColumnType("datetime2");
b.Property<int>("ChangedType")
.HasColumnType("int");
b.Property<string>("CodeType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ConcurrencyStamp")
.HasColumnType("nvarchar(max)");
b.Property<string>("Configcode")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreatedTime")
.HasColumnType("datetime2");
b.Property<string>("CustPartCode")
.HasColumnType("nvarchar(max)");
b.Property<int?>("DeliverBillType")
.HasColumnType("int");
b.Property<int?>("DeliverSubBillType")
.HasColumnType("int");
b.Property<string>("ErpToLoc")
.HasColumnType("nvarchar(max)");
b.Property<bool?>("IsReplenished")
.HasColumnType("bit");
b.Property<int>("LogType")
.HasColumnType("int");
b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("OrderNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("PjsNum")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
b.Property<string>("ReMark")
.HasColumnType("nvarchar(max)");
b.Property<string>("RealCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("RealPartCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("Seq")
.HasColumnType("nvarchar(max)");
b.Property<string>("SettlementPartCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("SettlementVinCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("UniqueCode")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("UpdatedTime")
.HasColumnType("datetime2");
b.Property<string>("VinCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("factory")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Set_VmiReplenished");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiSnapshot", b =>
{
b.Property<Guid>("Id")
@ -4872,7 +4975,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
ConcurrencyStamp = "09290251f9914e5385fbae2fa00c4734",
ConcurrencyStamp = "b301dcf7075a41768ced27af9a124f2f",
LastUpdate = new DateTime(2023, 8, 20, 0, 0, 0, 0, DateTimeKind.Local),
Name = "库存事务备份",
Number = "Set_VmiLog"
@ -4880,7 +4983,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
ConcurrencyStamp = "cecf7d9ac9924ac99b3665395406b3af",
ConcurrencyStamp = "1606b33f2487461fb72fb38851576947",
LastUpdate = new DateTime(2023, 8, 20, 0, 0, 0, 0, DateTimeKind.Local),
Name = "库存余额备份",
Number = "Set_VmiBalance"
@ -5721,13 +5824,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_relationship");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiReplenished", b =>
{
b.HasBaseType("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog");
b.ToTable("Set_VmiReplenished");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobLog", b =>
{
b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", "Job")
@ -5738,15 +5834,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Navigation("Job");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiReplenished", b =>
{
b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog", null)
.WithOne()
.HasForeignKey("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiReplenished", "Id")
.OnDelete(DeleteBehavior.ClientCascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}

1
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/SettleAccount.EntityFrameworkCore.csproj

@ -31,6 +31,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.17" />
<PackageReference Include="ShardingCore" Version="7.5.1.13" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.3.3" />
<PackageReference Include="Volo.Abp.Dapper" Version="4.3.3" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="4.3.3" />

Loading…
Cancel
Save