From 50a26ff27cbca73c5a3cfcc7e515c51c3ec3df5d Mon Sep 17 00:00:00 2001 From: mahao Date: Tue, 11 Jul 2023 11:00:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=80=E5=94=AE=E4=BB=B7=E6=A0=BC=E3=80=81?= =?UTF-8?q?=E5=A4=87=E4=BB=B6=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appsettings.json | 7 +- .../Bases/RequestInputBase.cs | 21 + .../Entities/Prices/PriceListDtoBase.cs | 356 +- .../Bases/CurdBaseAppService.cs | 150 + .../Entities/BQ/Prices/PriceListAppService.cs | 41 - .../Entities/Prices/PriceListAppService.cs | 271 +- .../Entities/Prices/PriceListAppServiceBJ.cs | 506 +-- .../SettleAccount.Application.csproj | 1 + ...ttleAccountApplicationAutoMapperProfile.cs | 71 +- .../Entities/Prices/PriceList.cs | 35 +- .../20230711014038_20230711-1.Designer.cs | 3750 +++++++++++++++++ .../Migrations/20230711014038_20230711-1.cs | 33 + .../SettleAccountDbContextModelSnapshot.cs | 6 + .../SettleAccountNormalEfCoreRepository.cs | 6 +- 14 files changed, 4664 insertions(+), 590 deletions(-) create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Bases/RequestInputBase.cs create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CurdBaseAppService.cs delete mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Prices/PriceListAppService.cs create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711014038_20230711-1.Designer.cs create mode 100644 code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711014038_20230711-1.cs diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json index ec00c4e8..071830a8 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json @@ -3,13 +3,8 @@ "CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088" }, "ConnectionStrings": { - "Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", + "Default": "Server=dev.ccwin-in.com,13319;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True", "SettleAccountService": "Server=dev.ccwin-in.com,13319;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;" - - - - - }, "Serilog": { diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Bases/RequestInputBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Bases/RequestInputBase.cs new file mode 100644 index 00000000..9e1496a0 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Bases/RequestInputBase.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.Application.Dtos; +using Win.Sfs.Shared.Filter; + +namespace Win.Sfs.SettleAccount.Bases +{ + public class RequestInputBase: PagedAndSortedResultRequestDto + { + /// + /// 导出文件类型 + /// + public int FileType { get; set; } + + /// + /// 高级检索 + /// + [Display(Name = "高级检索")] + public virtual List Filters { get; set; } = new List(); + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs index 9acb82ea..0a1c64b5 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs @@ -2,10 +2,8 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Volo.Abp.Application.Dtos; +using Win.Sfs.SettleAccount.Bases; using Win.Sfs.Shared.Filter; namespace Win.Sfs.SettleAccount.Entities.Prices @@ -50,81 +48,221 @@ namespace Win.Sfs.SettleAccount.Entities.Prices } - + /// + /// 销售价格单导出 + /// public class PriceListExportDto { /// - /// 版本 + /// 零件号 /// - [Display(Name = "版本")] - [ExporterHeader(DisplayName = "版本",IsIgnore =true)] - public string Version { set; get; } - [ExporterHeader(DisplayName = "有效从")] - public DateTime BeginDate { get; set; } + [Display(Name = "零件号")] + [ExporterHeader(DisplayName = "零件号")] + public string LU { get; set; } + /// - ///结算时间 + /// 价格 /// - [ExporterHeader(DisplayName = "有效到")] - public DateTime EndDate { get; set; } + [Display(Name = "价格")] + [ExporterHeader(DisplayName = "价格")] + public Decimal Price { set; get; } + /// - ///价格 + /// 开始时间 /// - [ExporterHeader(DisplayName = "*金额")] - public decimal Price { get; set; } + [Display(Name = "开始时间")] + [ExporterHeader(DisplayName = "开始时间")] + public DateTime BeginTime { set; get; } + /// - ///物料编号 + /// 结束时间 /// - [ExporterHeader(DisplayName = "*物料编码")] - public string MaterialCode { get; set; } + [Display(Name = "结束时间")] + [ExporterHeader(DisplayName = "结束时间")] + public DateTime EndTime { set; get; } + /// - ///价格类型 + /// 客户编码 /// - [ExporterHeader(DisplayName = "*分销渠道",IsIgnore =true)] - public int Type { get; set; } - [ExporterHeader(DisplayName = "*客户")] - public string CustomerCode { get; set; } - + [Display(Name = "客户编码")] + [ExporterHeader(DisplayName = "客户编码")] + public string ClientCode { get; set; } } - + /// + /// 销售价格导入 + /// [ImportProject(Name = SettleAccountModuleName.PriceList)] public class PriceListImportDto { ///// - ///// 版本 + ///// ItemNo ///// - //[Display(Name = "版本")] - //public string Version { set; get; } + //[ImporterHeader(Name = "ItemNo")] + //public string ItemNo { get; set; } + /// - ///开始时间 + /// 零件号 /// - [ImporterHeader(Name = "有效从")] - public DateTime BeginDate { get; set; } + [ImporterHeader(Name = "Part No.")] + public string PartNo { get; set; } + + ///// + ///// PartDescription + ///// + //[ImporterHeader(Name = "PartDescription")] + //public string PartDescription { get; set; } + + ///// + ///// ES1 + ///// + //[ImporterHeader(Name = "ES1")] + //public string ES1 { get; set; } + + ///// + ///// ES2 + ///// + //[ImporterHeader(Name = "ES2")] + //public string ES2 { get; set; } + + ///// + ///// ZGS + ///// + //[ImporterHeader(Name = "ZGS")] + //public string ZGS { get; set; } + + ///// + ///// UnitOfMeasure + ///// + //[ImporterHeader(Name = "UnitOfMeasure")] + //public string UnitOfMeasure { get; set; } + + ///// + ///// Currency + ///// + //[ImporterHeader(Name = "Currency")] + //public string Currency { get; set; } + + ///// + ///// PriceType + ///// + //[ImporterHeader(Name = "PriceType")] + //public string PriceType { get; set; } + /// - ///结算时间 + /// 价格 /// - [ImporterHeader(Name = "有效到")] - public DateTime EndDate { get; set; } + [ImporterHeader(Name = "Total Price")] + public string TotalPrice { get; set; } + + ///// + ///// Base Price(Old) + ///// + //[ImporterHeader(Name = "Base Price(Old)")] + //public string BasePriceOld { get; set; } + + ///// + ///// UnitOfOrder + ///// + //[ImporterHeader(Name = "Unit of Order")] + //public string UnitOfOrder { get; set; } + + ///// + ///// 11000 - BBAC JIS + ///// + //[ImporterHeader(Name = "11000 - BBAC JIS")] + //public string BBACJIS { get; set; } + /// - ///价格 + /// 开始时间 /// - [ImporterHeader(Name = "*金额")] - public decimal Price { get; set; } + [ImporterHeader(Name = "Valid From")] + public string ValidFrom { get; set; } + /// - ///物料编号 + /// 结束时间 /// - [ImporterHeader(Name = "*物料编码")] - public string MaterialCode { get; set; } + [ImporterHeader(Name = "Valid To")] + public string ValidTo { get; set; } + + ///// + ///// ProductionCountry + ///// + //[ImporterHeader(Name = "Production Country")] + //public string ProductionCountry { get; set; } + /// - ///价格类型 + /// 客户编码 /// - [ImporterHeader(Name = "*分销渠道")] - public int Type { get; set; } - [ImporterHeader(Name = "*客户")] - public string CustomerCode { get; set; } + [ImporterHeader(Name = "Plant")] + public string Plant { get; set; } - } + ///// + ///// Transport Term + ///// + //[ImporterHeader(Name = "Transport Term")] + //public string TransportTerm { get; set; } + ///// + ///// Transport Term City + ///// + //[ImporterHeader(Name = "Transport Term City")] + //public string TransportTermCity { get; set; } + + ///// + ///// Transport Term Country + ///// + //[ImporterHeader(Name = "Transport Term Country")] + //public string TransportTermCountry { get; set; } + + ///// + ///// Shipping Location + ///// + //[ImporterHeader(Name = "Shipping Location")] + //public string ShippingLocation { get; set; } + + ///// + ///// Production Location + ///// + //[ImporterHeader(Name = "Production Location")] + //public string ProductionLocation { get; set; } + + ///// + ///// VAT Shipping Country + ///// + //[ImporterHeader(Name = "VAT Shipping Country")] + //public string VATShippingCountry { get; set; } + + ///// + ///// Minimum Order Quantity + ///// + //[ImporterHeader(Name = "Minimum Order Quantity")] + //public string MinimumOrderQuantity { get; set; } + + ///// + ///// Payment + ///// + //[ImporterHeader(Name = "Payment")] + //public string Payment { get; set; } + + ///// + ///// Packaging + ///// + //[ImporterHeader(Name = "Packaging")] + //public string Packaging { get; set; } + + ///// + ///// Return + ///// + //[ImporterHeader(Name = "Return")] + //public string Return { get; set; } + + ///// + ///// 3YP + ///// + //[ImporterHeader(Name = "3YP")] + //public string YP3 { get; set; } + } public class PriceListRequestDto : PagedAndSortedResultRequestDto { @@ -149,126 +287,76 @@ namespace Win.Sfs.SettleAccount.Entities.Prices public virtual List Filters { get; set; } = new List(); } - - + #region 备件价格 public class PriceListBJDto : EntityDto { /// - /// 版本 - /// - [Display(Name = "版本")] - public string Version { set; get; } - /// - ///开始时间 - /// - [Display(Name = "开始时间")] - public DateTime BeginDate { get; set; } - /// - ///结算时间 + /// 零件号 /// - [Display(Name = "结算时间")] - public DateTime EndDate { get; set; } + [Display(Name = "零件号")] + public string LU { get; set; } + /// - ///价格 + /// 价格 /// [Display(Name = "价格")] - public decimal Price { get; set; } - /// - ///物料编号 - /// - [Display(Name = "物料编号")] - public string MaterialCode { get; set; } + public Decimal Price { set; get; } + /// - ///价格类型 + /// 客户编码 /// - [Display(Name = "价格类型")] - public int Type { get; set; } - - public Guid ParentId { set; get; } - [Display(Name = "客户")] - public string CustomerCode { get; set; } + [Display(Name = "客户编码")] + public string ClientCode { get; set; } } - - + [Display(Name = "备件价格")] public class PriceListBJExportDto { /// - /// 版本 - /// - [Display(Name = "版本")] - [ExporterHeader(DisplayName = "版本")] - public string Version { set; get; } - [ImporterHeader(Name = "有效从")] - public DateTime BeginDate { get; set; } - /// - ///结算时间 + /// 零件号 /// - [ImporterHeader(Name = "有效到")] - public DateTime EndDate { get; set; } + [ExporterHeader(DisplayName = "零件号")] + public string LU { get; set; } + /// - ///价格 + /// 价格 /// - [ImporterHeader(Name = "*金额")] + [ExporterHeader(DisplayName = "价格")] public decimal Price { get; set; } + /// - ///物料编号 - /// - [ImporterHeader(Name = "*物料编码")] - public string MaterialCode { get; set; } - /// - ///价格类型 + ///客户编码 /// - [ImporterHeader(Name = "*分销渠道")] - public int Type { get; set; } - [ImporterHeader(Name = "*客户")] - public string CustomerCode { get; set; } + [ExporterHeader(DisplayName = "客户编码")] + public string ClientCode { get; set; } } - public class PriceListBJImportDto { - ///// - ///// 版本 - ///// - //[Display(Name = "版本")] - //public string Version { set; get; } /// - ///开始时间 - /// - [ImporterHeader(Name = "有效从")] - public DateTime BeginDate { get; set; } - /// - ///结算时间 + /// 零件号 /// - [ImporterHeader(Name = "有效到")] - public DateTime EndDate { get; set; } + [ImporterHeader(Name = "零件号")] + public string LU { get; set; } + /// - ///价格 + /// 价格 /// - [ImporterHeader(Name = "*金额")] + [ImporterHeader(Name = "价格")] public decimal Price { get; set; } + /// - ///物料编号 - /// - [ImporterHeader(Name = "*物料编码")] - public string MaterialCode { get; set; } - /// - ///价格类型 + ///客户编码 /// - [ImporterHeader(Name = "*分销渠道")] - public int Type { get; set; } - [ImporterHeader(Name = "*客户")] - public string CustomerCode { get; set; } + [ImporterHeader(Name = "客户编码")] + public string ClientCode { get; set; } } - public class PriceListBJRequestDto : PagedAndSortedResultRequestDto + public class PriceListBJRequestDto : RequestInputBase { - - [Display(Name = "开始时间")] public DateTime BeginDate { get; set; } [Display(Name = "结算时间")] @@ -287,7 +375,8 @@ namespace Win.Sfs.SettleAccount.Entities.Prices public string Version { set; get; } public virtual List Filters { get; set; } = new List(); - } + } + #endregion /// /// 列表 @@ -389,6 +478,11 @@ namespace Win.Sfs.SettleAccount.Entities.Prices /// [Display(Name = "高级检索")] public virtual List Filters { get; set; } = new List(); + + /// + /// 导出文件类型 + /// + public int FileType { set; get; } } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CurdBaseAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CurdBaseAppService.cs new file mode 100644 index 00000000..32881e7f --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CurdBaseAppService.cs @@ -0,0 +1,150 @@ +using Castle.Core.Internal; +using Magicodes.ExporterAndImporter.Core; +using Magicodes.ExporterAndImporter.Csv; +using Magicodes.ExporterAndImporter.Excel; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using Shouldly; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Application.Services; +using Volo.Abp.Domain.Entities; +using Win.Sfs.BaseData.ImportExcelCommon; +using Win.Sfs.SettleAccount.Constant; +using Win.Sfs.SettleAccount.Entities.Prices; +using Win.Sfs.SettleAccount.ExcelImporter; +using Win.Sfs.Shared.RepositoryBase; + +namespace Win.Sfs.SettleAccount.Bases +{ + public abstract class CurdBaseAppService : ApplicationService + where TEntity : class, IEntity + where TEntityDto : class, IEntityDto, new() + where TRequestInput : RequestInputBase + where TImportInput : class, new() + where TExportDto : class, new() + { + private readonly INormalEfCoreRepository _repository; + private readonly IExcelImportAppService _excelImportService; + + protected CurdBaseAppService(INormalEfCoreRepository repository, IExcelImportAppService excelImportService) + { + _repository = repository; + _excelImportService = excelImportService; + } + + #region 导入、导出 + /// + /// 获取导入模板 + /// + [HttpPost("import-template")] + public virtual async Task ImportTemplateAsync() + { + await Task.CompletedTask; + return new Microsoft.AspNetCore.Mvc.OkResult(); + } + + /// + /// 导入 + /// + [HttpPost] + [Route("Import")] + public virtual async Task ImportAsync([FromForm] IFormFileCollection files, string version) + { + await Task.CompletedTask; + return ApplicationConsts.SuccessStr; + } + + /// + /// 导出 + /// + [HttpPost] + [Route("Export")] + public virtual async Task ExportAsync(TRequestInput input) + { + IExporter _csv = new CsvExporter(); + IExporter _excel = new ExcelExporter(); + + var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true); + var dtoDetails = ObjectMapper.Map, List>(entities); + + var classDisplayName = typeof(TExportDto).GetCustomAttribute()?.Name ?? typeof(TExportDto).Name; + string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx"; + byte[] result = null; + + switch (input.FileType) + { + case 0: + result = await _csv.ExportAsByteArray(dtoDetails); + break; + case 1: + result = await _excel.ExportAsByteArray(dtoDetails); + break; + } + result.ShouldNotBeNull(); + + //保存导出文件到服务器存成二进制 + await _excelImportService.SaveBlobAsync( + new SaveExcelImportInputDto + { + Name = _fileName, + Content = result + } + ); + return _fileName; + } + #endregion + + #region CURD + /// + /// 新增 + /// + [HttpPost("")] + public virtual async Task CreateAsync(TCreateInput input) + { + var entity = ObjectMapper.Map(input); + await _repository.InsertAsync(entity, autoSave: true).ConfigureAwait(continueOnCapturedContext: false); + return ObjectMapper.Map (entity); + } + + /// + /// 获取列表 + /// + [HttpPost] + [Route("list")] + public virtual async Task> GetListAsync(TRequestInput input) + { + var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount); + var totalCount = await _repository.GetCountByFilterAsync(input.Filters); + var dtos = ObjectMapper.Map, List>(entitys); + return new PagedResultDto(totalCount, dtos); + } + + /// + /// 删除 + /// + [HttpDelete] + [Route("{id}")] + virtual public async Task DeleteAsync(Guid id) + { + await _repository.DeleteAsync(id); + } + + /// + /// 批量删除 + /// + [HttpPost] + [Route("delete")] + virtual public async Task DeleteListAsync(List ids) + { + return await _repository.DeleteListAsync(ids); + } + #endregion + + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Prices/PriceListAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Prices/PriceListAppService.cs deleted file mode 100644 index dceb40f0..00000000 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Prices/PriceListAppService.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp.Application.Services; -using Win.Sfs.BaseData.ImportExcelCommon; -using Win.Sfs.SettleAccount.Entities.ImportMap; -using Win.Sfs.SettleAccount.Entities.Prices; -using Win.Sfs.SettleAccount.Entities.TaskJobs; - -namespace Win.Sfs.SettleAccount.Entities.BQ.Prices -{ - /// - /// 标准价格单-相关应用服务 - /// - [Authorize(SettleAccountPermissions.PriceLists.Default)] - [Route("api/SettleAccount/TB_PRICE_LIST_Service")] - public class PriceListAppService : ApplicationService - { - private readonly PriceListManager _mng; - private readonly IExcelImportAppService _excelImportService; - private readonly ISettleAccountBranchEfCoreRepository _mapRepository; - private readonly TaskJobService _service; - public PriceListAppService( - IExcelImportAppService excelImportService, - ISettleAccountBranchEfCoreRepository mapRepository, - PriceListManager mng, - TaskJobService service - ) - { - _mapRepository = mapRepository; - _excelImportService = excelImportService; - _mng = mng; - _service = service; - } - - } -} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs index a0467aa7..2f8c4a80 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs @@ -4,11 +4,16 @@ using Magicodes.ExporterAndImporter.Excel; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.OpenApi.Extensions; +using NPOI.SS.UserModel; using SettleAccount.Job.Services.Report; using Shouldly; using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.IO; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; using TaskJob.EventArgs; @@ -33,31 +38,116 @@ namespace Win.Sfs.SettleAccount.Entities.Prices public class PriceListAppService : ApplicationService /*, IPriceListAppService*/ { - private readonly PriceListManager _mng; + private readonly PriceListManager _priceListManager; private readonly IExcelImportAppService _excelImportService; private readonly ISettleAccountBranchEfCoreRepository _mapRepository; private readonly TaskJobService _service; public PriceListAppService( IExcelImportAppService excelImportService, ISettleAccountBranchEfCoreRepository mapRepository, - PriceListManager mng, + PriceListManager priceListManager, TaskJobService service ) { _mapRepository = mapRepository; _excelImportService = excelImportService; - _mng = mng; + _priceListManager = priceListManager; _service = service; } + #region 导入、导出 /// - /// 根据筛选条件获取实体列表 + /// 获取导入模板 + /// + [HttpPost("import-template")] + public virtual async Task ImportTemplateAsync() + { + await Task.CompletedTask; + return new Microsoft.AspNetCore.Mvc.OkResult(); + } + + /// + /// 导入 + /// + [HttpPost] + [Route("Import")] + //[Authorize(SettleAccountPermissions.PriceLists.Create)] + public virtual async Task ImportAsync([FromForm] IFormFileCollection files, string version) + { + ExportImporter _exportImporter = new ExportImporter(); + + var result = await _exportImporter.UploadExcelImport(files, _excelImportService); + + List _checkls = new List(); + _checkls.Add("1040"); + _checkls.Add("1046"); + _checkls.Add("104T"); + + result = result.Where(p => _checkls.Contains(p.Plant)).ToList(); + + var entityList = ObjectMapper.Map, List>(result); + var _ls = entityList.OrderByDescending(p => p.BeginTime).GroupBy(p => new { p.LU, p.ClientCode }).Select(p => p.FirstOrDefault()); + + + foreach (var itm in _ls) + { + itm.Update(GuidGenerator.Create(), version); + } + await _priceListManager.ImportAsync(_ls.ToList(), version); + return ApplicationConsts.SuccessStr; + } + + /// + /// 导出 + /// + [HttpPost] + [Route("Export")] + //[Authorize(SettleAccountPermissions.PriceLists.Default)] + public virtual async Task ExportAsync(TB_PRICE_LIST_RequestDto input) + { + IExporter _csv = new CsvExporter(); + + IExporter _excel = new ExcelExporter(); + + + var entities = await _priceListManager.GetListAsync(input.Filters, input.Sorting, int.MaxValue, + 0, true); + + var dtoDetails = ObjectMapper.Map, List>(entities); + + string _fileName = string.Empty; + //声明导出容器 + + byte[] result = null; + switch (input.FileType) + { + case 0: + _fileName = string.Format("销售价格单_{0}.xlsx", Guid.NewGuid().ToString()); + result = await _csv.ExportAsByteArray(dtoDetails); + break; + case 1: + _fileName = string.Format("销售价格单_{0}.xlsx", Guid.NewGuid().ToString()); + result = await _excel.ExportAsByteArray(dtoDetails); + break; + } + result.ShouldNotBeNull(); + + //保存导出文件到服务器存成二进制 + await _excelImportService.SaveBlobAsync( + new SaveExcelImportInputDto + { + Name = _fileName, + Content = result + } + ); + return _fileName; + } + #endregion + + #region CURD + /// + /// 获取列表 /// - /// - /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 - /// - /// 请求条件 - /// 实体DTO列表 [HttpPost] [Route("list")] //[Authorize(SettleAccountPermissions.PriceLists.Default)] @@ -67,26 +157,55 @@ namespace Win.Sfs.SettleAccount.Entities.Prices { input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); } - var entitys = await _mng.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount); + var entitys = await _priceListManager.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount); var totalCount = await GetCountAsync(input); var dtos = ObjectMapper.Map, List>(entitys); return new PagedResultDto(totalCount, dtos); } + /// + /// 删除 + /// + [HttpDelete] + [Route("{id}")] + //[Authorize(SettleAccountPermissions.PriceLists.Delete)] + virtual public async Task DeleteAsync(Guid id) + { + await _priceListManager.DeleteAsync(id); + } + + /// + /// 批量删除 + /// + [HttpPost] + [Route("delete")] + //[Authorize(SettleAccountPermissions.PriceLists.Delete)] + virtual public async Task DeleteListAsync(List ids) + { + return await _priceListManager.DeleteListAsync(ids); + } + #endregion + + #region 私有方法 /// /// 获取总数 /// private async Task GetCountAsync(TB_PRICE_LIST_RequestDto input) { - return await _mng.GetCountAsync(input.Filters, GuidGenerator.Create()); + return await _priceListManager.GetCountAsync(input.Filters, GuidGenerator.Create()); } + #endregion + + + + /// /// 获取总数 /// private async Task GetCountAsync(PriceListRequestDto input) { - return await _mng.GetCountAsync(input.Filters, GuidGenerator.Create()); + return await _priceListManager.GetCountAsync(input.Filters, GuidGenerator.Create()); } @@ -139,7 +258,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices /// [Authorize(SettleAccountPermissions.PriceLists.Default)] virtual public async Task GetAsync(Guid id) { - var result = await _mng.GetAsync(id); ; + var result = await _priceListManager.GetAsync(id); ; var dto = ObjectMapper.Map(result); return dto; @@ -164,7 +283,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices { - var entities = await _mng.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount); + var entities = await _priceListManager.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount); var totalCount = await GetCountAsync(input); var dtos = ObjectMapper.Map, List>(entities); return new PagedResultDto(totalCount, dtos); @@ -184,7 +303,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices //[Authorize(SettleAccountPermissions.PriceLists.Default)] virtual public async Task GetTotalCountAsync(Guid branchId) { - return await _mng.GetCountAsync(new List(), branchId); + return await _priceListManager.GetCountAsync(new List(), branchId); } /// @@ -196,50 +315,11 @@ namespace Win.Sfs.SettleAccount.Entities.Prices //[Authorize(SettleAccountPermissions.PriceLists.Default)] virtual public async Task> GetAllAsync(Guid branchId) { - var entities = await _mng.GetAllAsync(branchId); + var entities = await _priceListManager.GetAllAsync(branchId); var dtos = ObjectMapper.Map, List>(entities); return new ListResultDto(dtos); } - /// - /// 批量导入实体列表 - /// - /// - /// 以ID为依据,数据库中找不到ID的实体会新增,已有ID的实体会修改 - /// - /// 实体列表 - /// 是否导入成功 - [HttpPost] - [Route("ExcelImport-Map")] - //[Authorize(SettleAccountPermissions.PriceLists.Create)] - virtual public async Task ImportAsync([FromForm] IFormFileCollection files,string version) - { - ExportImporter _exportImporter = new ExportImporter(); - - var result = await _exportImporter.UploadExcelImport(files, _excelImportService); - - List _checkls = new List(); - _checkls.Add("100001"); - _checkls.Add("100053"); - _checkls.Add("100113"); - - result = result.Where(p => _checkls.Contains(p.CustomerCode)).ToList(); - - - var entityList = ObjectMapper.Map, List>(result); - var _ls = entityList.Where(p=>p.EndTime.ToString().Contains("9999")).OrderByDescending(p => p.BeginTime).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault()); - - - foreach (var itm in _ls) - { - itm.Update(GuidGenerator.Create(),version); - } - await _mng.ImportAsync(_ls.ToList(), version); - return ApplicationConsts.SuccessStr; - } - - - /// /// 修改实体 @@ -256,92 +336,13 @@ namespace Win.Sfs.SettleAccount.Entities.Prices ); - var _ent = await _mng.UpdateAsync(id, entity); + var _ent = await _priceListManager.UpdateAsync(id, entity); var dto = ObjectMapper.Map(_ent); return dto; } - /// - /// 删除实体 - /// - /// ID - /// - [HttpDelete] - [Route("{id}")] - //[Authorize(SettleAccountPermissions.PriceLists.Delete)] - virtual public async Task DeleteAsync(Guid id) - { - - await _mng.DeleteAsync(id); - } - - /// - /// 按IDs删除实体列表 - /// - /// ID列表 - /// 是否执行成功 - [HttpPost] - [Route("delete")] - //[Authorize(SettleAccountPermissions.PriceLists.Delete)] - virtual public async Task DeleteListAsync(List ids) - { - - return await _mng.DeleteListAsync(ids); - } - - /// - /// 导出文件 - /// - /// - /// - [HttpPost] - [Route("Export")] - //[Authorize(SettleAccountPermissions.PriceLists.Default)] - virtual public async Task ExportAsync(PriceListRequestDto input) - { - - IExporter _csv = new CsvExporter(); - - IExporter _excel = new ExcelExporter(); - - - var entities = await _mng.GetListAsync(input.Filters, input.Sorting, int.MaxValue, - 0, true); - - var dtoDetails = ObjectMapper.Map, List>(entities); - - string _fileName = string.Empty; - //声明导出容器 - - byte[] result = null; - switch (input.FileType) - { - case 0: - _fileName = string.Format("标准价格单_{0}.xlsx", Guid.NewGuid().ToString()); - result = await _csv.ExportAsByteArray(dtoDetails); - break; - case 1: - _fileName = string.Format("标准价格单_{0}.xlsx", Guid.NewGuid().ToString()); - result = await _excel.ExportAsByteArray(dtoDetails); - break; - } - result.ShouldNotBeNull(); - - //保存导出文件到服务器存成二进制 - await _excelImportService.SaveBlobAsync( - new SaveExcelImportInputDto - { - Name = _fileName, - Content = result - } - ); - return _fileName; - } - - - } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs index 1c0cfe76..005bbb76 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs @@ -13,277 +13,313 @@ using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; using Win.Sfs.BaseData.ImportExcelCommon; +using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Constant; using Win.Sfs.SettleAccount.Entities.ImportMap; using Win.Sfs.SettleAccount.ExcelImporter; +using Win.Sfs.SettleAccount.Repository; using Win.Sfs.Shared.Filter; +using Win.Sfs.Shared.RepositoryBase; namespace Win.Sfs.SettleAccount.Entities.Prices { /// - /// 标准价格单-相关应用服务 + /// 备件价格 /// //[Authorize(SettleAccountPermissions.PriceLists.Default)] [AllowAnonymous] [Route("api/SettleAccount/PriceListBJ")] - public class PriceListAppServiceBJ : ApplicationService - /*, IPriceListAppService*/ + public class PriceListAppServiceBJ : CurdBaseAppService { - private readonly PriceListManagerBJ _mng; + private readonly INormalEfCoreRepository _repository; + private readonly PriceListManagerBJ _priceListManagerBJ; private readonly IExcelImportAppService _excelImportService; private readonly ISettleAccountBranchEfCoreRepository _mapRepository; - public PriceListAppServiceBJ( - IExcelImportAppService excelImportService, - ISettleAccountBranchEfCoreRepository mapRepository, - PriceListManagerBJ mng - ) - { - _mapRepository = mapRepository; - _excelImportService = excelImportService; - _mng = mng; - } - - /// - /// 按ID获取唯一实体 - /// - /// - /// 返回实体全部属性 - /// - /// ID - /// 实体DTO - - [HttpGet] - [Route("{id}")] - /// [Authorize(SettleAccountPermissions.PriceLists.Default)] - virtual public async Task GetAsync(Guid id) - { - var result = await _mng.GetAsync(id); ; - var dto = ObjectMapper.Map(result); - return dto; - - } - - - - /// - /// 根据筛选条件获取实体列表 - /// - /// - /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 - /// - /// 请求条件 - /// 实体DTO列表 - [HttpPost] - [Route("list")] - //[Authorize(SettleAccountPermissions.PriceLists.Default)] - virtual public async Task> GetListAsync(PriceListRequestDto input) - { - - if (!string.IsNullOrEmpty(input.Version)) - { - input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); - } - var entities = await _mng.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount, - input.SkipCount); - var totalCount = await GetCountAsync(input); - var dtos = ObjectMapper.Map, List>(entities); - return new PagedResultDto(totalCount, dtos); - } - /// - /// 根据筛选条件获取实体列表 - /// - /// - /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 - /// - /// 请求条件 - /// 实体DTO列表 - [HttpPost] - [Route("versionlist")] - // [Authorize(SettleAccountPermissions.PriceLists.Default)] - virtual public async Task> GetVersionListAsync(PriceListRequestDto input) - { - var entities = await _mng.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount); - var totalCount = await GetCountAsync(input); - var dtos = ObjectMapper.Map, List>(entities); - return new PagedResultDto(totalCount, dtos); - } - - - - - - - private async Task GetCountAsync(PriceListRequestDto input) - { - return await _mng.GetCountAsync(input.Filters, GuidGenerator.Create()); - } + public PriceListAppServiceBJ( + INormalEfCoreRepository repository, + PriceListManagerBJ priceListManagerBJ, + IExcelImportAppService excelImportService, + ISettleAccountBranchEfCoreRepository mapRepository - /// - /// 获取实体总数 - /// - /// 实体总数 - [HttpGet] - [Route("count")] - //[Authorize(SettleAccountPermissions.PriceLists.Default)] - virtual public async Task GetTotalCountAsync(Guid branchId) + ) :base(repository: repository, excelImportService: excelImportService) { - return await _mng.GetCountAsync(new List(), branchId); - } + _repository = repository; + _priceListManagerBJ = priceListManagerBJ; + _excelImportService = excelImportService; - /// - /// 获取全部实体列表 - /// - /// 实体DTO列表 - [HttpGet] - [Route("all")] - //[Authorize(SettleAccountPermissions.PriceLists.Default)] - virtual public async Task> GetAllAsync(Guid branchId) - { - var entities = await _mng.GetAllAsync(branchId); - var dtos = ObjectMapper.Map, List>(entities); - return new ListResultDto(dtos); + _mapRepository = mapRepository; } + #region 导入、导出 /// - /// 批量导入实体列表 + /// 导入 /// - /// - /// 以ID为依据,数据库中找不到ID的实体会新增,已有ID的实体会修改 - /// - /// 实体列表 - /// 是否导入成功 [HttpPost] - [Route("ExcelImport-Map")] - //[Authorize(SettleAccountPermissions.PriceLists.Create)] - virtual public async Task ImportAsync([FromForm] IFormFileCollection files,string version) + [Route("Import")] + public override async Task ImportAsync([FromForm] IFormFileCollection files, string version) { ExportImporter _exportImporter = new ExportImporter(); var result = await _exportImporter.UploadExcelImport(files, _excelImportService); - List _checkls = new List(); - _checkls.Add("100001"); - _checkls.Add("100053"); - _checkls.Add("100113"); - // _checkls.Add("200067"); - result = result.Where(p => _checkls.Contains(p.CustomerCode)).ToList(); + _checkls.Add("1040"); + _checkls.Add("1046"); + _checkls.Add("104T"); + result = result.Where(p => _checkls.Contains(p.ClientCode)).ToList(); var entityList = ObjectMapper.Map, List>(result); - var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).OrderByDescending(p => p.BeginDate).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault()); - + var _ls = entityList.GroupBy(p => new { p.LU, p.ClientCode }).Select(p => p.FirstOrDefault()); foreach (var itm in _ls) { - itm.Update(GuidGenerator.Create(),version); + itm.Update(GuidGenerator.Create(), version); } - _ls=_ls.Where(p => p.Type == 20).ToList(); - - - - - await _mng.ImportAsync(_ls.ToList(), version); + await _priceListManagerBJ.ImportAsync(_ls.ToList(), version); return ApplicationConsts.SuccessStr; } - - - - - /// - /// 修改实体 - /// - /// ID - /// 修改实体DTO - /// 实体DTO - [HttpPut] - [Route("{id}")] - [Authorize(SettleAccountPermissions.PriceLists.Update)] - virtual public async Task UpdateAsync(Guid id, PriceListBJDto input) - { - var entity = new PriceListBJ( - - ); - - var _ent = await _mng.UpdateAsync(id, entity); - - - var dto = ObjectMapper.Map(_ent); - return dto; - } - - /// - /// 删除实体 - /// - /// ID - /// - [HttpDelete] - [Route("{id}")] - //[Authorize(SettleAccountPermissions.PriceLists.Delete)] - virtual public async Task DeleteAsync(Guid id) - { - - await _mng.DeleteAsync(id); - } - - /// - /// 按IDs删除实体列表 - /// - /// ID列表 - /// 是否执行成功 - [HttpPost] - [Route("delete")] - //[Authorize(SettleAccountPermissions.PriceLists.Delete)] - virtual public async Task DeleteListAsync(List ids) - { - - return await _mng.DeleteListAsync(ids); - } - - /// - /// 导出文件 - /// - /// - /// - [HttpPost] - [Route("Export")] - //[Authorize(SettleAccountPermissions.PriceLists.Default)] - virtual public async Task ExportAsync(PriceListRequestDto input) - { - - IExporter _csv = new CsvExporter(); - IExporter _excel = new ExcelExporter(); - var entities = await _mng.GetListAsync(input.Filters, input.Sorting, int.MaxValue, - 0, true); - var dtoDetails = ObjectMapper.Map, List>(entities); - - string _fileName = string.Empty; - //声明导出容器 - - byte[] result = null; - switch (input.FileType) - { - case 0: - _fileName = string.Format("备件标准价格单_{0}.xlsx", Guid.NewGuid().ToString()); - result = await _csv.ExportAsByteArray(dtoDetails); - break; - case 1: - _fileName = string.Format("备件标准价格单_{0}.xlsx", Guid.NewGuid().ToString()); - result = await _excel.ExportAsByteArray(dtoDetails); - break; - } - result.ShouldNotBeNull(); - - //保存导出文件到服务器存成二进制 - await _excelImportService.SaveBlobAsync( - new SaveExcelImportInputDto - { - Name = _fileName, - Content = result - } - ); - return _fileName; - } - - + #endregion + + #region 原有的方法之后废弃删除 + // /// + // /// 按ID获取唯一实体 + // /// + // /// + // /// 返回实体全部属性 + // /// + // /// ID + // /// 实体DTO + + // [HttpGet] + // [Route("{id}")] + // /// [Authorize(SettleAccountPermissions.PriceLists.Default)] + // virtual public async Task GetAsync(Guid id) + // { + // var result = await _mng.GetAsync(id); ; + // var dto = ObjectMapper.Map(result); + // return dto; + + // } + + + + // /// + // /// 根据筛选条件获取实体列表 + // /// + // /// + // /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + // /// + // /// 请求条件 + // /// 实体DTO列表 + // [HttpPost] + // [Route("list")] + // //[Authorize(SettleAccountPermissions.PriceLists.Default)] + // virtual public async Task> GetListAsync(PriceListRequestDto input) + // { + + // if (!string.IsNullOrEmpty(input.Version)) + // { + // input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); + // } + // var entities = await _mng.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount, + //input.SkipCount); + // var totalCount = await GetCountAsync(input); + // var dtos = ObjectMapper.Map, List>(entities); + // return new PagedResultDto(totalCount, dtos); + // } + + // /// + // /// 根据筛选条件获取实体列表 + // /// + // /// + // /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + // /// + // /// 请求条件 + // /// 实体DTO列表 + // [HttpPost] + // [Route("versionlist")] + // // [Authorize(SettleAccountPermissions.PriceLists.Default)] + // virtual public async Task> GetVersionListAsync(PriceListRequestDto input) + // { + // var entities = await _mng.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount); + // var totalCount = await GetCountAsync(input); + // var dtos = ObjectMapper.Map, List>(entities); + // return new PagedResultDto(totalCount, dtos); + // } + + + + + + + // private async Task GetCountAsync(PriceListRequestDto input) + // { + // return await _mng.GetCountAsync(input.Filters, GuidGenerator.Create()); + // } + + // /// + // /// 获取实体总数 + // /// + // /// 实体总数 + // [HttpGet] + // [Route("count")] + // //[Authorize(SettleAccountPermissions.PriceLists.Default)] + // virtual public async Task GetTotalCountAsync(Guid branchId) + // { + // return await _mng.GetCountAsync(new List(), branchId); + // } + + // /// + // /// 获取全部实体列表 + // /// + // /// 实体DTO列表 + // [HttpGet] + // [Route("all")] + // //[Authorize(SettleAccountPermissions.PriceLists.Default)] + // virtual public async Task> GetAllAsync(Guid branchId) + // { + // var entities = await _mng.GetAllAsync(branchId); + // var dtos = ObjectMapper.Map, List>(entities); + // return new ListResultDto(dtos); + // } + + // /// + // /// 批量导入实体列表 + // /// + // /// + // /// 以ID为依据,数据库中找不到ID的实体会新增,已有ID的实体会修改 + // /// + // /// 实体列表 + // /// 是否导入成功 + // [HttpPost] + // [Route("ExcelImport-Map")] + // //[Authorize(SettleAccountPermissions.PriceLists.Create)] + // virtual public async Task ImportAsync([FromForm] IFormFileCollection files,string version) + // { + // ExportImporter _exportImporter = new ExportImporter(); + // var result = await _exportImporter.UploadExcelImport(files, _excelImportService); + + // List _checkls = new List(); + // _checkls.Add("100001"); + // _checkls.Add("100053"); + // _checkls.Add("100113"); + // // _checkls.Add("200067"); + // result = result.Where(p => _checkls.Contains(p.CustomerCode)).ToList(); + + // var entityList = ObjectMapper.Map, List>(result); + // var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).OrderByDescending(p => p.BeginDate).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault()); + + // foreach (var itm in _ls) + // { + // itm.Update(GuidGenerator.Create(),version); + // } + // _ls=_ls.Where(p => p.Type == 20).ToList(); + + + + + + // await _mng.ImportAsync(_ls.ToList(), version); + // return ApplicationConsts.SuccessStr; + // } + + + + + // /// + // /// 修改实体 + // /// + // /// ID + // /// 修改实体DTO + // /// 实体DTO + // [HttpPut] + // [Route("{id}")] + // [Authorize(SettleAccountPermissions.PriceLists.Update)] + // virtual public async Task UpdateAsync(Guid id, PriceListBJDto input) + // { + // var entity = new PriceListBJ( + + // ); + + // var _ent = await _mng.UpdateAsync(id, entity); + + + // var dto = ObjectMapper.Map(_ent); + // return dto; + // } + + // /// + // /// 删除实体 + // /// + // /// ID + // /// + // [HttpDelete] + // [Route("{id}")] + // //[Authorize(SettleAccountPermissions.PriceLists.Delete)] + // virtual public async Task DeleteAsync(Guid id) + // { + + // await _mng.DeleteAsync(id); + // } + + // /// + // /// 按IDs删除实体列表 + // /// + // /// ID列表 + // /// 是否执行成功 + // [HttpPost] + // [Route("delete")] + // //[Authorize(SettleAccountPermissions.PriceLists.Delete)] + // virtual public async Task DeleteListAsync(List ids) + // { + + // return await _mng.DeleteListAsync(ids); + // } + + // /// + // /// 导出文件 + // /// + // /// + // /// + // [HttpPost] + // [Route("Export")] + // //[Authorize(SettleAccountPermissions.PriceLists.Default)] + // virtual public async Task ExportAsync(PriceListRequestDto input) + // { + + // IExporter _csv = new CsvExporter(); + // IExporter _excel = new ExcelExporter(); + // var entities = await _mng.GetListAsync(input.Filters, input.Sorting, int.MaxValue, + // 0, true); + // var dtoDetails = ObjectMapper.Map, List>(entities); + + // string _fileName = string.Empty; + // //声明导出容器 + + // byte[] result = null; + // switch (input.FileType) + // { + // case 0: + // _fileName = string.Format("备件标准价格单_{0}.xlsx", Guid.NewGuid().ToString()); + // result = await _csv.ExportAsByteArray(dtoDetails); + // break; + // case 1: + // _fileName = string.Format("备件标准价格单_{0}.xlsx", Guid.NewGuid().ToString()); + // result = await _excel.ExportAsByteArray(dtoDetails); + // break; + // } + // result.ShouldNotBeNull(); + + // //保存导出文件到服务器存成二进制 + // await _excelImportService.SaveBlobAsync( + // new SaveExcelImportInputDto + // { + // Name = _fileName, + // Content = result + // } + // ); + // return _fileName; + // } + #endregion } } 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 13de6698..a6f6d937 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj @@ -125,6 +125,7 @@ + diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs index 7dab1578..c314a15f 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs @@ -6,12 +6,12 @@ using Win.Sfs.SettleAccount.Entities.CodeSettings; using Win.Sfs.SettleAccount.FISes; using Win.Sfs.SettleAccount.Entities.Materials; using Win.Sfs.SettleAccount.Entities.SettleAccounts; - + using Win.Sfs.SettleAccount.Inventories; using Win.Sfs.SettleAccount.Items; using Win.Sfs.SettleAccount.MaterialRelationships; using Win.Sfs.SettleAccount.Entities.SettleAccountVersion; - + using Win.Sfs.SettleAccount.Prebatches; using Win.Sfs.SettleAccount.Entities.Controls; using Win.Sfs.SettleAccount.SendUnsettledDiffReports; @@ -72,7 +72,7 @@ namespace Win.Sfs.SettleAccount CreateMapBom(); CreateMapBomVersion(); CreateMapInventoryDetail(); - + CreateMapMaterial(); CreateMapMaterialRelationship(); CreateMapCodeSetting(); @@ -84,7 +84,7 @@ namespace Win.Sfs.SettleAccount CreateMapPrebatch(); CreateMapInventoryDetailVersion(); - + CreateMapFISVersion(); CreateMapFactory(); CreateMapEstimatedStockDiffReport(); @@ -97,13 +97,13 @@ namespace Win.Sfs.SettleAccount CreateMapSecondaryActuralDiffReport(); - + CreateMapBTSeqKBDiffReport(); CreateMapBTNotConsignReport(); CreateMapHQNotConsignReport(); CreateMapHQSPNotConsignReport(); CreateMapImportColumnMap(); - + CreateMapInvoiceSettledDiff(); CreateMapInvoiceSettledDiffVersion(); CreateMapPriceList(); @@ -152,7 +152,7 @@ namespace Win.Sfs.SettleAccount private void CreateMapWMSDiffOutputSum() { CreateMap().ReverseMap(); - + } private void CreateMapWMSCacelOutputSum() { @@ -172,7 +172,7 @@ namespace Win.Sfs.SettleAccount #region PG-派格映射 - + /// /// 红旗明细未结导入 @@ -306,12 +306,19 @@ namespace Win.Sfs.SettleAccount /// private void CreateMapPriceList() { - CreateMap().ReverseMap(); + CreateMap(); + CreateMap() + .ForMember(x => x.LU, y => y.MapFrom(y => y.PartNo)) + .ForMember(x => x.Price, y => y.MapFrom(y => y.TotalPrice)) + .ForMember(x => x.BeginTime, y => y.MapFrom(y => y.ValidFrom)) + .ForMember(x => x.EndTime, y => y.MapFrom(y => y.ValidTo)) + .ForMember(x => x.ClientCode, y => y.MapFrom(y => y.Plant)); + CreateMap(); + CreateMap().ReverseMap(); CreateMap().ReverseMap(); - CreateMap().ReverseMap(); - CreateMap().ReverseMap(); + } private void CreateMapPriceListBJ() @@ -345,7 +352,7 @@ namespace Win.Sfs.SettleAccount - + @@ -372,7 +379,7 @@ namespace Win.Sfs.SettleAccount CreateMap(); CreateMap(); CreateMap(); - + CreateMap(); CreateMap(); @@ -389,10 +396,10 @@ namespace Win.Sfs.SettleAccount CreateMap().ReverseMap(); CreateMap().ReverseMap(); ; CreateMap().ReverseMap(); ; - + CreateMap().ReverseMap(); ; - + CreateMap(); CreateMap(); @@ -403,10 +410,10 @@ namespace Win.Sfs.SettleAccount { CreateMap().ReverseMap(); CreateMap().ReverseMap(); - CreateMap().ReverseMap(); + CreateMap().ReverseMap(); CreateMap().ReverseMap(); - + CreateMap(); CreateMap(); @@ -442,9 +449,9 @@ namespace Win.Sfs.SettleAccount CreateMap().ReverseMap(); CreateMap().ReverseMap(); CreateMap().ReverseMap(); - - CreateMap().ReverseMap(); + + CreateMap().ReverseMap(); CreateMap(); } @@ -454,9 +461,9 @@ namespace Win.Sfs.SettleAccount { CreateMap().ReverseMap(); CreateMap().ReverseMap(); - CreateMap().ReverseMap(); + CreateMap().ReverseMap(); - CreateMap().ReverseMap(); + CreateMap().ReverseMap(); CreateMap(); @@ -481,7 +488,7 @@ namespace Win.Sfs.SettleAccount CreateMap().ReverseMap(); CreateMap().ReverseMap(); CreateMap().ReverseMap(); - + CreateMap(); CreateMap(); } @@ -523,10 +530,10 @@ namespace Win.Sfs.SettleAccount CreateMap(); CreateMap(); CreateMap(); - - + + } - + @@ -541,7 +548,7 @@ namespace Win.Sfs.SettleAccount CreateMap(); CreateMap(); CreateMap(); - + } private void CreateMapSupplierItemSetUp() { @@ -618,7 +625,7 @@ namespace Win.Sfs.SettleAccount CreateMap().ReverseMap(); CreateMap(); CreateMap(); - + CreateMap(); CreateMap(); } @@ -675,11 +682,11 @@ namespace Win.Sfs.SettleAccount private void CreateMapBTNotConsignReport() { CreateMap().ReverseMap(); - CreateMap().ReverseMap(); - CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); - CreateMap().ReverseMap(); + CreateMap().ReverseMap(); CreateMap(); } @@ -687,7 +694,7 @@ namespace Win.Sfs.SettleAccount - + private void CreateMapHQNotConsignReport() { CreateMap().ReverseMap(); @@ -699,7 +706,7 @@ namespace Win.Sfs.SettleAccount CreateMap(); } - private void CreateMapHQSPNotConsignReport() + private void CreateMapHQSPNotConsignReport() { CreateMap().ReverseMap(); CreateMap().ReverseMap(); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs index da4d0a32..b41079b9 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs @@ -119,6 +119,10 @@ namespace Win.Sfs.SettleAccount.Entities.Prices public Guid ParentId { set; get; } } + + /// + /// 备件价格 + /// public class PriceListBJ : FullAuditedAggregateRootBase { public PriceListBJ() @@ -149,6 +153,31 @@ namespace Win.Sfs.SettleAccount.Entities.Prices Id = id; Version = version; } + + /// + /// 零件号 + /// + [Display(Name = "零件号")] + public string LU { get; set; } + + /// + /// 价格 + /// + [Display(Name = "价格")] + public Decimal Price { set; get; } + + /// + /// 客户编码 + /// + [Display(Name = "客户编码")] + public string ClientCode { get; set; } + + + + + + + [Display(Name = "客户")] public string CustomerCode { get; set; } @@ -169,11 +198,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices /// [Display(Name = "结算时间")] public DateTime EndDate { set; get; } - /// - /// 价格 - /// - [Display(Name = "价格")] - public Decimal Price { set; get; } + /// /// 物料编号 diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711014038_20230711-1.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711014038_20230711-1.Designer.cs new file mode 100644 index 00000000..ce000eb1 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711014038_20230711-1.Designer.cs @@ -0,0 +1,3750 @@ +// +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("20230711014038_20230711-1")] + partial class _202307111 + { + 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.8") + .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("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + 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("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + 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("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("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + 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("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("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("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + 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("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("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("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("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("GroupNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + 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("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("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("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("InvGroupNum") + .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("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("State") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + 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("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("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("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("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("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("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("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("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("RecordCount") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + 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("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("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("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("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("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("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("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("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("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("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("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") + .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("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("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("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("SettleBillNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + 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("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("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("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("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") + .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("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("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("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("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("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("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("GroupNum") + .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("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("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") + .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("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.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.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("int"); + + 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("nvarchar(max)"); + + 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("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + 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("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + 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.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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711014038_20230711-1.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711014038_20230711-1.cs new file mode 100644 index 00000000..32513709 --- /dev/null +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711014038_20230711-1.cs @@ -0,0 +1,33 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Win.Sfs.SettleAccount.Migrations +{ + public partial class _202307111 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ClientCode", + table: "Set_PriceListBJ", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "LU", + table: "Set_PriceListBJ", + type: "nvarchar(max)", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ClientCode", + table: "Set_PriceListBJ"); + + migrationBuilder.DropColumn( + name: "LU", + table: "Set_PriceListBJ"); + } + } +} 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 650bcf00..21631bc5 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs @@ -3425,6 +3425,9 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("BranchId") .HasColumnType("uniqueidentifier"); + b.Property("ClientCode") + .HasColumnType("nvarchar(max)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -3467,6 +3470,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("LU") + .HasColumnType("nvarchar(max)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountNormalEfCoreRepository.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountNormalEfCoreRepository.cs index 36af5a75..bf2c301a 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountNormalEfCoreRepository.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountNormalEfCoreRepository.cs @@ -58,12 +58,8 @@ namespace Win.Sfs.SettleAccount.Repository entities = GetSortingQueryable(entities, sorting); - return await entities.PageBy(skipCount, maxResultCount) - .ToListAsync(GetCancellationToken(cancellationToken)); - - + return await entities.PageBy(skipCount, maxResultCount).ToListAsync(GetCancellationToken(cancellationToken)); } - } }