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 41019532..e7a64408 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 @@ -17,37 +17,36 @@ public class HBPO_SA_DTO : EntityDto /// [Display(Name = "期间")] public int Version { get; set; } - /// /// 结算单据 /// [Display(Name = "结算单据")] public string BillNum { get; set; } - /// /// 出库单号 /// [Display(Name = "出库单号")] public string DNBillNum { get; set; } - /// /// 1、新建 2、已有出库3、已有扣减寄售库 /// [Display(Name = "状态")] public string State { get; set; } - /// /// 明细记录行数 /// [Display(Name = "明细记录行数")] public string RecordCount { get; set; } - /// - /// 工厂地点 + /// 地点码 /// - [Display(Name = "工厂地点")] + [Display(Name = "地点码")] public string Site { get; set; } - + /// + /// 地点 + /// + [Display(Name = "地点")] + public string Place { get; set; } /// /// 业务类型 /// @@ -129,7 +128,6 @@ public class HBPO_SA_DETAIL_IMPORT_DTO [Display(Name = "ReceiveDate")] [ImporterHeader(Name = "ReceiveDate", Format = "yyyy/MM/dd HH:mm:ss")] public DateTime SettleDate { set; get; } - /// /// 结算分组号 /// @@ -137,7 +135,6 @@ public class HBPO_SA_DETAIL_IMPORT_DTO [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "DeliveryNode")] public string GroupNum { get; set; } - /// /// 到货日期 /// @@ -145,7 +142,6 @@ public class HBPO_SA_DETAIL_IMPORT_DTO [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "DeliveryDate", Format = "MM/yyyy/dd HH:mm:ss")] public DateTime? DeliveryDate { get; set; } - /// /// 客户零件号 /// @@ -153,22 +149,19 @@ public class HBPO_SA_DETAIL_IMPORT_DTO [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "PartNumber")] public string LU { get; set; } - /// - /// 数量 + /// 结算数量 /// [Display(Name = "结算数量")] [ImporterHeader(Name = "Qty")] public decimal Qty { get; set; } - /// - /// 工厂地点 + /// 地点 /// - [Display(Name = "filename")] + [Display(Name = "地点")] [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "filename")] - public string Site { get; set; } - + public string Place { get; set; } /// /// 生产号 /// @@ -216,6 +209,13 @@ public class MaiDanJianHBPOImportDto [ImporterHeader(Name = "五联单号")] [Required(ErrorMessage = "{0}不能为空")] public string GroupNum { get; set; } + /// + /// 地点 + /// + [Display(Name = "地点")] + [ImporterHeader(Name = "地点")] + [Required(ErrorMessage = "{0}不能为空")] + public string Place { get; set; } } /// diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs index 25c2909f..5f5a5bd5 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs @@ -17,24 +17,26 @@ public class PUB_SA_DTO : EntityDto /// [Display(Name = "期间")] public string Version { get; set; } - /// /// 结算单据 /// [Display(Name = "结算单据")] public string BillNum { get; set; } - /// /// 状态 /// [Display(Name = "状态")] public string State { get; set; } - /// /// 业务类型 /// [Display(Name = "业务类型")] public BusinessType BusinessType { get; set; } + /// + /// 地点 + /// + [Display(Name = "地点")] + public string Place { get; set; } } /// @@ -84,7 +86,6 @@ public class ZhiGongJianBBACImportDto [Display(Name = "Pstng Date")] [ImporterHeader(Name = "Pstng Date")] public DateTime SettleDate { set; get; } - /// /// 客户零件号 /// @@ -92,7 +93,6 @@ public class ZhiGongJianBBACImportDto [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "Material")] public string LU { get; set; } - /// /// 生产号 /// @@ -100,22 +100,19 @@ public class ZhiGongJianBBACImportDto [ImporterHeader(Name = "External Delivery ID")] [Required(ErrorMessage = "{0}不能为空")] public string PN { get; set; } - /// /// 数量 /// [Display(Name = "Quantity")] [ImporterHeader(Name = "Quantity")] public decimal Qty { get; set; } - /// /// 结算分组号 /// - [Display(Name = "Delivery")] - [ImporterHeader(Name = "Delivery")] + [Display(Name = "External Delivery ID")] + [ImporterHeader(Name = "External Delivery ID")] [Required(ErrorMessage = "{0}不能为空")] public string GroupNum { get; set; } - /// /// 根据Vendor=15663496过滤数据 /// @@ -135,7 +132,6 @@ public class ZhiGongJianHBPOImportDto [Display(Name = "结算日期")] [ImporterHeader(IsIgnore = true)] public DateTime SettleDate { set; get; } - /// /// 客户零件号 /// @@ -143,7 +139,6 @@ public class ZhiGongJianHBPOImportDto [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "零件号")] public string LU { get; set; } - /// /// 生产号 /// @@ -151,14 +146,12 @@ public class ZhiGongJianHBPOImportDto [ImporterHeader(Name = "订单编号")] [Required(ErrorMessage = "{0}不能为空")] public string PN { get; set; } - /// /// 数量 /// [Display(Name = "数量")] [ImporterHeader(Name = "数量")] public decimal Qty { get; set; } - /// /// 结算分组号 /// @@ -166,6 +159,13 @@ public class ZhiGongJianHBPOImportDto [ImporterHeader(Name = "订单编号")] [Required(ErrorMessage = "{0}不能为空")] public string GroupNum { get; set; } + /// + /// 地点 + /// + [Display(Name = "地点")] + [ImporterHeader(Name = "地点")] + [Required(ErrorMessage = "{0}不能为空")] + public string Place { 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 3b23a102..f2120af9 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 @@ -214,36 +214,11 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase /// private async Task ImportJisHBPOAsync([FromForm] IFormFileCollection files) { - ExportImporter _exportImporter = new ExportImporter(); - var result = await _exportImporter.UploadExcelImport(files, _excelImportService).ConfigureAwait(false); + var exportImporter = new ExportImporter(); + var result = await exportImporter.UploadExcelImport(files, _excelImportService).ConfigureAwait(false); var importHBOPSaDetails = ObjectMapper.Map, List>(result); - importHBOPSaDetails = HandleSaDetails(importHBOPSaDetails); - - //Site包含CN1 亦庄 - //Site包含CN5 顺义 - var importCN1HBOPSaDetails = importHBOPSaDetails.FindAll(t => t.Site.Contains("CN1")); - var importCN5HBOPSaDetails = importHBOPSaDetails.FindAll(t => t.Site.Contains("CN5")); - - #region 数据校验 - var checkList = await CheckAsync(importHBOPSaDetails).ConfigureAwait(false); - if (checkList.Count > 0) - { - string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); - return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = fileName }); - } - #endregion - - if (importCN1HBOPSaDetails.Any()) - { - await InsertSaDataAsync(importCN1HBOPSaDetails, "CN1").ConfigureAwait(false); - } - if (importCN5HBOPSaDetails.Any()) - { - await InsertSaDataAsync(importCN5HBOPSaDetails, "CN5").ConfigureAwait(false); - } - - return new JsonResult(new { Code = 200, Message = "导入成功" }); + return await SaDataGroupByPlaceAsync(importHBOPSaDetails).ConfigureAwait(false); } /// @@ -257,24 +232,7 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase var importMaiDanHBPOSaDetails = ObjectMapper.Map, List>(importResults); #endregion - if (!importMaiDanHBPOSaDetails.Any()) - { - return new JsonResult(new { Code = 200, Message = "导入成功" }); - } - - importMaiDanHBPOSaDetails = HandleSaDetails(importMaiDanHBPOSaDetails); - - #region 数据校验 - var checkList = await CheckAsync(importMaiDanHBPOSaDetails).ConfigureAwait(false); - if (checkList.Count > 0) - { - string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); - return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = fileName }); - } - #endregion - - await InsertSaDataAsync(importMaiDanHBPOSaDetails, "").ConfigureAwait(false); - return new JsonResult(new { Code = 200, Message = "导入成功" }); + return await SaDataGroupByPlaceAsync(importMaiDanHBPOSaDetails).ConfigureAwait(false); } /// @@ -313,11 +271,49 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase }).ToList(); } + /// + /// 结算数据 Place 分组保存 + /// + /// + /// + private async Task SaDataGroupByPlaceAsync(List hbpoSaDetails) + { + if (!hbpoSaDetails.Any()) + { + return new JsonResult(new { Code = 200, Message = "导入成功" }); + } + + hbpoSaDetails = HandleSaDetails(hbpoSaDetails); + + var cn1HBOPSaDetails = hbpoSaDetails.FindAll(t => t.Place.Contains("CN1")); + var cn5HBOPSaDetails = hbpoSaDetails.FindAll(t => t.Place.Contains("CN5")); + + #region 数据校验 + var checkList = await CheckAsync(hbpoSaDetails).ConfigureAwait(false); + if (checkList.Count > 0) + { + string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); + return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, Message = "错误提示文件已下载,请打开文件查看", fileName = fileName }); + } + #endregion + + if (cn1HBOPSaDetails.Any()) + { + await InsertSaDataAsync(cn1HBOPSaDetails, "CN1").ConfigureAwait(false); + } + if (cn5HBOPSaDetails.Any()) + { + await InsertSaDataAsync(cn5HBOPSaDetails, "CN5").ConfigureAwait(false); + } + return new JsonResult(new { Code = 200, Message = "导入成功" }); + } + /// /// Insert结算数据 /// - private async Task InsertSaDataAsync(List hbpoSaDetails, string site) + private async Task InsertSaDataAsync(List hbpoSaDetails, string place) { + var site = "104T"; //结算单号 var hbpoSaBillNum = OrderNumberGenerator.GenerateOrderNumber("SA"); //结算主表 @@ -327,6 +323,7 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase State = "0", BusinessType = BusinessType, Site = site, + Place = place, Version = Version }; //可结算单号 @@ -365,6 +362,7 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase hbpoSaDetail.BillNum = hbpoSaBillNum; hbpoSaDetail.KeyCode = hbpoSaDetail.PN + hbpoSaDetail.LU; hbpoSaDetail.BusinessType = BusinessType; + hbpoSaDetail.Site = site; }); //导入的零件号集合 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 86ea2f52..3e9b6355 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 @@ -521,6 +521,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase { //业务类型 var pubSaFirstDetail = pubSaDetails.First(); + var place = pubSaFirstDetail.Place; //结算单号 var pubSaBillNum = OrderNumberGenerator.GenerateOrderNumber("SA"); //结算主表 @@ -530,7 +531,8 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase State = "0", BusinessType = pubSaFirstDetail.BusinessType, Version = pubSaFirstDetail.Version, - Site = site + Site = site, + Place = place }; //可结算单号 var pubCanSaBillNum = OrderNumberGenerator.GenerateOrderNumber("C"); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs index bc777b29..9bd009f1 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs @@ -399,6 +399,12 @@ namespace SettleAccount.Bases /// 匹配类型 /// public EnumMappingType MappingType { get; set; } + /// + /// 地点 + /// + [Display(Name = "地点")] + [MaxLength(64)] + public string Place { get; set; } } public class SA_CAN_BASE : AuditedAggregateRoot, ISA_BASE diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs index 3d0c0e0d..f03b66fb 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs @@ -29,16 +29,22 @@ public class HBPO_SA : AuditedAggregateRoot /// [Display(Name = "明细记录行数")] public string RecordCount { get; set; } = null!; - /// - /// 工厂地点 + /// 地点码 /// - [Display(Name = "工厂地点")] - public string Site { get; set; } = null!; + [Display(Name = "地点码")] + [MaxLength(64)] + public string Site { get; set; } /// /// 业务类型 /// public EnumBusinessType BusinessType { get; set; } + /// + /// 地点 + /// + [Display(Name = "地点")] + [MaxLength(64)] + public string Place { get; set; } public HBPO_SA(Guid guid, int version, string billNum, string dNBillNum, string state, string recordCount) { diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SA.cs index d44bb1ce..211061c8 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SA.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SA.cs @@ -26,11 +26,17 @@ public class PUB_SA : AuditedAggregateRoot [Display(Name = "业务分类")] public EnumBusinessType BusinessType { get; set; } /// + /// 地点码 + /// + [Display(Name = "地点码")] + [MaxLength(64)] + public string Site { get; set; } + /// /// 地点 /// [Display(Name = "地点")] [MaxLength(64)] - public string Site { get; set; } + public string Place { get; set; } public PUB_SA(Guid guid, int version, string billNum, string state) { diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230913025512_20230913-2.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230914021528_20230914-1.Designer.cs similarity index 99% rename from code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230913025512_20230913-2.Designer.cs rename to code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230914021528_20230914-1.Designer.cs index 1425eafe..d28f4c2a 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230913025512_20230913-2.Designer.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230914021528_20230914-1.Designer.cs @@ -11,8 +11,8 @@ using Win.Sfs.SettleAccount; namespace Win.Sfs.SettleAccount.Migrations { [DbContext(typeof(SettleAccountDbContext))] - [Migration("20230913025512_20230913-2")] - partial class _202309132 + [Migration("20230914021528_20230914-1")] + partial class _202309141 { protected override void BuildTargetModel(ModelBuilder modelBuilder) { @@ -615,6 +615,10 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("PartCode") .HasColumnType("nvarchar(max)"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Price") .HasColumnType("decimal(18,2)"); @@ -1762,12 +1766,17 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("RecordCount") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Site") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("State") .HasMaxLength(50) @@ -1850,6 +1859,10 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("PartCode") .HasColumnType("nvarchar(max)"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Price") .HasColumnType("decimal(18,2)"); @@ -3511,6 +3524,10 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Site") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3607,6 +3624,10 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("PartCode") .HasColumnType("nvarchar(max)"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Price") .HasColumnType("decimal(18,2)"); @@ -4488,7 +4509,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), - ConcurrencyStamp = "8516c291b3ed4d5aba3a1a832535c4ae", + ConcurrencyStamp = "27a58b61e45c44db907e467fb594cc66", Cron = "0 0 8 26 *", IsDisabled = false, IsRunning = false, @@ -4498,7 +4519,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), - ConcurrencyStamp = "b3c6a359087b41e4b586c8c172efae5d", + ConcurrencyStamp = "b1d31f0c8ba14fd5baf9e86a382cf23b", Cron = "0 0/1 * * * ?", IsDisabled = false, IsRunning = false, @@ -4508,7 +4529,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), - ConcurrencyStamp = "a37556b1d5ab4bc5b0cf1c1622eefff3", + ConcurrencyStamp = "cb552d924aa5468c9605fc66af7f6aa2", Cron = "0 0/1 * * * ?", IsDisabled = false, IsRunning = false, @@ -4518,7 +4539,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), - ConcurrencyStamp = "289386fefb924a41afcc768204745473", + ConcurrencyStamp = "9c91f78395054248aaca3cb07018d785", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4528,7 +4549,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), - ConcurrencyStamp = "b2fdf754c09d4f3f816a378f71b76b6f", + ConcurrencyStamp = "861d9091519a403e880429b4ec92bf48", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4538,7 +4559,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), - ConcurrencyStamp = "136aad88976d4bf9b58a6e3586ca9fe1", + ConcurrencyStamp = "3b34af99b803428faad0b383080a46ef", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4548,7 +4569,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), - ConcurrencyStamp = "65b4aa76401a4f1ab800dc8b1702f0b9", + ConcurrencyStamp = "26fc2c469b324cd38fb3ee9c1fda720d", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4558,7 +4579,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), - ConcurrencyStamp = "d2500499b42341d784f5067aa91cf66d", + ConcurrencyStamp = "78bde67297b24c9eada8402d3f94d52b", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4568,7 +4589,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), - ConcurrencyStamp = "017827b08deb447ab5729a69e06d31dd", + ConcurrencyStamp = "2120adc593a148ba95427da1eadc2073", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4578,7 +4599,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), - ConcurrencyStamp = "a36bef05d3324491ac31fae24d5d622a", + ConcurrencyStamp = "628547db204a4af09bed4562a5d4e8fd", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4588,7 +4609,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), - ConcurrencyStamp = "30329237998d4b458194994a3e2229e5", + ConcurrencyStamp = "9f5c2dac8b544424b22248e87f78051d", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230913025512_20230913-2.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230914021528_20230914-1.cs similarity index 70% rename from code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230913025512_20230913-2.cs rename to code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230914021528_20230914-1.cs index 17f2e6a7..0ea26f59 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230913025512_20230913-2.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230914021528_20230914-1.cs @@ -3,210 +3,241 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace Win.Sfs.SettleAccount.Migrations { - public partial class _202309132 : Migration + public partial class _202309141 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { - migrationBuilder.DropColumn( - name: "IndexNum", - table: "Set_HBPO_SA_DETAIL"); - - migrationBuilder.DropColumn( - name: "IndexNum", - table: "Set_BBAC_SA_DETAIL"); - - migrationBuilder.AddColumn( - name: "IndexNum", - table: "Set_PUB_NOT_SA_DETAIL", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "IndexNum", - table: "Set_PUB_CAN_SA_DETAIL", - type: "int", - nullable: false, - defaultValue: 0); + migrationBuilder.AddColumn( + name: "Place", + table: "Set_PUB_SA_DETAIL", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "Place", + table: "Set_PUB_SA", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "Place", + table: "Set_HBPO_SA_DETAIL", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AlterColumn( + name: "Site", + table: "Set_HBPO_SA", + type: "nvarchar(64)", + maxLength: 64, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AddColumn( + name: "Place", + table: "Set_HBPO_SA", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); + + migrationBuilder.AddColumn( + name: "Place", + table: "Set_BBAC_SA_DETAIL", + type: "nvarchar(64)", + maxLength: 64, + nullable: true); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), column: "ConcurrencyStamp", - value: "b3c6a359087b41e4b586c8c172efae5d"); + value: "b1d31f0c8ba14fd5baf9e86a382cf23b"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), column: "ConcurrencyStamp", - value: "a37556b1d5ab4bc5b0cf1c1622eefff3"); + value: "cb552d924aa5468c9605fc66af7f6aa2"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), column: "ConcurrencyStamp", - value: "b2fdf754c09d4f3f816a378f71b76b6f"); + value: "861d9091519a403e880429b4ec92bf48"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), column: "ConcurrencyStamp", - value: "65b4aa76401a4f1ab800dc8b1702f0b9"); + value: "26fc2c469b324cd38fb3ee9c1fda720d"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), column: "ConcurrencyStamp", - value: "136aad88976d4bf9b58a6e3586ca9fe1"); + value: "3b34af99b803428faad0b383080a46ef"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), column: "ConcurrencyStamp", - value: "017827b08deb447ab5729a69e06d31dd"); + value: "2120adc593a148ba95427da1eadc2073"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), column: "ConcurrencyStamp", - value: "289386fefb924a41afcc768204745473"); + value: "9c91f78395054248aaca3cb07018d785"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), column: "ConcurrencyStamp", - value: "30329237998d4b458194994a3e2229e5"); + value: "9f5c2dac8b544424b22248e87f78051d"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), column: "ConcurrencyStamp", - value: "a36bef05d3324491ac31fae24d5d622a"); + value: "628547db204a4af09bed4562a5d4e8fd"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), column: "ConcurrencyStamp", - value: "8516c291b3ed4d5aba3a1a832535c4ae"); + value: "27a58b61e45c44db907e467fb594cc66"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), column: "ConcurrencyStamp", - value: "d2500499b42341d784f5067aa91cf66d"); + value: "78bde67297b24c9eada8402d3f94d52b"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( - name: "IndexNum", - table: "Set_PUB_NOT_SA_DETAIL"); + name: "Place", + table: "Set_PUB_SA_DETAIL"); migrationBuilder.DropColumn( - name: "IndexNum", - table: "Set_PUB_CAN_SA_DETAIL"); + name: "Place", + table: "Set_PUB_SA"); - migrationBuilder.AddColumn( - name: "IndexNum", - table: "Set_HBPO_SA_DETAIL", - type: "int", - nullable: false, - defaultValue: 0); + migrationBuilder.DropColumn( + name: "Place", + table: "Set_HBPO_SA_DETAIL"); - migrationBuilder.AddColumn( - name: "IndexNum", - table: "Set_BBAC_SA_DETAIL", - type: "int", - nullable: false, - defaultValue: 0); + migrationBuilder.DropColumn( + name: "Place", + table: "Set_HBPO_SA"); + + migrationBuilder.DropColumn( + name: "Place", + table: "Set_BBAC_SA_DETAIL"); + + migrationBuilder.AlterColumn( + name: "Site", + table: "Set_HBPO_SA", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(64)", + oldMaxLength: 64, + oldNullable: true); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), column: "ConcurrencyStamp", - value: "99884a6a7033490bbc93b2ffcf1212fe"); + value: "b3c6a359087b41e4b586c8c172efae5d"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), column: "ConcurrencyStamp", - value: "d6b499590a7f4d738e6d4d53cbae1419"); + value: "a37556b1d5ab4bc5b0cf1c1622eefff3"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), column: "ConcurrencyStamp", - value: "708a84b07be44ee99c1e70fe0f42820e"); + value: "b2fdf754c09d4f3f816a378f71b76b6f"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), column: "ConcurrencyStamp", - value: "b80a98f0c7154dfeb56c387e2e22c482"); + value: "65b4aa76401a4f1ab800dc8b1702f0b9"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), column: "ConcurrencyStamp", - value: "787cc284e9db4280a35d2ee3d71c0822"); + value: "136aad88976d4bf9b58a6e3586ca9fe1"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), column: "ConcurrencyStamp", - value: "32e17d97277a40b991b7f54e22668bac"); + value: "017827b08deb447ab5729a69e06d31dd"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), column: "ConcurrencyStamp", - value: "a0869b3e24eb4620bd5f01db384652ac"); + value: "289386fefb924a41afcc768204745473"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), column: "ConcurrencyStamp", - value: "8b15dfbd04ac49f2b52a3db7d7ebe9ed"); + value: "30329237998d4b458194994a3e2229e5"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), column: "ConcurrencyStamp", - value: "5da31dc2347145acbc2b660c3adbb582"); + value: "a36bef05d3324491ac31fae24d5d622a"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), column: "ConcurrencyStamp", - value: "0227468d6ab64b9c86ed33e7feaf88ae"); + value: "8516c291b3ed4d5aba3a1a832535c4ae"); migrationBuilder.UpdateData( table: "Set_JobItem", keyColumn: "Id", keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), column: "ConcurrencyStamp", - value: "8934e9981b4041249cdeaf63ff00c468"); + value: "d2500499b42341d784f5067aa91cf66d"); } } } 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 0f340b34..5072faff 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs @@ -613,6 +613,10 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("PartCode") .HasColumnType("nvarchar(max)"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Price") .HasColumnType("decimal(18,2)"); @@ -1760,12 +1764,17 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("RecordCount") .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Site") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("State") .HasMaxLength(50) @@ -1848,6 +1857,10 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("PartCode") .HasColumnType("nvarchar(max)"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Price") .HasColumnType("decimal(18,2)"); @@ -3509,6 +3522,10 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Site") .HasMaxLength(64) .HasColumnType("nvarchar(64)"); @@ -3605,6 +3622,10 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("PartCode") .HasColumnType("nvarchar(max)"); + b.Property("Place") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("Price") .HasColumnType("decimal(18,2)"); @@ -4486,7 +4507,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), - ConcurrencyStamp = "8516c291b3ed4d5aba3a1a832535c4ae", + ConcurrencyStamp = "27a58b61e45c44db907e467fb594cc66", Cron = "0 0 8 26 *", IsDisabled = false, IsRunning = false, @@ -4496,7 +4517,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), - ConcurrencyStamp = "b3c6a359087b41e4b586c8c172efae5d", + ConcurrencyStamp = "b1d31f0c8ba14fd5baf9e86a382cf23b", Cron = "0 0/1 * * * ?", IsDisabled = false, IsRunning = false, @@ -4506,7 +4527,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), - ConcurrencyStamp = "a37556b1d5ab4bc5b0cf1c1622eefff3", + ConcurrencyStamp = "cb552d924aa5468c9605fc66af7f6aa2", Cron = "0 0/1 * * * ?", IsDisabled = false, IsRunning = false, @@ -4516,7 +4537,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), - ConcurrencyStamp = "289386fefb924a41afcc768204745473", + ConcurrencyStamp = "9c91f78395054248aaca3cb07018d785", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4526,7 +4547,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), - ConcurrencyStamp = "b2fdf754c09d4f3f816a378f71b76b6f", + ConcurrencyStamp = "861d9091519a403e880429b4ec92bf48", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4536,7 +4557,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), - ConcurrencyStamp = "136aad88976d4bf9b58a6e3586ca9fe1", + ConcurrencyStamp = "3b34af99b803428faad0b383080a46ef", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4546,7 +4567,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), - ConcurrencyStamp = "65b4aa76401a4f1ab800dc8b1702f0b9", + ConcurrencyStamp = "26fc2c469b324cd38fb3ee9c1fda720d", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4556,7 +4577,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), - ConcurrencyStamp = "d2500499b42341d784f5067aa91cf66d", + ConcurrencyStamp = "78bde67297b24c9eada8402d3f94d52b", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4566,7 +4587,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), - ConcurrencyStamp = "017827b08deb447ab5729a69e06d31dd", + ConcurrencyStamp = "2120adc593a148ba95427da1eadc2073", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4576,7 +4597,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), - ConcurrencyStamp = "a36bef05d3324491ac31fae24d5d622a", + ConcurrencyStamp = "628547db204a4af09bed4562a5d4e8fd", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false, @@ -4586,7 +4607,7 @@ namespace Win.Sfs.SettleAccount.Migrations new { Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), - ConcurrencyStamp = "30329237998d4b458194994a3e2229e5", + ConcurrencyStamp = "9f5c2dac8b544424b22248e87f78051d", Cron = "0 0/30 * * * ? ", IsDisabled = false, IsRunning = false,