From bdcd412c8b4861d5b0c663c04b8d02c20cba46b3 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Mon, 15 Nov 2021 08:36:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?20211115=20=E5=AF=BC=E5=85=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Migrations/20211110061756_initail.cs | 507 +++++++ .../20211112093946_data20211112.Designer.cs | 1255 +++++++++++++++++ .../Migrations/20211112093946_data20211112.cs | 31 + ...ApiHostMigrationsDbContextModelSnapshot.cs | 1253 ++++++++++++++++ .../SettleAccount.HttpApi.Host.csproj | 1 - .../appsettings.Development.json | 4 +- .../appsettings.json | 4 +- .../Entities/Invoices/InvoiceDtoBase.cs | 142 +- .../Entities/VWKanBan/IVWKanBanAppService.cs | 2 +- .../Entities/VWKanBan/VWKanBanDto.cs | 2 +- .../Entities/VWKanBan/VWKanBanExportDto.cs | 2 +- .../Entities/VWKanBan/VWKanBanImportDto.cs | 26 +- .../VWKanBan/VWKanBanImport_EmpDto.cs | 93 ++ .../Entities/VWKanBan/VWKanBanRequestDto.cs | 2 +- .../VWScrapClaims/IScrapClaimsAppService.cs | 94 ++ .../VWScrapClaims/ScrapClaimsCreateDto.cs | 15 + .../Entities/VWScrapClaims/ScrapClaimsDto.cs | 56 + .../VWScrapClaims/ScrapClaimsDtoBase.cs | 58 + .../VWScrapClaims/ScrapClaimsExportDto.cs | 57 + .../VWScrapClaims/ScrapClaimsImportDto.cs | 55 + .../VWScrapClaims/ScrapClaimsRequestDto.cs | 64 + .../ScrapClaimsVersionDtoBase.cs | 100 ++ .../VWSparePart/ISparePartAppService.cs | 94 ++ .../VWSparePart/SparePartCreateDto.cs | 15 + .../Entities/VWSparePart/SparePartDto.cs | 122 ++ .../Entities/VWSparePart/SparePartDtoBase.cs | 124 ++ .../VWSparePart/SparePartExportDto.cs | 143 ++ .../VWSparePart/SparePartImportDto.cs | 129 ++ .../VWSparePart/SparePartRequestDto.cs | 129 ++ .../VWSparePart/SparePartVersionDtoBase.cs | 100 ++ ...ttleAccountPermissionDefinitionProvider.cs | 29 +- .../Permissions/SettleAccountPermissions.cs | 55 +- .../Entities/Invoices/InvoiceAppService.cs | 8 +- .../SettleAccounts/SettleAccountAppService.cs | 4 +- .../UnSettleAccountAppService.cs | 28 +- .../Entities/VWKanBan/VWKanBanAppService.cs | 54 +- .../VWScrapClaims/ScrapClaimsAppService.cs | 316 +++++ .../VWSparePart/SparePartAppService.cs | 308 ++++ .../ImportExcelCommon/ExportImporter.cs | 2 +- .../SettleAccount.Application.xml | 229 ++- ...ttleAccountApplicationAutoMapperProfile.cs | 265 +++- .../Entities/Invoices/Invoice.cs | 14 +- .../Entities/KanBan/KanBan.cs | 28 +- .../Entities/KanBan/KanBanManager.cs | 4 +- .../Entities/SettleAccounts/SettleAccount.cs | 8 +- .../UnSettleAccounts/UnSettleAccount.cs | 5 +- .../Entities/VWScrapClaims/ScrapClaims.cs | 101 ++ .../VWScrapClaims/ScrapClaimsVersion.cs | 47 + .../Entities/VWSparePart/SparePart.cs | 194 +++ .../Entities/VWSparePart/SparePartVersion.cs | 47 + ...AccountDbContextModelCreatingExtensions.cs | 649 ++++++--- 51 files changed, 6573 insertions(+), 501 deletions(-) create mode 100644 src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.cs create mode 100644 src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.Designer.cs create mode 100644 src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.cs create mode 100644 src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImport_EmpDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/IScrapClaimsAppService.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsCreateDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDtoBase.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsExportDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsRequestDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsVersionDtoBase.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartCreateDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDtoBase.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartExportDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartRequestDto.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartVersionDtoBase.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaims.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaimsVersion.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs create mode 100644 src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePartVersion.cs diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.cs b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.cs new file mode 100644 index 00000000..d96ba844 --- /dev/null +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.cs @@ -0,0 +1,507 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Win.Sfs.SettleAccount.Migrations +{ + public partial class initail : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Set_Invoice", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Period = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Version = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Factory = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + MaterialCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + MaterialDesc = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Qty = table.Column(type: "decimal(18,2)", nullable: false), + Amt = table.Column(type: "decimal(18,2)", nullable: false), + Extend = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_Invoice", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_InvoiceVersion", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Period = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Version = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + CustomerCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_InvoiceVersion", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_KanBanSettle", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(max)", nullable: true), + Period = table.Column(type: "nvarchar(max)", nullable: true), + Version = table.Column(type: "nvarchar(max)", nullable: true), + Kanban = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), + Relation = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + Factory = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + MaterialCode = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), + PartType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + SupplierCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + SettleInputDate = table.Column(type: "datetime2", nullable: false), + Batch = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Flag = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Qty = table.Column(type: "decimal(18,2)", nullable: false), + SettleDate = table.Column(type: "datetime2", nullable: false), + State = table.Column(type: "int", nullable: false), + Extend = table.Column(type: "nvarchar(max)", nullable: true), + ParentId = table.Column(type: "uniqueidentifier", nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_KanBanSettle", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_KanBanSettle_Version", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Period = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Version = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + CustomerCode = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_KanBanSettle_Version", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_ScrapClaims", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Period = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Version = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + MaterialCode = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + MaterialDesc = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Qty = table.Column(type: "decimal(18,2)", nullable: false), + Amt = table.Column(type: "decimal(18,2)", nullable: false), + Extend = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_ScrapClaims", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_ScrapClaims_Version", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Period = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Version = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + CustomerCode = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_ScrapClaims_Version", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_Settle", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + Period = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + SettleYear = table.Column(type: "nvarchar(max)", nullable: true), + KENNCode = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + ChassisNumber = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Model = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + CP5A = table.Column(type: "datetime2", nullable: false), + CP7 = table.Column(type: "datetime2", nullable: false), + MaterialCode = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Qty = table.Column(type: "decimal(18,2)", nullable: false), + SettlementID = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + SettlementSupplier = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + ParentId = table.Column(type: "uniqueidentifier", nullable: false), + state = table.Column(type: "int", nullable: false), + Version = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_Settle", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_Settle_Version", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Period = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Version = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + CustomerCode = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + Factory = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_Settle_Version", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_SparePart", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + Period = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + Version = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + LineNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + PurchaseType = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + PurchaseOrderNo = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + PurchaseOrderNoItem = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + PurchaseOrderNoText = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + ReceiptQty = table.Column(type: "decimal(18,2)", nullable: false), + InvoicedQty = table.Column(type: "decimal(18,2)", nullable: false), + AmountNoTax = table.Column(type: "decimal(18,2)", nullable: false), + PurchasePriceNoTax = table.Column(type: "decimal(18,2)", nullable: false), + AccountNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + MaterialCode = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false), + MaterialDesc = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + SpareDate = table.Column(type: "datetime2", nullable: false), + DeliveryOrderNo = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + DeliveryLineNum = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + BatchNo = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Unit = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + TaxRate = table.Column(type: "decimal(18,2)", nullable: false), + TaxCode = table.Column(type: "nvarchar(max)", nullable: true), + GermanInvoiceNo = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), + Factory = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + FactoryName = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), + Extend = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_SparePart", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_SparePart_Version", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Period = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Version = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + CustomerCode = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_SparePart_Version", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_Unsettle", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + Period = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + SettleYear = table.Column(type: "nvarchar(max)", nullable: true), + KENNCode = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + ChassisNumber = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Model = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + CP5A = table.Column(type: "datetime2", nullable: false), + CP7 = table.Column(type: "datetime2", nullable: false), + MaterialCode = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Qty = table.Column(type: "decimal(18,2)", nullable: false), + SettlementID = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + SettlementSupplier = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + ParentId = table.Column(type: "uniqueidentifier", nullable: false), + state = table.Column(type: "int", nullable: false), + UnsettledReason = table.Column(type: "nvarchar(max)", nullable: true), + Version = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_Unsettle", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Set_Unsettle_Version", + columns: table => new + { + Id = table.Column(type: "uniqueidentifier", nullable: false), + Year = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Period = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + Version = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: false), + CustomerCode = table.Column(type: "nvarchar(36)", maxLength: 36, nullable: true), + Factory = table.Column(type: "nvarchar(max)", nullable: true), + ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), + ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true), + BranchId = table.Column(type: "uniqueidentifier", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Remark = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Set_Unsettle_Version", x => x.Id); + }); + + migrationBuilder.CreateIndex( + name: "IX_Set_KanBanSettle_Kanban_MaterialCode", + table: "Set_KanBanSettle", + columns: new[] { "Kanban", "MaterialCode" }, + unique: true, + filter: "IsDeleted=0"); + + migrationBuilder.CreateIndex( + name: "IX_Set_KanBanSettle_Version_Version", + table: "Set_KanBanSettle_Version", + column: "Version", + unique: true, + filter: "IsDeleted=0"); + + migrationBuilder.CreateIndex( + name: "IX_Set_ScrapClaims_Version_Version", + table: "Set_ScrapClaims_Version", + column: "Version", + unique: true, + filter: "IsDeleted=0"); + + migrationBuilder.CreateIndex( + name: "IX_Set_Settle_state", + table: "Set_Settle", + column: "state"); + + migrationBuilder.CreateIndex( + name: "IX_Set_Settle_Version_ChassisNumber_MaterialCode_KENNCode", + table: "Set_Settle", + columns: new[] { "Version", "ChassisNumber", "MaterialCode", "KENNCode" }); + + migrationBuilder.CreateIndex( + name: "IX_Set_Settle_Version_Version", + table: "Set_Settle_Version", + column: "Version", + unique: true, + filter: "IsDeleted=0"); + + migrationBuilder.CreateIndex( + name: "IX_Set_SparePart_Version_Version", + table: "Set_SparePart_Version", + column: "Version", + unique: true, + filter: "IsDeleted=0"); + + migrationBuilder.CreateIndex( + name: "IX_Set_Unsettle_state", + table: "Set_Unsettle", + column: "state"); + + migrationBuilder.CreateIndex( + name: "IX_Set_Unsettle_Version_ChassisNumber_MaterialCode", + table: "Set_Unsettle", + columns: new[] { "Version", "ChassisNumber", "MaterialCode" }, + unique: true); + + migrationBuilder.CreateIndex( + name: "IX_Set_Unsettle_Version_Version", + table: "Set_Unsettle_Version", + column: "Version", + unique: true, + filter: "IsDeleted=0"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Set_Invoice"); + + migrationBuilder.DropTable( + name: "Set_InvoiceVersion"); + + migrationBuilder.DropTable( + name: "Set_KanBanSettle"); + + migrationBuilder.DropTable( + name: "Set_KanBanSettle_Version"); + + migrationBuilder.DropTable( + name: "Set_ScrapClaims"); + + migrationBuilder.DropTable( + name: "Set_ScrapClaims_Version"); + + migrationBuilder.DropTable( + name: "Set_Settle"); + + migrationBuilder.DropTable( + name: "Set_Settle_Version"); + + migrationBuilder.DropTable( + name: "Set_SparePart"); + + migrationBuilder.DropTable( + name: "Set_SparePart_Version"); + + migrationBuilder.DropTable( + name: "Set_Unsettle"); + + migrationBuilder.DropTable( + name: "Set_Unsettle_Version"); + } + } +} diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.Designer.cs b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.Designer.cs new file mode 100644 index 00000000..7de448fe --- /dev/null +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.Designer.cs @@ -0,0 +1,1255 @@ +// +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(SettleAccountHttpApiHostMigrationsDbContext))] + [Migration("20211112093946_data20211112")] + partial class data20211112 + { + 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("Win.Sfs.SettleAccount.Entities.Invoices.Invoice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + 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("Extend") + .HasColumnType("nvarchar(max)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_Invoice"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.InvoiceVersion", 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(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("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") + .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_InvoiceVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode", "KENNCode"); + + b.ToTable("Set_Settle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Settle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("UnsettledReason") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode") + .IsUnique(); + + b.ToTable("Set_Unsettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Unsettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanSettle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Batch") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("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("Extend") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Flag") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Kanban") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Relation") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("SettleInputDate") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Kanban", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaims", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + 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("Extend") + .HasColumnType("nvarchar(max)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_ScrapClaims"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_ScrapClaims_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePart", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccountNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AmountNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("BatchNo") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DeliveryLineNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeliveryOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FactoryName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GermanInvoiceNo") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("InvoicedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PurchaseOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoItem") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoText") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchasePriceNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("PurchaseType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReceiptQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SpareDate") + .HasColumnType("datetime2"); + + b.Property("TaxCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,2)"); + + b.Property("Unit") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_SparePart"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_SparePart_Version"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.cs b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.cs new file mode 100644 index 00000000..d24e17aa --- /dev/null +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.cs @@ -0,0 +1,31 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Win.Sfs.SettleAccount.Migrations +{ + public partial class data20211112 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "State", + table: "Set_KanBanSettle", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(int), + oldType: "int"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "State", + table: "Set_KanBanSettle", + type: "int", + nullable: false, + defaultValue: 0, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + } + } +} diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs new file mode 100644 index 00000000..da951d66 --- /dev/null +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs @@ -0,0 +1,1253 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Volo.Abp.EntityFrameworkCore; +using Win.Sfs.SettleAccount; + +namespace Win.Sfs.SettleAccount.Migrations +{ + [DbContext(typeof(SettleAccountHttpApiHostMigrationsDbContext))] + partial class SettleAccountHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(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("Win.Sfs.SettleAccount.Entities.Invoices.Invoice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + 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("Extend") + .HasColumnType("nvarchar(max)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_Invoice"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.InvoiceVersion", 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(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("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") + .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_InvoiceVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode", "KENNCode"); + + b.ToTable("Set_Settle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Settle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("UnsettledReason") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode") + .IsUnique(); + + b.ToTable("Set_Unsettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Unsettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanSettle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Batch") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("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("Extend") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Flag") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Kanban") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Relation") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("SettleInputDate") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Kanban", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaims", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + 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("Extend") + .HasColumnType("nvarchar(max)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_ScrapClaims"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_ScrapClaims_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePart", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccountNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AmountNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("BatchNo") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DeliveryLineNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeliveryOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FactoryName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GermanInvoiceNo") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("InvoicedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PurchaseOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoItem") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoText") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchasePriceNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("PurchaseType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReceiptQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SpareDate") + .HasColumnType("datetime2"); + + b.Property("TaxCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,2)"); + + b.Property("Unit") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_SparePart"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_SparePart_Version"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj index 47366b8f..c09813b6 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj @@ -54,7 +54,6 @@ - diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json index 005445ae..734cc4b1 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json @@ -3,8 +3,8 @@ "CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088" }, "ConnectionStrings": { - "Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", - "SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;" + "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", + "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" }, "Logging": { "LogLevel": { diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json index 93697eef..03b8ad70 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json @@ -3,8 +3,8 @@ "CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088" }, "ConnectionStrings": { - "Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", - "SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;" + "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#", + "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" }, "Logging": { "LogLevel": { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Invoices/InvoiceDtoBase.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Invoices/InvoiceDtoBase.cs index 5efdcb98..4300023a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Invoices/InvoiceDtoBase.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Invoices/InvoiceDtoBase.cs @@ -87,30 +87,6 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices - - - - - - - - - - - - - - - - - - - - - - - - public class InvoiceDto : EntityDto { /// @@ -138,8 +114,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// ///入库文本号 /// - [Display(Name = "入库文本号")] - public string TextCode { get; set; } + //[Display(Name = "入库文本号")] + //public string TextCode { get; set; } /// ///零件号 /// @@ -153,8 +129,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// ///入库日期 /// - [Display(Name = "入库日期")] - public DateTime Date { get; set; } + //[Display(Name = "入库日期")] + //public DateTime Date { get; set; } /// ///数量 /// @@ -168,18 +144,18 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// ///记账号码 /// - [Display(Name = "记账号码")] - public string Number { get; set; } - /// - ///记账人员 - /// - [Display(Name = "记账人员")] - public string Accounting { get; set; } - /// - ///记账日期 - /// - [Display(Name = "记账日期")] - public DateTime AccountDate { get; set; } + //[Display(Name = "记账号码")] + //public string Number { get; set; } + ///// + /////记账人员 + ///// + //[Display(Name = "记账人员")] + //public string Accounting { get; set; } + ///// + /////记账日期 + ///// + //[Display(Name = "记账日期")] + //public DateTime AccountDate { get; set; } } @@ -202,8 +178,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// ///入库文本号 /// - [ExporterHeader(DisplayName = "入库文本号")] - public string TextCode { get; set; } + //[ExporterHeader(DisplayName = "入库文本号")] + //public string TextCode { get; set; } /// ///零件号 /// @@ -217,8 +193,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// ///入库日期 /// - [ExporterHeader(DisplayName = "入库日期")] - public DateTime Date { get; set; } + //[ExporterHeader(DisplayName = "入库日期")] + //public DateTime Date { get; set; } /// ///数量 /// @@ -232,18 +208,18 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// ///记账号码 /// - [ExporterHeader(DisplayName = "记账号码")] - public string Number { get; set; } - /// - ///记账人员 - /// - [ExporterHeader(DisplayName = "记账人员")] - public string Accounting { get; set; } - /// - ///记账日期 - /// - [ExporterHeader(DisplayName = "记账日期")] - public DateTime AccountDate { get; set; } + //[ExporterHeader(DisplayName = "记账号码")] + //public string Number { get; set; } + ///// + /////记账人员 + ///// + //[ExporterHeader(DisplayName = "记账人员")] + //public string Accounting { get; set; } + ///// + /////记账日期 + ///// + //[ExporterHeader(DisplayName = "记账日期")] + //public DateTime AccountDate { get; set; } } @@ -261,8 +237,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// ///入库文本号 /// - [ImporterHeader(Name = "入库文本号")] - public string TextCode { get; set; } + //[ImporterHeader(Name = "入库文本号")] + //public string TextCode { get; set; } /// ///零件号 /// @@ -276,8 +252,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// ///入库日期 /// - [ImporterHeader(Name = "入库日期")] - public DateTime Date { get; set; } + //[ImporterHeader(Name = "入库日期")] + //public DateTime Date { get; set; } /// ///数量 /// @@ -291,18 +267,18 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// ///记账号码 /// - [ImporterHeader(Name = "记账号码")] - public string Number { get; set; } - /// - ///记账人员 - /// - [ImporterHeader(Name = "记账人员")] - public string Accounting { get; set; } - /// - ///记账日期 - /// - [ImporterHeader(Name = "记账日期")] - public DateTime AccountDate { get; set; } + //[ImporterHeader(Name = "记账号码")] + //public string Number { get; set; } + ///// + /////记账人员 + ///// + //[ImporterHeader(Name = "记账人员")] + //public string Accounting { get; set; } + ///// + /////记账日期 + ///// + //[ImporterHeader(Name = "记账日期")] + //public DateTime AccountDate { get; set; } } @@ -328,24 +304,24 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices public string Version { set; get; } [Display(Name = "工厂")] public string Factory { get; set; } - [Display(Name = "入库文本号")] - public string TextCode { get; set; } + //[Display(Name = "入库文本号")] + //public string TextCode { get; set; } [Display(Name = "零件号")] public string MaterialCode { get; set; } [Display(Name = "零件名称")] public string MaterialDesc { get; set; } - [Display(Name = "入库日期")] - public DateTime Date { get; set; } + //[Display(Name = "入库日期")] + //public DateTime Date { get; set; } [Display(Name = "数量")] public decimal Qty { get; set; } [Display(Name = "金额")] - public decimal Amt { get; set; } - [Display(Name = "记账号码")] - public string Number { get; set; } - [Display(Name = "记账人员")] - public string Accounting { get; set; } - [Display(Name = "记账日期")] - public DateTime AccountDate { get; set; } + //public decimal Amt { get; set; } + //[Display(Name = "记账号码")] + //public string Number { get; set; } + //[Display(Name = "记账人员")] + //public string Accounting { get; set; } + //[Display(Name = "记账日期")] + //public DateTime AccountDate { get; set; } public string Site { get; set; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/IVWKanBanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/IVWKanBanAppService.cs index c6c05e2f..9323c46f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/IVWKanBanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/IVWKanBanAppService.cs @@ -50,7 +50,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// 请求条件 /// 实体DTO列表 - Task> GetListAsync(Guid parentId, VWKanBanRequestDto input); + Task> GetListAsync(VWKanBanRequestDto input); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanDto.cs index 85ca810e..30d746e8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanDto.cs @@ -75,7 +75,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// /// 结算状态 /// - public virtual int State { get ; set ; } + public virtual string State { get ; set ; } /// /// 备注 diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanExportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanExportDto.cs index 5a464ef7..77a28a6c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanExportDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanExportDto.cs @@ -88,6 +88,6 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// 结算状态 /// [ExporterHeader(DisplayName = "结算状态")] - public virtual int State { get; set; } + public virtual string State { get; set; } } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImportDto.cs index d1c04f56..16e822bf 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImportDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImportDto.cs @@ -11,17 +11,17 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan public class VWKanBanImportDto { - /// - /// 期间 - /// - [ImporterHeader(Name = "期间")] - public string Period { set; get; } + ///// + ///// 期间 + ///// + //[ImporterHeader(Name = "期间")] + //public string Period { set; get; } - /// - /// 版本 - /// - [ImporterHeader(Name = "版本")] - public virtual string Version { get; set; } + ///// + ///// 版本 + ///// + //[ImporterHeader(Name = "版本")] + //public virtual string Version { get; set; } /// ///看板条码号 @@ -53,7 +53,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// R3入库日期 /// [ImporterHeader(Name = "R3入库日期")] - public virtual DateTime SettleInputDate { set; get; } + public virtual string SettleInputDate { set; get; } /// @@ -82,13 +82,13 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// 结算日期 /// [ImporterHeader(Name = "R3结算时间")] - public virtual DateTime SettleDate { get; set; } + public virtual string SettleDate { get; set; } /// /// 结算状态 /// [ImporterHeader(Name = "结算状态")] - public virtual int State { get; set; } + public virtual string State { get; set; } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImport_EmpDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImport_EmpDto.cs new file mode 100644 index 00000000..e78e38bd --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImport_EmpDto.cs @@ -0,0 +1,93 @@ +using Magicodes.ExporterAndImporter.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Win.Sfs.SettleAccount.Entities.VWKanBan +{ + public class VWKanBanImport_EmpDto + { + + ///// + ///// 期间 + ///// + //[ImporterHeader(Name = "期间")] + //public string Period { set; get; } + + ///// + ///// 版本 + ///// + //[ImporterHeader(Name = "版本")] + //public virtual string Version { get; set; } + + /// + ///看板条码号 + /// + [ImporterHeader(Name = "看板条码号")] + public string Kanban { set; get; } + + /// + /// 入库关联号 + /// + [ImporterHeader(Name = "入库关联号")] + public virtual string Relation { set; get; } + /// + /// 工厂 + /// + [ImporterHeader(Name = "工厂")] + public virtual string Factory { set; get; } + /// + /// 零件号 + /// + [ImporterHeader(Name = "零件号")] + public virtual string MaterialCode { set; get; } + /// + /// 零件类型 + /// + [ImporterHeader(Name = "零件类型")] + public virtual string PartType { set; get; } + /// + /// R3入库日期 + /// + [ImporterHeader(Name = "R3入库日期")] + public virtual string SettleInputDate { set; get; } + + + /// + ///供应商编码 + /// + [ImporterHeader(Name = "供应商")] + public virtual string SupplierCode { get; set; } + /// + /// 数量 + /// + [ImporterHeader(Name = "数量")] + public virtual decimal Qty { get; set; } + /// + /// 批次 + /// + [ImporterHeader(Name = "批次")] + public virtual string Batch { get; set; } + + /// + /// 入库结算标识 + /// + [ImporterHeader(Name = "入库结算标识")] + public virtual string Flag { get; set; } + + /// + /// 结算日期 + /// + [ImporterHeader(Name = "R3结算时间")] + public virtual string SettleDate { get; set; } + + /// + /// 结算状态 + /// + [ImporterHeader(Name = "结算状态")] + public virtual string State { get; set; } + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanRequestDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanRequestDto.cs index 0d35ce2d..daa012a9 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanRequestDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanRequestDto.cs @@ -76,7 +76,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// /// 结算状态 /// - public virtual int State { get; set; } + public virtual string State { get; set; } /// /// 备注 diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/IScrapClaimsAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/IScrapClaimsAppService.cs new file mode 100644 index 00000000..3adbf5d6 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/IScrapClaimsAppService.cs @@ -0,0 +1,94 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + /// + /// 报废与索赔 + /// + public interface IScrapClaimsAppService + { + /// + /// 导入功能 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + + Task ScrapClaimsUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, + string year, string period, string version, string customerCode); + + /// + /// 按ID获取唯一实体 + /// + /// + /// 返回实体全部属性 + /// + /// ID + /// 实体DTO + + Task GetAsync(Guid id); + + /// + /// 根据筛选条件获取实体列表 + /// + /// + /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + /// + /// 请求条件 + /// 实体DTO列表 + + Task> GetListAsync(Guid parentId, ScrapClaimsRequestDto input); + + + + + /// + /// 根据筛选条件获取实体列表 + /// + /// + /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + /// + /// 请求条件 + /// 实体DTO列表 + + Task> GetVersionListAsync(ScrapClaimsVersionRequestDto input); + + + Task ExportAsync(ScrapClaimsRequestDto input); + + /// + /// 获取实体总数 + /// + /// 实体总数 + + Task GetTotalCountAsync(Guid branchId); + + + + + + ///// + ///// 删除实体 + ///// + ///// ID + ///// + + Task DeleteAsync(Guid id); + + + /// + /// 按IDs删除实体列表 + /// + /// IDs + /// 是否执行成功 + + Task DeleteListAsync(List ids); + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsCreateDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsCreateDto.cs new file mode 100644 index 00000000..45ff634c --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsCreateDto.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + + public class ScrapClaimsCreateDto : ScrapClaimsDtoBase, IBranch + { + public virtual Guid BranchId { get; set; } + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDto.cs new file mode 100644 index 00000000..f2055002 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDto.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DtoBase; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + public class ScrapClaimsDto : AuditedEntityDtoBase + { + /// + /// 期间 + /// + public string Period { set; get; } + + /// + /// 版本 + /// + public virtual string Version { get; set; } + + /// + /// 类型:CP7报废和索赔两种 + /// + public string Type { set; get; } + + + /// + /// 零件号 + /// + public string MaterialCode { get; set; } + + /// + /// 零件名称 + /// + public string MaterialDesc { get; set; } + + + + /// + /// 数量 + /// + public decimal Qty { set; get; } + + /// + /// 金额 + /// + public decimal Amt { set; get; } + + + /// + /// 备注 + /// + public string Extend { set; get; } + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDtoBase.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDtoBase.cs new file mode 100644 index 00000000..ff0db803 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDtoBase.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DtoBase; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + public class ScrapClaimsDtoBase : CreateOrUpdateEntityDtoBase + { + + /// + /// 期间 + /// + public string Period { set; get; } + + /// + /// 版本 + /// + public virtual string Version { get; set; } + + /// + /// 类型:CP7报废和索赔两种 + /// + public string Type { set; get; } + + + /// + /// 零件号 + /// + public string MaterialCode { get; set; } + + /// + /// 零件名称 + /// + public string MaterialDesc { get; set; } + + + + /// + /// 数量 + /// + public decimal Qty { set; get; } + + /// + /// 金额 + /// + public decimal Amt { set; get; } + + + /// + /// 备注 + /// + public string Extend { set; get; } + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsExportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsExportDto.cs new file mode 100644 index 00000000..bae9167a --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsExportDto.cs @@ -0,0 +1,57 @@ +using Magicodes.ExporterAndImporter.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + public class ScrapClaimsExportDto + { + + /// + /// 期间 + /// + [ExporterHeader(DisplayName = "期间")] + public string Period { set; get; } + + /// + /// 版本 + /// + [ExporterHeader(DisplayName = "版本")] + public virtual string Version { get; set; } + + + /// + /// 类型 + /// + [ExporterHeader(DisplayName = "类型")] + public virtual string Type { set; get; } + + /// + /// 零件号 + /// + [ExporterHeader(DisplayName = "零件号")] + public virtual string MaterialCode { set; get; } + /// + /// 零件类型 + /// + [ExporterHeader(DisplayName = "零件名称")] + public virtual string MaterialDesc { set; get; } + + + /// + /// 数量 + /// + [ExporterHeader(DisplayName = "数量")] + public virtual decimal Qty { get; set; } + /// + /// 金额 + /// + [ExporterHeader(DisplayName = "金额")] + public virtual decimal Amt { get; set; } + + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs new file mode 100644 index 00000000..966d0259 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs @@ -0,0 +1,55 @@ +using Magicodes.ExporterAndImporter.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + public class ScrapClaimsImportDto + { + ///// + ///// 期间 + ///// + //[ImporterHeader(Name = "期间")] + //public string Period { set; get; } + + ///// + ///// 版本 + ///// + //[ImporterHeader(Name = "版本")] + //public virtual string Version { get; set; } + + /// + ///类型 + /// + [ImporterHeader(Name = "类型")] + public string Type { set; get; } + + /// + /// 零件号 + /// + [ImporterHeader(Name = "零件号")] + public virtual string MaterialCode { set; get; } + /// + /// 零件类型 + /// + [ImporterHeader(Name = "零件名称")] + public virtual string MaterialDesc { set; get; } + + /// + /// 数量 + /// + [ImporterHeader(Name = "数量")] + public virtual decimal Qty { get; set; } + /// + /// 金额 + /// + [ImporterHeader(Name = "金额")] + public virtual decimal Amt { get; set; } + + + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsRequestDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsRequestDto.cs new file mode 100644 index 00000000..651b846f --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsRequestDto.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DtoBase; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + public class ScrapClaimsRequestDto : RequestDtoBase + { + + /// + /// 期间 + /// + public string Period { set; get; } + + /// + /// 版本 + /// + public virtual string Version { get; set; } + + /// + /// 类型:CP7报废和索赔两种 + /// + public string Type { set; get; } + + + /// + /// 零件号 + /// + public string MaterialCode { get; set; } + + /// + /// 零件名称 + /// + public string MaterialDesc { get; set; } + + + + /// + /// 数量 + /// + public decimal Qty { set; get; } + + /// + /// 金额 + /// + public decimal Amt { set; get; } + + /// + /// 备注 + /// + public virtual string Remark { get; set; } + + public virtual Guid ParentId { get; set; } + public virtual Guid BranchId { get; set; } + + public virtual Guid UserId { get; set; } + + public virtual int FileType { get; set; } + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsVersionDtoBase.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsVersionDtoBase.cs new file mode 100644 index 00000000..af418849 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsVersionDtoBase.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared; +using Win.Sfs.Shared.DtoBase; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + /// + /// SettleAccountVersion + /// + public class ScrapClaimsVersionDtoBase : CreateOrUpdateEntityDtoBase + { + + public string Year { get; private set; } + /// + /// 期间 + /// + public string Period { get; private set; } + /// + /// 版本号 + /// + public string Version { get; private set; } + + /// + /// 客户号 + /// + public string CustomerCode { private set; get; } + + + } + + + + public class ScrapClaimsVersionDto : AuditedEntityDtoBase, IBranch + { + public string Year { get; set; } + /// + /// 期间 + /// + public string Period { get; set; } + /// + /// 版本号 + /// + public string Version { get; set; } + + /// + /// 客户号 + /// + public string CustomerCode { set; get; } + public Guid BranchId { get; set; } + } + + public class ScrapClaimsVersionCreateDto : ScrapClaimsVersionDtoBase + { } + public class ScrapClaimsVersionUpdateDto : ScrapClaimsVersionDtoBase + { } + public class ScrapClaimsVersionRequestDto : RequestDtoBase, IBranch + { + + public string Year { get; private set; } + /// + /// 期间 + /// + public string Period { get; private set; } + /// + /// 版本号 + /// + public string Version { get; private set; } + + /// + /// 客户号 + /// + public string CustomerCode { private set; get; } + public Guid BranchId { get; set; } + } + + public class ScrapClaimsVersionImportDto + { + + public string Year { get; private set; } + /// + /// 期间 + /// + public string Period { get; private set; } + /// + /// 版本号 + /// + public string Version { get; private set; } + + /// + /// 客户号 + /// + public string CustomerCode { private set; get; } + + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs new file mode 100644 index 00000000..d7148931 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs @@ -0,0 +1,94 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + /// + /// /大众备件导入功能 + /// + public interface ISparePartAppService + { + /// + /// 导入功能 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + + Task SparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, + string year, string period, string version, string customerCode); + + /// + /// 按ID获取唯一实体 + /// + /// + /// 返回实体全部属性 + /// + /// ID + /// 实体DTO + + Task GetAsync(Guid id); + + /// + /// 根据筛选条件获取实体列表 + /// + /// + /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + /// + /// 请求条件 + /// 实体DTO列表 + + Task> GetListAsync(Guid parentId, SparePartRequestDto input); + + + + + /// + /// 根据筛选条件获取实体列表 + /// + /// + /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + /// + /// 请求条件 + /// 实体DTO列表 + + Task> GetVersionListAsync(SparePartVersionRequestDto input); + + + Task ExportAsync(SparePartRequestDto input); + + /// + /// 获取实体总数 + /// + /// 实体总数 + + Task GetTotalCountAsync(Guid branchId); + + + + + + ///// + ///// 删除实体 + ///// + ///// ID + ///// + + Task DeleteAsync(Guid id); + + + /// + /// 按IDs删除实体列表 + /// + /// IDs + /// 是否执行成功 + + Task DeleteListAsync(List ids); + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartCreateDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartCreateDto.cs new file mode 100644 index 00000000..d28ae13e --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartCreateDto.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + + public class SparePartCreateDto : SparePartDtoBase, IBranch + { + public virtual Guid BranchId { get; set; } + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDto.cs new file mode 100644 index 00000000..40b1f7e6 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDto.cs @@ -0,0 +1,122 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DtoBase; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + public class SparePartDto : AuditedEntityDtoBase + { + /// + ///年 + /// + public string Year { get; set; } + /// + /// 期间 + /// + public string Period { set; get; } + /// + /// 版本号 + /// + public string Version { set; get; } + + /// + /// 行号 + /// + public string LineNumber { set; get; } + + + /// + /// 采购类型 + /// + public string PurchaseType { get; set; } + + /// + /// 采购订单号 + /// + public string PurchaseOrderNo { get; set; } + /// + /// 采购订单行项目 + /// + public string PurchaseOrderNoItem { get; set; } + /// + /// 采购订单文本 + /// + public string PurchaseOrderNoText { get; set; } + /// + /// 收货数量 + /// + public decimal ReceiptQty { get; set; } + + /// + /// 开票数量 + /// + public decimal InvoicedQty { get; set; } + /// + /// 不含税金额 + /// + public decimal AmountNoTax { get; set; } + /// + /// 采购价格不含税 + /// + public decimal PurchasePriceNoTax { get; set; } + /// + /// 科目号 + /// + public string AccountNum { get; set; } + /// + /// 物料代码 + /// + public string MaterialCode { get; set; } + /// + /// 物料描述 + /// + public string MaterialDesc { get; set; } + /// + /// 日期 + /// + public DateTime SpareDate { get; set; } + /// + /// 交货单号 + /// + public string DeliveryOrderNo { get; set; } + /// + /// 交货行号 + /// + public string DeliveryLineNum { get; set; } + /// + /// 批次号 + /// + public string BatchNo { get; set; } + /// + /// 单位 + /// + public string Unit { get; set; } + /// + /// 税率 + /// + public decimal TaxRate { get; set; } + /// + /// 税码 + /// + public string TaxCode { get; set; } + /// + /// 德国发票号 + /// + public string GermanInvoiceNo { get; set; } + /// + /// 工厂 + /// + public string Factory { get; set; } + /// + /// 工厂名称 + /// + public string FactoryName { get; set; } + /// + /// 备注 + /// + public string Extend { set; get; } + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDtoBase.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDtoBase.cs new file mode 100644 index 00000000..7a7f283d --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDtoBase.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DtoBase; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + public class SparePartDtoBase : CreateOrUpdateEntityDtoBase + { + + /// + ///年 + /// + public string Year { get; set; } + /// + /// 期间 + /// + public string Period { set; get; } + /// + /// 版本号 + /// + public string Version { set; get; } + + /// + /// 行号 + /// + public string LineNumber { set; get; } + + + /// + /// 采购类型 + /// + public string PurchaseType { get; set; } + + /// + /// 采购订单号 + /// + public string PurchaseOrderNo { get; set; } + /// + /// 采购订单行项目 + /// + public string PurchaseOrderNoItem { get; set; } + /// + /// 采购订单文本 + /// + public string PurchaseOrderNoText { get; set; } + /// + /// 收货数量 + /// + public decimal ReceiptQty { get; set; } + + /// + /// 开票数量 + /// + public decimal InvoicedQty { get; set; } + /// + /// 不含税金额 + /// + public decimal AmountNoTax { get; set; } + /// + /// 采购价格不含税 + /// + public decimal PurchasePriceNoTax { get; set; } + /// + /// 科目号 + /// + public string AccountNum { get; set; } + /// + /// 物料代码 + /// + public string MaterialCode { get; set; } + /// + /// 物料描述 + /// + public string MaterialDesc { get; set; } + /// + /// 日期 + /// + public DateTime SpareDate { get; set; } + /// + /// 交货单号 + /// + public string DeliveryOrderNo { get; set; } + /// + /// 交货行号 + /// + public string DeliveryLineNum { get; set; } + /// + /// 批次号 + /// + public string BatchNo { get; set; } + /// + /// 单位 + /// + public string Unit { get; set; } + /// + /// 税率 + /// + public decimal TaxRate { get; set; } + /// + /// 税码 + /// + public string TaxCode { get; set; } + /// + /// 德国发票号 + /// + public string GermanInvoiceNo { get; set; } + /// + /// 工厂 + /// + public string Factory { get; set; } + /// + /// 工厂名称 + /// + public string FactoryName { get; set; } + /// + /// 备注 + /// + public string Extend { set; get; } + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartExportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartExportDto.cs new file mode 100644 index 00000000..33c5ab3b --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartExportDto.cs @@ -0,0 +1,143 @@ +using Magicodes.ExporterAndImporter.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + public class SparePartExportDto + { + + /// + /// 期间 + /// + [ExporterHeader(DisplayName = "期间")] + public string Period { set; get; } + + /// + /// 版本 + /// + [ExporterHeader(DisplayName = "版本")] + public virtual string Version { get; set; } + + + /// + /// 行号 + /// + [ExporterHeader(DisplayName = "行号")] + public string LineNumber { set; get; } + + + /// + /// 采购类型 + /// + [ExporterHeader(DisplayName = "采购类型")] + public string PurchaseType { get; set; } + + /// + /// 采购订单号 + /// + [ExporterHeader(DisplayName = "采购订单号")] + public string PurchaseOrderNo { get; set; } + /// + /// 采购订单行项目 + /// + [ExporterHeader(DisplayName = "采购订单行项目")] + public string PurchaseOrderNoItem { get; set; } + /// + /// 采购订单文本 + /// + [ExporterHeader(DisplayName = "采购订单文本")] + public string PurchaseOrderNoText { get; set; } + /// + /// 收货数量 + /// + [ExporterHeader(DisplayName = "收货数量")] + public decimal ReceiptQty { get; set; } + + /// + /// 开票数量 + /// + [ExporterHeader(DisplayName = "开票数量")] + public decimal InvoicedQty { get; set; } + /// + /// 不含税金额 + /// + [ExporterHeader(DisplayName = "不含税金额")] + public decimal AmountNoTax { get; set; } + /// + /// 采购价格不含税 + /// + [ExporterHeader(DisplayName = "采购价格不含税")] + public decimal PurchasePriceNoTax { get; set; } + /// + /// 科目号 + /// + [ExporterHeader(DisplayName = "科目号")] + public string AccountNum { get; set; } + /// + /// 物料代码 + /// + [ExporterHeader(DisplayName = "物料代码")] + public string MaterialCode { get; set; } + /// + /// 物料描述 + /// + [ExporterHeader(DisplayName = "物料描述")] + public string MaterialDesc { get; set; } + /// + /// 日期 + /// + [ExporterHeader(DisplayName = "日期")] + public DateTime SpareDate { get; set; } + /// + /// 交货单号 + /// + [ExporterHeader(DisplayName = "交货单号")] + public string DeliveryOrderNo { get; set; } + /// + /// 交货行号 + /// + [ExporterHeader(DisplayName = "交货行号")] + public string DeliveryLineNum { get; set; } + /// + /// 批次号 + /// + [ExporterHeader(DisplayName = "批次号")] + public string BatchNo { get; set; } + /// + /// 单位 + /// + [ExporterHeader(DisplayName = "单位")] + public string Unit { get; set; } + /// + /// 税率 + /// + [ExporterHeader(DisplayName = "税率")] + public decimal TaxRate { get; set; } + /// + /// 税码 + /// + [ExporterHeader(DisplayName = "税码")] + public string TaxCode { get; set; } + /// + /// 德国发票号 + /// + [ExporterHeader(DisplayName = "德国发票号")] + public string GermanInvoiceNo { get; set; } + /// + /// 工厂 + /// + [ExporterHeader(DisplayName = "工厂")] + public string Factory { get; set; } + /// + /// 工厂名称 + /// + [ExporterHeader(DisplayName = "工厂名称")] + public string FactoryName { get; set; } + + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs new file mode 100644 index 00000000..d63f82cc --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs @@ -0,0 +1,129 @@ +using Magicodes.ExporterAndImporter.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + public class SparePartImportDto + { + + /// + /// 行号 + /// + [ImporterHeader(Name = "行号")] + public string LineNumber { set; get; } + + + /// + /// 采购类型 + /// + [ImporterHeader(Name = "采购类型")] + public string PurchaseType { get; set; } + + /// + /// 采购订单号 + /// + [ImporterHeader(Name = "采购订单号")] + public string PurchaseOrderNo { get; set; } + /// + /// 采购订单行项目 + /// + [ImporterHeader(Name = "采购订单行项目")] + public string PurchaseOrderNoItem { get; set; } + /// + /// 采购订单文本 + /// + [ImporterHeader(Name = "采购订单文本")] + public string PurchaseOrderNoText { get; set; } + /// + /// 收货数量 + /// + [ImporterHeader(Name = "收货数量")] + public decimal ReceiptQty { get; set; } + + /// + /// 开票数量 + /// + [ImporterHeader(Name = "开票数量")] + public decimal InvoicedQty { get; set; } + /// + /// 不含税金额 + /// + [ImporterHeader(Name = "不含税金额")] + public decimal AmountNoTax { get; set; } + /// + /// 采购价格不含税 + /// + [ImporterHeader(Name = "采购价格不含税")] + public decimal PurchasePriceNoTax { get; set; } + /// + /// 科目号 + /// + [ImporterHeader(Name = "科目号")] + public string AccountNum { get; set; } + /// + /// 物料代码 + /// + [ImporterHeader(Name = "物料代码")] + public string MaterialCode { get; set; } + /// + /// 物料描述 + /// + [ImporterHeader(Name = "物料描述")] + public string MaterialDesc { get; set; } + /// + /// 日期 + /// + [ImporterHeader(Name = "日期")] + public DateTime SpareDate { get; set; } + /// + /// 交货单号 + /// + [ImporterHeader(Name = "交货单号")] + public string DeliveryOrderNo { get; set; } + /// + /// 交货行号 + /// + [ImporterHeader(Name = "交货行号")] + public string DeliveryLineNum { get; set; } + /// + /// 批次号 + /// + [ImporterHeader(Name = "批次号")] + public string BatchNo { get; set; } + /// + /// 单位 + /// + [ImporterHeader(Name = "单位")] + public string Unit { get; set; } + /// + /// 税率 + /// + [ImporterHeader(Name = "税率")] + public decimal TaxRate { get; set; } + /// + /// 税码 + /// + [ImporterHeader(Name = "税码")] + public string TaxCode { get; set; } + /// + /// 德国发票号 + /// + [ImporterHeader(Name = "德国发票号")] + public string GermanInvoiceNo { get; set; } + /// + /// 工厂 + /// + [ImporterHeader(Name = "工厂")] + public string Factory { get; set; } + /// + /// 工厂名称 + /// + [ImporterHeader(Name = "工厂名称")] + public string FactoryName { get; set; } + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartRequestDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartRequestDto.cs new file mode 100644 index 00000000..7ceb6ac2 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartRequestDto.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DtoBase; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + public class SparePartRequestDto : RequestDtoBase + { + /// + ///年 + /// + public string Year { get; set; } + /// + /// 期间 + /// + public string Period { set; get; } + /// + /// 版本号 + /// + public string Version { set; get; } + + /// + /// 行号 + /// + public string LineNumber { set; get; } + + + /// + /// 采购类型 + /// + public string PurchaseType { get; set; } + + /// + /// 采购订单号 + /// + public string PurchaseOrderNo { get; set; } + /// + /// 采购订单行项目 + /// + public string PurchaseOrderNoItem { get; set; } + /// + /// 采购订单文本 + /// + public string PurchaseOrderNoText { get; set; } + /// + /// 收货数量 + /// + public decimal ReceiptQty { get; set; } + + /// + /// 开票数量 + /// + public decimal InvoicedQty { get; set; } + /// + /// 不含税金额 + /// + public decimal AmountNoTax { get; set; } + /// + /// 采购价格不含税 + /// + public decimal PurchasePriceNoTax { get; set; } + /// + /// 科目号 + /// + public string AccountNum { get; set; } + /// + /// 物料代码 + /// + public string MaterialCode { get; set; } + /// + /// 物料描述 + /// + public string MaterialDesc { get; set; } + /// + /// 日期 + /// + public DateTime SpareDate { get; set; } + /// + /// 交货单号 + /// + public string DeliveryOrderNo { get; set; } + /// + /// 交货行号 + /// + public string DeliveryLineNum { get; set; } + /// + /// 批次号 + /// + public string BatchNo { get; set; } + /// + /// 单位 + /// + public string Unit { get; set; } + /// + /// 税率 + /// + public decimal TaxRate { get; set; } + /// + /// 税码 + /// + public string TaxCode { get; set; } + /// + /// 德国发票号 + /// + public string GermanInvoiceNo { get; set; } + /// + /// 工厂 + /// + public string Factory { get; set; } + /// + /// 工厂名称 + /// + public string FactoryName { get; set; } + /// + /// 备注 + /// + public string Extend { set; get; } + + public virtual Guid ParentId { get; set; } + public virtual Guid BranchId { get; set; } + + public virtual Guid UserId { get; set; } + + public virtual int FileType { get; set; } + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartVersionDtoBase.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartVersionDtoBase.cs new file mode 100644 index 00000000..733cbed0 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartVersionDtoBase.cs @@ -0,0 +1,100 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared; +using Win.Sfs.Shared.DtoBase; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + /// + /// SettleAccountVersion + /// + public class SparePartVersionDtoBase : CreateOrUpdateEntityDtoBase + { + + public string Year { get; private set; } + /// + /// 期间 + /// + public string Period { get; private set; } + /// + /// 版本号 + /// + public string Version { get; private set; } + + /// + /// 客户号 + /// + public string CustomerCode { private set; get; } + + + } + + + + public class SparePartVersionDto : AuditedEntityDtoBase, IBranch + { + public string Year { get; set; } + /// + /// 期间 + /// + public string Period { get; set; } + /// + /// 版本号 + /// + public string Version { get; set; } + + /// + /// 客户号 + /// + public string CustomerCode { set; get; } + public Guid BranchId { get; set; } + } + + public class SparePartVersionCreateDto : SparePartVersionDtoBase + { } + public class SparePartVersionUpdateDto : SparePartVersionDtoBase + { } + public class SparePartVersionRequestDto : RequestDtoBase, IBranch + { + + public string Year { get; private set; } + /// + /// 期间 + /// + public string Period { get; private set; } + /// + /// 版本号 + /// + public string Version { get; private set; } + + /// + /// 客户号 + /// + public string CustomerCode { private set; get; } + public Guid BranchId { get; set; } + } + + public class SparePartVersionImportDto + { + + public string Year { get; private set; } + /// + /// 期间 + /// + public string Period { get; private set; } + /// + /// 版本号 + /// + public string Version { get; private set; } + + /// + /// 客户号 + /// + public string CustomerCode { private set; get; } + + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissionDefinitionProvider.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissionDefinitionProvider.cs index d6af62b8..93a95d45 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissionDefinitionProvider.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissionDefinitionProvider.cs @@ -11,11 +11,35 @@ namespace Win.Sfs.SettleAccount var myGroup = context.AddGroup(SettleAccountPermissions.GroupName, L("SettleAccount")); #region 派格 + //大众看板明细结算导入 var vwKanban = myGroup.AddPermission(SettleAccountPermissions.VWKanBan.Default, L("VWKanBan")); vwKanban.AddChild(SettleAccountPermissions.VWKanBan.Create, L("Create")); vwKanban.AddChild(SettleAccountPermissions.VWKanBan.Update, L("Update")); vwKanban.AddChild(SettleAccountPermissions.VWKanBan.Delete, L("Delete")); + //大众发票导入 + var Invoices = myGroup.AddPermission(SettleAccountPermissions.Invoices.Default, L("Invoices")); + Invoices.AddChild(SettleAccountPermissions.Invoices.Create, L("Create")); + Invoices.AddChild(SettleAccountPermissions.Invoices.Update, L("Update")); + Invoices.AddChild(SettleAccountPermissions.Invoices.Delete, L("Delete")); + //cp7报废和索赔 + var scrapClaims = myGroup.AddPermission(SettleAccountPermissions.ScrapClaims.Default, L("ScrapClaims")); + scrapClaims.AddChild(SettleAccountPermissions.ScrapClaims.Create, L("Create")); + scrapClaims.AddChild(SettleAccountPermissions.ScrapClaims.Update, L("Update")); + scrapClaims.AddChild(SettleAccountPermissions.ScrapClaims.Delete, L("Delete")); + + + //大众备件 + var sparePart = myGroup.AddPermission(SettleAccountPermissions.SparePart.Default, L("SparePart")); + sparePart.AddChild(SettleAccountPermissions.SparePart.Create, L("Create")); + sparePart.AddChild(SettleAccountPermissions.SparePart.Update, L("Update")); + sparePart.AddChild(SettleAccountPermissions.SparePart.Delete, L("Delete")); + + //大众FIS未结算明细 + var unSettleAccount = myGroup.AddPermission(SettleAccountPermissions.UnSettleAccount.Default, L("UnSettleAccount")); + unSettleAccount.AddChild(SettleAccountPermissions.UnSettleAccount.Create, L("Create")); + unSettleAccount.AddChild(SettleAccountPermissions.UnSettleAccount.Update, L("Update")); + unSettleAccount.AddChild(SettleAccountPermissions.UnSettleAccount.Delete, L("Delete")); #endregion @@ -56,10 +80,7 @@ namespace Win.Sfs.SettleAccount itemInvoicePrices.AddChild(SettleAccountPermissions.ItemInvoicePrices.Delete, L("Delete")); - var Invoices = myGroup.AddPermission(SettleAccountPermissions.Invoices.Default, L("Invoices")); - Invoices.AddChild(SettleAccountPermissions.Invoices.Create, L("Create")); - Invoices.AddChild(SettleAccountPermissions.Invoices.Update, L("Update")); - Invoices.AddChild(SettleAccountPermissions.Invoices.Delete, L("Delete")); + var CodeSettings = myGroup.AddPermission(SettleAccountPermissions.CodeSettings.Default, L("CodeSettings")); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissions.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissions.cs index bb1ced77..6b8ef521 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissions.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissions.cs @@ -24,6 +24,53 @@ namespace Win.Sfs.SettleAccount public const string Update = Default + "." + UpdateStr; public const string Delete = Default + "." + DeleteStr; } + /// + /// 发票汇总 + /// + public static class Invoices + { + public const string Default = GroupName + "." + nameof(Invoices); + public const string Create = Default + "." + "Create"; + public const string Update = Default + "." + "Update"; + public const string Delete = Default + "." + "Delete"; + public const string Export = Default + "." + "Export"; + } + + /// + /// CP7报废和索赔 + /// + public static class ScrapClaims + { + public const string Default = GroupName + "." + nameof(ScrapClaims); + public const string Create = Default + "." + "Create"; + public const string Update = Default + "." + "Update"; + public const string Delete = Default + "." + "Delete"; + public const string Export = Default + "." + "Export"; + } + + /// + /// 大众备件 + /// + public static class SparePart + { + public const string Default = GroupName + "." + nameof(SparePart); + public const string Create = Default + "." + "Create"; + public const string Update = Default + "." + "Update"; + public const string Delete = Default + "." + "Delete"; + public const string Export = Default + "." + "Export"; + } + + /// + /// 大众FIS未结算明细 + /// + public static class UnSettleAccount + { + public const string Default = GroupName + "." + nameof(UnSettleAccount); + public const string Create = Default + "." + "Create"; + public const string Update = Default + "." + "Update"; + public const string Delete = Default + "." + "Delete"; + public const string Export = Default + "." + "Export"; + } #endregion #region 天合 @@ -105,15 +152,7 @@ namespace Win.Sfs.SettleAccount - public static class Invoices - { - public const string Default = GroupName + "." + nameof(Invoices); - public const string Create = Default + "." + "Create"; - public const string Update = Default + "." + "Update"; - public const string Delete = Default + "." + "Delete"; - public const string Export = Default + "." + "Export"; - } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs index 9260f185..e70499f9 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs @@ -38,7 +38,7 @@ using Win.Utils; namespace Win.Sfs.SettleAccount.Entities.Invoices { - [Authorize(SettleAccountPermissions.Invoices.Default)] + //[Authorize(SettleAccountPermissions.Invoices.Default)] //[AllowAnonymous] @@ -97,7 +97,11 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices var _id = GuidGenerator.Create(); var _bomList = new List(); _bomList.Add(new InvoiceVersion(_id, branchId, year, period, version, customerCode)); - + foreach (var itm in entityList) + { + itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, _id); + } + //批量插入操作 await _repository.GetDbContext().BulkInsertAsync(entityList); await _versionRepository.GetDbContext().BulkInsertAsync(_bomList); return ApplicationConsts.SuccessStr; diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs index 56787455..36753d32 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs @@ -47,7 +47,7 @@ using TaskJob.EventArgs; namespace Win.Sfs.SettleAccount.Entities.SettleAccounts { /// - /// 区域相关应用服务 + /// 大众准时化结算明细导入-R3已结 /// [Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[AllowAnonymous] @@ -117,7 +117,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [HttpPost] - [Route("ExcelImport-TH")] + [Route("ExcelImport-PG")] [DisableRequestSizeLimit] [Authorize(SettleAccountPermissions.SettleAccounts.Default)] public async Task SettleAccountUploadExcelImportTH([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs index 8d64a38e..f2a94aa1 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs @@ -47,9 +47,9 @@ using TaskJob.EventArgs; namespace Win.Sfs.SettleAccount.Entities.SettleAccounts { /// - /// 区域相关应用服务 + ///大众FIS未结算明细导入功能 /// - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[AllowAnonymous] [Route("api/settleaccount/UnSettleAccount")] public class UnSettleAccountAppService : SettleAccountApplicationBase, IUnSettleAccountAppService @@ -93,14 +93,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts _relrepository = relrepository; } /// - /// 导入功能 + /// 导入功能,做成任务下载 /// /// 上传的文件(前端已经限制只能上传一个附件) /// [HttpPost] [Route("ExcelImport")] [DisableRequestSizeLimit] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] public async Task UnSettleAccountUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory) { @@ -108,7 +108,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts customConditionList.Add(new CustomCondition() { Name = "Version", Value = version }); customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode }); customConditionList.Add(new CustomCondition() { Name = "Factory", Value = customerCode }); - var _taskid = await _service.ImportEnqueueAsync(files, "未结算数据导入", CurrentUser, typeof(UnSettleAccountImportService), customConditionList, (rs) => { + var _taskid = await _service.ImportEnqueueAsync(files, "大众FIS未结算明细", CurrentUser, typeof(UnSettleAccountImportService), customConditionList, (rs) => { }); return _taskid; @@ -124,7 +124,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// 实体DTO [HttpGet] [Route("{id}")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); @@ -161,7 +161,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// [HttpPost] [Route("Export")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(UnSettleAccountRequestDto input) { @@ -185,11 +185,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts switch (input.FileType) { case 0: - _fileName = string.Format("大众未结算_{0}.csv", input.UserId.ToString()); + _fileName = string.Format("大众FIS未结算明细_{0}.csv", input.UserId.ToString()); result = await _csv.ExportAsByteArray(dtoDetails); break; case 1: - _fileName = string.Format("大众未结算_{0}.xlsx", input.UserId.ToString()); + _fileName = string.Format("大众FIS未结算明细_{0}.xlsx", input.UserId.ToString()); result = await _excel.ExportAsByteArray(dtoDetails); break; } @@ -224,7 +224,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// 实体DTO列表 [HttpPost] [Route("list")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetListAsync(Guid id, UnSettleAccountRequestDto input) { if (input.ParentId != Guid.Empty) @@ -253,7 +253,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// 实体总数 [HttpGet] [Route("count")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task GetTotalCountAsync(Guid branchId) { return await _repository.GetCountAsync(branchId); @@ -265,7 +265,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// 实体DTO列表 [HttpGet] [Route("all")] - [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); @@ -283,7 +283,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// [HttpDelete] [Route("{id}")] - [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] + //[Authorize(SettleAccountPermissions.SettleAccounts.Delete)] virtual public async Task DeleteAsync(Guid id) { var entity = await GetFromCacheAsync(id); @@ -298,7 +298,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// 是否执行成功 [HttpPost] [Route("delete")] - [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] + //[Authorize(SettleAccountPermissions.SettleAccounts.Delete)] virtual public async Task DeleteListAsync(List ids) { foreach (var id in ids) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs index 784cc234..647c0ca1 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs @@ -23,9 +23,7 @@ using Win.Sfs.SettleAccount.Entities.VWKanBanVersion; using Magicodes.ExporterAndImporter.Csv; using Magicodes.ExporterAndImporter.Excel; using Shouldly; - - - +using Volo.Abp; namespace Win.Sfs.SettleAccount.Entities.VWKanBan { @@ -35,7 +33,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[AllowAnonymous] [Route("api/settleaccount/VWKanBan")] - public class VWKanBanAppService : SettleAccountApplicationBase, IVWKanBanAppService + public class VWKanBanAppService : SettleAccountApplicationBase, IVWKanBanAppService { private readonly IGuidGenerator _guidGenerator; @@ -43,7 +41,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan private readonly ISettleAccountBranchEfCoreRepository _versionRepository; - private readonly ISettleAccountBranchEfCoreRepository _repository; + private readonly ISettleAccountBranchEfCoreRepository _repository; /// /// 构建方法 /// @@ -52,8 +50,8 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// 缓存 public VWKanBanAppService(IGuidGenerator guidGenerator, ISettleAccountBranchEfCoreRepository versionRepository, - ISettleAccountBranchEfCoreRepository repository, - IDistributedCache cache, + ISettleAccountBranchEfCoreRepository repository, + IDistributedCache cache, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager @@ -77,9 +75,14 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] public async Task VWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) { + if(string.IsNullOrEmpty(version)) + { + throw new BusinessException("版本不能空,必须传入!"); + } + List listImport = new List(); ExportImporter _exportImporter = new ExportImporter(); var result = await _exportImporter.UploadExcelImport(files, _excelImportService); - var entityList = ObjectMapper.Map, List>(result); + var entityList = ObjectMapper.Map, List>(result); //删除版本 var _versionQuery = _versionRepository.Where(p => p.Version == version); await _versionQuery.BatchDeleteAsync(); @@ -99,12 +102,15 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan var _id = GuidGenerator.Create(); var _bomList = new List(); _bomList.Add(new KanBanVersion(_id, branchId, year, period, version, customerCode)); - + foreach (var itm in entityList) + { + itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, _id); + } if (checkList.Count > 0) { return await ExportErrorReportAsync(checkList); } - await _repository.GetDbContext().BulkInsertAsync(entityList); + await _repository.GetDbContext().BulkInsertAsync(entityList); await _versionRepository.GetDbContext().BulkInsertAsync(_bomList); return ApplicationConsts.SuccessStr; } @@ -123,12 +129,12 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan virtual public async Task GetAsync(Guid id) { var result = await GetFromCacheAsync(id); - var dto = ObjectMapper.Map(result); + var dto = ObjectMapper.Map(result); return dto; } - private async Task GetFromCacheAsync(Guid id) + private async Task GetFromCacheAsync(Guid id) { var result = await _repository.GetAsync(id); return result; @@ -159,14 +165,15 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan IExporter _csv = new CsvExporter(); IExporter _excel = new ExcelExporter(); - if (input.ParentId != Guid.Empty) + + if (!string.IsNullOrEmpty(input.Version)) { - input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); } - var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue, + var entities = await _repository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, int.MaxValue, 0, true); - var dtoDetails = ObjectMapper.Map, List>(entities); + var dtoDetails = ObjectMapper.Map, List>(entities); string _fileName = string.Empty; //声明导出容器 @@ -208,22 +215,21 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan [HttpPost] [Route("list")] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] - virtual public async Task> GetListAsync(Guid id, VWKanBanRequestDto input) + virtual public async Task> GetListAsync(VWKanBanRequestDto input) { - if (input.ParentId != Guid.Empty) + + if (!string.IsNullOrEmpty(input.Version)) { - input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); } else { return new PagedResultDto(0, new List()); } - var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount, + var entities = await _repository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); - var totalCount = await GetCountAsync(input); - var dtos = ObjectMapper.Map, List>(entities); - + var dtos = ObjectMapper.Map, List>(entities); return new PagedResultDto(totalCount, dtos); } @@ -252,7 +258,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan var entities = await _repository.GetAllAsync(branchId, true); - var dtos = ObjectMapper.Map, List>(entities); + var dtos = ObjectMapper.Map, List>(entities); return new ListResultDto(dtos); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs new file mode 100644 index 00000000..3208404f --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs @@ -0,0 +1,316 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Caching; +using Volo.Abp.Guids; +using Win.Abp.Snowflakes; +using Win.Sfs.BaseData.ImportExcelCommon; +using Win.Sfs.SettleAccount.CommonManagers; +using Win.Sfs.SettleAccount.ExcelImporter; +using Win.Sfs.Shared.Filter; +using EFCore.BulkExtensions; +using Win.Sfs.SettleAccount.ExportReports; +using Win.Sfs.SettleAccount.Constant; +using Volo.Abp.Domain.Repositories; +using Magicodes.ExporterAndImporter.Core; +using Shouldly; +using Magicodes.ExporterAndImporter.Csv; +using Magicodes.ExporterAndImporter.Excel; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + /// + /// 大众CP7报废和索赔导入 + /// + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + //[AllowAnonymous] + [Route("api/settleaccount/ScrapClaims")] + public class ScrapClaimsAppService : SettleAccountApplicationBase, IScrapClaimsAppService + { + private readonly IGuidGenerator _guidGenerator; + + private readonly IExcelImportAppService _excelImportService; + + private readonly ISettleAccountBranchEfCoreRepository _versionRepository; + + private readonly ISettleAccountBranchEfCoreRepository _repository; + /// + /// 构建方法 + /// + /// 构建UID + /// 仓储接口 + /// 缓存 + public ScrapClaimsAppService(IGuidGenerator guidGenerator, + ISettleAccountBranchEfCoreRepository versionRepository, + ISettleAccountBranchEfCoreRepository repository, + IDistributedCache cache, + IExcelImportAppService excelImportService, + ISnowflakeIdGenerator snowflakeIdGenerator, + ICommonManager commonManager + ) : base(cache, excelImportService, snowflakeIdGenerator, commonManager) + { + _versionRepository = versionRepository; + _guidGenerator = guidGenerator; + _excelImportService = excelImportService; + _repository = repository; + } + + + /// + /// 导入功能 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpPost] + [Route("ExcelImport")] + [DisableRequestSizeLimit] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + public async Task ScrapClaimsUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) + { + ExportImporter _exportImporter = new ExportImporter(); + var result = await _exportImporter.UploadExcelImport(files, _excelImportService); + var entityList = ObjectMapper.Map, List>(result); + //删除版本 + var _versionQuery = _versionRepository.Where(p => p.Version == version); + await _versionQuery.BatchDeleteAsync(); + //删除明细 + var _query = _repository.Where(p => p.Version == version); + await _query.BatchDeleteAsync(); + //插入数据前检验 + var checkList = new List(); + var _group = entityList.GroupBy(x => new { x.Type, x.MaterialCode, x.Version }).Select(p => new { Count = p.Count(), Type = p.Key.Type, MaterialCode = p.Key.MaterialCode }); + foreach (var itm in _group) + { + if (string.IsNullOrEmpty(itm.Type)) + { + checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的零件号{0},其类型标识{1}有空,请检查!", itm.MaterialCode, itm.Type), string.Empty)); + } + } + var _id = GuidGenerator.Create(); + var _bomList = new List(); + _bomList.Add(new ScrapClaimsVersion(_id, branchId, year, period, version, customerCode)); + foreach (var itm in entityList) + { + //赋值上主键ID + itm.SetValue(GuidGenerator.Create(), branchId, year, period, version); + } + if (checkList.Count > 0) + { + return await ExportErrorReportAsync(checkList); + } + await _repository.GetDbContext().BulkInsertAsync(entityList); + await _versionRepository.GetDbContext().BulkInsertAsync(_bomList); + return ApplicationConsts.SuccessStr; + } + + /// + /// 按ID获取唯一实体 + /// + /// + /// 返回实体全部属性 + /// + /// ID + /// 实体DTO + [HttpGet] + [Route("{id}")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task GetAsync(Guid id) + { + var result = await GetFromCacheAsync(id); + var dto = ObjectMapper.Map(result); + return dto; + } + + + private async Task GetFromCacheAsync(Guid id) + { + var result = await _repository.GetAsync(id); + return result; + } + + + private async Task GetCountAsync(ScrapClaimsRequestDto input) + { + return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters); + } + + private async Task GetCountAsync(ScrapClaimsVersionRequestDto input) + { + return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters); + } + + + /// + /// 导出文件 + /// + /// + /// + [HttpPost] + [Route("Export")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task ExportAsync(ScrapClaimsRequestDto input) + { + + IExporter _csv = new CsvExporter(); + IExporter _excel = new ExcelExporter(); + if (input.ParentId != Guid.Empty) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + } + var entities = await _repository.GetListByFilterAsync(input.BranchId, 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("CP7报废和索赔明细_{0}.csv", input.UserId.ToString()); + result = await _csv.ExportAsByteArray(dtoDetails); + break; + case 1: + _fileName = string.Format("CP7报废和索赔明细_{0}.xlsx", input.UserId.ToString()); + result = await _excel.ExportAsByteArray(dtoDetails); + break; + } + result.ShouldNotBeNull(); + + //保存导出文件到服务器存成二进制 + await _excelImportService.SaveBlobAsync( + new SaveExcelImportInputDto + { + Name = _fileName, + Content = result + } + ); + return _fileName; + } + + + /// + /// 根据筛选条件获取实体列表 + /// + /// + /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + /// + /// 请求条件 + /// 实体DTO列表 + [HttpPost] + [Route("list")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> GetListAsync(Guid id, ScrapClaimsRequestDto input) + { + if (input.ParentId != Guid.Empty) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + } + else + { + return new PagedResultDto(0, new List()); + } + var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount, + input.SkipCount, true); + + var totalCount = await GetCountAsync(input); + var dtos = ObjectMapper.Map, List>(entities); + + return new PagedResultDto(totalCount, dtos); + } + + + /// + /// 获取实体总数 + /// + /// 实体总数 + [HttpGet] + [Route("count")] + [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task GetTotalCountAsync(Guid branchId) + { + return await _repository.GetCountAsync(branchId); + } + + /// + /// 获取全部实体列表 + /// + /// 实体DTO列表 + [HttpGet] + [Route("all")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> GetAllAsync(Guid branchId) + { + var entities = await _repository.GetAllAsync(branchId, true); + + + var dtos = ObjectMapper.Map, List>(entities); + + + return new ListResultDto(dtos); + } + + + + /// + /// 删除实体 + /// + /// ID + /// + [HttpDelete] + [Route("{id}")] + /// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] + virtual public async Task DeleteAsync(Guid id) + { + await _repository.DeleteAsync(id); + } + + /// + /// 按IDs删除实体列表 + /// + /// IDs + /// 是否执行成功 + [HttpPost] + [Route("delete")] + // [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] + virtual public async Task DeleteListAsync(List ids) + { + foreach (var id in ids) + { + var entity = await GetFromCacheAsync(id); + //await Cache.DeleteAsync(id.ToString()); + } + + return await _repository.DeleteListAsync(ids); + } + + + + /// + /// 版本列表查询 + /// + /// + /// + [HttpPost] + [Route("listversion")] + public async Task> GetVersionListAsync(ScrapClaimsVersionRequestDto input) + { + var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue, + input.SkipCount, true); + + var totalCount = await GetCountAsync(input); + var dtos = ObjectMapper.Map, List>(entities); + + return new PagedResultDto(totalCount, dtos); + } + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs new file mode 100644 index 00000000..d74033d2 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs @@ -0,0 +1,308 @@ +using EFCore.BulkExtensions; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Application.Dtos; +using Volo.Abp.Caching; +using Volo.Abp.Domain.Repositories; +using Volo.Abp.Guids; +using Win.Abp.Snowflakes; +using Win.Sfs.BaseData.ImportExcelCommon; +using Win.Sfs.SettleAccount.CommonManagers; +using Win.Sfs.SettleAccount.Constant; +using Win.Sfs.SettleAccount.ExcelImporter; +using Win.Sfs.SettleAccount.ExportReports; +using Shouldly; +using Magicodes.ExporterAndImporter.Core; +using Magicodes.ExporterAndImporter.Csv; +using Magicodes.ExporterAndImporter.Excel; +using Win.Sfs.Shared.Filter; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + + [Route("api/settleaccount/SparePart")] + public class SparePartAppService : SettleAccountApplicationBase, ISparePartAppService + { + private readonly IGuidGenerator _guidGenerator; + + private readonly IExcelImportAppService _excelImportService; + + private readonly ISettleAccountBranchEfCoreRepository< SparePartVersion, Guid> _versionRepository; + + private readonly ISettleAccountBranchEfCoreRepository _repository; + /// + /// 构建方法 + /// + /// 构建UID + /// 仓储接口 + /// 缓存 + public SparePartAppService(IGuidGenerator guidGenerator, + ISettleAccountBranchEfCoreRepository< SparePartVersion, Guid> versionRepository, + ISettleAccountBranchEfCoreRepository repository, + IDistributedCache cache, + IExcelImportAppService excelImportService, + ISnowflakeIdGenerator snowflakeIdGenerator, + ICommonManager commonManager + ) : base(cache, excelImportService, snowflakeIdGenerator, commonManager) + { + _versionRepository = versionRepository; + _guidGenerator = guidGenerator; + _excelImportService = excelImportService; + _repository = repository; + } + + + /// + /// 导入功能 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpPost] + [Route("ExcelImport")] + [DisableRequestSizeLimit] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + public async Task SparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) + { + ExportImporter _exportImporter = new ExportImporter(); + var result = await _exportImporter.UploadExcelImport< SparePartImportDto>(files, _excelImportService); + var entityList = ObjectMapper.Map, List>(result); + //删除版本 + var _versionQuery = _versionRepository.Where(p => p.Version == version); + await _versionQuery.BatchDeleteAsync(); + //删除明细 + var _query = _repository.Where(p => p.Version == version); + await _query.BatchDeleteAsync(); + //插入数据前检验 + var checkList = new List(); + var _group = entityList.GroupBy(x => new {x.LineNumber, x.MaterialCode, x.Version }).Select(p => new { Count = p.Count(), LineNumber= p.Key.LineNumber, MaterialCode = p.Key.MaterialCode }); + foreach (var itm in _group) + { + if (string.IsNullOrEmpty(itm.MaterialCode)) + { + checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的行号为{0}的物料代码为空,请检查!", itm.LineNumber), string.Empty)); + } + } + var _id = GuidGenerator.Create(); + var _bomList = new List< SparePartVersion>(); + _bomList.Add(new SparePartVersion(_id, branchId, year, period, version, customerCode)); + + if (checkList.Count > 0) + { + return await ExportErrorReportAsync(checkList); + } + await _repository.GetDbContext().BulkInsertAsync(entityList); + await _versionRepository.GetDbContext().BulkInsertAsync(_bomList); + return ApplicationConsts.SuccessStr; + } + + /// + /// 按ID获取唯一实体 + /// + /// + /// 返回实体全部属性 + /// + /// ID + /// 实体DTO + [HttpGet] + [Route("{id}")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task GetAsync(Guid id) + { + var result = await GetFromCacheAsync(id); + var dto = ObjectMapper.Map(result); + return dto; + } + + + private async Task GetFromCacheAsync(Guid id) + { + var result = await _repository.GetAsync(id); + return result; + } + + + private async Task GetCountAsync(SparePartRequestDto input) + { + return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters); + } + + private async Task GetCountAsync(SparePartVersionRequestDto input) + { + return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters); + } + + + /// + /// 导出文件 + /// + /// + /// + [HttpPost] + [Route("Export")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task ExportAsync(SparePartRequestDto input) + { + + IExporter _csv = new CsvExporter(); + IExporter _excel = new ExcelExporter(); + if (input.ParentId != Guid.Empty) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + } + var entities = await _repository.GetListByFilterAsync(input.BranchId, 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}.csv", input.UserId.ToString()); + result = await _csv.ExportAsByteArray(dtoDetails); + break; + case 1: + _fileName = string.Format("大众备件结算明细_{0}.xlsx", input.UserId.ToString()); + result = await _excel.ExportAsByteArray(dtoDetails); + break; + } + result.ShouldNotBeNull(); + + //保存导出文件到服务器存成二进制 + await _excelImportService.SaveBlobAsync( + new SaveExcelImportInputDto + { + Name = _fileName, + Content = result + } + ); + return _fileName; + } + + + /// + /// 根据筛选条件获取实体列表 + /// + /// + /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + /// + /// 请求条件 + /// 实体DTO列表 + [HttpPost] + [Route("list")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> GetListAsync(Guid id, SparePartRequestDto input) + { + if (input.ParentId != Guid.Empty) + { + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + } + else + { + return new PagedResultDto(0, new List()); + } + var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount, + input.SkipCount, true); + + var totalCount = await GetCountAsync(input); + var dtos = ObjectMapper.Map, List>(entities); + + return new PagedResultDto(totalCount, dtos); + } + + + /// + /// 获取实体总数 + /// + /// 实体总数 + [HttpGet] + [Route("count")] + [Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task GetTotalCountAsync(Guid branchId) + { + return await _repository.GetCountAsync(branchId); + } + + /// + /// 获取全部实体列表 + /// + /// 实体DTO列表 + [HttpGet] + [Route("all")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> GetAllAsync(Guid branchId) + { + var entities = await _repository.GetAllAsync(branchId, true); + + + var dtos = ObjectMapper.Map, List>(entities); + + + return new ListResultDto(dtos); + } + + + + /// + /// 删除实体 + /// + /// ID + /// + [HttpDelete] + [Route("{id}")] + /// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] + virtual public async Task DeleteAsync(Guid id) + { + await _repository.DeleteAsync(id); + } + + /// + /// 按IDs删除实体列表 + /// + /// IDs + /// 是否执行成功 + [HttpPost] + [Route("delete")] + // [Authorize(SettleAccountPermissions.SettleAccounts.Delete)] + virtual public async Task DeleteListAsync(List ids) + { + foreach (var id in ids) + { + var entity = await GetFromCacheAsync(id); + //await Cache.DeleteAsync(id.ToString()); + } + + return await _repository.DeleteListAsync(ids); + } + + + + /// + /// 版本列表查询 + /// + /// + /// + [HttpPost] + [Route("listversion")] + public async Task> GetVersionListAsync(SparePartVersionRequestDto input) + { + var entities = await _versionRepository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue, + input.SkipCount, true); + + var totalCount = await GetCountAsync(input); + var dtos = ObjectMapper.Map, List>(entities); + + return new PagedResultDto(totalCount, dtos); + } + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs index f6bdce3a..0e8880d2 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs @@ -110,7 +110,7 @@ namespace Win.Sfs.SettleAccount.ExcelImporter { if (import.TemplateErrors.Count > 0) { - throw new BusinessException("8989","模板错误!当前模板中字段不匹配!!请正确上传模板数据!"); + throw new BusinessException("8989","模板错误!当前模板中字段不匹配!!请正确上传模板数据!导入不对的列名:"+import.TemplateErrors.FirstOrDefault().RequireColumnName); } import.ShouldNotBeNull(); if (import.Exception != null) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml index 553df5bc..889b4e43 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml @@ -1159,7 +1159,7 @@ - 区域相关应用服务 + 大众准时化结算明细导入-R3已结 @@ -1258,9 +1258,9 @@ 实体DTO列表 - - 区域相关应用服务 - + + 大众FIS未结算明细导入功能 + @@ -1272,7 +1272,7 @@ - 导入功能 + 导入功能,做成任务下载 上传的文件(前端已经限制只能上传一个附件) @@ -1504,7 +1504,7 @@ 大众看板结算明细导入 - + 构建方法 @@ -1536,7 +1536,7 @@ - + 根据筛选条件获取实体列表 @@ -1579,6 +1579,161 @@ + + + 大众CP7报废和索赔导入 + + + + + 构建方法 + + 构建UID + 仓储接口 + 缓存 + + + + 导入功能 + + 上传的文件(前端已经限制只能上传一个附件) + + + + + 按ID获取唯一实体 + + + 返回实体全部属性 + + ID + 实体DTO + + + + 导出文件 + + + + + + + 根据筛选条件获取实体列表 + + + 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + + 请求条件 + 实体DTO列表 + + + + 获取实体总数 + + 实体总数 + + + + 获取全部实体列表 + + 实体DTO列表 + + + + 删除实体 + + ID + + + + + 按IDs删除实体列表 + + IDs + 是否执行成功 + + + + 版本列表查询 + + + + + + + 构建方法 + + 构建UID + 仓储接口 + 缓存 + + + + 导入功能 + + 上传的文件(前端已经限制只能上传一个附件) + + + + + 按ID获取唯一实体 + + + 返回实体全部属性 + + ID + 实体DTO + + + + 导出文件 + + + + + + + 根据筛选条件获取实体列表 + + + 请求条件包括:筛选条件列表,排序条件,数据数量,页码 + + 请求条件 + 实体DTO列表 + + + + 获取实体总数 + + 实体总数 + + + + 获取全部实体列表 + + 实体DTO列表 + + + + 删除实体 + + ID + + + + + 按IDs删除实体列表 + + IDs + 是否执行成功 + + + + 版本列表查询 + + + + 区域相关应用服务 @@ -2148,6 +2303,66 @@ 上传的文件(前端已经限制只能上传一个附件) + + + 大众看板导入 + + + + + 大众看板导入-版本 + + + + + 大众发票导入 + + + + + 大众发票导入-版本 + + + + + 报废和索赔导入 + + + + + 报废和索赔导入-版本 + + + + + 大众备件导入 + + + + + 大众备件导入-版本 + + + + + 大众准时化结算明细导入 + + + + + 大众准时化结算明细导入--版本 + + + + + 大众FIS未结算明细导入 + + + + + 大众FIS未结算明细导入-版本 + + 结算件对照表 diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs index 178af8a9..0e1cbd89 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs @@ -76,6 +76,9 @@ using Win.Sfs.SettleAccount.Entities.SettlementCrossReference; using Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePartss; using Win.Sfs.SettleAccount.Entities.SecMatch; using Win.Sfs.SettleAccount.Entities.VWKanBan; +using Win.Sfs.SettleAccount.Entities.VWScrapClaims; +using Win.Sfs.SettleAccount.Entities.VWSparePart; +using Win.Sfs.SettleAccount.Entities.VWKanBanVersion; namespace Win.Sfs.SettleAccount { @@ -83,7 +86,7 @@ namespace Win.Sfs.SettleAccount { public SettleAccountApplicationAutoMapperProfile() { - + #region 天合 CreateMapSettlementPart(); CreateMapSettlementPartVersion(); @@ -95,7 +98,7 @@ namespace Win.Sfs.SettleAccount CreateMapBomVersion(); CreateMapEstimatedInventoryDetail(); CreateMapInventoryDetail(); - CreateMapSettleAccount(); + CreateMapEstimatedSum(); CreateMapMaterial(); CreateMapMaterialRelationship(); @@ -109,7 +112,7 @@ namespace Win.Sfs.SettleAccount CreateMapEstimatedInventoryVersion(); CreateMapInventoryDetailVersion(); - CreateMapSettleAccountVersion(); + CreateMapEstimatedSumVersion(); CreateMapFISVersion(); CreateMapFactory(); @@ -172,8 +175,7 @@ namespace Win.Sfs.SettleAccount CreateMapHQNotConsignReport(); CreateMapHQSPNotConsignReport(); CreateMapImportColumnMap(); - CreateMapInvoice(); - CreateMapInvoiceVersion(); + CreateMapInvoiceSettledDiff(); CreateMapInvoiceSettledDiffVersion(); CreateMapPriceList(); @@ -186,21 +188,198 @@ namespace Win.Sfs.SettleAccount CreateMapSettlementPakAndSpareParts(); CreateMapSettlementPakAndSparePartsVersion(); CreateMapSecMatchBaseDto(); + + #endregion + + + #region 派格 + CreateMapInvoice(); + CreateMapInvoiceVersion(); CreateMapVWKanBan(); + CreateMapVWKanBanVersion(); + CreateMapScrapClaims(); + CreateMapScrapClaimsVersion(); + CreateMapSparePart(); + CreateMapSparePartVersion(); + CreateMapSettleAccount(); + CreateMapSettleAccountVersion(); + CreateMapUnSettleAccount(); + CreateMapUnSettleAccountVersion(); + + + #endregion } #region PG-派格映射 + + /// + /// 大众看板导入 + /// private void CreateMapVWKanBan() { - CreateMap().ReverseMap(); - //CreateMap().ReverseMap(); - //CreateMap().ReverseMap(); - //CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap() + .ForMember(dest => dest.SettleInputDate, + opt => opt.MapFrom(src => DateTime.ParseExact(src.SettleInputDate, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture))) + .ForMember(dest => dest.SettleDate, + opt => opt.MapFrom(src => DateTime.ParseExact(src.SettleDate, "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture))); + CreateMap().ReverseMap(); + } + + /// + /// 大众看板导入-版本 + /// + private void CreateMapVWKanBanVersion() + { + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + } + + /// + /// 大众发票导入 + /// + private void CreateMapInvoice() + + { + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + + } + + /// + /// 大众发票导入-版本 + /// + private void CreateMapInvoiceVersion() + + { + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + } + + /// + /// 报废和索赔导入 + /// + private void CreateMapScrapClaims() + + { + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); } + /// + /// 报废和索赔导入-版本 + /// + private void CreateMapScrapClaimsVersion() + + { + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + } + + /// + /// 大众备件导入 + /// + private void CreateMapSparePart() + + { + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + CreateMap().ReverseMap(); + } + + /// + /// 大众备件导入-版本 + /// + private void CreateMapSparePartVersion() + + { + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + } + + /// + /// 大众准时化结算明细导入 + /// + private void CreateMapSettleAccount() + { + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + + + + CreateMap(); + CreateMap(); + } + + + /// + /// 大众准时化结算明细导入--版本 + /// + private void CreateMapSettleAccountVersion() + { + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + } + + /// + /// 大众FIS未结算明细导入 + /// + private void CreateMapUnSettleAccount() + { + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + + + + CreateMap(); + CreateMap(); + } + /// + /// 大众FIS未结算明细导入-版本 + /// + private void CreateMapUnSettleAccountVersion() + { + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + } + + #endregion + #region 天合 private void CreateMapMaterialRelationshipDetail() @@ -270,25 +449,9 @@ namespace Win.Sfs.SettleAccount - private void CreateMapInvoice() + - { - CreateMap().ReverseMap(); - CreateMap().ReverseMap(); - CreateMap().ReverseMap(); - CreateMap().ReverseMap(); - CreateMap().ReverseMap(); - } - - private void CreateMapInvoiceVersion() - - { - CreateMap().ReverseMap(); - CreateMap().ReverseMap(); - CreateMap().ReverseMap(); - CreateMap().ReverseMap(); - } private void CreateMapEstimatedStockDiffReport() @@ -630,55 +793,6 @@ namespace Win.Sfs.SettleAccount CreateMap(); } - private void CreateMapSettleAccount() - { - CreateMap().ReverseMap(); - CreateMap(); - CreateMap(); - - CreateMap(); - - - - CreateMap(); - CreateMap(); - } - - private void CreateMapSettleAccountVersion() - { - CreateMap().ReverseMap(); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - } - - private void CreateMapUnSettleAccount() - { - CreateMap().ReverseMap(); - CreateMap(); - CreateMap(); - - CreateMap(); - - - - CreateMap(); - CreateMap(); - } - - private void CreateMapUnSettleAccountVersion() - { - CreateMap().ReverseMap(); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); - } - - - - @@ -1060,5 +1174,6 @@ namespace Win.Sfs.SettleAccount //CreateMap().ReverseMap(); //CreateMap().ReverseMap(); } + #endregion } } \ No newline at end of file diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Invoices/Invoice.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Invoices/Invoice.cs index b7b79c12..c5d2ef53 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Invoices/Invoice.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Invoices/Invoice.cs @@ -8,10 +8,22 @@ using Win.Sfs.Shared.DomainBase; namespace Win.Sfs.SettleAccount.Entities.Invoices { + /// + /// 大众发票汇总导入 + /// public class Invoice : FullAuditedAggregateRootBase, ISettleAccountEntityBase { public Invoice() { } + + public void SetValue(Guid guid, Guid branchId, string year, string peroid, string version, Guid parentId) + { + Period = peroid; + Year = year; + Id = guid; + Version = version; + BranchId = branchId; + } public Invoice(Guid Id,string year, string period, string version, string factory, string materialCode, string materialDesc, decimal qty, decimal amt):base(Id) @@ -89,7 +101,7 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices /// 备注 /// [Display(Name = "备注")] - public string Remark { set; get; } + public string Extend { set; get; } ///// ///// 记账号码 diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBan.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBan.cs index 5fd3b794..c6ec0a1c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBan.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBan.cs @@ -27,7 +27,10 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan * 数量 * 结算状态 */ - public class KanBan : FullAuditedAggregateRootBase, ISettleAccountEntityBase + /// + /// 大众看板 + /// + public class KanBanSettle : FullAuditedAggregateRootBase, ISettleAccountEntityBase { /// ///年度 @@ -46,7 +49,6 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// /// 看板条码号 /// - [Display(Name = "看板条码号")] public string Kanban { set; get; } /// @@ -79,38 +81,33 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan /// /// 批次 /// - [Display(Name = "")] public string Batch { set; get; } /// /// 入库结算标识 /// - [Display(Name = "")] public string Flag { set; get; } /// /// 数量 /// - [Display(Name = "数量")] public decimal Qty { set; get; } /// /// R3结算时间 /// - [Display(Name = "结算日期")] public DateTime SettleDate { set; get; } /// /// 结算状态 /// - [Display(Name = "结算状态")] - public int State { set; get; } + public string State { set; get; } /// /// 备注 /// [Display(Name = "备注")] - public string Remark { set; get; } + public string Extend { set; get; } public Guid ParentId { get; protected set; } @@ -123,9 +120,9 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan BranchId = branchId; ParentId = parentId; } - public KanBan() + public KanBanSettle() { } - public KanBan( + public KanBanSettle( Guid id, Guid branchId, string year, @@ -141,14 +138,14 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan string batch, string flag, DateTime settleDate, - int state, - string remark, + string state, Guid parentId, - DateTime creationTime, + //DateTime creationTime, Guid guid) : base(id) { BranchId = branchId; Year = year; + Version = version; Kanban = kanban; Relation = relation; Factory = factory; @@ -161,9 +158,8 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan Flag = flag; SettleDate = settleDate; State = state; - Remark = remark; ParentId = parentId; - CreationTime = creationTime; + //CreationTime = creationTime; CreatorId = guid; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBanManager.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBanManager.cs index 78f00f90..60660cb0 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBanManager.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBanManager.cs @@ -12,10 +12,10 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan { public class KanBanManager:DomainService { - private readonly ISettleAccountBranchEfCoreRepository _repository; + private readonly ISettleAccountBranchEfCoreRepository _repository; private readonly ISettleAccountBranchEfCoreRepository _versionRepository; public KanBanManager( - ISettleAccountBranchEfCoreRepository repository, + ISettleAccountBranchEfCoreRepository repository, ISettleAccountBranchEfCoreRepository versionRepository diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/SettleAccounts/SettleAccount.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/SettleAccounts/SettleAccount.cs index a7dc768e..61062ce2 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/SettleAccounts/SettleAccount.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/SettleAccounts/SettleAccount.cs @@ -7,6 +7,9 @@ using Win.Sfs.Shared.DomainBase; namespace Win.Sfs.SettleAccount.Entities.SettleAccounts { + /// + /// 大众准时化结算明细导入 + /// public class SettleAccount: FullAuditedAggregateRootBase, ISettleAccountEntityBase { @@ -44,7 +47,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// public DateTime CP5A { set; get; } /// - /// CP7 + /// CP7日期 /// public DateTime CP7 { set; get; } @@ -72,9 +75,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts public Guid ParentId { get; protected set; } - - - public int state { get; set; } /// diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs index cc9eda72..e88e0e8a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs @@ -7,6 +7,9 @@ using Win.Sfs.Shared.DomainBase; namespace Win.Sfs.SettleAccount.Entities.SettleAccounts { + /// + /// 大众FIS未结算明细导入 + /// public class UnSettleAccount: FullAuditedAggregateRootBase, ISettleAccountEntityBase { @@ -44,7 +47,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// public DateTime CP5A { set; get; } /// - /// CP7 + /// CP7日期 /// public DateTime CP7 { set; get; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaims.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaims.cs new file mode 100644 index 00000000..78332181 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaims.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DomainBase; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + /// + /// CP7报废和索赔 + /// + public class ScrapClaims : FullAuditedAggregateRootBase, ISettleAccountEntityBase + { + public ScrapClaims() + { } + + public void SetValue(Guid guid, Guid branchId, string year, string peroid, string version) + { + Period = peroid; + Year = year; + Id = guid; + Version = version; + BranchId = branchId; + } + public ScrapClaims(Guid Id, string year, string period, string version,string type, + string materialCode, string materialDesc, decimal qty, + decimal amt) : base(Id) + { + Year = year; + Period = period; + Version = version; + Type = type; + MaterialCode = materialCode; + MaterialDesc = materialDesc; + Qty = qty; + Amt = amt; + } + + //类型 零件号 零件名称 数 量 金 额 + + /// + ///年 + /// + [Display(Name = "年")] + public string Year { get; set; } + /// + /// 期间 + /// + [Display(Name = "期间")] + public string Period { set; get; } + /// + /// 版本号 + /// + [Display(Name = "版本号")] + public string Version { set; get; } + /// + /// 类型:CP7报废和索赔两种 + /// + [Display(Name = "类型")] + public string Type { set; get; } + + + /// + /// 零件号 + /// + [Display(Name = "零件号")] + public string MaterialCode { get; set; } + + /// + /// 零件名称 + /// + [Display(Name = "零件名称")] + public string MaterialDesc { get; set; } + + + + /// + /// 数量 + /// + [Display(Name = "数量")] + public decimal Qty { set; get; } + + /// + /// 金额 + /// + [Display(Name = "金额")] + public decimal Amt { set; get; } + + + /// + /// 备注 + /// + [Display(Name = "备注")] + public string Extend { set; get; } + + + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaimsVersion.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaimsVersion.cs new file mode 100644 index 00000000..2015dfbe --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaimsVersion.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DomainBase; + +namespace Win.Sfs.SettleAccount.Entities.VWScrapClaims +{ + public class ScrapClaimsVersion : FullAuditedAggregateRootBase, ISettleAccountEntityBase + { + + public ScrapClaimsVersion() + { } + + public string Year { get; private set; } + /// + /// 期间 + /// + public string Period { get; private set; } + /// + /// 版本号 + /// + public string Version { get; set; } + + /// + /// 客户号 + /// + public string CustomerCode { private set; get; } + + + public ScrapClaimsVersion( + Guid id, + Guid branchId, + string year, string period, string version, string customerCode) : base(id) + { + BranchId = branchId; + Year = year; + Period = period; + Version = version; + CustomerCode = customerCode; + + } + + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs new file mode 100644 index 00000000..f9aab181 --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs @@ -0,0 +1,194 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DomainBase; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + /// + /// 大众备件 + /// + public class SparePart : FullAuditedAggregateRootBase, ISettleAccountEntityBase + { + public SparePart() + { } + public SparePart(Guid Id, string year, string period, string version, string lineNumber, + string purchaseType,string purchaseOrderNo, string purchaseOrderNoItem, string purchaseOrderNoText, + decimal receiptQty, decimal invoicedQty, decimal amountNoTax, decimal purchasePriceNoTax, + string accountNum,string materialCode, string materialDesc, DateTime spareDate, string deliveryOrderNo, + string deliveryLineNum, string batchNo, string unit, decimal taxRate, string taxCode, string factory + + ) : base(Id) + { + Year = year; + Period = period; + Version = version; + LineNumber = lineNumber; + PurchaseType = purchaseType; + PurchaseOrderNo = purchaseOrderNo; + PurchaseOrderNoItem = purchaseOrderNoItem; + PurchaseOrderNoText = purchaseOrderNoText; + ReceiptQty = receiptQty; + InvoicedQty = invoicedQty; + AmountNoTax = amountNoTax; + PurchasePriceNoTax = purchasePriceNoTax; + AccountNum = accountNum; + MaterialCode = materialCode; + MaterialDesc = materialDesc; + SpareDate = spareDate; + DeliveryOrderNo = deliveryOrderNo; + DeliveryLineNum = deliveryLineNum; + BatchNo = batchNo; + Unit = unit; + TaxRate = taxRate; + TaxCode = taxCode; + Factory = factory; + } + + //行号 采购类型 采购订单号 采购订单行项目 采购订单文本 收货数量 开票数量 不含税金额 采购价格不含税 + //科目号 物料代码 物料描述 日期 交货单号 交货行号 批次号 单位 税率 税码 + //德国发票号 AP_REQUISITION_MIMRS.GERMANY_INVOCE_AMOUNT 借贷 PO币种 工厂 工厂名称 BM 单号 + + /// + ///年 + /// + [Display(Name = "年")] + public string Year { get; set; } + /// + /// 期间 + /// + [Display(Name = "期间")] + public string Period { set; get; } + /// + /// 版本号 + /// + [Display(Name = "版本号")] + public string Version { set; get; } + + /// + /// 行号 + /// + [Display(Name = "行号")] + public string LineNumber { set; get; } + + + /// + /// 采购类型 + /// + [Display(Name = "采购类型")] + public string PurchaseType { get; set; } + + /// + /// 采购订单号 + /// + [Display(Name = "采购订单号")] + public string PurchaseOrderNo { get; set; } + /// + /// 采购订单行项目 + /// + [Display(Name = "采购订单行项目")] + public string PurchaseOrderNoItem { get; set; } + /// + /// 采购订单文本 + /// + [Display(Name = "采购订单文本")] + public string PurchaseOrderNoText { get; set; } + /// + /// 收货数量 + /// + [Display(Name = "收货数量")] + public decimal ReceiptQty { get; set; } + + /// + /// 开票数量 + /// + [Display(Name = "开票数量")] + public decimal InvoicedQty { get; set; } + /// + /// 不含税金额 + /// + [Display(Name = "不含税金额")] + public decimal AmountNoTax { get; set; } + /// + /// 采购价格不含税 + /// + [Display(Name = "采购价格不含税")] + public decimal PurchasePriceNoTax { get; set; } + /// + /// 科目号 + /// + [Display(Name = "科目号")] + public string AccountNum { get; set; } + /// + /// 物料代码 + /// + [Display(Name = "物料代码")] + public string MaterialCode { get; set; } + /// + /// 物料描述 + /// + [Display(Name = "物料描述")] + public string MaterialDesc { get; set; } + /// + /// 日期 + /// + [Display(Name = "日期")] + public DateTime SpareDate { get; set; } + /// + /// 交货单号 + /// + [Display(Name = "交货单号")] + public string DeliveryOrderNo { get; set; } + /// + /// 交货行号 + /// + [Display(Name = "交货行号")] + public string DeliveryLineNum { get; set; } + /// + /// 批次号 + /// + [Display(Name = "批次号")] + public string BatchNo { get; set; } + /// + /// 单位 + /// + [Display(Name = "单位")] + public string Unit { get; set; } + /// + /// 税率 + /// + [Display(Name = "税率")] + public decimal TaxRate { get; set; } + /// + /// 税码 + /// + [Display(Name = "税码")] + public string TaxCode { get; set; } + /// + /// 德国发票号 + /// + [Display(Name = "德国发票号")] + public string GermanInvoiceNo { get; set; } + /// + /// 工厂 + /// + [Display(Name = "工厂")] + public string Factory { get; set; } + /// + /// 工厂名称 + /// + [Display(Name = "工厂名称")] + public string FactoryName { get; set; } + /// + /// 备注 + /// + [Display(Name = "备注")] + public string Extend { set; get; } + + + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePartVersion.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePartVersion.cs new file mode 100644 index 00000000..ed1757cb --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePartVersion.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win.Sfs.Shared.DomainBase; + +namespace Win.Sfs.SettleAccount.Entities.VWSparePart +{ + public class SparePartVersion : FullAuditedAggregateRootBase, ISettleAccountEntityBase + { + + public SparePartVersion() + { } + + public string Year { get; private set; } + /// + /// 期间 + /// + public string Period { get; private set; } + /// + /// 版本号 + /// + public string Version { get; set; } + + /// + /// 客户号 + /// + public string CustomerCode { private set; get; } + + + public SparePartVersion( + Guid id, + Guid branchId, + string year, string period, string version, string customerCode) : base(id) + { + BranchId = branchId; + Year = year; + Period = period; + Version = version; + CustomerCode = customerCode; + + } + + + } +} diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs index 7d73d745..790e4377 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -63,6 +63,8 @@ using Win.Sfs.SettleAccount.Entities.SettlementCrossReferences; using Win.Sfs.SettleAccount.Entities.SettlementCrossReference; using Win.Sfs.SettleAccount.Entities.SecMatch; using Win.Sfs.SettleAccount.Entities.VWKanBan; +using Win.Sfs.SettleAccount.Entities.VWScrapClaims; +using Win.Sfs.SettleAccount.Entities.VWSparePart; namespace Win.Sfs.SettleAccount { @@ -83,187 +85,209 @@ namespace Win.Sfs.SettleAccount // optionsAction?.Invoke(options); - #region old + #region 天合 //产品结构 - builder.ConfigureBom(options); + //builder.ConfigureBom(options); - //结算件 - builder.ConfigureSettlementPart(options); + ////结算件 + //builder.ConfigureSettlementPart(options); - //ERP总成开票价格 - builder.ConfigureItemInvoicePrice(options); - builder.ConfigureItemInvoicePriceVersion(options); + ////ERP总成开票价格 + //builder.ConfigureItemInvoicePrice(options); + //builder.ConfigureItemInvoicePriceVersion(options); - //客户 - builder.ConfigureCustomer(options); + ////客户 + //builder.ConfigureCustomer(options); - //客户产品结构 - builder.ConfigureCustomerBom(options); - builder.ConfigureEstimatedSum(options); - builder.ConfigureCodeSetting(options); - builder.ConfigureMaterial(options); - builder.ConfigureEstimatedInventoryDetail(options); - builder.ConfigureInventoryDetail(options); - builder.ConfigureSettleAccount(options); - builder.ConfigureUnSettleAccount(options); - builder.ConfigureMaterialRelationship(options); - builder.ConfigureFIS(options); - builder.ConfigureFISExtend(options); - builder.ConfigureCentralizedControl(options); - builder.ConfigurePrebatch(options); - builder.ConfigureFactory(options); - builder.ConfigureSupplierItemSetUp(options); - builder.ConfigureSecondaryAdjustment(options); - builder.ConfigureSecondaryPriceRatio(options); - builder.ConfigureCustomerStorageLocation(options); - builder.ConfigureBomVersion(options); - builder.ConfigureFISVersion(options); - builder.ConfigureEstimatedSumVersion(options); - builder.ConfigureEstimatedInventoryVersion(options); - builder.ConfigureInventoryDetailVersion(options); - builder.ConfigureSettleAccountVersion(options); - builder.ConfigureUnSettleAccountVersion(options); + ////客户产品结构 + //builder.ConfigureCustomerBom(options); + //builder.ConfigureEstimatedSum(options); + //builder.ConfigureCodeSetting(options); + //builder.ConfigureMaterial(options); + //builder.ConfigureEstimatedInventoryDetail(options); + //builder.ConfigureInventoryDetail(options); + + + //builder.ConfigureMaterialRelationship(options); + //builder.ConfigureFIS(options); + //builder.ConfigureFISExtend(options); + //builder.ConfigureCentralizedControl(options); + //builder.ConfigurePrebatch(options); + //builder.ConfigureFactory(options); + //builder.ConfigureSupplierItemSetUp(options); + //builder.ConfigureSecondaryAdjustment(options); + //builder.ConfigureSecondaryPriceRatio(options); + //builder.ConfigureCustomerStorageLocation(options); + //builder.ConfigureBomVersion(options); + //builder.ConfigureFISVersion(options); + //builder.ConfigureEstimatedSumVersion(options); + //builder.ConfigureEstimatedInventoryVersion(options); + //builder.ConfigureInventoryDetailVersion(options); + + - builder.ConfigureSecondaryAdjustmentVersion(options); - builder.ConfigureSecondaryPriceRatioVersion(options); - builder.ConfigureSecondaryDiscount(options); - builder.ConfigureSecondaryDiscountVersion(options); + //builder.ConfigureSecondaryAdjustmentVersion(options); + //builder.ConfigureSecondaryPriceRatioVersion(options); + //builder.ConfigureSecondaryDiscount(options); + //builder.ConfigureSecondaryDiscountVersion(options); - builder.ConfigureSecondaryPriceRatioVersion(options); - //暂估发出未结算 - builder.ConfigureEstimatedStockDiffReport(options); + //builder.ConfigureSecondaryPriceRatioVersion(options); + ////暂估发出未结算 + //builder.ConfigureEstimatedStockDiffReport(options); - //暂估发出未结算明细 - builder.ConfigureEstimatedStockDiffReportDetail(options); + ////暂估发出未结算明细 + //builder.ConfigureEstimatedStockDiffReportDetail(options); - //库存未结算比对 - builder.ConfigureStockUnsettledDiffReport(options); + ////库存未结算比对 + //builder.ConfigureStockUnsettledDiffReport(options); - //库存未结算比对明细 - builder.ConfigureStockUnsettledDiffReportDetail(options); + ////库存未结算比对明细 + //builder.ConfigureStockUnsettledDiffReportDetail(options); - //R3结算数据对比输出表 - builder.ConfigureStockSettledDiffReport(options); + ////R3结算数据对比输出表 + //builder.ConfigureStockSettledDiffReport(options); - //R3结算数据对比输出表明细 - builder.ConfigureStockSettledDiffReportDetail(options); + ////R3结算数据对比输出表明细 + //builder.ConfigureStockSettledDiffReportDetail(options); - //FIS发运数据对比输出表 - builder.ConfigureStockFisDiffReport(options); + ////FIS发运数据对比输出表 + //builder.ConfigureStockFisDiffReport(options); - //FIS发运数据对比输出表明细 - builder.ConfigureStockFisDiffReportDetail(options); + ////FIS发运数据对比输出表明细 + //builder.ConfigureStockFisDiffReportDetail(options); - //发出未结算比对 - builder.ConfigureSendUnsettledDiffReport(options); + ////发出未结算比对 + //builder.ConfigureSendUnsettledDiffReport(options); - //发出未结算比对明细 - builder.ConfigureSendUnsettledDiffReportDetail(options); + ////发出未结算比对明细 + //builder.ConfigureSendUnsettledDiffReportDetail(options); - //奔腾轿车一厂车序输入表 - builder.ConfigureBTCarSeqFirst(options); - builder.ConfigureBTCarSeqFirstVersion(options); - //实际二配调整后输出表 - builder.ConfigureSecondaryActuralAdjustmentReport(options); + ////奔腾轿车一厂车序输入表 + //builder.ConfigureBTCarSeqFirst(options); + //builder.ConfigureBTCarSeqFirstVersion(options); + ////实际二配调整后输出表 + //builder.ConfigureSecondaryActuralAdjustmentReport(options); - //实际二配调整后输出表明细 - builder.ConfigureSecondaryActuralAdjustmentReportDetail(options); + ////实际二配调整后输出表明细 + //builder.ConfigureSecondaryActuralAdjustmentReportDetail(options); - //二配对比输出表 - builder.ConfigureSecondaryActuralDiffReport(options); + ////二配对比输出表 + //builder.ConfigureSecondaryActuralDiffReport(options); - //二配对比输出表明细 - builder.ConfigureSecondaryActuralDiffReportDetail(options); + ////二配对比输出表明细 + //builder.ConfigureSecondaryActuralDiffReportDetail(options); - //奔腾轿车二厂车序输入表 - builder.ConfigureBTCarSeqSecond(options); - builder.ConfigureBTCarSeqSecondVersion(options); + ////奔腾轿车二厂车序输入表 + //builder.ConfigureBTCarSeqSecond(options); + //builder.ConfigureBTCarSeqSecondVersion(options); - //奔腾轿车车序输入表 - builder.ConfigureBTCarSeq(options); - builder.ConfigureBTCarSeqVersion(options); + ////奔腾轿车车序输入表 + //builder.ConfigureBTCarSeq(options); + //builder.ConfigureBTCarSeqVersion(options); - //奔腾看板输入表 - builder.ConfigureBTCarKB(options); - builder.ConfigureBTCarKBVersion(options); + ////奔腾看板输入表 + //builder.ConfigureBTCarKB(options); + //builder.ConfigureBTCarKBVersion(options); - //奔腾结算输入表 - builder.ConfigureBTCarConsign(options); - builder.ConfigureBTCarConsignVersion(options); + ////奔腾结算输入表 + //builder.ConfigureBTCarConsign(options); + //builder.ConfigureBTCarConsignVersion(options); - //解放看板输入表 - builder.ConfigureJFCarKB(options); - builder.ConfigureJFCarKBVersion(options); + ////解放看板输入表 + //builder.ConfigureJFCarKB(options); + //builder.ConfigureJFCarKBVersion(options); - //结算结算输入表 - builder.ConfigureJFCarConsign(options); - builder.ConfigureJFCarConsignVersion(options); + ////结算结算输入表 + //builder.ConfigureJFCarConsign(options); + //builder.ConfigureJFCarConsignVersion(options); - //车型代码与零件号匹配关系设置表 - builder.ConfigureCarMaterialConfig(options); + ////车型代码与零件号匹配关系设置表 + //builder.ConfigureCarMaterialConfig(options); - //轿车车序与看板差异输出表 - builder.ConfigureBTSeqKBDiffReport(options); + ////轿车车序与看板差异输出表 + //builder.ConfigureBTSeqKBDiffReport(options); - //轿车车序与看板差异输出表明细 - builder.ConfigureBTSeqKBDiffReportDetail(options); + ////轿车车序与看板差异输出表明细 + //builder.ConfigureBTSeqKBDiffReportDetail(options); - //轿车发出未结算输出表 - builder.ConfigureBTNotConsignReport(options); - //轿车发出未结算输出表明细 - builder.ConfigureBTNotConsignReportDetail(options); + ////轿车发出未结算输出表 + //builder.ConfigureBTNotConsignReport(options); + ////轿车发出未结算输出表明细 + //builder.ConfigureBTNotConsignReportDetail(options); - //解放发出未结算输出表 - builder.ConfigureJFNotConsignReport(options); - //解放发出未结算输出表明细 - builder.ConfigureJFNotConsignReportDetail(options); + ////解放发出未结算输出表 + //builder.ConfigureJFNotConsignReport(options); + ////解放发出未结算输出表明细 + //builder.ConfigureJFNotConsignReportDetail(options); - builder.ConfigureHQKBVersion(options); - builder.ConfigureHQSpecKBVersion(options); - builder.ConfigureHQConsignVersion(options); - builder.ConfigureHQSpecConsignVersion(options); + //builder.ConfigureHQKBVersion(options); + //builder.ConfigureHQSpecKBVersion(options); + //builder.ConfigureHQConsignVersion(options); + //builder.ConfigureHQSpecConsignVersion(options); - builder.ConfigureHQKB(options); - builder.ConfigureHQSpecKB(options); - builder.ConfigureHQConsign(options); - builder.ConfigureHQSpecConsign(options); - builder.ConfigureTaskJob(options); - builder.ConfigureImportMap(options); + //builder.ConfigureHQKB(options); + //builder.ConfigureHQSpecKB(options); + //builder.ConfigureHQConsign(options); + //builder.ConfigureHQSpecConsign(options); + //builder.ConfigureTaskJob(options); + //builder.ConfigureImportMap(options); - builder.ConfigureInvoice(options); + + + //builder.ConfigureInvoiceSettledDiff(options); + //builder.ConfigureInventoryDetailVersion(options); + //builder.ConfigureInvoiceSettledDiffVersion(options); + //builder.ConfigurePriceListVersion(options); + //builder.ConfigurePriceList(options); + //builder.ConfigureFIS_TH(options); + //builder.ConfigureMaterialRelationshipVersion(options); + //builder.ConfigureMaterialRelationshipDetail(options); + //builder.ConfigureSettlementPartVersion(options); + ////结算关系对照表 + //builder.ConfigureSettlementCrossReference(options); + //builder.ConfigureSettlementCrossReferenceVersion(options); + ////结算包和跟散件对应关系 + //builder.ConfigureSettlementPakAndSpareParts(options); + //builder.ConfigureSettlementPakAndSparePartsVersion(options); + + //builder.ConfigureSecMatchBase(options); + #endregion + + + #region 派格结算 + //大众看板明细导入 + builder.ConfigureKanBan(options); + builder.ConfigureKanBanVersion(options); + //大众发票导入 + builder.ConfigureInvoice(options); builder.ConfigureInvoiceVersion(options); + //CP7报废和索赔 + builder.ConfigureScrapClaims(options); + builder.ConfigureScrapClaimsVersion(options); + //大众备件 + builder.ConfigureSparePart(options); + builder.ConfigureSparePartVersion(options); + //大众FIS未结明细 + builder.ConfigureUnSettleAccount(options); + builder.ConfigureUnSettleAccountVersion(options); + //大众准时化结算明细导入-已结 + builder.ConfigureSettleAccount(options); + builder.ConfigureSettleAccountVersion(options); - builder.ConfigureInvoiceSettledDiff(options); - builder.ConfigureInventoryDetailVersion(options); - builder.ConfigureInvoiceSettledDiffVersion(options); - builder.ConfigurePriceListVersion(options); - builder.ConfigurePriceList(options); - builder.ConfigureFIS_TH(options); - builder.ConfigureMaterialRelationshipVersion(options); - builder.ConfigureMaterialRelationshipDetail(options); - builder.ConfigureSettlementPartVersion(options); - //结算关系对照表 - builder.ConfigureSettlementCrossReference(options); - builder.ConfigureSettlementCrossReferenceVersion(options); - //结算包和跟散件对应关系 - builder.ConfigureSettlementPakAndSpareParts(options); - builder.ConfigureSettlementPakAndSparePartsVersion(options); - - builder.ConfigureSecMatchBase(options); - #endregion + #endregion } @@ -274,13 +298,13 @@ namespace Win.Sfs.SettleAccount /// /// /// - private static void ConfigureKanBanVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + private static void ConfigureKanBan(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) { - builder.Entity(b => + builder.Entity(b => { - b.ToTable($"{options.TablePrefix}_VWKanBan", options.Schema); + b.ToTable($"{options.TablePrefix}_KanBanSettle", options.Schema); b.ConfigureByConvention(); b.Property(x => x.Kanban).IsRequired().HasMaxLength(150);//必填项 @@ -296,6 +320,21 @@ namespace Win.Sfs.SettleAccount }); } + + private static void ConfigureKanBanVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_KanBanSettle_Version", options.Schema); + b.ConfigureByConvention(); + b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength); + b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter); + }); + } /// /// 大众发票汇总导入 /// @@ -320,12 +359,249 @@ namespace Win.Sfs.SettleAccount }); } + /// + /// 大众发票汇总导入-版本 + /// + /// + /// + private static void ConfigureInvoiceVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + + b.ToTable($"{options.TablePrefix}_InvoiceVersion", options.Schema); + + b.ConfigureByConvention(); + b.Property(x => x.Year).HasMaxLength(50); + b.Property(x => x.Period).HasMaxLength(50); + b.Property(x => x.Version).HasMaxLength(50); + b.Property(x => x.CustomerCode).HasMaxLength(50); + // b.Property(x => x.Factory).HasMaxLength(50); + + }); + } + + /// + /// CP7报废和索赔 + /// + /// + /// + private static void ConfigureScrapClaims(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + + b.ToTable($"{options.TablePrefix}_ScrapClaims", options.Schema); + + b.ConfigureByConvention(); + b.Property(x => x.Year).HasMaxLength(50); + b.Property(x => x.Period).HasMaxLength(50); + b.Property(x => x.Version).HasMaxLength(50); + b.Property(x => x.Type).IsRequired().HasMaxLength(50);//类型不能为空,否则区分不开报废还是索赔 + b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(50);//零件号不能为空 + b.Property(x => x.MaterialDesc).HasMaxLength(50); + b.Property(x => x.Remark).HasMaxLength(1000); + + }); + } + + + + /// + /// CP7报废和索赔-版本 + /// + /// + /// + private static void ConfigureScrapClaimsVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_ScrapClaims_Version", options.Schema); + b.ConfigureByConvention(); + b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength); + b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter); + }); + + } + + /// + /// 大众备件发票导入 + /// + /// + /// + private static void ConfigureSparePart(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + + b.ToTable($"{options.TablePrefix}_SparePart", options.Schema); + + b.ConfigureByConvention(); + b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Period).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Version).HasMaxLength(CommonConsts.MaxCodeLength); + + b.Property(x => x.LineNumber).HasMaxLength(50); + b.Property(x => x.PurchaseType).HasMaxLength(50); + b.Property(x => x.PurchaseOrderNo).IsRequired().HasMaxLength(50); + b.Property(x => x.PurchaseOrderNoItem).HasMaxLength(50); + b.Property(x => x.PurchaseOrderNoText).HasMaxLength(50); + + b.Property(x => x.ReceiptQty).IsRequired(); + b.Property(x => x.InvoicedQty).IsRequired(); + b.Property(x => x.AmountNoTax).IsRequired(); + b.Property(x => x.PurchasePriceNoTax).IsRequired(); + + b.Property(x => x.AccountNum).HasMaxLength(50); + b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(150); + b.Property(x => x.MaterialDesc).HasMaxLength(50); + b.Property(x => x.SpareDate); + b.Property(x => x.DeliveryOrderNo).IsRequired().HasMaxLength(50); + b.Property(x => x.DeliveryLineNum).HasMaxLength(50); + b.Property(x => x.BatchNo).HasMaxLength(50); + b.Property(x => x.Unit).HasMaxLength(50); + b.Property(x => x.TaxRate); + b.Property(x => x.TaxCode); + b.Property(x => x.GermanInvoiceNo).HasMaxLength(100); + b.Property(x => x.Factory).HasMaxLength(50); + b.Property(x => x.FactoryName).HasMaxLength(50); + b.Property(x => x.Extend).HasMaxLength(250); + + }); + } + /// + /// 大众备件发票导入-版本 + /// + /// + /// + private static void ConfigureSparePartVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_SparePart_Version", options.Schema); + b.ConfigureByConvention(); + b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength); + b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter); + }); + + } + /// + /// 大众FIS未结算明细导入 + /// + /// + /// + private static void ConfigureUnSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_Unsettle", options.Schema); + b.ConfigureByConvention(); + b.Property(x => x.KENNCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Period).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Qty).IsRequired(); + b.Property(x => x.Model).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.SettlementID).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.ChassisNumber).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + //b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + + b.Property(x => x.Enabled); + b.HasIndex(x => new { x.state }); + b.HasIndex(x => new { x.Version, x.ChassisNumber, x.MaterialCode }).IsUnique(); + }); + } + /// + /// 大众FIS未结算明细导入-版本 + /// + /// + /// + private static void ConfigureUnSettleAccountVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_Unsettle_Version", options.Schema); + b.ConfigureByConvention(); + b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength); + b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter); + }); + + } + + /// + /// 大众准时化结算明细导入 + /// + /// + /// + private static void ConfigureSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_Settle", options.Schema); + b.ConfigureByConvention(); + + b.Property(x => x.KENNCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Period).HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Qty).IsRequired(); + b.Property(x => x.Model).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.SettlementID).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.ChassisNumber).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + //b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + + b.Property(x => x.Enabled); + b.HasIndex(x => new { x.state }); + b.HasIndex(x => new { x.Version, x.ChassisNumber, x.MaterialCode, x.KENNCode }); + }); + } + /// + /// 大众准时化结算明细导入-版本 + /// + /// + /// + private static void ConfigureSettleAccountVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(b => + { + b.ToTable($"{options.TablePrefix}_Settle_Version", options.Schema); + b.ConfigureByConvention(); + b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); + b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength); + b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter); + }); + + } #endregion - #region old + #region 天合 private static void ConfigureHangfire(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) { @@ -610,57 +886,8 @@ namespace Win.Sfs.SettleAccount } - private static void ConfigureSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) - { - builder.Entity(b => - { - b.ToTable($"{options.TablePrefix}_settle", options.Schema); - b.ConfigureByConvention(); - b.Property(x => x.KENNCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Period).HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Qty).IsRequired(); - b.Property(x => x.Model).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.SettlementID).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.ChassisNumber).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - //b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - - b.Property(x => x.Enabled); - b.HasIndex(x => new { x.state }); - b.HasIndex(x => new { x.Version, x.ChassisNumber, x.MaterialCode, x.KENNCode }); - }); - } - - private static void ConfigureUnSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) - { - builder.Entity(b => - { - b.ToTable($"{options.TablePrefix}_unsettle", options.Schema); - b.ConfigureByConvention(); - - b.Property(x => x.KENNCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - - b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Year).HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Period).HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.MaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Qty).IsRequired(); - b.Property(x => x.Model).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.SettlementID).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.ChassisNumber).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - //b.Property(x => x.SettlementSupplier).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - - b.Property(x => x.Enabled); - b.HasIndex(x => new { x.state }); - b.HasIndex(x => new { x.Version, x.ChassisNumber, x.MaterialCode }).IsUnique(); - }); - } private static void ConfigureEstimatedInventoryDetail(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) { builder.Entity(b => @@ -1333,42 +1560,10 @@ namespace Win.Sfs.SettleAccount b.HasIndex(x => new {x.Version,x.Factory }).IsUnique().HasFilter(IsDeletedFilter); }); } - private static void ConfigureSettleAccountVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) - { - - builder.Entity(b => - { - b.ToTable($"{options.TablePrefix}_settle_version", options.Schema); - b.ConfigureByConvention(); - b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength); - b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter); - }); - - - - - - } + - private static void ConfigureUnSettleAccountVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) - { - builder.Entity(b => - { - b.ToTable($"{options.TablePrefix}_unsettle_version", options.Schema); - b.ConfigureByConvention(); - b.Property(x => x.Year).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Period).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength); - b.Property(x => x.CustomerCode).HasMaxLength(CommonConsts.MaxCodeLength); - b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter); - }); - - } private static void ConfigureFISVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) { @@ -1973,23 +2168,7 @@ namespace Win.Sfs.SettleAccount } - private static void ConfigureInvoiceVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) - { - - builder.Entity(b => - { - - b.ToTable($"{options.TablePrefix}_InvoiceVersion", options.Schema); - - b.ConfigureByConvention(); - b.Property(x => x.Year).HasMaxLength(50); - b.Property(x => x.Period).HasMaxLength(50); - b.Property(x => x.Version).HasMaxLength(50); - b.Property(x => x.CustomerCode).HasMaxLength(50); - // b.Property(x => x.Factory).HasMaxLength(50); - - }); - } + private static void ConfigureSettlementPartVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) From 384eb8d584bbd60c04a19259d12e3893b178bb42 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Mon, 15 Nov 2021 08:36:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=96=87=E4=BB=B61?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20211110061756_initail.Designer.cs | 1255 +++++++++++++++++ 1 file changed, 1255 insertions(+) create mode 100644 src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.Designer.cs diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.Designer.cs b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.Designer.cs new file mode 100644 index 00000000..1cd86580 --- /dev/null +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.Designer.cs @@ -0,0 +1,1255 @@ +// +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(SettleAccountHttpApiHostMigrationsDbContext))] + [Migration("20211110061756_initail")] + partial class initail + { + 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("Win.Sfs.SettleAccount.Entities.Invoices.Invoice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + 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("Extend") + .HasColumnType("nvarchar(max)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_Invoice"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.InvoiceVersion", 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(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("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") + .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_InvoiceVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode", "KENNCode"); + + b.ToTable("Set_Settle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Settle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("UnsettledReason") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode") + .IsUnique(); + + b.ToTable("Set_Unsettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Unsettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanSettle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Batch") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("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("Extend") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Flag") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Kanban") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Relation") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("SettleInputDate") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Kanban", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaims", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + 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("Extend") + .HasColumnType("nvarchar(max)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_ScrapClaims"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_ScrapClaims_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePart", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccountNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AmountNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("BatchNo") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DeliveryLineNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeliveryOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FactoryName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GermanInvoiceNo") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("InvoicedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PurchaseOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoItem") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoText") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchasePriceNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("PurchaseType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReceiptQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SpareDate") + .HasColumnType("datetime2"); + + b.Property("TaxCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,2)"); + + b.Property("Unit") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_SparePart"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_SparePart_Version"); + }); +#pragma warning restore 612, 618 + } + } +} From b3ec4b3bff7d935ab3e91b499290ca419722fbf5 Mon Sep 17 00:00:00 2001 From: 44673626 <44673626@qq.com> Date: Mon, 15 Nov 2021 14:02:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4-=E4=B8=8B=E5=8D=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ApiHostMigrationsDbContextModelSnapshot.cs | 9432 ++++++++++++++++- .../VWSparePart/ISparePartAppService.cs | 2 +- .../VWSparePart/SparePartAppService.cs | 30 +- .../SettleAccount.Application.xml | 7 +- .../Entities/VWSparePart/SparePart.cs | 9 + ...AccountDbContextModelCreatingExtensions.cs | 260 +- .../UnSettleAccountImportService.cs | 3 + 7 files changed, 9211 insertions(+), 532 deletions(-) diff --git a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs index da951d66..4902863f 100644 --- a/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs +++ b/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs @@ -21,15 +21,12 @@ namespace Win.Sfs.SettleAccount.Migrations .HasAnnotation("ProductVersion", "5.0.8") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.Invoice", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarConsigns.BTCarConsign", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("Amt") - .HasColumnType("decimal(18,2)"); - b.Property("BranchId") .HasColumnType("uniqueidentifier"); @@ -47,6 +44,10 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomerCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -58,23 +59,21 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("Enabled") .HasColumnType("bit"); - b.Property("Extend") - .HasColumnType("nvarchar(max)"); - 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("KBCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -85,38 +84,41 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("MaterialCode") .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); - b.Property("MaterialDesc") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); b.Property("Period") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("nvarchar(max)"); b.Property("Qty") + .HasPrecision(18, 2) .HasColumnType("decimal(18,2)"); b.Property("Remark") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("nvarchar(max)"); - b.Property("Version") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("State") + .HasMaxLength(36) + .HasColumnType("int"); - b.Property("Year") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.ToTable("Set_Invoice"); + b.HasIndex("CustomerCode", "MaterialCode", "KBCode", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_btcarconsign"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.InvoiceVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarKBs.BTCarKB", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -131,6 +133,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -140,8 +145,12 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("CreatorId"); b.Property("CustomerCode") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DateTime") + .HasColumnType("datetime2"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -151,6 +160,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); + b.Property("DeliveryDateTime") + .HasColumnType("datetime2"); + b.Property("Enabled") .HasColumnType("bit"); @@ -172,46 +184,72 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("NeedQty") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("OrderKBCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + b.Property("Period") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ReceiveAreaCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ReceiveAreaName") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("Version") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("State") + .HasMaxLength(36) + .HasColumnType("int"); - b.Property("Year") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.ToTable("Set_InvoiceVersion"); + b.HasIndex("CustomerCode", "MaterialCode", "OrderKBCode", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_btcarkb"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarSeqFirsts.BTCarSeqFirst", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BarCode") + .HasColumnType("nvarchar(450)"); + b.Property("BranchId") .HasColumnType("uniqueidentifier"); - b.Property("CP5A") - .HasColumnType("datetime2"); - - b.Property("CP7") - .HasColumnType("datetime2"); - - b.Property("ChassisNumber") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -226,6 +264,13 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomerCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("DT") + .HasColumnType("datetime2"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -247,11 +292,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("KENNCode") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -260,72 +300,68 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MaterialCode") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Model") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("Period") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Qty") - .HasColumnType("decimal(18,2)"); - - b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SettleYear") + b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SettlementID") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("SettlementSupplier") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("VIN") + .HasColumnType("nvarchar(450)"); b.Property("Version") .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); - b.Property("Year") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("state") - .HasColumnType("int"); - b.HasKey("Id"); - b.HasIndex("state"); - - b.HasIndex("Version", "ChassisNumber", "MaterialCode", "KENNCode"); + b.HasIndex("CustomerCode", "BarCode", "VIN", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); - b.ToTable("Set_Settle"); + b.ToTable("Set_btcarseqfirst"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarSeqSeconds.BTCarSeqSecond", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BarCode") + .HasColumnType("nvarchar(450)"); + b.Property("BranchId") .HasColumnType("uniqueidentifier"); + b.Property("CMSerie") + .HasColumnType("nvarchar(max)"); + + b.Property("CMSerieRemark") + .HasColumnType("nvarchar(max)"); + + b.Property("CarModelShort") + .HasColumnType("nvarchar(max)"); + + b.Property("CarName") + .HasColumnType("nvarchar(max)"); + + b.Property("CarType") + .HasColumnType("nvarchar(max)"); + + b.Property("Code") + .HasColumnType("nvarchar(max)"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -341,8 +377,11 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("CreatorId"); b.Property("CustomerCode") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("DateTime") + .HasColumnType("datetime2"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -355,11 +394,14 @@ namespace Win.Sfs.SettleAccount.Migrations b.Property("Enabled") .HasColumnType("bit"); + b.Property("EngineCode") + .HasColumnType("nvarchar(max)"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("Factory") + b.Property("InColor") .HasColumnType("nvarchar(max)"); b.Property("IsDeleted") @@ -376,53 +418,69 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); + + b.Property("OrderStateNum") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + b.Property("Period") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .HasColumnType("nvarchar(max)"); + + b.Property("PlanDate") + .HasColumnType("datetime2"); + + b.Property("PlanSeq") + .HasColumnType("int"); + + b.Property("PlanTypeRemark") + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("Version") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("SpecialCarTypeRemark") + .HasColumnType("nvarchar(max)"); - b.Property("Year") + b.Property("StateName") + .HasColumnType("nvarchar(max)"); + + b.Property("TopSeq") + .HasColumnType("nvarchar(max)"); + + b.Property("VIN") + .HasColumnType("nvarchar(450)"); + + b.Property("Version") .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("CustomerCode", "BarCode", "VIN", "Version") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_Settle_Version"); + b.ToTable("Set_btcarseqsecond"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTCarSeqs.BTCarSeq", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BarCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + b.Property("BranchId") .HasColumnType("uniqueidentifier"); - b.Property("CP5A") - .HasColumnType("datetime2"); - - b.Property("CP7") - .HasColumnType("datetime2"); - - b.Property("ChassisNumber") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) @@ -437,6 +495,14 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomerCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DT") + .HasColumnType("datetime2"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -458,11 +524,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("KENNCode") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -471,74 +532,49 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MaterialCode") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Model") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("Period") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Qty") - .HasColumnType("decimal(18,2)"); + .HasMaxLength(1024) + .HasColumnType("nvarchar(1024)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SettleYear") - .HasColumnType("nvarchar(max)"); - - b.Property("SettlementID") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("SettlementSupplier") + b.Property("VIN") .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("UnsettledReason") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("Version") .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); - b.Property("Year") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("state") - .HasColumnType("int"); - b.HasKey("Id"); - b.HasIndex("state"); - - b.HasIndex("Version", "ChassisNumber", "MaterialCode") - .IsUnique(); + b.HasIndex("CustomerCode", "BarCode", "VIN", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); - b.ToTable("Set_Unsettle"); + b.ToTable("Set_btcarseq"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReport", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); + b.Property("BeginTime") + .HasColumnType("datetime2"); + b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -555,9 +591,14 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -567,16 +608,27 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + b.Property("Enabled") .HasColumnType("bit"); + b.Property("EndTime") + .HasColumnType("datetime2"); + b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("Factory") - .HasColumnType("nvarchar(max)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -591,51 +643,30 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Period") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("Version") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - - b.Property("Year") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("BranchId", "DocumentNumber") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_Unsettle_Version"); + b.ToTable("Set_bt_not_kb_consign_report"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanSettle", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReportDetail", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("Batch") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); b.Property("CreationTime") .HasColumnType("datetime2") @@ -645,6 +676,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomCode") + .HasColumnType("nvarchar(450)"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -653,23 +687,19 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("Extend") - .HasColumnType("nvarchar(max)"); + b.Property("DeliveryDateTime") + .HasColumnType("datetime2"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); - b.Property("Factory") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("Flag") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Enabled") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -677,11 +707,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); - b.Property("Kanban") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -691,65 +716,51 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("LastModifierId"); b.Property("MaterialCode") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); - - b.Property("ParentId") - .HasColumnType("uniqueidentifier"); - - b.Property("PartType") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("nvarchar(450)"); - b.Property("Period") + b.Property("MaterialDesc") .HasColumnType("nvarchar(max)"); - b.Property("Qty") + b.Property("NeedQty") .HasColumnType("decimal(18,2)"); - b.Property("Relation") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); + b.Property("OrderKBCode") + .HasColumnType("nvarchar(450)"); - b.Property("Remark") + b.Property("Period") .HasColumnType("nvarchar(max)"); - b.Property("SettleDate") - .HasColumnType("datetime2"); - - b.Property("SettleInputDate") - .HasColumnType("datetime2"); - - b.Property("State") + b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SupplierCode") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("State") + .HasColumnType("int"); b.Property("Version") - .HasColumnType("nvarchar(max)"); + .HasColumnType("nvarchar(450)"); b.Property("Year") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("Kanban", "MaterialCode") + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "Version", "CustomCode", "MaterialCode", "OrderKBCode") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_KanBanSettle"); + b.ToTable("Set_bt_not_kb_consign_report_detail"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReport", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -766,9 +777,14 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); b.Property("DeleterId") .HasColumnType("uniqueidentifier") @@ -778,6 +794,17 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + b.Property("Enabled") .HasColumnType("bit"); @@ -800,50 +827,36 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("LastModifierId"); b.Property("Period") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .HasColumnType("nvarchar(max)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); b.Property("Version") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .HasColumnType("nvarchar(max)"); b.Property("Year") - .IsRequired() - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("BranchId", "DocumentNumber") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_KanBanSettle_Version"); + b.ToTable("Set_bt_seq_kb_diff_report"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaims", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReportDetail", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("Amt") - .HasColumnType("decimal(18,2)"); - b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -852,6 +865,12 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CustomCode") + .HasColumnType("nvarchar(450)"); + + b.Property("DT") + .HasColumnType("datetime2"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -860,15 +879,19 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("Enabled") - .HasColumnType("bit"); + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); - b.Property("Extend") - .HasColumnType("nvarchar(max)"); + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -876,6 +899,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasDefaultValue(false) .HasColumnName("IsDeleted"); + b.Property("KBQty") + .HasColumnType("decimal(18,2)"); + b.Property("LastModificationTime") .HasColumnType("datetime2") .HasColumnName("LastModificationTime"); @@ -885,52 +911,63 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("LastModifierId"); b.Property("MaterialCode") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("MaterialDesc") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("Period") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Qty") - .HasColumnType("decimal(18,2)"); + .HasColumnType("nvarchar(max)"); b.Property("Remark") - .HasMaxLength(1000) - .HasColumnType("nvarchar(1000)"); + .HasColumnType("nvarchar(max)"); - b.Property("Type") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("SeqQty") + .HasColumnType("decimal(18,2)"); b.Property("Version") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("nvarchar(450)"); b.Property("Year") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasColumnType("nvarchar(max)"); b.HasKey("Id"); - b.ToTable("Set_ScrapClaims"); + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "Version", "DT", "CustomCode", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_bt_seq_kb_diff_report_detail"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsVersion", b => + 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) @@ -945,10 +982,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("CustomerCode") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); - b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -957,19 +990,32 @@ namespace Win.Sfs.SettleAccount.Migrations .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"); @@ -978,59 +1024,89 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Period") + 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") - .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); b.Property("Year") - .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("ParentItemCode", "ChildItemCode", "Version") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_ScrapClaims_Version"); + b.ToTable("Set_bom"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePart", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.Customers.Customer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); - b.Property("AccountNum") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("AmountNoTax") - .HasColumnType("decimal(18,2)"); - - b.Property("BatchNo") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Address") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.Property("BranchId") + .HasMaxLength(36) .HasColumnType("uniqueidentifier"); + b.Property("Code") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(40) .HasColumnType("nvarchar(40)") .HasColumnName("ConcurrencyStamp"); + b.Property("Contact") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("ContactEmail") + .HasColumnType("nvarchar(max)"); + + b.Property("ContactFax") + .HasColumnType("nvarchar(max)"); + + b.Property("ContactPhone") + .HasColumnType("nvarchar(max)"); + b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -1039,6 +1115,12 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); + b.Property("CurrencyId") + .HasColumnType("uniqueidentifier"); + + b.Property("CustomerType") + .HasColumnType("int"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -1047,41 +1129,17 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); - b.Property("DeliveryLineNum") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("DeliveryOrderNo") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Description") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.Property("Enabled") .HasColumnType("bit"); - b.Property("Extend") - .HasMaxLength(250) - .HasColumnType("nvarchar(250)"); - b.Property("ExtraProperties") .HasColumnType("nvarchar(max)") .HasColumnName("ExtraProperties"); - b.Property("Factory") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("FactoryName") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("GermanInvoiceNo") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("InvoicedQty") - .HasColumnType("decimal(18,2)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -1096,76 +1154,189 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("LineNumber") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("MaterialCode") + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "Code") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_customer"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Customers.CustomerBom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ChildItemCode") .IsRequired() - .HasMaxLength(150) - .HasColumnType("nvarchar(150)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("MaterialDesc") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); - b.Property("Period") - .HasMaxLength(36) - .HasColumnType("nvarchar(36)"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); - b.Property("PurchaseOrderNo") + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") .IsRequired() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); - b.Property("PurchaseOrderNoItem") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); - b.Property("PurchaseOrderNoText") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); - b.Property("PurchasePriceNoTax") - .HasColumnType("decimal(18,2)"); + b.Property("EffectiveTime") + .HasColumnType("datetime2"); - b.Property("PurchaseType") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + b.Property("Enabled") + .HasColumnType("bit"); - b.Property("ReceiptQty") + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FailureTime") + .HasColumnType("datetime2"); + + 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("ParentItemCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Qty") .HasColumnType("decimal(18,2)"); b.Property("Remark") .HasColumnType("nvarchar(max)"); - b.Property("SpareDate") - .HasColumnType("datetime2"); + b.HasKey("Id"); - b.Property("TaxCode") - .HasColumnType("nvarchar(max)"); + b.HasIndex("BranchId", "CustomerCode", "ParentItemCode", "ChildItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); - b.Property("TaxRate") - .HasColumnType("decimal(18,2)"); + b.ToTable("Set_customer_bom"); + }); - b.Property("Unit") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarConsigns.BTCarConsignVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); - b.Property("Version") + 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") + .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); - b.Property("Year") + 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") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); b.HasKey("Id"); - b.ToTable("Set_SparePart"); + b.ToTable("Set_btcarconsign_version"); }); - modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion", b => + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarKBs.BTCarKBVersion", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -1192,6 +1363,9 @@ namespace Win.Sfs.SettleAccount.Migrations .HasMaxLength(36) .HasColumnType("nvarchar(36)"); + b.Property("DateTime") + .HasColumnType("datetime2"); + b.Property("DeleterId") .HasColumnType("uniqueidentifier") .HasColumnName("DeleterId"); @@ -1222,7 +1396,6 @@ namespace Win.Sfs.SettleAccount.Migrations .HasColumnName("LastModifierId"); b.Property("Period") - .IsRequired() .HasMaxLength(36) .HasColumnType("nvarchar(36)"); @@ -1234,18 +1407,8493 @@ namespace Win.Sfs.SettleAccount.Migrations .HasMaxLength(36) .HasColumnType("nvarchar(36)"); + b.HasKey("Id"); + + b.ToTable("Set_btcarkb_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarSeqFirsts.BTCarSeqFirstVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DT") + .HasColumnType("datetime2"); + + 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") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_btcarseqfirst_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarSeqSeconds.BTCarSeqSecondVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DateTime") + .HasColumnType("datetime2"); + + 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") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_btcarseqsecond_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BTCarSeqs.BTCarSeqVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("DT") + .HasColumnType("datetime2"); + + 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") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_btcarseq_version"); + }); + + 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.CarMaterialConfigs.CarMaterialConfig", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CarCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CarCode", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_carmaterialconfig"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.CodeSettings.CodeSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Project") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Value") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Project", "Value") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_code"); + }); + + 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.EstimatedInventories.EstimatedInventoryVersion", 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_estinventory_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.EstimatedSums.EstimatedSum", 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("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Postingperiod") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PurchaseDocument") + .HasColumnType("nvarchar(max)"); + + b.Property("PurchaseLine") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierDesc") + .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_estsum"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.EstimatedSums.EstimatedSumVersion", 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_estsum_verion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.FISes.FIS_TH", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5Time") + .HasColumnType("datetime2"); + + b.Property("CP7Time") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ChassisNumber2") + .HasColumnType("nvarchar(450)"); + + 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("EndTime") + .HasColumnType("datetime2"); + + b.Property("ErpMaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Extend1") + .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("KENNCode") + .HasColumnType("nvarchar(max)"); + + 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("Model") + .HasColumnType("nvarchar(450)"); + + b.Property("OrderBillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SequenceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("ChassisNumber2", "Version", "Model", "MaterialCode") + .IsUnique() + .HasFilter("[ChassisNumber2] IS NOT NULL AND [Model] IS NOT NULL"); + + b.ToTable("Set_fis_th"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Factories.Factory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Desc") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_factory"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarConsigns.HQConsign", 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") + .IsRequired() + .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("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") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("VIN") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "VIN", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_hqcon"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarConsigns.HQConsignVersion", 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("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.HasKey("Id"); + + b.ToTable("Set_hqcon_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarConsigns.HQSpecConsign", 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") + .IsRequired() + .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("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KBCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("KBCodeExtend") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "KBCode", "KBCodeExtend", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_hqspcon"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarConsigns.HQSpecConsignVersion", 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("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.HasKey("Id"); + + b.ToTable("Set_hqspcon_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarKBs.HQKB", 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("ConsignQty") + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .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("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KBCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("NeedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("VIN") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "VIN", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_hqkb"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarKBs.HQKBVersion", 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("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.HasKey("Id"); + + b.ToTable("Set_hqkb_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarKBs.HQSpecKB", 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("ConsignQty") + .HasColumnType("decimal(18,2)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .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("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("KBCode") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("NeedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "KBCode", "Version") + .IsUnique() + .HasFilter("[MaterialCode] IS NOT NULL"); + + b.ToTable("Set_hqspkb"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.HQCarKBs.HQSpecKBVersion", 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("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.HasKey("Id"); + + b.ToTable("Set_hqspkb_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.ImportMap.ImportColumnMap", 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("IsCheck") + .HasColumnType("bit"); + + 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("NewColumnName") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("OldColumnName") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ProjectName") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_importmap"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Inventories.InventoryDetailVersion", 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(450)"); + + 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.HasIndex("Version", "Factory") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_inventory_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.Invoice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + 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("Extend") + .HasColumnType("nvarchar(max)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_Invoice"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Invoices.InvoiceVersion", 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(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("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") + .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_InvoiceVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.ItemInvoicePrices.ItemInvoicePrice", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Backorder") + .HasColumnType("nvarchar(max)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CC") + .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("Enabled") + .HasColumnType("bit"); + + b.Property("ExtendedMargin") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtendedPrice") + .HasColumnType("decimal(18,2)"); + + 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("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("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Sales") + .HasColumnType("nvarchar(max)"); + + b.Property("SubAcct") + .HasColumnType("nvarchar(max)"); + + b.Property("UM") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Period", "Version", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_item_invoice_price"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.ItemInvoicePrices.ItemInvoicePriceVersion", 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(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("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_item_invoice_price_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.JFCarConsigns.JFCarConsignVersion", 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") + .IsRequired() + .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("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.HasKey("Id"); + + b.ToTable("Set_jfcarconsign_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.JFCarKBs.JFCarKBVersion", 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") + .IsRequired() + .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("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.HasKey("Id"); + + b.ToTable("Set_jfcarkb_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.MaterialRelationships.MaterialRelationshipDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppraisalCategory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .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("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("ErpMaterialCode") + .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("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialProperty") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleMaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShipMaterailCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_MaterialRelationshipDetail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.MaterialRelationships.MaterialRelationshipVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .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("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("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") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_MaterialRelationshipVersion"); + }); + + 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("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("BeginDate") + .HasColumnType("datetime2"); + + 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(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("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.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.SecMatch.SecMatchBase", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .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("DiffAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("DiffPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Index") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("IsDiffNumber") + .HasColumnType("bit"); + + b.Property("IsSettle") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Model") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("RealSettlementNumber") + .HasColumnType("decimal(18,2)"); + + b.Property("RealSettlementPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettleMentPartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettlementNumber") + .HasColumnType("decimal(18,2)"); + + b.Property("SettlementPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplyProportion") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("TheoreticalSettlementNumber") + .HasColumnType("decimal(18,2)"); + + b.Property("UsedNumber") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_SecMatchBase"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryAdjustment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .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("CustomerComponentCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("CustomerMaterialCode") + .IsRequired() + .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("HasChanged") + .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("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(450)"); + + b.Property("Total") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version", "CustomerComponentCode", "CustomerMaterialCode", "SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_adj"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryAdjustmentVersion", 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") + .HasColumnType("nvarchar(max)"); + + 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_adj_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryDiscount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .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("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("HasChanged") + .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("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Total") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_dis"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryDiscountVersion", 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") + .HasColumnType("nvarchar(max)"); + + 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.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_dis_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryPriceRatio", 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("CustomItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("CustomItemPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("CustomSubItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomSubItemPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("CustomerCode") + .IsRequired() + .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("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(450)"); + + b.Property("SupplierDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplyProportion") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplyProportionPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version", "CustomItemCode", "CustomSubItemCode", "SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_ratio"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SecondaryMatching.SecondaryPriceRatioVersion", 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") + .HasColumnType("nvarchar(max)"); + + 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") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_ratio_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode", "KENNCode"); + + b.ToTable("Set_Settle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Settle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5A") + .HasColumnType("datetime2"); + + b.Property("CP7") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Model") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleYear") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementID") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementSupplier") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("UnsettledReason") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("state") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("state"); + + b.HasIndex("Version", "ChassisNumber", "MaterialCode") + .IsUnique(); + + b.ToTable("Set_Unsettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountVersion", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_Unsettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementCrossReference.SettlementCrossReferenceVersion", 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(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("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_SettlementCrossReference_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementCrossReferences.SettlementCrossReference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BomMaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + 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("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("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Model") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementMaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierDesc") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("Version", "SettlementMaterialCode", "BomMaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_SettlementCrossReference"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePartsRef.SettlementPakAndSpareParts", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ApplicableFunction") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpSparePartCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ErpSparePartName") + .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("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasColumnType("nvarchar(max)"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PerCarNum") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Price") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("ProductLine") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QADCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QuantityPrice") + .HasMaxLength(50) + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementPartCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SettlementPartDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplyProportion") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_SettlementPakAndSpareParts"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePartsRef.SettlementPakAndSparePartsVersion", 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(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("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_SettlementPakAndSpareParts_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementParts.SettlementPart", 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") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("Model") + .HasColumnType("nvarchar(max)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettlementPartCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SettlementPartDesc") + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); + + b.Property("Uom") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Period", "CustomerCode", "Version", "SettlementPartCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_settlement_part"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.SettlementParts.SettlementPartVersion", 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(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("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_settlement_part_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.StorageLocations.CustomerStorageLocation", 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") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("CustomerDesc") + .IsRequired() + .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("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Storagelocation") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Storagelocation", "CustomerCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_customerlocation"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.TaskJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActionName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("Creator") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DownFileName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Email") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Error") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FileName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Name") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("RealDownFileName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("RealFileName") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("ServiceName") + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Type") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_TaskJob"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanSettle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Batch") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("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("Extend") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Flag") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("Kanban") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("PartType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Relation") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleDate") + .HasColumnType("datetime2"); + + b.Property("SettleInputDate") + .HasColumnType("datetime2"); + + b.Property("State") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Kanban", "MaterialCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_KanBanSettle_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaims", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("Amt") + .HasColumnType("decimal(18,2)"); + + 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("Extend") + .HasColumnType("nvarchar(max)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Year") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.ToTable("Set_ScrapClaims"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_ScrapClaims_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePart", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AccountNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AmountNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("BatchNo") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DeliveryLineNum") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DeliveryOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("FactoryName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("GermanInvoiceNo") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("InvoicedQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("LineNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("nvarchar(150)"); + + b.Property("MaterialDesc") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PurchaseOrderNo") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoItem") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrderNoText") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchasePriceNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("PurchaseType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReceiptQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SpareDate") + .HasColumnType("datetime2"); + + b.Property("TaxCode") + .HasColumnType("nvarchar(max)"); + + b.Property("TaxRate") + .HasColumnType("decimal(18,2)"); + + b.Property("Unit") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Version") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_SparePart"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion", 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("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("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_SparePart_Version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedInventories.EstimatedInventoryDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNumber") + .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("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("InvoiceQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialDocument") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDocumentLine") + .HasColumnType("nvarchar(450)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PostingDate") + .HasColumnType("datetime2"); + + b.Property("PurchaseDocument") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("PurchaseLine") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ReceiveQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Source") + .HasColumnType("nvarchar(max)"); + + b.Property("StorageLocation") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("SupplierDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("MaterialDocument", "MaterialDocumentLine", "MaterialCode", "Version") + .IsUnique() + .HasFilter("[MaterialDocumentLine] IS NOT NULL"); + + b.ToTable("Set_estdetail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .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("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + 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") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_estimate_stock_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + 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("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimationQty") + .HasColumnType("decimal(18,2)"); + + b.Property("EstimationType") + .HasColumnType("nvarchar(max)"); + + b.Property("EstimationTypeDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("FgQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("UnSettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_estimate_stock_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.FISes.FIS", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5Time") + .HasColumnType("datetime2"); + + b.Property("CP7Time") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ChassisNumber2") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("EndTime") + .HasColumnType("datetime2"); + + b.Property("ErpMaterialCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FISYear") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("KENNCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("OrderBillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SequenceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleState") + .HasColumnType("int"); + + b.Property("SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("ChassisNumber2", "KENNCode"); + + b.HasIndex("ChassisNumber2", "Version", "KENNCode", "ItemCode"); + + b.ToTable("Set_fis"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.FISes.FISExtend", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CP5Time") + .HasColumnType("datetime2"); + + b.Property("CP7Time") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ChassisNumber2") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("EndTime") + .HasColumnType("datetime2"); + + b.Property("ErpMaterialCode") + .HasColumnType("nvarchar(max)"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FISYear") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("KENNCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("OrderBillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SequenceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleState") + .HasColumnType("int"); + + b.Property("SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("ChassisNumber2", "Version", "Model", "ItemCode") + .IsUnique() + .HasFilter("[Model] IS NOT NULL"); + + b.ToTable("Set_fis_extend"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.FISes.FISVersion", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginDate") + .HasColumnType("datetime2"); + + 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("EndDate") + .HasColumnType("datetime2"); + + 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("Model") + .HasColumnType("nvarchar(max)"); + + b.Property("Period") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_fis_version"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Inventories.InventoryDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("AppraisalCategory") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("AppraisalDesc") + .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("EndingInventoryQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("Factory") + .HasColumnType("nvarchar(max)"); + + b.Property("InputQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("OpeningInventoryQty") + .HasColumnType("decimal(18,2)"); + + b.Property("OutputQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StorageLocation") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("StorageLocationDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("Version", "MaterialCode", "StorageLocation") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_inventory"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFCarConsigns.JFCarConsign", 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") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + 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("MaterialCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("MaterialDesc") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PABillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(36) + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "PABillNum", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_jfcarconsign"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFCarKBs.JFCarKB", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)") + .HasColumnName("ConcurrencyStamp"); + + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomerCode") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + 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("InStockQty") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("MaterialDesc") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasMaxLength(36) + .HasColumnType("int"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerCode", "MaterialCode", "BillNum", "Version") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_jfcarkb"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BranchId") + .HasMaxLength(36) + .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("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + 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("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_jf_not_kb_consign_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BillNum") + .HasColumnType("nvarchar(450)"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ConsignQty") + .HasColumnType("decimal(18,2)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(450)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("InStockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasColumnType("nvarchar(450)"); + + b.Property("MaterialDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("OnLineDateTime") + .HasColumnType("datetime2"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId", "Version", "CustomCode", "MaterialCode", "BillNum") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_jf_not_kb_consign_report_detail"); + }); + + 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"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Prebatches.Prebatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasColumnType("uniqueidentifier"); + + b.Property("CarCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + 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("KENNCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("Year") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("YearKennCode") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.HasKey("Id"); + + b.ToTable("Set_prebatch"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs.InvoiceSettledDiff", 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("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("InvoiceQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ParentId") + .HasColumnType("uniqueidentifier"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SettleQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Set_InvoiceSettledDiff"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs.InvoiceSettledDiffVersion", 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("CreatorName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustomCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CustomName") + .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("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") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProjectName") + .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_InvoiceSettledDiffVersion"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .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("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + 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") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_act_adjustment_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("Buyer") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomSubItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomSubItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomSubItemPrice") + .HasColumnType("decimal(18,2)"); + + b.Property("CustomSubItemSumQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpSubItemActualQty") + .HasColumnType("decimal(18,2)"); + + b.Property("ErpSubItemCode") + .HasColumnType("nvarchar(max)"); + + b.Property("ErpSubItemQty") + .HasColumnType("decimal(18,2)"); + + b.Property("HasChanged") + .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("OfflineQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SumPriceNoTax") + .HasColumnType("decimal(18,2)"); + + b.Property("SumPriceWithTax") + .HasColumnType("decimal(18,2)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(450)"); + + b.Property("SupplierDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("SupplyProportion") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "Version", "CustomItemCode", "CustomSubItemCode", "SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_act_adjustment_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .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("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + 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") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_act_diff_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("ActNoTaxAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("ActPaymentPartyQty") + .HasColumnType("decimal(18,2)"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomSubItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomSubItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("ErpSubItemCode") + .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") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StaPaymentPartyQty") + .HasColumnType("decimal(18,2)"); + + b.Property("StdNoTaxAmount") + .HasColumnType("decimal(18,2)"); + + b.Property("SupplierCode") + .HasColumnType("nvarchar(450)"); + + b.Property("SupplierDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "Version", "CustomItemCode", "CustomSubItemCode", "SupplierCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_sec_act_diff_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SendUnsettledDiffReports.SendUnsettledDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BeginTime") + .HasColumnType("datetime2"); + + b.Property("BeginVersion") + .HasColumnType("nvarchar(max)"); + + b.Property("BranchId") + .HasMaxLength(36) + .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("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EndTime") + .HasColumnType("datetime2"); + + b.Property("EndVersion") + .HasColumnType("nvarchar(max)"); + + 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("Remark") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_send_unsettled_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SendUnsettledDiffReports.SendUnsettledDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CP5Time") + .HasColumnType("datetime2"); + + b.Property("ChassisNumber") + .HasColumnType("nvarchar(450)"); + + b.Property("ChassisNumber2") + .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("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("Extend1") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + + b.Property("FISYear") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("KENNCode") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Model") + .HasColumnType("nvarchar(max)"); + + b.Property("OrderBillNum") + .HasColumnType("nvarchar(max)"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Qty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("SequenceNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Version") + .HasColumnType("nvarchar(450)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentId", "Version", "ChassisNumber", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_send_unsettled_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .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("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + 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") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_fis_diff_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimationType") + .HasColumnType("nvarchar(max)"); + + b.Property("FisQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_fis_diff_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .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("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + 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") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_settled_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimationType") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("R3SettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_settled_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .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("CreatorName") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomName") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("DocumentStatus") + .HasColumnType("int"); + + b.Property("DocumentType") + .HasColumnType("int"); + + 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") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("BranchId", "DocumentNumber") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_unsettled_report"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReportDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BranchId") + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("CustomCode") + .HasColumnType("nvarchar(max)"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("DiffQty") + .HasColumnType("decimal(18,2)"); + + b.Property("DocumentId") + .HasColumnType("uniqueidentifier"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Enabled") + .HasColumnType("bit"); + + b.Property("EstimationType") + .HasColumnType("nvarchar(max)"); + + b.Property("FisUnSettledQty") + .HasColumnType("decimal(18,2)"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("ItemCode") + .HasColumnType("nvarchar(450)"); + + b.Property("ItemDesc") + .HasColumnType("nvarchar(max)"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + + b.Property("Period") + .HasColumnType("nvarchar(max)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("StockQty") + .HasColumnType("decimal(18,2)"); + + b.Property("Version") + .HasColumnType("nvarchar(max)"); + b.Property("Year") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentId"); + + b.HasIndex("BranchId", "DocumentId", "ItemCode") + .IsUnique() + .HasFilter("IsDeleted=0"); + + b.ToTable("Set_stock_unsettled_report_detail"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SupplierItemSetUps.SupplierItemSetUp", 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") + .HasColumnType("nvarchar(450)"); + + b.Property("CustomerSupplierCode") + .IsRequired() + .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("ErpItemCode") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ErpSupplierCode") .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("Remark") + .HasColumnType("nvarchar(max)"); + b.HasKey("Id"); - b.HasIndex("Version") + b.HasIndex("ErpSupplierCode", "ErpItemCode", "CustomerSupplierCode", "CustomerCode") .IsUnique() .HasFilter("IsDeleted=0"); - b.ToTable("Set_SparePart_Version"); + b.ToTable("Set_supplier_item_setup"); + }); + + modelBuilder.Entity("Win.Sfs.Shared.DomainBase.UpstreamDocument", b => + { + b.Property("UpstreamDocumentId") + .ValueGeneratedOnAdd() + .HasColumnType("uniqueidentifier"); + + b.Property("BTNotConsignReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("BTSeqKBDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("EstimatedStockDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("JFNotConsignReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("SecondaryActuralAdjustmentReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("SecondaryActuralDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("SendUnsettledDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("Seq") + .HasColumnType("int"); + + b.Property("StockFisDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("StockSettledDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("StockUnsettledDiffReportId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpstreamDocumentNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("UpstreamDocumentType") + .HasColumnType("int"); + + b.HasKey("UpstreamDocumentId"); + + b.HasIndex("BTNotConsignReportId"); + + b.HasIndex("BTSeqKBDiffReportId"); + + b.HasIndex("EstimatedStockDiffReportId"); + + b.HasIndex("JFNotConsignReportId"); + + b.HasIndex("SecondaryActuralAdjustmentReportId"); + + b.HasIndex("SecondaryActuralDiffReportId"); + + b.HasIndex("SendUnsettledDiffReportId"); + + b.HasIndex("StockFisDiffReportId"); + + b.HasIndex("StockSettledDiffReportId"); + + b.HasIndex("StockUnsettledDiffReportId"); + + b.ToTable("UpstreamDocument"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReport", null) + .WithMany("BTNotConsignReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReport", null) + .WithMany("BTSeqKBDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReport", null) + .WithMany("EstimatedStockDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReport", null) + .WithMany("JFNotConsignReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReport", null) + .WithMany("SecondaryActuralAdjustmentReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReport", null) + .WithMany("SecondaryActuralDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReport", null) + .WithMany("StockFisDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReport", null) + .WithMany("StockSettledDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReportDetail", b => + { + b.HasOne("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReport", null) + .WithMany("StockUnsettledDiffReportDetails") + .HasForeignKey("DocumentId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Win.Sfs.Shared.DomainBase.UpstreamDocument", b => + { + b.HasOne("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("BTNotConsignReportId"); + + b.HasOne("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("BTSeqKBDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("EstimatedStockDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("JFNotConsignReportId"); + + b.HasOne("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("SecondaryActuralAdjustmentReportId"); + + b.HasOne("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("SecondaryActuralDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.SendUnsettledDiffReports.SendUnsettledDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("SendUnsettledDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("StockFisDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("StockSettledDiffReportId"); + + b.HasOne("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReport", null) + .WithMany("UpstreamDocuments") + .HasForeignKey("StockUnsettledDiffReportId"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.BTNotConsignReports.BTNotConsignReport", b => + { + b.Navigation("BTNotConsignReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.BTSeqKBDiffReports.BTSeqKBDiffReport", b => + { + b.Navigation("BTSeqKBDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.EstimatedStockDiffReports.EstimatedStockDiffReport", b => + { + b.Navigation("EstimatedStockDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.JFNotConsignReports.JFNotConsignReport", b => + { + b.Navigation("JFNotConsignReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports.SecondaryActuralAdjustmentReport", b => + { + b.Navigation("SecondaryActuralAdjustmentReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SecondaryActuralDiffReports.SecondaryActuralDiffReport", b => + { + b.Navigation("SecondaryActuralDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.SendUnsettledDiffReports.SendUnsettledDiffReport", b => + { + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockFisDiffReports.StockFisDiffReport", b => + { + b.Navigation("StockFisDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockSettledDiffReports.StockSettledDiffReport", b => + { + b.Navigation("StockSettledDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); + }); + + modelBuilder.Entity("Win.Sfs.SettleAccount.StockUnsettledDiffReports.StockUnsettledDiffReport", b => + { + b.Navigation("StockUnsettledDiffReportDetails"); + + b.Navigation("UpstreamDocuments"); }); #pragma warning restore 612, 618 } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs index d7148931..f3fec313 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs @@ -43,7 +43,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart /// 请求条件 /// 实体DTO列表 - Task> GetListAsync(Guid parentId, SparePartRequestDto input); + Task> GetListAsync( SparePartRequestDto input); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs index d74033d2..1a99deee 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs @@ -22,10 +22,13 @@ using Magicodes.ExporterAndImporter.Core; using Magicodes.ExporterAndImporter.Csv; using Magicodes.ExporterAndImporter.Excel; using Win.Sfs.Shared.Filter; +using Volo.Abp; namespace Win.Sfs.SettleAccount.Entities.VWSparePart { - + /// + /// 大众备件服务 + /// [Route("api/settleaccount/SparePart")] public class SparePartAppService : SettleAccountApplicationBase, ISparePartAppService { @@ -69,6 +72,10 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] public async Task SparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) { + if (string.IsNullOrEmpty(version)) + { + throw new BusinessException("版本不能空,必须传入!"); + } ExportImporter _exportImporter = new ExportImporter(); var result = await _exportImporter.UploadExcelImport< SparePartImportDto>(files, _excelImportService); var entityList = ObjectMapper.Map, List>(result); @@ -91,7 +98,10 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart var _id = GuidGenerator.Create(); var _bomList = new List< SparePartVersion>(); _bomList.Add(new SparePartVersion(_id, branchId, year, period, version, customerCode)); - + foreach (var itm in entityList) + { + itm.SetValue(GuidGenerator.Create(), branchId, year, period, version); + } if (checkList.Count > 0) { return await ExportErrorReportAsync(checkList); @@ -148,12 +158,15 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(SparePartRequestDto input) { - + if (string.IsNullOrEmpty(input.Version)) + { + throw new BusinessException("版本不能空,必须传入!"); + } IExporter _csv = new CsvExporter(); IExporter _excel = new ExcelExporter(); - if (input.ParentId != Guid.Empty) + if (!string.IsNullOrEmpty(input.Version)) { - input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); } var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue, 0, true); @@ -200,16 +213,17 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart [HttpPost] [Route("list")] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] - virtual public async Task> GetListAsync(Guid id, SparePartRequestDto input) + virtual public async Task> GetListAsync(SparePartRequestDto input) { - if (input.ParentId != Guid.Empty) + if (!string.IsNullOrEmpty(input.Version)) { - input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() }); + input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version }); } else { return new PagedResultDto(0, new List()); } + var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml index 889b4e43..30684b63 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml @@ -1659,6 +1659,11 @@ + + + 大众备件服务 + + 构建方法 @@ -1691,7 +1696,7 @@ - + 根据筛选条件获取实体列表 diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs index f9aab181..caa70da8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs @@ -15,6 +15,15 @@ namespace Win.Sfs.SettleAccount.Entities.VWSparePart { public SparePart() { } + + public void SetValue(Guid guid, Guid branchId, string year, string peroid, string version) + { + Period = peroid; + Year = year; + Id = guid; + Version = version; + BranchId = branchId; + } public SparePart(Guid Id, string year, string period, string version, string lineNumber, string purchaseType,string purchaseOrderNo, string purchaseOrderNoItem, string purchaseOrderNoText, decimal receiptQty, decimal invoicedQty, decimal amountNoTax, decimal purchasePriceNoTax, diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs index 790e4377..f33f1b1d 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -87,181 +87,181 @@ namespace Win.Sfs.SettleAccount #region 天合 //产品结构 - //builder.ConfigureBom(options); + builder.ConfigureBom(options); - ////结算件 - //builder.ConfigureSettlementPart(options); + //结算件 + builder.ConfigureSettlementPart(options); - ////ERP总成开票价格 - //builder.ConfigureItemInvoicePrice(options); - //builder.ConfigureItemInvoicePriceVersion(options); + //ERP总成开票价格 + builder.ConfigureItemInvoicePrice(options); + builder.ConfigureItemInvoicePriceVersion(options); - ////客户 - //builder.ConfigureCustomer(options); + //客户 + builder.ConfigureCustomer(options); - ////客户产品结构 - //builder.ConfigureCustomerBom(options); - //builder.ConfigureEstimatedSum(options); - //builder.ConfigureCodeSetting(options); - //builder.ConfigureMaterial(options); - //builder.ConfigureEstimatedInventoryDetail(options); - //builder.ConfigureInventoryDetail(options); - - - //builder.ConfigureMaterialRelationship(options); - //builder.ConfigureFIS(options); - //builder.ConfigureFISExtend(options); - //builder.ConfigureCentralizedControl(options); - //builder.ConfigurePrebatch(options); - //builder.ConfigureFactory(options); - //builder.ConfigureSupplierItemSetUp(options); - //builder.ConfigureSecondaryAdjustment(options); - //builder.ConfigureSecondaryPriceRatio(options); - //builder.ConfigureCustomerStorageLocation(options); - //builder.ConfigureBomVersion(options); - //builder.ConfigureFISVersion(options); - //builder.ConfigureEstimatedSumVersion(options); - //builder.ConfigureEstimatedInventoryVersion(options); - //builder.ConfigureInventoryDetailVersion(options); - - + //客户产品结构 + builder.ConfigureCustomerBom(options); + builder.ConfigureEstimatedSum(options); + builder.ConfigureCodeSetting(options); + builder.ConfigureMaterial(options); + builder.ConfigureEstimatedInventoryDetail(options); + builder.ConfigureInventoryDetail(options); - //builder.ConfigureSecondaryAdjustmentVersion(options); - //builder.ConfigureSecondaryPriceRatioVersion(options); - //builder.ConfigureSecondaryDiscount(options); - //builder.ConfigureSecondaryDiscountVersion(options); - //builder.ConfigureSecondaryPriceRatioVersion(options); - ////暂估发出未结算 - //builder.ConfigureEstimatedStockDiffReport(options); + builder.ConfigureMaterialRelationship(options); + builder.ConfigureFIS(options); + builder.ConfigureFISExtend(options); + builder.ConfigureCentralizedControl(options); + builder.ConfigurePrebatch(options); + builder.ConfigureFactory(options); + builder.ConfigureSupplierItemSetUp(options); + builder.ConfigureSecondaryAdjustment(options); + builder.ConfigureSecondaryPriceRatio(options); + builder.ConfigureCustomerStorageLocation(options); + builder.ConfigureBomVersion(options); + builder.ConfigureFISVersion(options); + builder.ConfigureEstimatedSumVersion(options); + builder.ConfigureEstimatedInventoryVersion(options); + builder.ConfigureInventoryDetailVersion(options); - ////暂估发出未结算明细 - //builder.ConfigureEstimatedStockDiffReportDetail(options); - ////库存未结算比对 - //builder.ConfigureStockUnsettledDiffReport(options); + builder.ConfigureSecondaryAdjustmentVersion(options); + builder.ConfigureSecondaryPriceRatioVersion(options); + builder.ConfigureSecondaryDiscount(options); + builder.ConfigureSecondaryDiscountVersion(options); - ////库存未结算比对明细 - //builder.ConfigureStockUnsettledDiffReportDetail(options); + builder.ConfigureSecondaryPriceRatioVersion(options); + //暂估发出未结算 + builder.ConfigureEstimatedStockDiffReport(options); + //暂估发出未结算明细 + builder.ConfigureEstimatedStockDiffReportDetail(options); - ////R3结算数据对比输出表 - //builder.ConfigureStockSettledDiffReport(options); - ////R3结算数据对比输出表明细 - //builder.ConfigureStockSettledDiffReportDetail(options); + //库存未结算比对 + builder.ConfigureStockUnsettledDiffReport(options); - ////FIS发运数据对比输出表 - //builder.ConfigureStockFisDiffReport(options); + //库存未结算比对明细 + builder.ConfigureStockUnsettledDiffReportDetail(options); - ////FIS发运数据对比输出表明细 - //builder.ConfigureStockFisDiffReportDetail(options); + //R3结算数据对比输出表 + builder.ConfigureStockSettledDiffReport(options); - ////发出未结算比对 - //builder.ConfigureSendUnsettledDiffReport(options); + //R3结算数据对比输出表明细 + builder.ConfigureStockSettledDiffReportDetail(options); - ////发出未结算比对明细 - //builder.ConfigureSendUnsettledDiffReportDetail(options); + //FIS发运数据对比输出表 + builder.ConfigureStockFisDiffReport(options); - ////奔腾轿车一厂车序输入表 - //builder.ConfigureBTCarSeqFirst(options); - //builder.ConfigureBTCarSeqFirstVersion(options); - ////实际二配调整后输出表 - //builder.ConfigureSecondaryActuralAdjustmentReport(options); + //FIS发运数据对比输出表明细 + builder.ConfigureStockFisDiffReportDetail(options); - ////实际二配调整后输出表明细 - //builder.ConfigureSecondaryActuralAdjustmentReportDetail(options); + //发出未结算比对 + builder.ConfigureSendUnsettledDiffReport(options); - ////二配对比输出表 - //builder.ConfigureSecondaryActuralDiffReport(options); + //发出未结算比对明细 + builder.ConfigureSendUnsettledDiffReportDetail(options); - ////二配对比输出表明细 - //builder.ConfigureSecondaryActuralDiffReportDetail(options); + //奔腾轿车一厂车序输入表 + builder.ConfigureBTCarSeqFirst(options); + builder.ConfigureBTCarSeqFirstVersion(options); + //实际二配调整后输出表 + builder.ConfigureSecondaryActuralAdjustmentReport(options); - ////奔腾轿车二厂车序输入表 - //builder.ConfigureBTCarSeqSecond(options); - //builder.ConfigureBTCarSeqSecondVersion(options); + //实际二配调整后输出表明细 + builder.ConfigureSecondaryActuralAdjustmentReportDetail(options); - ////奔腾轿车车序输入表 - //builder.ConfigureBTCarSeq(options); - //builder.ConfigureBTCarSeqVersion(options); - ////奔腾看板输入表 - //builder.ConfigureBTCarKB(options); - //builder.ConfigureBTCarKBVersion(options); + //二配对比输出表 + builder.ConfigureSecondaryActuralDiffReport(options); - ////奔腾结算输入表 - //builder.ConfigureBTCarConsign(options); - //builder.ConfigureBTCarConsignVersion(options); + //二配对比输出表明细 + builder.ConfigureSecondaryActuralDiffReportDetail(options); - ////解放看板输入表 - //builder.ConfigureJFCarKB(options); - //builder.ConfigureJFCarKBVersion(options); + //奔腾轿车二厂车序输入表 + builder.ConfigureBTCarSeqSecond(options); + builder.ConfigureBTCarSeqSecondVersion(options); - ////结算结算输入表 - //builder.ConfigureJFCarConsign(options); - //builder.ConfigureJFCarConsignVersion(options); + //奔腾轿车车序输入表 + builder.ConfigureBTCarSeq(options); + builder.ConfigureBTCarSeqVersion(options); - ////车型代码与零件号匹配关系设置表 - //builder.ConfigureCarMaterialConfig(options); + //奔腾看板输入表 + builder.ConfigureBTCarKB(options); + builder.ConfigureBTCarKBVersion(options); - ////轿车车序与看板差异输出表 - //builder.ConfigureBTSeqKBDiffReport(options); + //奔腾结算输入表 + builder.ConfigureBTCarConsign(options); + builder.ConfigureBTCarConsignVersion(options); - ////轿车车序与看板差异输出表明细 - //builder.ConfigureBTSeqKBDiffReportDetail(options); + //解放看板输入表 + builder.ConfigureJFCarKB(options); + builder.ConfigureJFCarKBVersion(options); - ////轿车发出未结算输出表 - //builder.ConfigureBTNotConsignReport(options); - ////轿车发出未结算输出表明细 - //builder.ConfigureBTNotConsignReportDetail(options); + //结算结算输入表 + builder.ConfigureJFCarConsign(options); + builder.ConfigureJFCarConsignVersion(options); + //车型代码与零件号匹配关系设置表 + builder.ConfigureCarMaterialConfig(options); - ////解放发出未结算输出表 - //builder.ConfigureJFNotConsignReport(options); - ////解放发出未结算输出表明细 - //builder.ConfigureJFNotConsignReportDetail(options); + //轿车车序与看板差异输出表 + builder.ConfigureBTSeqKBDiffReport(options); + //轿车车序与看板差异输出表明细 + builder.ConfigureBTSeqKBDiffReportDetail(options); + + //轿车发出未结算输出表 + builder.ConfigureBTNotConsignReport(options); + //轿车发出未结算输出表明细 + builder.ConfigureBTNotConsignReportDetail(options); + + + //解放发出未结算输出表 + builder.ConfigureJFNotConsignReport(options); + //解放发出未结算输出表明细 + builder.ConfigureJFNotConsignReportDetail(options); + + + builder.ConfigureHQKBVersion(options); + builder.ConfigureHQSpecKBVersion(options); + builder.ConfigureHQConsignVersion(options); + builder.ConfigureHQSpecConsignVersion(options); + + builder.ConfigureHQKB(options); + builder.ConfigureHQSpecKB(options); + builder.ConfigureHQConsign(options); + builder.ConfigureHQSpecConsign(options); + builder.ConfigureTaskJob(options); + builder.ConfigureImportMap(options); - //builder.ConfigureHQKBVersion(options); - //builder.ConfigureHQSpecKBVersion(options); - //builder.ConfigureHQConsignVersion(options); - //builder.ConfigureHQSpecConsignVersion(options); - //builder.ConfigureHQKB(options); - //builder.ConfigureHQSpecKB(options); - //builder.ConfigureHQConsign(options); - //builder.ConfigureHQSpecConsign(options); - //builder.ConfigureTaskJob(options); - //builder.ConfigureImportMap(options); - + builder.ConfigureInvoiceSettledDiff(options); + builder.ConfigureInventoryDetailVersion(options); + builder.ConfigureInvoiceSettledDiffVersion(options); + builder.ConfigurePriceListVersion(options); + builder.ConfigurePriceList(options); + builder.ConfigureFIS_TH(options); + builder.ConfigureMaterialRelationshipVersion(options); + builder.ConfigureMaterialRelationshipDetail(options); + builder.ConfigureSettlementPartVersion(options); + //结算关系对照表 + builder.ConfigureSettlementCrossReference(options); + builder.ConfigureSettlementCrossReferenceVersion(options); + //结算包和跟散件对应关系 + builder.ConfigureSettlementPakAndSpareParts(options); + builder.ConfigureSettlementPakAndSparePartsVersion(options); - //builder.ConfigureInvoiceSettledDiff(options); - //builder.ConfigureInventoryDetailVersion(options); - //builder.ConfigureInvoiceSettledDiffVersion(options); - //builder.ConfigurePriceListVersion(options); - //builder.ConfigurePriceList(options); - //builder.ConfigureFIS_TH(options); - //builder.ConfigureMaterialRelationshipVersion(options); - //builder.ConfigureMaterialRelationshipDetail(options); - //builder.ConfigureSettlementPartVersion(options); - ////结算关系对照表 - //builder.ConfigureSettlementCrossReference(options); - //builder.ConfigureSettlementCrossReferenceVersion(options); - ////结算包和跟散件对应关系 - //builder.ConfigureSettlementPakAndSpareParts(options); - //builder.ConfigureSettlementPakAndSparePartsVersion(options); - - //builder.ConfigureSecMatchBase(options); + builder.ConfigureSecMatchBase(options); #endregion diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs index 8e95c7b3..74247508 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs @@ -15,6 +15,9 @@ using Win.Sfs.SettleAccount.Repository.SettleAccount; namespace TaskJob.Services { + /// + /// 大众FIS未结数据-服务 + /// public class UnSettleAccountImportService : ITransientDependency, IImportJob { private readonly UnSettleAccountRepository _repository;