From ccbfc5c970003977b371cba9cbe588630dfb613c Mon Sep 17 00:00:00 2001 From: mahao Date: Wed, 26 Jul 2023 13:34:54 +0800 Subject: [PATCH 1/6] tj --- .../Entities/BQ/Dtos/HBPO_SA_DTO.cs | 44 +++++++++++-------- .../Entities/BQ/HBPO_SA_SERVICE.cs | 14 +++--- .../Entities/BQ/PUB_SA_SERVICE.cs | 10 ++--- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs index 51a89a5f..a4523b04 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs @@ -61,45 +61,53 @@ public class HBPO_SA_DETAIL_IMPORT_DTO /// 结算日期 /// [Display(Name = "结算日期")] - [ImporterHeader(Name = "ReceiveDate", Format = "yyyy/MM/dd")] + [ImporterHeader(Name = "ReceiveDate", Format = "yyyy/MM/dd HH:mm:ss")] public DateTime SettleDate { set; get; } /// - /// 零件号 + /// 结算分组号 /// - [Display(Name = "零件号")] + [Display(Name = "DeliveryNode")] [Required(ErrorMessage = "{0}不能为空")] - [ImporterHeader(Name = "PartNumber")] - public string LU { get; set; } + [ImporterHeader(Name = "DeliveryNode")] + public string GroupNum { get; set; } /// - /// 生产号 + /// 到货日期 /// - [Display(Name = "生产号")] - [ImporterHeader(Name = "productionNumber")] + [Display(Name = "DeliveryDate")] [Required(ErrorMessage = "{0}不能为空")] - public string PN { get; set; } + [ImporterHeader(Name = "DeliveryDate", Format = "MM/yyyy/dd HH:mm:ss")] + public DateTime? DeliveryDate { get; set; } + + /// + /// 客户零件号 + /// + [Display(Name = "PartNumber")] + [Required(ErrorMessage = "{0}不能为空")] + [ImporterHeader(Name = "PartNumber")] + public string LU { get; set; } /// /// 数量 /// - [Display(Name = "数量")] + [Display(Name = "结算数量")] [ImporterHeader(Name = "Qty")] public decimal Qty { get; set; } /// - /// 结算分组号 + /// 工厂地点 /// - [Display(Name = "结算分组号")] - [ImporterHeader(Name = "DeliveryNode")] + [Display(Name = "filename")] [Required(ErrorMessage = "{0}不能为空")] - public string GroupNum { get; set; } + [ImporterHeader(Name = "filename")] + public string Site { get; set; } /// - /// 工厂地点 + /// 生产号 /// - [Display(Name = "工厂地点")] - [ImporterHeader(Name = "filename")] + [Display(Name = "productionNumber")] [Required(ErrorMessage = "{0}不能为空")] - public string Site { get; set; } + [ImporterHeader(Name = "productionNumber")] + public string PN { get; set; } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs index 19c63ec0..18f2719c 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs @@ -22,6 +22,8 @@ using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Constant; using Win.Sfs.SettleAccount.ExcelImporter; using Win.Sfs.SettleAccount.ExportReports; +using OfficeOpenXml; +using OfficeOpenXml.Core; namespace Win.Sfs.SettleAccount.Entities.BQ; @@ -143,6 +145,8 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase var result = await _exportImporter.UploadExcelImport(files, _excelImportService); var importPubSaDetails = ObjectMapper.Map, List>(result); + return ""; + //结算分组号 var hbpoSaGroupNums = importPubSaDetails.Select(t => t.GroupNum).Distinct(); @@ -208,7 +212,6 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase }); #endregion - #region 入库数据赋值 //结算明细 hbpoSaDetails = importPubSaDetails; @@ -243,7 +246,6 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase { hbpoNotSaDetails.ForEach(hbpoNotSaDetail => { - hbpoNotSaDetail.InvGroupNum = hbpoCanSaBillNum; hbpoNotSaDetail.BusinessType = businessType; }); @@ -310,19 +312,19 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase //删除 await _hbpoSaRepository.DeleteAsync(hbpoSaDelEntity); - if (hbpoSaDetailDelEntitys != null) + if (hbpoSaDetailDelEntitys.Any()) { await _hbpoSaDetailRepository.DeleteManyAsync(hbpoSaDetailDelEntitys); } - if (hbpoCanSaDelEntitys != null) + if (hbpoCanSaDelEntitys.Any()) { await _hbpoCanSaRepository.DeleteManyAsync(hbpoCanSaDelEntitys); } - if (hbpoCanSaDetailDelEntitys != null) + if (hbpoCanSaDetailDelEntitys.Any()) { await _hbpoCanSaDetailRepository.DeleteManyAsync(hbpoCanSaDetailDelEntitys); } - if (hbpoNotSaDetailDelEntitys != null) + if (hbpoNotSaDetailDelEntitys.Any()) { await _hbpoNotSaDetailRepository.DeleteManyAsync(hbpoNotSaDetailDelEntitys); } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs index 952364aa..f630f957 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs @@ -140,7 +140,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ //不可结算 List pubNotSaDetailDelEntitys; - pubSaDelEntity = await _repository.FindAsync(id); if (pubSaDelEntity == null) return; //结算单据 @@ -160,19 +159,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ //删除 await _repository.DeleteAsync(pubSaDelEntity); - if (pubSaDetailDelEntitys != null) + if (pubSaDetailDelEntitys.Any()) { await _pubSaDetailRepository.DeleteManyAsync(pubSaDetailDelEntitys); } - if (pubCanSaDelEntitys != null) + if (pubCanSaDelEntitys.Any()) { await _pubCanSaRepository.DeleteManyAsync(pubCanSaDelEntitys); } - if (pubCanSaDetailDelEntitys != null) + if (pubCanSaDetailDelEntitys.Any()) { await _pubCanSaDetailRepository.DeleteManyAsync(pubCanSaDetailDelEntitys); } - if (pubNotSaDetailDelEntitys != null) + if (pubNotSaDetailDelEntitys.Any()) { await _pubNotSaDetailRepository.DeleteManyAsync(pubNotSaDetailDelEntitys); } @@ -321,7 +320,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ { pubNotSaDetails.ForEach(pubNotSaDetail => { - pubNotSaDetail.InvGroupNum = pubCanSaBillNum; pubNotSaDetail.BusinessType = businessType; }); From 8079f155411183f97b3b48846e6784d1f9241610 Mon Sep 17 00:00:00 2001 From: mahao Date: Wed, 26 Jul 2023 13:38:29 +0800 Subject: [PATCH 2/6] tj --- .../MaterialRelationships/MaterialRelationshipAppService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs index 2a093dc8..b3dcc89a 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs @@ -41,7 +41,7 @@ public class MaterialRelationshipAppService : SettleAccountApplicationBase [HttpPost] - public async Task ImportAsync(MaterialRelationshipImportRequestDto materialRelationshipImportRequestDto) + public async Task ImportAsync([FromForm] MaterialRelationshipImportRequestDto materialRelationshipImportRequestDto) { ExportImporter _exportImporter = new ExportImporter(); var result = await _exportImporter.UploadExcelImport(materialRelationshipImportRequestDto.Files, _excelImportService); From e6254aab71d2f4f1f17141b40b77d208f1f88df7 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Thu, 27 Jul 2023 08:27:31 +0800 Subject: [PATCH 3/6] update --- .../SettleAccount.HttpApi.Host/Program.cs | 41 +- .../wwwroot/models/bbac-edi-se-compare.js | 1 - .../wwwroot/models/inventory/backup.js | 93 +- .../wwwroot/models/inventory/balance.js | 105 +- .../models/inventory/{record.js => log.js} | 70 +- .../wwwroot/models/inventory/vmi.js | 88 + .../wwwroot/router/business.js | 2 +- .../views/inventory/{record.js => log.js} | 2 +- .../Entities/BQ/HBPO_SA_SERVICE.cs | 1 - .../Entities/BQ/PUB_SA_SERVICE.cs | 1 - .../Entities/BQ/VmiAppService.cs | 284 +- .../SettleAccount.Application.csproj | 6 + .../influxdb/InfluxHelper.cs | 92 + .../influxdb/InfluxQueryResult.cs | 28 + .../Entities/BQ/Vmi/VmiBalance.cs | 57 +- .../Entities/BQ/Vmi/VmiLog.cs | 63 +- ...AccountDbContextModelCreatingExtensions.cs | 8 +- .../20230726065932_vmi4.Designer.cs | 4683 +++++++++++++++++ .../Migrations/20230726065932_vmi4.cs | 202 + .../SettleAccountDbContextModelSnapshot.cs | 67 +- 20 files changed, 5561 insertions(+), 333 deletions(-) rename code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/{record.js => log.js} (65%) create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/vmi.js rename code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/{record.js => log.js} (86%) create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.Application/influxdb/InfluxHelper.cs create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.Application/influxdb/InfluxQueryResult.cs create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230726065932_vmi4.Designer.cs create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230726065932_vmi4.cs diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Program.cs b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Program.cs index a17adf98..b532dc74 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Program.cs +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Program.cs @@ -1,11 +1,9 @@ using System; -using System.IO; -using Magicodes.ExporterAndImporter.Excel.Utility.TemplateExport; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using Serilog; -using Serilog.Events; +using Win.Sfs.SettleAccount.influxdb; namespace Win.Sfs.SettleAccount { @@ -13,37 +11,24 @@ namespace Win.Sfs.SettleAccount { public static int Main(string[] args) { -// Log.Logger = new LoggerConfiguration() -//#if DEBUG -// .MinimumLevel.Debug() -//#else -// .MinimumLevel.Information() -//#endif -// .MinimumLevel.Override("Microsoft", LogEventLevel.Information) -// .Enrich.FromLogContext() -// .WriteTo.Async(c => c.File("Logs/logs.txt")) -//#if DEBUG -// .WriteTo.Async(c => c.Console()) -//#endif -// .CreateLogger(); - - - var configuration = new ConfigurationBuilder() -//#if DEBUG -// .AddJsonFile("appsettings.Development.json") -//#else -// .AddJsonFile("appsettings.json") -//#endif + .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) + .AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")}.json", optional: true, reloadOnChange: true) .Build(); - + try + { + new InfluxHelper(configuration).Start().Query("create database vmi").Wait(); + } + catch (Exception ex) + { + throw new Exception("influxdb 启动失败", ex); + } Log.Logger = new LoggerConfiguration() .ReadFrom.Configuration(configuration) .WriteTo.Async(c => c.Console()) .CreateLogger(); - try { Log.Information("Starting web host."); @@ -67,12 +52,10 @@ namespace Win.Sfs.SettleAccount { webBuilder.ConfigureKestrel((context, options) => { - //设置应用服务器Kestrel请求体最大为50MB options.Limits.MaxRequestBodySize = 5242880000; options.Limits.MaxRequestBufferSize = 302768; - options.Limits.MaxRequestLineSize = 302768; - + options.Limits.MaxRequestLineSize = 302768; }); webBuilder.UseStartup(); }) diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bbac-edi-se-compare.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bbac-edi-se-compare.js index a1428cf3..550041be 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bbac-edi-se-compare.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bbac-edi-se-compare.js @@ -54,7 +54,6 @@ export default function () { query: { url: queryUrl, method: queryMethod, - autoSubmit: true, disableQueryOnLoad: true, schema: { diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/backup.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/backup.js index a6375733..07e27b50 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/backup.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/backup.js @@ -1,52 +1,15 @@ -const schema = { - title: "通用代码", - type: "object", - properties: { - project: { - title: "项目", - type: "string", - readOnly: true, - showForList: true, - rules: [ - { - required: true, - }, - ], - }, - value: { - title: "值", - type: "string", - readOnly: true, - showForList: true, - rules: [ - { - required: true, - }, - ], - }, - description: { - title: "描述", - type: "string", - input: "textarea", - showForList: true, - rules: [ - { - required: true, - }, - { max: 60 }, - ], - }, - }, -}; +import useVmi from "./vmi.js"; -const baseUrl = "settleaccount/code-setting"; -const queryUrl = `${baseUrl}/get-list`; +const schema = useVmi(); + +const baseUrl = "settleaccount/vmi"; +const queryUrl = `${baseUrl}/backup`; const detailsUrl = `${baseUrl}/get/%s`; const createUrl = `${baseUrl}/create`; const updateUrl = `${baseUrl}/update/%s`; const deleteUrl = `${baseUrl}/delete-list`; const importUrl = `${baseUrl}/code-setting-upload-excel-import`; -const exportUrl = `${baseUrl}/export`; +const exportUrl = `${baseUrl}/backup-export`; const queryMethod = "POST"; const detailsMethod = "POST"; const createMethod = "POST"; @@ -61,10 +24,22 @@ export default function () { url: queryUrl, method: queryMethod, hasFilter: true, + autoSubmit: true, + disableQueryOnLoad: true, schema: { - title: "通用代码", + title: "时点库存余额查询", type: "object", properties: { + name: { + title: "时间", + type: "string", + input: "select", + url: "settleaccount/vmi/snapshot", + value: "name", + label: "name", + defaultSelected: true, + clearable: false, + }, filters: { title: "项目", type: "array", @@ -89,7 +64,35 @@ export default function () { default: [ { logic: "and", - column: "project", + column: "erpToLoc", + action: "like", + value: null, + readOnly: true, + }, + { + logic: "and", + column: "lu", + action: "like", + value: null, + readOnly: true, + }, + { + logic: "and", + column: "vinCode", + action: "like", + value: null, + readOnly: true, + }, + { + logic: "and", + column: "codeType", + action: "like", + value: null, + readOnly: true, + }, + { + logic: "and", + column: "proType", action: "like", value: null, readOnly: true, diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/balance.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/balance.js index 5197088b..55a1df18 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/balance.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/balance.js @@ -1,75 +1,6 @@ -const schema = { - title: "寄售库存", - type: "object", - properties: { - id: { - type: "string", - hidden: true, - }, - erpToLoc: { - title: "ERP库位", - type: "string", - }, - lu: { - title: "LU零件号", - type: "string", - }, - partCode: { - title: "客户零件号", - type: "string", - }, - vinCode: { - title: "生产码", - type: "string", - }, - codeType: { - title: "生产码类型", - type: "string", - }, - proType: { - title: "发货类型", - type: "string", - }, - qty: { - title: "数量", - type: "string", - }, - shippingDate: { - title: "发运日期", - type: "string", - input: "date", - }, - creationTime: { - title: "订单日期", - type: "string", - input: "date", - }, - seqNumber: { - title: "EDI顺序号", - type: "string", - }, - tmpe4: { - title: "客户订单号", - type: "string", - }, - uniqueCode: { - title: "塑件唯一码", - type: "string", - }, - matchNumber: { - title: "EDI总成号", - type: "string", - }, - pjsNum: { - title: "PJIS生产顺序号", - type: "string", - }, - desc: { - title: "备注", - type: "string", - }, - }, -}; +import useVmi from "./vmi.js"; + +const schema = useVmi(); const baseUrl = "settleaccount/vmi"; const queryUrl = `${baseUrl}/balance`; @@ -78,7 +9,7 @@ const createUrl = `${baseUrl}/create`; const updateUrl = `${baseUrl}/update/%s`; const deleteUrl = `${baseUrl}/delete-list`; const importUrl = `${baseUrl}/code-setting-upload-excel-import`; -const exportUrl = `${baseUrl}/export`; +const exportUrl = `${baseUrl}/balance-export`; const queryMethod = "POST"; const detailsMethod = "POST"; const createMethod = "POST"; @@ -126,6 +57,34 @@ export default function () { value: null, readOnly: true, }, + { + logic: "and", + column: "lu", + action: "like", + value: null, + readOnly: true, + }, + { + logic: "and", + column: "vinCode", + action: "like", + value: null, + readOnly: true, + }, + { + logic: "and", + column: "codeType", + action: "like", + value: null, + readOnly: true, + }, + { + logic: "and", + column: "proType", + action: "like", + value: null, + readOnly: true, + }, ], }, skipCount: { diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/record.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js similarity index 65% rename from code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/record.js rename to code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js index a6375733..9512c1df 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/record.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js @@ -1,46 +1,52 @@ +//变动单据号、发生时间、生产码类型、、订单号、库位、变动数、EDI顺序号、备注、变动类型(In、Out标识)、发货类型(JIS\JIT\买单件\备件等)、 +//实扣LU零件号、实扣客户零件号、结算LU零件号、结算客户零件号、实扣生产码、结算生产码 +//库位、开始结束时间段、发货类型、生产码、生产码类型、LU零件号、订单号 const schema = { - title: "通用代码", + title: "库存事务日志", type: "object", properties: { - project: { - title: "项目", + orderNumber: { + title: "变动单号", type: "string", - readOnly: true, - showForList: true, - rules: [ - { - required: true, - }, - ], }, - value: { - title: "值", + CreatedDate: { + title: "发生时间", type: "string", - readOnly: true, - showForList: true, - rules: [ - { - required: true, - }, - ], }, - description: { - title: "描述", + CodeType: { + title: "生产码类型", + type: "string", + }, + Tmpe4: { + title: "订单号", + type: "string", + }, + ErpToLoc: { + title: "库位", + type: "string", + }, + Count: { + title: "变动数", + type: "number", + }, + ProType: { + title: "变动单号", + type: "发货类型", + }, + VinCode: { + title: "生产码", + type: "string", + }, + + LU: { + title: "LU零件号", type: "string", - input: "textarea", - showForList: true, - rules: [ - { - required: true, - }, - { max: 60 }, - ], }, }, }; -const baseUrl = "settleaccount/code-setting"; -const queryUrl = `${baseUrl}/get-list`; +const baseUrl = "settleaccount/vmi"; +const queryUrl = `${baseUrl}/log`; const detailsUrl = `${baseUrl}/get/%s`; const createUrl = `${baseUrl}/create`; const updateUrl = `${baseUrl}/update/%s`; @@ -89,7 +95,7 @@ export default function () { default: [ { logic: "and", - column: "project", + column: "erpToLoc", action: "like", value: null, readOnly: true, diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/vmi.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/vmi.js new file mode 100644 index 00000000..098d0584 --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/vmi.js @@ -0,0 +1,88 @@ +export default function () { + return { + title: "寄售库存", + type: "object", + properties: { + // id: { + // type: "string", + // hidden: true, + // showForList: false, + // }, + erpToLoc: { + title: "ERP库位", + type: "string", + }, + lu: { + title: "LU零件号", + type: "string", + }, + partCode: { + title: "客户零件号", + type: "string", + }, + vinCode: { + title: "生产码", + type: "string", + }, + codeType: { + title: "生产码类型", + type: "string", + input: "select", + options: [ + { value: "01", label: "前保" }, + { value: "02", label: "后保" }, + { value: "03", label: "门槛" }, + ], + }, + proType: { + title: "发货类型", + type: "string", + input: "select", + options: [ + { value: "JIS", label: "JIS" }, + { value: "JIT", label: "JIT" }, + { value: "买单件", label: "买单件" }, + { value: "备件", label: "备件" }, + ], + }, + qty: { + title: "数量", + type: "string", + }, + shippingDate: { + title: "发运日期", + type: "string", + input: "date", + }, + creationTime: { + title: "订单日期", + type: "string", + input: "date", + }, + seqNumber: { + title: "EDI顺序号", + type: "string", + }, + tmpe4: { + title: "客户订单号", + type: "string", + }, + uniqueCode: { + title: "塑件唯一码", + type: "string", + }, + matchNumber: { + title: "EDI总成号", + type: "string", + }, + pjsNum: { + title: "PJIS生产顺序号", + type: "string", + }, + desc: { + title: "备注", + type: "string", + }, + }, + }; +} diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js index e4891603..18e4f711 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js @@ -2865,7 +2865,7 @@ export default [ ], }, { - path: "record", + path: "log", meta: { type: "page", title: "库存事物查询", diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/record.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js similarity index 86% rename from code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/record.js rename to code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js index bb4fd659..fa9c49da 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/record.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js @@ -1,6 +1,6 @@ import AppList from "../../../components/list/index.js"; import html from "html"; -import useConfig from "../../../models/inventory/record.js"; +import useConfig from "../../../models/inventory/log.js"; export default { components: { AppList }, diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs index 19c63ec0..e14e3aff 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs @@ -17,7 +17,6 @@ using Win.Sfs.Shared.RepositoryBase; using System; using System.Linq; using Microsoft.AspNetCore.Http; -using NUglify.Helpers; using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Constant; using Win.Sfs.SettleAccount.ExcelImporter; diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs index 952364aa..648fd6e4 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs @@ -6,7 +6,6 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using NUglify.Helpers; using SettleAccount.Domain.BQ; using Volo.Abp; using Volo.Abp.Application.Dtos; 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 a71e37cc..582b0374 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 @@ -1,24 +1,34 @@ using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Diagnostics; +using System.Globalization; using System.IO; using System.Linq; using System.Linq.Dynamic.Core; +using System.Reflection; using System.Threading.Tasks; +using ClosedXML.Excel; +using InfluxDB.LineProtocol.Client; +using Magicodes.ExporterAndImporter.Core.Extension; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage; -using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime; +using Microsoft.Extensions.Configuration; +using Microsoft.OpenApi.Extensions; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; -using Volo.Abp.AspNetCore.Uow; +using Volo.Abp.BlobStoring; using Volo.Abp.DependencyInjection; +using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.EntityFrameworkCore; +using Win.Sfs.SettleAccount.influxdb; using Win.Sfs.Shared.Filter; using Win.Sfs.Shared.RepositoryBase; -using static Microsoft.EntityFrameworkCore.DbLoggerCategory; namespace Win.Sfs.SettleAccount.Entities.BQ; @@ -29,23 +39,28 @@ public interface IVmiService : IApplicationService, ITransientDependency, IJobSe void Out(VmiCategory category, string erpToLoc, string partCode, string lu, decimal count, object message); void Run(string logGroupId, VmiType type); -} - +} + [AllowAnonymous] [Route("api/settleaccount/[controller]/[action]")] public class VmiAppService : ApplicationService, IVmiService, IJobService, ITransientDependency { + private readonly IConfiguration _cfg; private readonly INormalEfCoreRepository _balanceRepository; private readonly INormalEfCoreRepository _logRepository; private readonly INormalEfCoreRepository _snapshotRepository; + private readonly IBlobContainer _fileContainer; - public VmiAppService(INormalEfCoreRepository balanceRepository, + public VmiAppService(IConfiguration cfg, INormalEfCoreRepository balanceRepository, INormalEfCoreRepository logRepository, - INormalEfCoreRepository snapshotRepository) + INormalEfCoreRepository snapshotRepository, + IBlobContainer fileContainer) { + this._cfg = cfg; this._balanceRepository = balanceRepository; this._logRepository = logRepository; this._snapshotRepository = snapshotRepository; + this._fileContainer = fileContainer; } /// @@ -60,15 +75,16 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran using var dbContext = new VmiSqliteContext(connectionString); if (!dbContext.GetService().Exists() && dbContext.Database.EnsureCreated()) { - this._balanceRepository.AsNoTracking().ForEachAsync(o => + var list = this._balanceRepository.AsNoTracking().ToList(); + foreach (var item in list) { - dbContext.Set().Add(o); - }); + dbContext.Set().Add(item); + } dbContext.SaveChanges(); var snapshot = new VmiSnapshot { Name = date, Path = connectionString }; this._snapshotRepository.InsertAsync(snapshot).Wait(); } - Console.WriteLine($"{nameof(VmiAppService)}:{DateTime.Now}"); + Debug.WriteLine($"{nameof(VmiAppService)}:{DateTime.Now}"); } /// @@ -76,7 +92,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran /// [HttpPost] public void In(VmiCategory category, string erpToLoc, string partCode, string lu, decimal count, object message) - { + { } /// @@ -84,7 +100,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran /// [HttpPost] public void Out(VmiCategory category, string erpToLoc, string partCode, string lu, decimal count, object message) - { + { } /// @@ -107,8 +123,21 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran { 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 dtos = ObjectMapper.Map, List>(entities); - return new PagedResultDto(totalCount, entities); + return new PagedResultDto(totalCount, entities); + } + + /// + /// 库存余额导出 + /// + [HttpPost] + public async Task BalanceExport(RequestDto input) + { + var entities = await _balanceRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda()) + .ToListAsync().ConfigureAwait(false); + var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx"; + var content = this.GetContent(entities, "库存备份"); + await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); + return fileName; } /// @@ -119,27 +148,230 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran [HttpPost] public async Task> Log(RequestDto 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 dtos = ObjectMapper.Map, List>(entities); - return new PagedResultDto(totalCount, entities); - } + var type = typeof(VmiLog); + var querySql = $"select * from {typeof(VmiLog).Name} where 1=1"; + var countSql = $"select count(*) from {typeof(VmiLog).Name} where 1=1"; + var where = ""; + if (input.Filters.Any()) + { + foreach (var item in input.Filters) + { + var property = type.GetProperties().FirstOrDefault(p => p.Name.ToLowerInvariant() == item.Column.ToLowerInvariant()); + if (property != null) + { + var @operator = GetOperator(item.Action); + var value = GetValue(property, item.Value); + where += $" and {property.Name}{string.Format(GetOperator(item.Action), item.Value)}"; + } + } + } + var herlper = new InfluxHelper(_cfg); + var countResult = await herlper.Query(countSql + where).ConfigureAwait(false); + var count = Convert.ToInt32(countResult.results.FirstOrDefault().series.FirstOrDefault().values.FirstOrDefault().LastOrDefault()); + var result = await herlper.Query(querySql + where).ConfigureAwait(false); + var entities = new List(); + result.results.FirstOrDefault().series.FirstOrDefault().values.ForEach(v => + { + var entity = Activator.CreateInstance(); + entities.Add(entity); + var i = 0; + result.results.FirstOrDefault().series.FirstOrDefault().columns.ForEach(c => + { + var property = type.GetProperty(c); + if (property != null) + { + this.SetPropertyValue(property, entity, v[i]); + i++; + } + }); + }); + return new PagedResultDto(count, entities); + } + + /// + /// 快照列表 + /// + [HttpPost] + public async Task> Snapshot() + { + var list = await _snapshotRepository.GetListAsync().ConfigureAwait(false); + return new ListResultDto(list); + } /// /// 时点库存查询 /// - /// 备份名称 - /// - [HttpPost("{name}")] - public async Task> Backup(string name, RequestDto input) + [HttpPost] + public async Task> Backup(BackupListRequest input) { - var connectionString = $"Data Source=wwwroot/files/vmi/{name}.db"; + var connectionString = $"Data Source=wwwroot/files/vmi/{input.Name}.db"; using var dbContext = new VmiSqliteContext(connectionString); var repo = dbContext.Set(); var filters = input.Filters.ToLambda(); var query = (input.Filters.Count > 0 ? repo.Where(input.Filters.ToLambda()) : repo); var totalCount = query.Count(); - var entities = await query.PageBy(input.SkipCount, input.MaxResultCount).ToListAsync(); + 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(totalCount, entities); } + + /// + /// 时点库存导出 + /// + [HttpPost] + public async Task BackupExport(BackupListRequest input) + { + var connectionString = $"Data Source=wwwroot/files/vmi/{input.Name}.db"; + using var dbContext = new VmiSqliteContext(connectionString); + var repo = dbContext.Set(); + var filters = input.Filters.ToLambda(); + var query = (input.Filters.Count > 0 ? repo.Where(input.Filters.ToLambda()) : repo); + query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting); + var entities = await query.ToListAsync().ConfigureAwait(false); + var fileName = $"库存备份_{input.Name}.xlsx"; + var content = this.GetContent(entities, "库存备份"); + await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); + return fileName; + } + + private byte[] GetContent(List entities, string name = "sheet1") + { + using var workbook = new XLWorkbook(); + var ws = workbook.Worksheets.Add(name); + var type = typeof(TExport); + var properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.GetProperty) + .Where(o => o.GetAttributes().Any()) + .ToList(); + var rowIndex = 1; + for (var i = 0; i < properties.Count; i++) + { + var property = properties[i]; + var columnIndex = i + 1; + var cell = ws.Cell(1, columnIndex); + cell.Value = property.GetAttributes().Any() ? property.GetAttribute().Name : property.Name; + } + foreach (var item in entities) + { + rowIndex++; + for (var i = 0; i < properties.Count; i++) + { + var property = properties[i]; + var columnIndex = i + 1; + var cell = ws.Cell(rowIndex, columnIndex); + SetCell(item, cell, property); + } + } + ws.RangeUsed().Style.Border.TopBorder = + ws.RangeUsed().Style.Border.RightBorder = + ws.RangeUsed().Style.Border.BottomBorder = + ws.RangeUsed().Style.Border.LeftBorder = XLBorderStyleValues.Thin; + ws.RangeUsed().Style.Border.TopBorderColor = + ws.RangeUsed().Style.Border.RightBorderColor = + ws.RangeUsed().Style.Border.BottomBorderColor = + ws.RangeUsed().Style.Border.LeftBorderColor = XLColor.Black; + ws.RangeUsed().SetAutoFilter(); + ws.ColumnsUsed().AdjustToContents(); + ws.RowsUsed().AdjustToContents(); + using var stream = new MemoryStream(); + workbook.SaveAs(stream); + stream.Seek(0, SeekOrigin.Begin); + return stream.ToArray(); + } + + [HttpGet] + public async Task InfluxQueryTest(string q) + { + return await new InfluxHelper(_cfg).Query(q).ConfigureAwait(false); + } + + [HttpGet] + public List InfluxQueryTest2() + { + var sql = this._logRepository.Where(o => o.Category == null || o.Category == "").ToQueryString(); + return new InfluxHelper(_cfg).Query(out long total, 1, 10, o => o.Category == null || o.Category == ""); + } + + [HttpGet] + public async Task InfluxInsertTest(string q) + { + return await new InfluxHelper(_cfg).Insert(new VmiLog()).ConfigureAwait(false); + } + + private static void SetCell(TExportModel? model, IXLCell cell, PropertyInfo property) + { + var propertyType = property.PropertyType; + var value = property.GetValue(model)?.ToString()?.Trim(); + if (string.IsNullOrEmpty(value)) + { + return; + } + if (propertyType == typeof(bool)) + { + cell.Value = (bool)property.GetValue(model)! ? "是" : "否"; + } + else if (propertyType.IsEnum) + { + cell.Value = (Enum.Parse(propertyType, value) as Enum)?.GetDisplayName(); + } + else if (propertyType == typeof(DateTime)) + { + cell.Value = ((DateTime)property.GetValue(model)!).ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); + } + else + { + cell.Value = value; + } + } + + 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 +{ + [Required] + public string Name { get; set; } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj index 2cd48043..9da8ed51 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj @@ -116,8 +116,14 @@ + + + + + + diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/influxdb/InfluxHelper.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/influxdb/InfluxHelper.cs new file mode 100644 index 00000000..2fe806b6 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/influxdb/InfluxHelper.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Reflection; +using System.Threading.Tasks; +using CodeArts.Db; +using Flurl.Http; +using InfluxDB.LineProtocol.Client; +using InfluxDB.LineProtocol.Payload; +using Microsoft.Extensions.Configuration; + +namespace Win.Sfs.SettleAccount.influxdb; + +public class InfluxHelper +{ + private readonly IConfiguration _configuration; + private readonly string _database = "vmi"; + + public InfluxHelper(IConfiguration configuration) + { + this._configuration = configuration; + } + + public InfluxHelper Start() + { + if (!Process.GetProcessesByName("influxd").Any()) + { + var influxPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "influxdb"); + var process = new Process(); + process.StartInfo = new ProcessStartInfo + { + UseShellExecute = false, + CreateNoWindow = true, + WorkingDirectory = influxPath, + FileName = Path.Combine(influxPath, "influxd.exe"), + Arguments = $"-config {Path.Combine(influxPath, "influxdb.conf")}", + }; + process.Start(); + } + return this; + } + + public async Task Query(string q) + { + var influxUrl = GetUrl(); + var response = await $"{influxUrl}/query".PostUrlEncodedAsync(new { q, db = this._database }).ConfigureAwait(false); + if (response.StatusCode == 200) + { + var result = await response.GetJsonAsync().ConfigureAwait(false); + return result; + } + throw new Exception($"StatusCode:{response.StatusCode}"); + } + + private string GetUrl() + { + return (_configuration.GetConnectionString("influxdb") ?? "http://localhost:8086").TrimEnd('/'); + } + + public async Task Insert(T data) + { + var influxUrl = GetUrl(); + var client = new LineProtocolClient(new Uri(influxUrl), this._database); + var table = typeof(T).Name; + var payload = new LineProtocolPayload(); + var dictonary = typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly) + .ToDictionary(o => o.Name, o => o.GetValue(data, null)); + payload.Add(new LineProtocolPoint(table, dictonary)); + var result = await client.WriteAsync(payload).ConfigureAwait(false); + return result; + } + + public List Query(out long total, int pageIndex, int pageSize, Func where) where T : class, new() + { + var influxOptions = new InfluxOptions(GetUrl(), _database, string.Empty, string.Empty); + var influxDbClient = influxOptions.CreateSampleInfluxClient(); + var connectionConfig = new Influx17xConnectionConfig(influxDbClient); + CodeArtsHelper.InitializeBasic(); + Influx17xHelper.InitializeCodeArts(); + Influx17xHelper.InitializeDefaultConnectionConfig(connectionConfig); + var query = Influx17xHelper.CreateQuery(connectionConfig, null); + //.Where(where); + //total = query.LongCount(); + Debug.WriteLine(query.ToString()); + total = 10; + var result = query.Skip(0).Take(10).ToList(); + return result; + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/influxdb/InfluxQueryResult.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/influxdb/InfluxQueryResult.cs new file mode 100644 index 00000000..7f2d6dc2 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/influxdb/InfluxQueryResult.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; + +namespace Win.Sfs.SettleAccount.influxdb; + +public class InfluxQueryResult +{ + public List results { get; set; } = new List(); +} + +public class InfluxResult +{ + public string statement_id { get; set; } + public List messages { get; set;} = new List(); + public List series { get; set; } = new List(); +} + +public class InfluxMessage +{ + public string level { get; set; } + public string text { get; set; } +} + +public class InfluxSeries +{ + public string name { get; set; } + public List columns { get; set; } = new List(); + public List> values { get; set; } = new List>(); +} 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 5996ed7b..5f5343e5 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 @@ -15,74 +15,55 @@ public class VmiBalance : Entity } /// - /// Erp目标库位 + /// key /// + [Display(Name ="ERP库位")] public string ErpToLoc { get; set; } /// - /// LU零件号 + /// key /// + [Display(Name = "LU零件号")] public string LU { get; set; } - /// - /// 客户零件号 - /// + + [Display(Name = "客户零件号")] public string PartCode { get; set; } /// - /// 生产码 + /// key /// - [Display(Name = "", Description = "Key")] + [Display(Name = "生产码")] public string VinCode { get; set; } - /// - /// 生产码类型 - /// + [Display(Name = "客户零件号")] public string CodeType { get; set; } - /// - /// 发货类型 - /// + [Display(Name = "发货类型")] public string ProType { get; set; } - /// - /// 数量 - /// + [Display(Name = "数量")] public decimal Qty { get; set; } - /// - /// 发运日期 - /// + [Display(Name = "发运日期")] public DateTime ShippingDate { get; set; } - /// - /// 订单日期 - /// + [Display(Name = "订单日期")] public DateTime CreationTime { get; set; } - /// - /// EDI顺序号 - /// + [Display(Name = "EDI顺序号")] public string SeqNumber { get; set; } - /// - /// 客户订单号 - /// - public string Tmpe4 { get; set; } + [Display(Name = "客户订单号")] + public string CustomOrderNumber { get; set; } - /// - /// 塑件唯一码 - /// + [Display(Name = "塑件唯一码")] public string UniqueCode { get; set; } - /// - /// EDI总成号 - /// + [Display(Name = "EDI总成号")] public string MatchNumber { get; set; } - /// - /// PJIS生产顺序号 - /// + [Display(Name = "PJIS生产顺序号")] public string PjsNum { get; set; } [Display(Name = "备注")] 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 d5b698d6..7bf8c614 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 @@ -20,16 +20,31 @@ public class VmiLog : Entity public VmiLogType VmiType { get; set; } /// - /// 库存事务分类 + /// 库存事务分类Number /// - public Guid CategoryId { get; set; } + public string Category { get; set; } /// - /// 库存Id + /// 库存变动 /// - public Guid BalanceId { get; set; } + public decimal Count { get; set; } - #region 库存备份 + /// + /// 变动时间 + /// + public DateTime CreatedDate { get; set; } = DateTime.Now; + + /// + /// 便动人 + /// + public string CreatedBy { get; set; } + + /// + /// 变动单号 + /// + public string OrderNumber { get; set; } + + #region 变动前库存 /// /// Erp目标库位 @@ -82,11 +97,6 @@ public class VmiLog : Entity /// public string SeqNumber { get; set; } - /// - /// 客户订单号 - /// - public string Tmpe4 { get; set; } - /// /// 塑件唯一码 /// @@ -107,27 +117,23 @@ public class VmiLog : Entity /// public string BalanceDesc { get; set; } - #endregion 库存备份 - /// - /// 变动单号 + /// 备注 /// - public string OrderNumber { get; set; } + public string Desc { get; set; } - /// - /// 变动时间 - /// - public DateTime CreatedDate { get; set; } = DateTime.Now; + #endregion 变动前库存 - /// - /// 变动类型 - /// - public string D2 { get; set; } + #region 入库附加信息 /// - /// 便动人 + /// 客户订单号 /// - public string CreatedBy { get; set; } + public string Tmpe4 { get; set; } + + #endregion 入库附加信息 + + #region 出库附加信息 /// /// 实扣LU零件号 @@ -159,12 +165,5 @@ public class VmiLog : Entity /// public string K2 { get; set; } - /// - /// 备注 - /// - public string Desc { get; set; } - - public VmiType Type { get; set; } - public VmiCategory Category { get; set; } - public VmiBalance Balance { get; set; } + #endregion 出库附加信息 } 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 7582fdb3..dfe55a6e 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -1202,13 +1202,13 @@ namespace Win.Sfs.SettleAccount //seed builder.Entity().HasData(new JobItem("vmi".ToGuid()) { Name = "库存快照", Cron = "0 0 8 26 *", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiService" }); - builder.Entity().HasData(new VmiCategory("发运".ToGuid()) { Type = VmiType.In, Name = "发运", Number = "100" }); - builder.Entity().HasData(new VmiCategory("结算".ToGuid()) { Type = VmiType.Out, Name = "结算", Number = "200" }); + builder.Entity().HasData(new VmiCategory("发运入库".ToGuid()) { Type = VmiType.In, Name = "发运入库", Number = "100" }); + builder.Entity().HasData(new VmiCategory("结算出库".ToGuid()) { Type = VmiType.Out, Name = "结算出库", Number = "200" }); builder.Entity().HasData(new VmiCategory("客户退货".ToGuid()) { Type = VmiType.Out, Name = "客户退货", Number = "300" }); builder.Entity().HasData(new VmiCategory("调整入库".ToGuid()) { Type = VmiType.In, Name = "调整入库", Number = "400" }); builder.Entity().HasData(new VmiCategory("调整出库".ToGuid()) { Type = VmiType.Out, Name = "调整出库", Number = "500" }); - builder.Entity().HasData(new VmiCategory("漏发补货".ToGuid()) { Type = VmiType.In, Name = "漏发补货", Number = "600" }); - builder.Entity().HasData(new VmiCategory("负库存补货".ToGuid()) { Type = VmiType.In, Name = "负库存补货", Number = "700" }); + //builder.Entity().HasData(new VmiCategory("漏发补货".ToGuid()) { Type = VmiType.In, Name = "漏发补货", Number = "600" }); + //builder.Entity().HasData(new VmiCategory("负库存补货".ToGuid()) { Type = VmiType.In, Name = "负库存补货", Number = "700" }); } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230726065932_vmi4.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230726065932_vmi4.Designer.cs new file mode 100644 index 00000000..b48e71bd --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230726065932_vmi4.Designer.cs @@ -0,0 +1,4683 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Win.Sfs.SettleAccount; + +namespace Win.Sfs.SettleAccount.Migrations +{ + [DbContext(typeof(SettleAccountDbContext))] + [Migration("20230726065932_vmi4")] + partial class vmi4 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.17") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_CAN_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractDocID") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_CAN_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_NOT_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractDocID") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_NOT_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_PD_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend2") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend3") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend4") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RELU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("REPN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_PD_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DNBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_EDI", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend4") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_EDI"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_SA_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WMSQty") + .HasColumnType("decimal(18,2)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_SA_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_CAN_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_CAN_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_CAN_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_CAN_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_NOT_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_NOT_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_PD_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend2") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend3") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend4") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RELU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("REPN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_PD_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DNBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("RecordCount") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_EDI", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend4") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_EDI"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_SA_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WMSQty") + .HasColumnType("decimal(18,2)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_SA_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_GRP", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvoiceState") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("RealnvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TaxAmt") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_GRP"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_MAP_GROUP", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_MAP_GROUP"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_NOT_SETTLE", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_NOT_SETTLE"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_WAIT_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BussiessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend4") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PRICE") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_WAIT_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.JIT_SE_SA_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WMSQty") + .HasColumnType("decimal(18,2)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_JIT_SE_SA_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_CAN_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_CAN_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_CAN_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_CAN_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_NOT_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_NOT_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_PD_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend2") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend3") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend4") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RELU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("REPN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_PD_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_SE_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SE_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PURCHASE_PRICE", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.ToTable("Set_PURCHASE_PRICE"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.TB_RePartsRelationship", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("RepLU") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_TB_RePartsRelationship"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Boms.Bom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BomLevel") + .HasColumnType("int"); + + b.Property("BomType") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ChildItemDesc") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("ChildItemUom") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EffectiveTime") + .HasColumnType("datetime2"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IssuePosition") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OperateProcess") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentItemDesc") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("ScrapPercent") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("ParentItemCode", "ChildItemCode", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_bom"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.BBAC_SEC_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimitiveLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReplaceLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SAQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SEC_DETAIL"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.HBPO_SEC_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimitiveLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReplaceLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SAQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SEC_DETAIL"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.PUB_SEC_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimitiveLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReplaceLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SAQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SEC_DETAIL"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Cron") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsRunning") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Service") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Set_JobItem"); + + b.HasData( + new + { + Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), + Cron = "0 0 8 26 *", + IsRunning = false, + Name = "库存快照", + Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiService" + }); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("End") + .HasColumnType("datetime2"); + + b.Property("Exception") + .HasColumnType("nvarchar(max)"); + + b.Property("JobId") + .HasColumnType("uniqueidentifier"); + + b.Property("Start") + .HasColumnType("datetime2"); + + b.Property("Success") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("JobId"); + + b.ToTable("Set_JobLog"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiBalance", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CodeType") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CustomOrderNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpToLoc") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("LU") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("MatchNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("PjsNum") + .HasColumnType("nvarchar(max)"); + + b.Property("ProType") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("UniqueCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VinCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasAlternateKey("ErpToLoc", "PartCode", "LU"); + + b.ToTable("Set_VmiBalance"); + + b.HasData( + new + { + Id = new Guid("cd6b8f09-2146-73d3-cade-4e832627b4f6"), + CreationTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + Desc = "test", + ErpToLoc = "key1", + LU = "key3", + PartCode = "key2", + Qty = 0m, + ShippingDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified) + }); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Set_VmiCategory"); + + b.HasData( + new + { + Id = new Guid("b3b321dd-5e0e-55b0-5548-70a742e9a4db"), + Name = "发运入库", + Number = "100", + Type = 0 + }, + new + { + Id = new Guid("a04d00ac-0e9c-064d-b7ce-af0b4d7c8c6b"), + Name = "结算出库", + Number = "200", + Type = 1 + }, + new + { + Id = new Guid("c9199f7f-7cc8-7423-d608-f206167ae0b6"), + Name = "客户退货", + Number = "300", + Type = 1 + }, + new + { + Id = new Guid("5fda8ad4-f424-a9e1-8174-72c0f29fc225"), + Name = "调整入库", + Number = "400", + Type = 0 + }, + new + { + Id = new Guid("42230472-9f26-7484-ff2a-451878e9955f"), + Name = "调整出库", + Number = "500", + Type = 1 + }); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BalanceDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Category") + .HasColumnType("nvarchar(max)"); + + b.Property("CodeType") + .HasColumnType("nvarchar(max)"); + + b.Property("Count") + .HasColumnType("decimal(18,2)"); + + b.Property("CreatedBy") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Desc") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpToLoc") + .HasColumnType("nvarchar(max)"); + + b.Property("F2") + .HasColumnType("nvarchar(max)"); + + b.Property("G2") + .HasColumnType("nvarchar(max)"); + + b.Property("GroupId") + .HasColumnType("nvarchar(max)"); + + b.Property("H2") + .HasColumnType("nvarchar(max)"); + + b.Property("I2") + .HasColumnType("nvarchar(max)"); + + b.Property("J2") + .HasColumnType("nvarchar(max)"); + + b.Property("K2") + .HasColumnType("nvarchar(max)"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("MatchNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PjsNum") + .HasColumnType("nvarchar(max)"); + + b.Property("ProType") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Tmpe4") + .HasColumnType("nvarchar(max)"); + + b.Property("UniqueCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VinCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VmiCategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("VmiType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("VmiCategoryId"); + + b.ToTable("Set_VmiLog"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiSnapshot", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("Path") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_VmiSnapshot"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Boms.BomVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_bom_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.CodeSettings.CodeSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Project") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_CodeSetting"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Controls.CentralizedControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("bit"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Year", "Period") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_control"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Materials.Material", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerPartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimateType") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("EstimateTypeDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_material"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceList", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractNo") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceList"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceListBJ", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractNo") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceListBJ"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceListVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceListVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceListVersionBJ", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceListVersionBJ"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.TaskJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActionName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Creator") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DownFileName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Error") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RealDownFileName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("RealFileName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("ServiceName") + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Type") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_TaskJob"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.MaterialRelationships.MaterialRelationship", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppraisalCategory") + .HasColumnType("nvarchar(max)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpMaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialProperty") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleMaterialCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ShipMaterailCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ErpMaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_relationship"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobLog", b => + { + b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", "Job") + .WithMany() + .HasForeignKey("JobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Job"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog", b => + { + b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiCategory", null) + .WithMany("Logs") + .HasForeignKey("VmiCategoryId"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiCategory", b => + { + b.Navigation("Logs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230726065932_vmi4.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230726065932_vmi4.cs new file mode 100644 index 00000000..0e1f5c2c --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230726065932_vmi4.cs @@ -0,0 +1,202 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Win.Sfs.SettleAccount.Migrations +{ + public partial class vmi4 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_Set_VmiLog_Set_VmiBalance_BalanceId", + table: "Set_VmiLog"); + + migrationBuilder.DropForeignKey( + name: "FK_Set_VmiLog_Set_VmiCategory_CategoryId", + table: "Set_VmiLog"); + + migrationBuilder.DropIndex( + name: "IX_Set_VmiLog_BalanceId", + table: "Set_VmiLog"); + + migrationBuilder.DropIndex( + name: "IX_Set_VmiLog_CategoryId", + table: "Set_VmiLog"); + + migrationBuilder.DeleteData( + table: "Set_VmiCategory", + keyColumn: "Id", + keyValue: new Guid("27b1609e-05af-cef7-f5f4-dd598c31b4de")); + + migrationBuilder.DeleteData( + table: "Set_VmiCategory", + keyColumn: "Id", + keyValue: new Guid("3e0655a6-2532-a861-344f-b9c53c809c64")); + + migrationBuilder.DeleteData( + table: "Set_VmiCategory", + keyColumn: "Id", + keyValue: new Guid("869f1589-9063-a545-719e-a83b6dca03c3")); + + migrationBuilder.DeleteData( + table: "Set_VmiCategory", + keyColumn: "Id", + keyValue: new Guid("a6462ee4-6e2c-bc8b-b1cb-5203c8dcaea8")); + + migrationBuilder.DropColumn( + name: "BalanceId", + table: "Set_VmiLog"); + + migrationBuilder.DropColumn( + name: "CategoryId", + table: "Set_VmiLog"); + + migrationBuilder.DropColumn( + name: "Type", + table: "Set_VmiLog"); + + migrationBuilder.RenameColumn( + name: "D2", + table: "Set_VmiLog", + newName: "Category"); + + migrationBuilder.RenameColumn( + name: "Tmpe4", + table: "Set_VmiBalance", + newName: "CustomOrderNumber"); + + migrationBuilder.AddColumn( + name: "Count", + table: "Set_VmiLog", + type: "decimal(18,2)", + nullable: false, + defaultValue: 0m); + + migrationBuilder.AddColumn( + name: "VmiCategoryId", + table: "Set_VmiLog", + type: "uniqueidentifier", + nullable: true); + + migrationBuilder.InsertData( + table: "Set_VmiCategory", + columns: new[] { "Id", "Name", "Number", "Type" }, + values: new object[] { new Guid("b3b321dd-5e0e-55b0-5548-70a742e9a4db"), "发运入库", "100", 0 }); + + migrationBuilder.InsertData( + table: "Set_VmiCategory", + columns: new[] { "Id", "Name", "Number", "Type" }, + values: new object[] { new Guid("a04d00ac-0e9c-064d-b7ce-af0b4d7c8c6b"), "结算出库", "200", 1 }); + + migrationBuilder.CreateIndex( + name: "IX_Set_VmiLog_VmiCategoryId", + table: "Set_VmiLog", + column: "VmiCategoryId"); + + migrationBuilder.AddForeignKey( + name: "FK_Set_VmiLog_Set_VmiCategory_VmiCategoryId", + table: "Set_VmiLog", + column: "VmiCategoryId", + principalTable: "Set_VmiCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_Set_VmiLog_Set_VmiCategory_VmiCategoryId", + table: "Set_VmiLog"); + + migrationBuilder.DropIndex( + name: "IX_Set_VmiLog_VmiCategoryId", + table: "Set_VmiLog"); + + migrationBuilder.DeleteData( + table: "Set_VmiCategory", + keyColumn: "Id", + keyValue: new Guid("a04d00ac-0e9c-064d-b7ce-af0b4d7c8c6b")); + + migrationBuilder.DeleteData( + table: "Set_VmiCategory", + keyColumn: "Id", + keyValue: new Guid("b3b321dd-5e0e-55b0-5548-70a742e9a4db")); + + migrationBuilder.DropColumn( + name: "Count", + table: "Set_VmiLog"); + + migrationBuilder.DropColumn( + name: "VmiCategoryId", + table: "Set_VmiLog"); + + migrationBuilder.RenameColumn( + name: "Category", + table: "Set_VmiLog", + newName: "D2"); + + migrationBuilder.RenameColumn( + name: "CustomOrderNumber", + table: "Set_VmiBalance", + newName: "Tmpe4"); + + migrationBuilder.AddColumn( + name: "BalanceId", + table: "Set_VmiLog", + type: "uniqueidentifier", + nullable: false, + defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); + + migrationBuilder.AddColumn( + name: "CategoryId", + table: "Set_VmiLog", + type: "uniqueidentifier", + nullable: false, + defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); + + migrationBuilder.AddColumn( + name: "Type", + table: "Set_VmiLog", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.InsertData( + table: "Set_VmiCategory", + columns: new[] { "Id", "Name", "Number", "Type" }, + values: new object[,] + { + { new Guid("a6462ee4-6e2c-bc8b-b1cb-5203c8dcaea8"), "发运", "100", 0 }, + { new Guid("869f1589-9063-a545-719e-a83b6dca03c3"), "结算", "200", 1 }, + { new Guid("3e0655a6-2532-a861-344f-b9c53c809c64"), "漏发补货", "600", 0 }, + { new Guid("27b1609e-05af-cef7-f5f4-dd598c31b4de"), "负库存补货", "700", 0 } + }); + + migrationBuilder.CreateIndex( + name: "IX_Set_VmiLog_BalanceId", + table: "Set_VmiLog", + column: "BalanceId"); + + migrationBuilder.CreateIndex( + name: "IX_Set_VmiLog_CategoryId", + table: "Set_VmiLog", + column: "CategoryId"); + + migrationBuilder.AddForeignKey( + name: "FK_Set_VmiLog_Set_VmiBalance_BalanceId", + table: "Set_VmiLog", + column: "BalanceId", + principalTable: "Set_VmiBalance", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_Set_VmiLog_Set_VmiCategory_CategoryId", + table: "Set_VmiLog", + column: "CategoryId", + principalTable: "Set_VmiCategory", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + } +} 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 c43d17d6..2196306c 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs @@ -3540,6 +3540,9 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("CreationTime") .HasColumnType("datetime2"); + b.Property("CustomOrderNumber") + .HasColumnType("nvarchar(max)"); + b.Property("Desc") .HasColumnType("nvarchar(max)"); @@ -3573,9 +3576,6 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("ShippingDate") .HasColumnType("datetime2"); - b.Property("Tmpe4") - .HasColumnType("nvarchar(max)"); - b.Property("UniqueCode") .HasColumnType("nvarchar(max)"); @@ -3634,15 +3634,15 @@ namespace Win.Sfs.SettleAccount.Migrations b.HasData( new { - Id = new Guid("a6462ee4-6e2c-bc8b-b1cb-5203c8dcaea8"), - Name = "发运", + Id = new Guid("b3b321dd-5e0e-55b0-5548-70a742e9a4db"), + Name = "发运入库", Number = "100", Type = 0 }, new { - Id = new Guid("869f1589-9063-a545-719e-a83b6dca03c3"), - Name = "结算", + Id = new Guid("a04d00ac-0e9c-064d-b7ce-af0b4d7c8c6b"), + Name = "结算出库", Number = "200", Type = 1 }, @@ -3666,20 +3666,6 @@ namespace Win.Sfs.SettleAccount.Migrations Name = "调整出库", Number = "500", Type = 1 - }, - new - { - Id = new Guid("3e0655a6-2532-a861-344f-b9c53c809c64"), - Name = "漏发补货", - Number = "600", - Type = 0 - }, - new - { - Id = new Guid("27b1609e-05af-cef7-f5f4-dd598c31b4de"), - Name = "负库存补货", - Number = "700", - Type = 0 }); }); @@ -3692,15 +3678,15 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("BalanceDesc") .HasColumnType("nvarchar(max)"); - b.Property("BalanceId") - .HasColumnType("uniqueidentifier"); - - b.Property("CategoryId") - .HasColumnType("uniqueidentifier"); + b.Property("Category") + .HasColumnType("nvarchar(max)"); b.Property("CodeType") .HasColumnType("nvarchar(max)"); + b.Property("Count") + .HasColumnType("decimal(18,2)"); + b.Property("CreatedBy") .HasColumnType("nvarchar(max)"); @@ -3710,9 +3696,6 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("CreationTime") .HasColumnType("datetime2"); - b.Property("D2") - .HasColumnType("nvarchar(max)"); - b.Property("Desc") .HasColumnType("nvarchar(max)"); @@ -3770,23 +3753,21 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("Tmpe4") .HasColumnType("nvarchar(max)"); - b.Property("Type") - .HasColumnType("int"); - b.Property("UniqueCode") .HasColumnType("nvarchar(max)"); b.Property("VinCode") .HasColumnType("nvarchar(max)"); + b.Property("VmiCategoryId") + .HasColumnType("uniqueidentifier"); + b.Property("VmiType") .HasColumnType("int"); b.HasKey("Id"); - b.HasIndex("BalanceId"); - - b.HasIndex("CategoryId"); + b.HasIndex("VmiCategoryId"); b.ToTable("Set_VmiLog"); }); @@ -4685,21 +4666,9 @@ namespace Win.Sfs.SettleAccount.Migrations modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog", b => { - b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiBalance", "Balance") - .WithMany() - .HasForeignKey("BalanceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiCategory", "Category") + b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiCategory", null) .WithMany("Logs") - .HasForeignKey("CategoryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Balance"); - - b.Navigation("Category"); + .HasForeignKey("VmiCategoryId"); }); modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiCategory", b => From f08c571eb44a407ab0a68a9abb2c0c9a941168db Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Thu, 27 Jul 2023 08:29:51 +0800 Subject: [PATCH 4/6] update --- ...eAccountDbContextModelCreatingExtensions.cs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) 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 f8bee45e..e2755680 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -101,7 +101,6 @@ namespace Win.Sfs.SettleAccount builder.ConfigureHBPO_SEC_DETAIL(options); builder.ConfigureBBAC_SEC_DETAIL(options); - builder.ConfigurePUB_ADJ_DETAIL(options); builder.ConfigureBBAC_ADJ_DETAIL(options); builder.ConfigureHBPO_ADJ_DETAIL(options); @@ -1158,10 +1157,8 @@ namespace Win.Sfs.SettleAccount private static void ConfigurePUB_ADJ_DETAIL(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) { - builder.Entity(b => { - b.ToTable($"{options.TablePrefix}_PUB_ADJ_DETAIL", options.Schema); b.ConfigureByConvention(); @@ -1181,10 +1178,8 @@ namespace Win.Sfs.SettleAccount private static void ConfigureHBPO_ADJ_DETAIL(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) { - builder.Entity(b => { - b.ToTable($"{options.TablePrefix}_HBPO_ADJ_DETAIL", options.Schema); b.ConfigureByConvention(); @@ -1200,12 +1195,11 @@ namespace Win.Sfs.SettleAccount b.Property(x => x.ConcurrencyStamp).HasMaxLength(50); }); } + private static void ConfigureBBAC_ADJ_DETAIL(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) { - builder.Entity(b => { - b.ToTable($"{options.TablePrefix}_BBAC_ADJ_DETAIL", options.Schema); b.ConfigureByConvention(); @@ -1224,7 +1218,6 @@ namespace Win.Sfs.SettleAccount }); } - private static void ConfigureVmi(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) { builder.Entity(b => @@ -1274,15 +1267,6 @@ namespace Win.Sfs.SettleAccount b.ConfigureByConvention(); }); - - - - - - - - - //seed builder.Entity().HasData(new JobItem("vmi".ToGuid()) { Name = "库存快照", Cron = "0 0 8 26 *", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiService" }); builder.Entity().HasData(new VmiCategory("发运入库".ToGuid()) { Type = VmiType.In, Name = "发运入库", Number = "100" }); From 110750d5a3d8e7543638d3bc3ff609bd6a52ed01 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Thu, 27 Jul 2023 08:54:20 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0JobItem=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccount.HttpApi.Host/Startup.cs | 39 +- .../Entities/BQ/Vmi/JobItem.cs | 1 + .../20230727005325_vmi5.Designer.cs | 4966 +++++++++++++++++ .../Migrations/20230727005325_vmi5.cs | 24 + .../SettleAccountDbContextModelSnapshot.cs | 4 + 5 files changed, 5016 insertions(+), 18 deletions(-) create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230727005325_vmi5.Designer.cs create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230727005325_vmi5.cs 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 69545588..baa16222 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs @@ -20,7 +20,7 @@ public class Startup { public void ConfigureServices(IServiceCollection services) { - services.AddSignalR(o => o.EnableDetailedErrors=true); + services.AddSignalR(o => o.EnableDetailedErrors = true); AppDomain.CurrentDomain.GetAssemblies().SelectMany(o => o.GetTypes()) .Where(o => o.IsClass && !o.IsAbstract && o.IsAssignableTo(typeof(IJobService))) .ForEach(o => services.AddTransient(o)); @@ -65,25 +65,28 @@ public class Startup var jobItemRepository = db.Set(); var jobLogRepository = db.Set(); var jobItem = jobItemRepository.FirstOrDefault(o => o.Id == jobId); - jobItem.IsRunning = true; - db.SaveChanges(); - var jobLog = new JobLog { JobId = jobId, Start = DateTime.Now }; - try + if (!jobItem.IsDisabled) { - jobService.Invoke(); - jobLog.Success = true; - } - catch (Exception ex) - { - Console.WriteLine(ex.ToString()); - jobLog.Exception = ex.ToString(); - } - finally - { - jobLog.End = DateTime.Now; - jobLogRepository.Add(jobLog); - jobItem.IsRunning = false; + jobItem.IsRunning = true; db.SaveChanges(); + var jobLog = new JobLog { JobId = jobId, Start = DateTime.Now }; + try + { + jobService.Invoke(); + jobLog.Success = true; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + jobLog.Exception = ex.ToString(); + } + finally + { + jobLog.End = DateTime.Now; + jobLogRepository.Add(jobLog); + jobItem.IsRunning = false; + db.SaveChanges(); + } } }).Cron(job.Cron); } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/JobItem.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/JobItem.cs index 06d07496..e00008e7 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/JobItem.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/JobItem.cs @@ -10,6 +10,7 @@ public class JobItem : Entity, IHasConcurrencyStamp this.Id = id; } + public bool IsDisabled { get; set; } public string Name { get; set; } public string Cron { get; set; } public string Service { get; set; } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230727005325_vmi5.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230727005325_vmi5.Designer.cs new file mode 100644 index 00000000..1e1a1259 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230727005325_vmi5.Designer.cs @@ -0,0 +1,4966 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Win.Sfs.SettleAccount; + +namespace Win.Sfs.SettleAccount.Migrations +{ + [DbContext(typeof(SettleAccountDbContext))] + [Migration("20230727005325_vmi5")] + partial class vmi5 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.17") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_ADJ_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractDocID") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OldInvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_ADJ_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_CAN_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractDocID") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_CAN_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_NOT_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractDocID") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_NOT_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_PD_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend2") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend3") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend4") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RELU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("REPN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_PD_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DNBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsReturn") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_EDI", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend4") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_EDI"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_SA_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WMSQty") + .HasColumnType("decimal(18,2)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SE_SA_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_ADJ_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OldInvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_ADJ_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_CAN_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_CAN_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_CAN_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_CAN_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_NOT_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_NOT_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_PD_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend2") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend3") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend4") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RELU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("REPN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_PD_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DNBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("RecordCount") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_EDI", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend4") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_EDI"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_SE_SA_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WMSQty") + .HasColumnType("decimal(18,2)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SE_SA_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_GRP", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvoiceState") + .HasColumnType("int"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("RealnvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TaxAmt") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_GRP"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_MAP_GROUP", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_MAP_GROUP"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_NOT_SETTLE", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_NOT_SETTLE"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.INVOICE_WAIT_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BussiessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend4") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvbillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PRICE") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_INVOICE_WAIT_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.JIT_SE_SA_REPORT", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AssemblyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Category") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EDIQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("InjectionCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WMSQty") + .HasColumnType("decimal(18,2)"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_JIT_SE_SA_REPORT"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_ADJ_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OldInvBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_ADJ_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_CAN_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Site") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_CAN_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_CAN_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_CAN_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_NOT_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_NOT_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_PD_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend2") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend3") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend4") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("InvGroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("RELU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("REPN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_PD_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_SA", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SA"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_SA_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("Site") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SA_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PUB_SE_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BusinessType") + .HasMaxLength(50) + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Extend1") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend2") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Extend3") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KeyCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SE_DETAIL"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.PURCHASE_PRICE", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.ToTable("Set_PURCHASE_PRICE"); + }); + + modelBuilder.Entity("SettleAccount.Domain.BQ.TB_RePartsRelationship", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("RepLU") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_TB_RePartsRelationship"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Boms.Bom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BomLevel") + .HasColumnType("int"); + + b.Property("BomType") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ChildItemDesc") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("ChildItemUom") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("EffectiveTime") + .HasColumnType("datetime2"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExpireTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IssuePosition") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("OperateProcess") + .HasColumnType("int"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("ParentItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentItemDesc") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("ScrapPercent") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("ParentItemCode", "ChildItemCode", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_bom"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.BBAC_SEC_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimitiveLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReplaceLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SAQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_BBAC_SEC_DETAIL"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.HBPO_SEC_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimitiveLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReplaceLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SAQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_HBPO_SEC_DETAIL"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.PUB_SEC_DETAIL", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerOfflineTime") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FixPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MateType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDes") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PJISSeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PN") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PrimitiveLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReplaceLU") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SAQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SEQty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("WmsBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PUB_SEC_DETAIL"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("Cron") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDisabled") + .HasColumnType("bit"); + + b.Property("IsRunning") + .HasColumnType("bit"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Service") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Set_JobItem"); + + b.HasData( + new + { + Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), + Cron = "0 0 8 26 *", + IsDisabled = false, + IsRunning = false, + Name = "库存快照", + Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiService" + }); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("End") + .HasColumnType("datetime2"); + + b.Property("Exception") + .HasColumnType("nvarchar(max)"); + + b.Property("JobId") + .HasColumnType("uniqueidentifier"); + + b.Property("Start") + .HasColumnType("datetime2"); + + b.Property("Success") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("JobId"); + + b.ToTable("Set_JobLog"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiBalance", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("CodeType") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CustomOrderNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Desc") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpToLoc") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("LU") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("MatchNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("PjsNum") + .HasColumnType("nvarchar(max)"); + + b.Property("ProType") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("UniqueCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VinCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasAlternateKey("ErpToLoc", "PartCode", "LU"); + + b.ToTable("Set_VmiBalance"); + + b.HasData( + new + { + Id = new Guid("cd6b8f09-2146-73d3-cade-4e832627b4f6"), + CreationTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), + Desc = "test", + ErpToLoc = "key1", + LU = "key3", + PartCode = "key2", + Qty = 0m, + ShippingDate = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified) + }); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Number") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.HasIndex("Number") + .IsUnique(); + + b.ToTable("Set_VmiCategory"); + + b.HasData( + new + { + Id = new Guid("b3b321dd-5e0e-55b0-5548-70a742e9a4db"), + Name = "发运入库", + Number = "100", + Type = 0 + }, + new + { + Id = new Guid("a04d00ac-0e9c-064d-b7ce-af0b4d7c8c6b"), + Name = "结算出库", + Number = "200", + Type = 1 + }, + new + { + Id = new Guid("c9199f7f-7cc8-7423-d608-f206167ae0b6"), + Name = "客户退货", + Number = "300", + Type = 1 + }, + new + { + Id = new Guid("5fda8ad4-f424-a9e1-8174-72c0f29fc225"), + Name = "调整入库", + Number = "400", + Type = 0 + }, + new + { + Id = new Guid("42230472-9f26-7484-ff2a-451878e9955f"), + Name = "调整出库", + Number = "500", + Type = 1 + }); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BalanceDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Category") + .HasColumnType("nvarchar(max)"); + + b.Property("CodeType") + .HasColumnType("nvarchar(max)"); + + b.Property("Count") + .HasColumnType("decimal(18,2)"); + + b.Property("CreatedBy") + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedDate") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Desc") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpToLoc") + .HasColumnType("nvarchar(max)"); + + b.Property("F2") + .HasColumnType("nvarchar(max)"); + + b.Property("G2") + .HasColumnType("nvarchar(max)"); + + b.Property("GroupId") + .HasColumnType("nvarchar(max)"); + + b.Property("H2") + .HasColumnType("nvarchar(max)"); + + b.Property("I2") + .HasColumnType("nvarchar(max)"); + + b.Property("J2") + .HasColumnType("nvarchar(max)"); + + b.Property("K2") + .HasColumnType("nvarchar(max)"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("MatchNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("PartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("PjsNum") + .HasColumnType("nvarchar(max)"); + + b.Property("ProType") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("SeqNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("ShippingDate") + .HasColumnType("datetime2"); + + b.Property("Tmpe4") + .HasColumnType("nvarchar(max)"); + + b.Property("UniqueCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VinCode") + .HasColumnType("nvarchar(max)"); + + b.Property("VmiCategoryId") + .HasColumnType("uniqueidentifier"); + + b.Property("VmiType") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("VmiCategoryId"); + + b.ToTable("Set_VmiLog"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiSnapshot", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("Path") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_VmiSnapshot"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Boms.BomVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_bom_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.CodeSettings.CodeSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Project") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_CodeSetting"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Controls.CentralizedControl", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("bit"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Year", "Period") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_control"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Materials.Material", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerPartCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimateType") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("EstimateTypeDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_material"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceList", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("BusinessType") + .HasColumnType("int"); + + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractNo") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceList"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceListBJ", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ContractNo") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndDate") + .HasColumnType("datetime2"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LU") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceListBJ"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceListVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceListVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceListVersionBJ", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_PriceListVersionBJ"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.TaskJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActionName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Creator") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DownFileName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Error") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RealDownFileName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("RealFileName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("ServiceName") + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Type") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_TaskJob"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.MaterialRelationships.MaterialRelationship", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppraisalCategory") + .HasColumnType("nvarchar(max)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpMaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialProperty") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleMaterialCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ShipMaterailCode") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ErpMaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_relationship"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobLog", b => + { + b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", "Job") + .WithMany() + .HasForeignKey("JobId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Job"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog", b => + { + b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiCategory", null) + .WithMany("Logs") + .HasForeignKey("VmiCategoryId"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiCategory", b => + { + b.Navigation("Logs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230727005325_vmi5.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230727005325_vmi5.cs new file mode 100644 index 00000000..319c7789 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230727005325_vmi5.cs @@ -0,0 +1,24 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Win.Sfs.SettleAccount.Migrations +{ + public partial class vmi5 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "IsDisabled", + table: "Set_JobItem", + type: "bit", + nullable: false, + defaultValue: false); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "IsDisabled", + table: "Set_JobItem"); + } + } +} 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 130bb381..17b9e2c4 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs @@ -3748,6 +3748,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasMaxLength(50) .HasColumnType("nvarchar(50)"); + b.Property("IsDisabled") + .HasColumnType("bit"); + b.Property("IsRunning") .HasColumnType("bit"); @@ -3773,6 +3776,7 @@ namespace Win.Sfs.SettleAccount.Migrations { Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), Cron = "0 0 8 26 *", + IsDisabled = false, IsRunning = false, Name = "库存快照", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiService" From dc47eb5d88c1b174fee735f3ab8cf9d100c95fc3 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Thu, 27 Jul 2023 09:16:05 +0800 Subject: [PATCH 6/6] update --- .../Entities/BQ/JobItemAppService.cs | 82 +++++++++++++++++++ .../SettleAccount.Application.csproj | 1 + 2 files changed, 83 insertions(+) create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/JobItemAppService.cs diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/JobItemAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/JobItemAppService.cs new file mode 100644 index 00000000..e8e06f11 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/JobItemAppService.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Dynamic.Core; +using System.Threading.Tasks; +using EFCore.BulkExtensions; +using Microsoft.AspNetCore.Mvc; +using Omu.ValueInjecter; +using Volo.Abp.Application.Dtos; +using Win.Sfs.SettleAccount.Entities.BQ.Dtos; +using Win.Sfs.SettleAccount.Entities.BQ.Vmi; +using Win.Sfs.SettleAccount.Entities.Materials; +using Win.Sfs.Shared.RepositoryBase; + +namespace Win.Sfs.SettleAccount.Entities.BQ; + +[Route("api/settleaccount/[controller]/[action]")] +public class JobItemAppService : SettleAccountApplicationBase +{ + private readonly INormalEfCoreRepository _repository; + + public JobItemAppService(INormalEfCoreRepository repository) + { + this._repository = repository; + } + + [HttpPost] + public async Task> GetListAsync(RequestDto input) + { + var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, + input.SkipCount, true).ConfigureAwait(false); + var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); + return new PagedResultDto(totalCount, entities); + } + + [HttpPost] + public async Task CreateAsync(JobItem input) + { + await _repository.InsertAsync(input).ConfigureAwait(false); + return input; + } + + [HttpPost("{id}")] + public async Task UpdateAsync(Guid id, JobItem input) + { + var entity = await _repository.FindAsync(id).ConfigureAwait(false); + if (entity != null) + { + entity.InjectFrom(input); + } + await _repository.UpdateAsync(entity).ConfigureAwait(false); + return input; + } + + [HttpPost] + public async Task DeleteListAsync(List ids) + { + var _query = _repository.Where(p => ids.Contains(p.Id)); + int i = await _query.BatchDeleteAsync().ConfigureAwait(false); + return i == 0; + } +} + +[Route("api/settleaccount/[controller]/[action]")] +public class JobLogAppService : SettleAccountApplicationBase +{ + private readonly INormalEfCoreRepository _repository; + + public JobLogAppService(INormalEfCoreRepository repository) + { + this._repository = repository; + } + + [HttpPost] + public async Task> GetListAsync(RequestDto input) + { + var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, + input.SkipCount, true).ConfigureAwait(false); + var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); + return new PagedResultDto(totalCount, entities); + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj index 9da8ed51..2a809cee 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj @@ -126,6 +126,7 @@ +