Administrator 3 years ago
parent
commit
6199abfbcc
  1. 1255
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.Designer.cs
  2. 507
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.cs
  3. 1255
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.Designer.cs
  4. 31
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.cs
  5. 9901
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs
  6. 1
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj
  7. 4
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json
  8. 4
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
  9. 142
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Invoices/InvoiceDtoBase.cs
  10. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/IVWKanBanAppService.cs
  11. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanDto.cs
  12. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanExportDto.cs
  13. 26
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImportDto.cs
  14. 93
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImport_EmpDto.cs
  15. 2
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanRequestDto.cs
  16. 94
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/IScrapClaimsAppService.cs
  17. 15
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsCreateDto.cs
  18. 56
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDto.cs
  19. 58
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsDtoBase.cs
  20. 57
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsExportDto.cs
  21. 55
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsImportDto.cs
  22. 64
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsRequestDto.cs
  23. 100
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWScrapClaims/ScrapClaimsVersionDtoBase.cs
  24. 94
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/ISparePartAppService.cs
  25. 15
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartCreateDto.cs
  26. 122
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDto.cs
  27. 124
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartDtoBase.cs
  28. 143
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartExportDto.cs
  29. 129
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartImportDto.cs
  30. 129
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartRequestDto.cs
  31. 100
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWSparePart/SparePartVersionDtoBase.cs
  32. 29
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissionDefinitionProvider.cs
  33. 55
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Permissions/SettleAccountPermissions.cs
  34. 8
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs
  35. 4
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
  36. 28
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs
  37. 54
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWKanBan/VWKanBanAppService.cs
  38. 316
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWScrapClaims/ScrapClaimsAppService.cs
  39. 322
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs
  40. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs
  41. 230
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  42. 263
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  43. 14
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Invoices/Invoice.cs
  44. 28
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBan.cs
  45. 4
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBanManager.cs
  46. 8
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/SettleAccounts/SettleAccount.cs
  47. 5
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs
  48. 101
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaims.cs
  49. 47
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWScrapClaims/ScrapClaimsVersion.cs
  50. 203
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs
  51. 47
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePartVersion.cs
  52. 395
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  53. 3
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs

1255
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211110061756_initail.Designer.cs

File diff suppressed because it is too large

507
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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Period = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Version = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Factory = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
MaterialCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
MaterialDesc = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Amt = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Extend = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Period = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Version = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CustomerCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(max)", nullable: true),
Period = table.Column<string>(type: "nvarchar(max)", nullable: true),
Version = table.Column<string>(type: "nvarchar(max)", nullable: true),
Kanban = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false),
Relation = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Factory = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
MaterialCode = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false),
PartType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SupplierCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SettleInputDate = table.Column<DateTime>(type: "datetime2", nullable: false),
Batch = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Flag = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
SettleDate = table.Column<DateTime>(type: "datetime2", nullable: false),
State = table.Column<int>(type: "int", nullable: false),
Extend = table.Column<string>(type: "nvarchar(max)", nullable: true),
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
CustomerCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Period = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Version = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Type = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
MaterialCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
MaterialDesc = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Amt = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Extend = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
CustomerCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
SettleYear = table.Column<string>(type: "nvarchar(max)", nullable: true),
KENNCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
ChassisNumber = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Model = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
CP5A = table.Column<DateTime>(type: "datetime2", nullable: false),
CP7 = table.Column<DateTime>(type: "datetime2", nullable: false),
MaterialCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
SettlementID = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
SettlementSupplier = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
state = table.Column<int>(type: "int", nullable: false),
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
CustomerCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
Factory = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
LineNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
PurchaseType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
PurchaseOrderNo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
PurchaseOrderNoItem = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
PurchaseOrderNoText = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ReceiptQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
InvoicedQty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
AmountNoTax = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
PurchasePriceNoTax = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
AccountNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
MaterialCode = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false),
MaterialDesc = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SpareDate = table.Column<DateTime>(type: "datetime2", nullable: false),
DeliveryOrderNo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
DeliveryLineNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
BatchNo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Unit = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
TaxRate = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
TaxCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
GermanInvoiceNo = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Factory = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
FactoryName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Extend = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
CustomerCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
SettleYear = table.Column<string>(type: "nvarchar(max)", nullable: true),
KENNCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
ChassisNumber = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Model = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
CP5A = table.Column<DateTime>(type: "datetime2", nullable: false),
CP7 = table.Column<DateTime>(type: "datetime2", nullable: false),
MaterialCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
SettlementID = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
SettlementSupplier = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
state = table.Column<int>(type: "int", nullable: false),
UnsettledReason = table.Column<string>(type: "nvarchar(max)", nullable: true),
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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<Guid>(type: "uniqueidentifier", nullable: false),
Year = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Period = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false),
CustomerCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true),
Factory = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true),
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Enabled = table.Column<bool>(type: "bit", nullable: false),
Remark = table.Column<string>(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");
}
}
}

1255
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/20211112093946_data20211112.Designer.cs

File diff suppressed because it is too large

31
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<string>(
name: "State",
table: "Set_KanBanSettle",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "State",
table: "Set_KanBanSettle",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
}
}
}

9901
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Migrations/SettleAccountHttpApiHostMigrationsDbContextModelSnapshot.cs

File diff suppressed because it is too large

1
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccount.HttpApi.Host.csproj

@ -54,7 +54,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Migrations\" />
<Folder Include="wwwroot\files\host\my-file-container\" /> <Folder Include="wwwroot\files\host\my-file-container\" />
</ItemGroup> </ItemGroup>

4
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" "CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#",
"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;" "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {

4
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" "CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#",
"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService;user id=sa;Password=1;" "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {

142
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<Guid> public class InvoiceDto : EntityDto<Guid>
{ {
/// <summary> /// <summary>
@ -138,8 +114,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///入库文本号 ///入库文本号
/// </summary> /// </summary>
[Display(Name = "入库文本号")] //[Display(Name = "入库文本号")]
public string TextCode { get; set; } //public string TextCode { get; set; }
/// <summary> /// <summary>
///零件号 ///零件号
/// </summary> /// </summary>
@ -153,8 +129,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///入库日期 ///入库日期
/// </summary> /// </summary>
[Display(Name = "入库日期")] //[Display(Name = "入库日期")]
public DateTime Date { get; set; } //public DateTime Date { get; set; }
/// <summary> /// <summary>
///数量 ///数量
/// </summary> /// </summary>
@ -168,18 +144,18 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///记账号码 ///记账号码
/// </summary> /// </summary>
[Display(Name = "记账号码")] //[Display(Name = "记账号码")]
public string Number { get; set; } //public string Number { get; set; }
/// <summary> ///// <summary>
///记账人员 /////记账人员
/// </summary> ///// </summary>
[Display(Name = "记账人员")] //[Display(Name = "记账人员")]
public string Accounting { get; set; } //public string Accounting { get; set; }
/// <summary> ///// <summary>
///记账日期 /////记账日期
/// </summary> ///// </summary>
[Display(Name = "记账日期")] //[Display(Name = "记账日期")]
public DateTime AccountDate { get; set; } //public DateTime AccountDate { get; set; }
} }
@ -202,8 +178,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///入库文本号 ///入库文本号
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "入库文本号")] //[ExporterHeader(DisplayName = "入库文本号")]
public string TextCode { get; set; } //public string TextCode { get; set; }
/// <summary> /// <summary>
///零件号 ///零件号
/// </summary> /// </summary>
@ -217,8 +193,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///入库日期 ///入库日期
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "入库日期")] //[ExporterHeader(DisplayName = "入库日期")]
public DateTime Date { get; set; } //public DateTime Date { get; set; }
/// <summary> /// <summary>
///数量 ///数量
/// </summary> /// </summary>
@ -232,18 +208,18 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///记账号码 ///记账号码
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "记账号码")] //[ExporterHeader(DisplayName = "记账号码")]
public string Number { get; set; } //public string Number { get; set; }
/// <summary> ///// <summary>
///记账人员 /////记账人员
/// </summary> ///// </summary>
[ExporterHeader(DisplayName = "记账人员")] //[ExporterHeader(DisplayName = "记账人员")]
public string Accounting { get; set; } //public string Accounting { get; set; }
/// <summary> ///// <summary>
///记账日期 /////记账日期
/// </summary> ///// </summary>
[ExporterHeader(DisplayName = "记账日期")] //[ExporterHeader(DisplayName = "记账日期")]
public DateTime AccountDate { get; set; } //public DateTime AccountDate { get; set; }
} }
@ -261,8 +237,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///入库文本号 ///入库文本号
/// </summary> /// </summary>
[ImporterHeader(Name = "入库文本号")] //[ImporterHeader(Name = "入库文本号")]
public string TextCode { get; set; } //public string TextCode { get; set; }
/// <summary> /// <summary>
///零件号 ///零件号
/// </summary> /// </summary>
@ -276,8 +252,8 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///入库日期 ///入库日期
/// </summary> /// </summary>
[ImporterHeader(Name = "入库日期")] //[ImporterHeader(Name = "入库日期")]
public DateTime Date { get; set; } //public DateTime Date { get; set; }
/// <summary> /// <summary>
///数量 ///数量
/// </summary> /// </summary>
@ -291,18 +267,18 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary> /// <summary>
///记账号码 ///记账号码
/// </summary> /// </summary>
[ImporterHeader(Name = "记账号码")] //[ImporterHeader(Name = "记账号码")]
public string Number { get; set; } //public string Number { get; set; }
/// <summary> ///// <summary>
///记账人员 /////记账人员
/// </summary> ///// </summary>
[ImporterHeader(Name = "记账人员")] //[ImporterHeader(Name = "记账人员")]
public string Accounting { get; set; } //public string Accounting { get; set; }
/// <summary> ///// <summary>
///记账日期 /////记账日期
/// </summary> ///// </summary>
[ImporterHeader(Name = "记账日期")] //[ImporterHeader(Name = "记账日期")]
public DateTime AccountDate { get; set; } //public DateTime AccountDate { get; set; }
} }
@ -328,24 +304,24 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
public string Version { set; get; } public string Version { set; get; }
[Display(Name = "工厂")] [Display(Name = "工厂")]
public string Factory { get; set; } public string Factory { get; set; }
[Display(Name = "入库文本号")] //[Display(Name = "入库文本号")]
public string TextCode { get; set; } //public string TextCode { get; set; }
[Display(Name = "零件号")] [Display(Name = "零件号")]
public string MaterialCode { get; set; } public string MaterialCode { get; set; }
[Display(Name = "零件名称")] [Display(Name = "零件名称")]
public string MaterialDesc { get; set; } public string MaterialDesc { get; set; }
[Display(Name = "入库日期")] //[Display(Name = "入库日期")]
public DateTime Date { get; set; } //public DateTime Date { get; set; }
[Display(Name = "数量")] [Display(Name = "数量")]
public decimal Qty { get; set; } public decimal Qty { get; set; }
[Display(Name = "金额")] [Display(Name = "金额")]
public decimal Amt { get; set; } //public decimal Amt { get; set; }
[Display(Name = "记账号码")] //[Display(Name = "记账号码")]
public string Number { get; set; } //public string Number { get; set; }
[Display(Name = "记账人员")] //[Display(Name = "记账人员")]
public string Accounting { get; set; } //public string Accounting { get; set; }
[Display(Name = "记账日期")] //[Display(Name = "记账日期")]
public DateTime AccountDate { get; set; } //public DateTime AccountDate { get; set; }
public string Site { get; set; } public string Site { get; set; }

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/IVWKanBanAppService.cs

@ -50,7 +50,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <param name="input">请求条件</param> /// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns> /// <returns>实体DTO列表</returns>
Task<PagedResultDto<VWKanBanDto>> GetListAsync(Guid parentId, VWKanBanRequestDto input); Task<PagedResultDto<VWKanBanDto>> GetListAsync(VWKanBanRequestDto input);

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanDto.cs

@ -75,7 +75,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <summary> /// <summary>
/// 结算状态 /// 结算状态
/// </summary> /// </summary>
public virtual int State { get ; set ; } public virtual string State { get ; set ; }
/// <summary> /// <summary>
/// 备注 /// 备注

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanExportDto.cs

@ -88,6 +88,6 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// 结算状态 /// 结算状态
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "结算状态")] [ExporterHeader(DisplayName = "结算状态")]
public virtual int State { get; set; } public virtual string State { get; set; }
} }
} }

26
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanImportDto.cs

@ -11,17 +11,17 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
public class VWKanBanImportDto public class VWKanBanImportDto
{ {
/// <summary> ///// <summary>
/// 期间 ///// 期间
/// </summary> ///// </summary>
[ImporterHeader(Name = "期间")] //[ImporterHeader(Name = "期间")]
public string Period { set; get; } //public string Period { set; get; }
/// <summary> ///// <summary>
/// 版本 ///// 版本
/// </summary> ///// </summary>
[ImporterHeader(Name = "版本")] //[ImporterHeader(Name = "版本")]
public virtual string Version { get; set; } //public virtual string Version { get; set; }
/// <summary> /// <summary>
///看板条码号 ///看板条码号
@ -53,7 +53,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// R3入库日期 /// R3入库日期
/// </summary> /// </summary>
[ImporterHeader(Name = "R3入库日期")] [ImporterHeader(Name = "R3入库日期")]
public virtual DateTime SettleInputDate { set; get; } public virtual string SettleInputDate { set; get; }
/// <summary> /// <summary>
@ -82,13 +82,13 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// 结算日期 /// 结算日期
/// </summary> /// </summary>
[ImporterHeader(Name = "R3结算时间")] [ImporterHeader(Name = "R3结算时间")]
public virtual DateTime SettleDate { get; set; } public virtual string SettleDate { get; set; }
/// <summary> /// <summary>
/// 结算状态 /// 结算状态
/// </summary> /// </summary>
[ImporterHeader(Name = "结算状态")] [ImporterHeader(Name = "结算状态")]
public virtual int State { get; set; } public virtual string State { get; set; }
} }

93
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
{
///// <summary>
///// 期间
///// </summary>
//[ImporterHeader(Name = "期间")]
//public string Period { set; get; }
///// <summary>
///// 版本
///// </summary>
//[ImporterHeader(Name = "版本")]
//public virtual string Version { get; set; }
/// <summary>
///看板条码号
/// </summary>
[ImporterHeader(Name = "看板条码号")]
public string Kanban { set; get; }
/// <summary>
/// 入库关联号
/// </summary>
[ImporterHeader(Name = "入库关联号")]
public virtual string Relation { set; get; }
/// <summary>
/// 工厂
/// </summary>
[ImporterHeader(Name = "工厂")]
public virtual string Factory { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ImporterHeader(Name = "零件号")]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ImporterHeader(Name = "零件类型")]
public virtual string PartType { set; get; }
/// <summary>
/// R3入库日期
/// </summary>
[ImporterHeader(Name = "R3入库日期")]
public virtual string SettleInputDate { set; get; }
/// <summary>
///供应商编码
/// </summary>
[ImporterHeader(Name = "供应商")]
public virtual string SupplierCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[ImporterHeader(Name = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 批次
/// </summary>
[ImporterHeader(Name = "批次")]
public virtual string Batch { get; set; }
/// <summary>
/// 入库结算标识
/// </summary>
[ImporterHeader(Name = "入库结算标识")]
public virtual string Flag { get; set; }
/// <summary>
/// 结算日期
/// </summary>
[ImporterHeader(Name = "R3结算时间")]
public virtual string SettleDate { get; set; }
/// <summary>
/// 结算状态
/// </summary>
[ImporterHeader(Name = "结算状态")]
public virtual string State { get; set; }
}
}

2
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/VWKanBan/VWKanBanRequestDto.cs

@ -76,7 +76,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <summary> /// <summary>
/// 结算状态 /// 结算状态
/// </summary> /// </summary>
public virtual int State { get; set; } public virtual string State { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注

94
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
{
/// <summary>
/// 报废与索赔
/// </summary>
public interface IScrapClaimsAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> ScrapClaimsUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<ScrapClaimsDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<ScrapClaimsDto>> GetListAsync(Guid parentId, ScrapClaimsRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<ScrapClaimsVersionDto>> GetVersionListAsync(ScrapClaimsVersionRequestDto input);
Task<string> ExportAsync(ScrapClaimsRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

15
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<Guid>
{
public virtual Guid BranchId { get; set; }
}
}

56
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<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
/// 类型:CP7报废和索赔两种
/// </summary>
public string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

58
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<Guid>
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
/// 类型:CP7报废和索赔两种
/// </summary>
public string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

57
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
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "版本")]
public virtual string Version { get; set; }
/// <summary>
/// 类型
/// </summary>
[ExporterHeader(DisplayName = "类型")]
public virtual string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ExporterHeader(DisplayName = "零件号")]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ExporterHeader(DisplayName = "零件名称")]
public virtual string MaterialDesc { set; get; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 金额
/// </summary>
[ExporterHeader(DisplayName = "金额")]
public virtual decimal Amt { get; set; }
}
}

55
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
{
///// <summary>
///// 期间
///// </summary>
//[ImporterHeader(Name = "期间")]
//public string Period { set; get; }
///// <summary>
///// 版本
///// </summary>
//[ImporterHeader(Name = "版本")]
//public virtual string Version { get; set; }
/// <summary>
///类型
/// </summary>
[ImporterHeader(Name = "类型")]
public string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ImporterHeader(Name = "零件号")]
public virtual string MaterialCode { set; get; }
/// <summary>
/// 零件类型
/// </summary>
[ImporterHeader(Name = "零件名称")]
public virtual string MaterialDesc { set; get; }
/// <summary>
/// 数量
/// </summary>
[ImporterHeader(Name = "数量")]
public virtual decimal Qty { get; set; }
/// <summary>
/// 金额
/// </summary>
[ImporterHeader(Name = "金额")]
public virtual decimal Amt { get; set; }
}
}

64
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
{
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
public virtual string Version { get; set; }
/// <summary>
/// 类型:CP7报废和索赔两种
/// </summary>
public string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { set; get; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { set; get; }
/// <summary>
/// 备注
/// </summary>
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; }
}
}

100
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
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class ScrapClaimsVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class ScrapClaimsVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
}
public class ScrapClaimsVersionCreateDto : ScrapClaimsVersionDtoBase
{ }
public class ScrapClaimsVersionUpdateDto : ScrapClaimsVersionDtoBase
{ }
public class ScrapClaimsVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class ScrapClaimsVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

94
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
{
/// <summary>
/// /大众备件导入功能
/// </summary>
public interface ISparePartAppService
{
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
Task<string> SparePartUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
string year, string period, string version, string customerCode);
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
Task<SparePartDto> GetAsync(Guid id);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SparePartDto>> GetListAsync( SparePartRequestDto input);
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
Task<PagedResultDto<SparePartVersionDto>> GetVersionListAsync(SparePartVersionRequestDto input);
Task<string> ExportAsync(SparePartRequestDto input);
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
Task<long> GetTotalCountAsync(Guid branchId);
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
Task DeleteAsync(Guid id);
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
Task<bool> DeleteListAsync(List<Guid> ids);
}
}

15
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<Guid>
{
public virtual Guid BranchId { get; set; }
}
}

122
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<Guid>
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

124
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<Guid>
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Extend { set; get; }
}
}

143
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
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "版本")]
public virtual string Version { get; set; }
/// <summary>
/// 行号
/// </summary>
[ExporterHeader(DisplayName = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[ExporterHeader(DisplayName = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[ExporterHeader(DisplayName = "采购订单号")]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[ExporterHeader(DisplayName = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[ExporterHeader(DisplayName = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ExporterHeader(DisplayName = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[ExporterHeader(DisplayName = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[ExporterHeader(DisplayName = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[ExporterHeader(DisplayName = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[ExporterHeader(DisplayName = "科目号")]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[ExporterHeader(DisplayName = "物料代码")]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[ExporterHeader(DisplayName = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[ExporterHeader(DisplayName = "交货单号")]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[ExporterHeader(DisplayName = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[ExporterHeader(DisplayName = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[ExporterHeader(DisplayName = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[ExporterHeader(DisplayName = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[ExporterHeader(DisplayName = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[ExporterHeader(DisplayName = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[ExporterHeader(DisplayName = "工厂名称")]
public string FactoryName { get; set; }
}
}

129
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
{
/// <summary>
/// 行号
/// </summary>
[ImporterHeader(Name = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[ImporterHeader(Name = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[ImporterHeader(Name = "采购订单号")]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[ImporterHeader(Name = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[ImporterHeader(Name = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[ImporterHeader(Name = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[ImporterHeader(Name = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[ImporterHeader(Name = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[ImporterHeader(Name = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[ImporterHeader(Name = "科目号")]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[ImporterHeader(Name = "物料代码")]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ImporterHeader(Name = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[ImporterHeader(Name = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[ImporterHeader(Name = "交货单号")]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[ImporterHeader(Name = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[ImporterHeader(Name = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[ImporterHeader(Name = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[ImporterHeader(Name = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[ImporterHeader(Name = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[ImporterHeader(Name = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[ImporterHeader(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[ImporterHeader(Name = "工厂名称")]
public string FactoryName { get; set; }
}
}

129
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
{
/// <summary>
///年
/// </summary>
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
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; }
}
}

100
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
{
/// <summary>
/// SettleAccountVersion
/// </summary>
public class SparePartVersionDtoBase : CreateOrUpdateEntityDtoBase<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
public class SparePartVersionDto : AuditedEntityDtoBase<Guid>, IBranch<Guid>
{
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { set; get; }
public Guid BranchId { get; set; }
}
public class SparePartVersionCreateDto : SparePartVersionDtoBase
{ }
public class SparePartVersionUpdateDto : SparePartVersionDtoBase
{ }
public class SparePartVersionRequestDto : RequestDtoBase, IBranch<Guid>
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
public Guid BranchId { get; set; }
}
public class SparePartVersionImportDto
{
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; private set; }
/// <summary>
/// 客户号
/// </summary>
public string CustomerCode { private set; get; }
}
}

29
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")); var myGroup = context.AddGroup(SettleAccountPermissions.GroupName, L("SettleAccount"));
#region 派格 #region 派格
//大众看板明细结算导入 //大众看板明细结算导入
var vwKanban = myGroup.AddPermission(SettleAccountPermissions.VWKanBan.Default, L("VWKanBan")); var vwKanban = myGroup.AddPermission(SettleAccountPermissions.VWKanBan.Default, L("VWKanBan"));
vwKanban.AddChild(SettleAccountPermissions.VWKanBan.Create, L("Create")); vwKanban.AddChild(SettleAccountPermissions.VWKanBan.Create, L("Create"));
vwKanban.AddChild(SettleAccountPermissions.VWKanBan.Update, L("Update")); vwKanban.AddChild(SettleAccountPermissions.VWKanBan.Update, L("Update"));
vwKanban.AddChild(SettleAccountPermissions.VWKanBan.Delete, L("Delete")); 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 #endregion
@ -56,10 +80,7 @@ namespace Win.Sfs.SettleAccount
itemInvoicePrices.AddChild(SettleAccountPermissions.ItemInvoicePrices.Delete, L("Delete")); 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")); var CodeSettings = myGroup.AddPermission(SettleAccountPermissions.CodeSettings.Default, L("CodeSettings"));

55
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 Update = Default + "." + UpdateStr;
public const string Delete = Default + "." + DeleteStr; public const string Delete = Default + "." + DeleteStr;
} }
/// <summary>
/// 发票汇总
/// </summary>
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";
}
/// <summary>
/// CP7报废和索赔
/// </summary>
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";
}
/// <summary>
/// 大众备件
/// </summary>
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";
}
/// <summary>
/// 大众FIS未结算明细
/// </summary>
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 #endregion
#region 天合 #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";
}

8
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs

@ -38,7 +38,7 @@ using Win.Utils;
namespace Win.Sfs.SettleAccount.Entities.Invoices namespace Win.Sfs.SettleAccount.Entities.Invoices
{ {
[Authorize(SettleAccountPermissions.Invoices.Default)] //[Authorize(SettleAccountPermissions.Invoices.Default)]
//[AllowAnonymous] //[AllowAnonymous]
@ -97,7 +97,11 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
var _id = GuidGenerator.Create(); var _id = GuidGenerator.Create();
var _bomList = new List<InvoiceVersion>(); var _bomList = new List<InvoiceVersion>();
_bomList.Add(new InvoiceVersion(_id, branchId, year, period, version, customerCode)); _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<Invoice>(entityList); await _repository.GetDbContext().BulkInsertAsync<Invoice>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(_bomList); await _versionRepository.GetDbContext().BulkInsertAsync(_bomList);
return ApplicationConsts.SuccessStr; return ApplicationConsts.SuccessStr;

4
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs

@ -47,7 +47,7 @@ using TaskJob.EventArgs;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{ {
/// <summary> /// <summary>
/// 区域相关应用服务 /// 大众准时化结算明细导入-R3已结
/// </summary> /// </summary>
[Authorize(SettleAccountPermissions.SettleAccounts.Default)] [Authorize(SettleAccountPermissions.SettleAccounts.Default)]
//[AllowAnonymous] //[AllowAnonymous]
@ -117,7 +117,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[HttpPost] [HttpPost]
[Route("ExcelImport-TH")] [Route("ExcelImport-PG")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)] [Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> SettleAccountUploadExcelImportTH([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory) public async Task<string> SettleAccountUploadExcelImportTH([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory)

28
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs

@ -47,9 +47,9 @@ using TaskJob.EventArgs;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{ {
/// <summary> /// <summary>
/// 区域相关应用服务 ///大众FIS未结算明细导入功能
/// </summary> /// </summary>
[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
//[AllowAnonymous] //[AllowAnonymous]
[Route("api/settleaccount/UnSettleAccount")] [Route("api/settleaccount/UnSettleAccount")]
public class UnSettleAccountAppService : SettleAccountApplicationBase<UnSettleAccount>, IUnSettleAccountAppService public class UnSettleAccountAppService : SettleAccountApplicationBase<UnSettleAccount>, IUnSettleAccountAppService
@ -93,14 +93,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
_relrepository = relrepository; _relrepository = relrepository;
} }
/// <summary> /// <summary>
/// 导入功能 /// 导入功能,做成任务下载
/// </summary> /// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("ExcelImport")] [Route("ExcelImport")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> UnSettleAccountUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory) public async Task<string> 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 = "Version", Value = version });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode }); customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = customerCode }); customConditionList.Add(new CustomCondition() { Name = "Factory", Value = customerCode });
var _taskid = await _service.ImportEnqueueAsync<ImportTaskArgs>(files, "未结算数据导入", CurrentUser, typeof(UnSettleAccountImportService), customConditionList, (rs) => { var _taskid = await _service.ImportEnqueueAsync<ImportTaskArgs>(files, "大众FIS未结算明细", CurrentUser, typeof(UnSettleAccountImportService), customConditionList, (rs) => {
}); });
return _taskid; return _taskid;
@ -124,7 +124,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns>实体DTO</returns> /// <returns>实体DTO</returns>
[HttpGet] [HttpGet]
[Route("{id}")] [Route("{id}")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<UnSettleAccountDto> GetAsync(Guid id) virtual public async Task<UnSettleAccountDto> GetAsync(Guid id)
{ {
var result = await GetFromCacheAsync(id); var result = await GetFromCacheAsync(id);
@ -161,7 +161,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("Export")] [Route("Export")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<string> ExportAsync(UnSettleAccountRequestDto input) virtual public async Task<string> ExportAsync(UnSettleAccountRequestDto input)
{ {
@ -185,11 +185,11 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
switch (input.FileType) switch (input.FileType)
{ {
case 0: case 0:
_fileName = string.Format("大众未结算_{0}.csv", input.UserId.ToString()); _fileName = string.Format("大众FIS未结算明细_{0}.csv", input.UserId.ToString());
result = await _csv.ExportAsByteArray(dtoDetails); result = await _csv.ExportAsByteArray(dtoDetails);
break; break;
case 1: case 1:
_fileName = string.Format("大众未结算_{0}.xlsx", input.UserId.ToString()); _fileName = string.Format("大众FIS未结算明细_{0}.xlsx", input.UserId.ToString());
result = await _excel.ExportAsByteArray(dtoDetails); result = await _excel.ExportAsByteArray(dtoDetails);
break; break;
} }
@ -224,7 +224,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns>实体DTO列表</returns> /// <returns>实体DTO列表</returns>
[HttpPost] [HttpPost]
[Route("list")] [Route("list")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<UnSettleAccountDto>> GetListAsync(Guid id, UnSettleAccountRequestDto input) virtual public async Task<PagedResultDto<UnSettleAccountDto>> GetListAsync(Guid id, UnSettleAccountRequestDto input)
{ {
if (input.ParentId != Guid.Empty) if (input.ParentId != Guid.Empty)
@ -253,7 +253,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns>实体总数</returns> /// <returns>实体总数</returns>
[HttpGet] [HttpGet]
[Route("count")] [Route("count")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<long> GetTotalCountAsync(Guid branchId) virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{ {
return await _repository.GetCountAsync(branchId); return await _repository.GetCountAsync(branchId);
@ -265,7 +265,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns>实体DTO列表</returns> /// <returns>实体DTO列表</returns>
[HttpGet] [HttpGet]
[Route("all")] [Route("all")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<ListResultDto<UnSettleAccountDto>> GetAllAsync(Guid branchId) virtual public async Task<ListResultDto<UnSettleAccountDto>> GetAllAsync(Guid branchId)
{ {
var entities = await _repository.GetAllAsync(branchId, true); var entities = await _repository.GetAllAsync(branchId, true);
@ -283,7 +283,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns>无</returns> /// <returns>无</returns>
[HttpDelete] [HttpDelete]
[Route("{id}")] [Route("{id}")]
[Authorize(SettleAccountPermissions.SettleAccounts.Delete)] //[Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task DeleteAsync(Guid id) virtual public async Task DeleteAsync(Guid id)
{ {
var entity = await GetFromCacheAsync(id); var entity = await GetFromCacheAsync(id);
@ -298,7 +298,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <returns>是否执行成功</returns> /// <returns>是否执行成功</returns>
[HttpPost] [HttpPost]
[Route("delete")] [Route("delete")]
[Authorize(SettleAccountPermissions.SettleAccounts.Delete)] //[Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids) virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{ {
foreach (var id in ids) foreach (var id in ids)

54
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.Csv;
using Magicodes.ExporterAndImporter.Excel; using Magicodes.ExporterAndImporter.Excel;
using Shouldly; using Shouldly;
using Volo.Abp;
namespace Win.Sfs.SettleAccount.Entities.VWKanBan namespace Win.Sfs.SettleAccount.Entities.VWKanBan
{ {
@ -35,7 +33,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
//[AllowAnonymous] //[AllowAnonymous]
[Route("api/settleaccount/VWKanBan")] [Route("api/settleaccount/VWKanBan")]
public class VWKanBanAppService : SettleAccountApplicationBase<KanBan>, IVWKanBanAppService public class VWKanBanAppService : SettleAccountApplicationBase<KanBanSettle>, IVWKanBanAppService
{ {
private readonly IGuidGenerator _guidGenerator; private readonly IGuidGenerator _guidGenerator;
@ -43,7 +41,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
private readonly ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> _versionRepository; private readonly ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> _versionRepository;
private readonly ISettleAccountBranchEfCoreRepository<KanBan, Guid> _repository; private readonly ISettleAccountBranchEfCoreRepository<KanBanSettle, Guid> _repository;
/// <summary> /// <summary>
/// 构建方法 /// 构建方法
/// </summary> /// </summary>
@ -52,8 +50,8 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <param name="cache">缓存</param> /// <param name="cache">缓存</param>
public VWKanBanAppService(IGuidGenerator guidGenerator, public VWKanBanAppService(IGuidGenerator guidGenerator,
ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> versionRepository, ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<KanBan, Guid> repository, ISettleAccountBranchEfCoreRepository<KanBanSettle, Guid> repository,
IDistributedCache<KanBan> cache, IDistributedCache<KanBanSettle> cache,
IExcelImportAppService excelImportService, IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator, ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager ICommonManager commonManager
@ -77,9 +75,14 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> VWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) public async Task<string> VWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode)
{ {
if(string.IsNullOrEmpty(version))
{
throw new BusinessException("版本不能空,必须传入!");
}
List<VWKanBanImportDto> listImport = new List<VWKanBanImportDto>();
ExportImporter _exportImporter = new ExportImporter(); ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<VWKanBanImportDto>(files, _excelImportService); var result = await _exportImporter.UploadExcelImport<VWKanBanImportDto>(files, _excelImportService);
var entityList = ObjectMapper.Map<List<VWKanBanImportDto>, List<KanBan>>(result); var entityList = ObjectMapper.Map<List<VWKanBanImportDto>, List<KanBanSettle>>(result);
//删除版本 //删除版本
var _versionQuery = _versionRepository.Where(p => p.Version == version); var _versionQuery = _versionRepository.Where(p => p.Version == version);
await _versionQuery.BatchDeleteAsync(); await _versionQuery.BatchDeleteAsync();
@ -99,12 +102,15 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
var _id = GuidGenerator.Create(); var _id = GuidGenerator.Create();
var _bomList = new List<KanBanVersion>(); var _bomList = new List<KanBanVersion>();
_bomList.Add(new KanBanVersion(_id, branchId, year, period, version, customerCode)); _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) if (checkList.Count > 0)
{ {
return await ExportErrorReportAsync(checkList); return await ExportErrorReportAsync(checkList);
} }
await _repository.GetDbContext().BulkInsertAsync<KanBan>(entityList); await _repository.GetDbContext().BulkInsertAsync<KanBanSettle>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(_bomList); await _versionRepository.GetDbContext().BulkInsertAsync(_bomList);
return ApplicationConsts.SuccessStr; return ApplicationConsts.SuccessStr;
} }
@ -123,12 +129,12 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
virtual public async Task<VWKanBanDto> GetAsync(Guid id) virtual public async Task<VWKanBanDto> GetAsync(Guid id)
{ {
var result = await GetFromCacheAsync(id); var result = await GetFromCacheAsync(id);
var dto = ObjectMapper.Map<KanBan, VWKanBanDto>(result); var dto = ObjectMapper.Map<KanBanSettle, VWKanBanDto>(result);
return dto; return dto;
} }
private async Task<KanBan> GetFromCacheAsync(Guid id) private async Task<KanBanSettle> GetFromCacheAsync(Guid id)
{ {
var result = await _repository.GetAsync(id); var result = await _repository.GetAsync(id);
return result; return result;
@ -159,14 +165,15 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
IExporter _csv = new CsvExporter(); IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter(); 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); 0, true);
var dtoDetails = ObjectMapper.Map<List<KanBan>, List<VWKanBanExportDto>>(entities); var dtoDetails = ObjectMapper.Map<List<KanBanSettle>, List<VWKanBanExportDto>>(entities);
string _fileName = string.Empty; string _fileName = string.Empty;
//声明导出容器 //声明导出容器
@ -208,22 +215,21 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
[HttpPost] [HttpPost]
[Route("list")] [Route("list")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<VWKanBanDto>> GetListAsync(Guid id, VWKanBanRequestDto input) virtual public async Task<PagedResultDto<VWKanBanDto>> 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 else
{ {
return new PagedResultDto<VWKanBanDto>(0, new List<VWKanBanDto>()); return new PagedResultDto<VWKanBanDto>(0, new List<VWKanBanDto>());
} }
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); input.SkipCount, true);
var totalCount = await GetCountAsync(input); var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<KanBan>, List<VWKanBanDto>>(entities); var dtos = ObjectMapper.Map<List<KanBanSettle>, List<VWKanBanDto>>(entities);
return new PagedResultDto<VWKanBanDto>(totalCount, dtos); return new PagedResultDto<VWKanBanDto>(totalCount, dtos);
} }
@ -252,7 +258,7 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
var entities = await _repository.GetAllAsync(branchId, true); var entities = await _repository.GetAllAsync(branchId, true);
var dtos = ObjectMapper.Map<List<KanBan>, List<VWKanBanDto>>(entities); var dtos = ObjectMapper.Map<List<KanBanSettle>, List<VWKanBanDto>>(entities);
return new ListResultDto<VWKanBanDto>(dtos); return new ListResultDto<VWKanBanDto>(dtos);

316
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
{
/// <summary>
/// 大众CP7报废和索赔导入
/// </summary>
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/ScrapClaims")]
public class ScrapClaimsAppService : SettleAccountApplicationBase<ScrapClaims>, IScrapClaimsAppService
{
private readonly IGuidGenerator _guidGenerator;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<ScrapClaimsVersion, Guid> _versionRepository;
private readonly ISettleAccountBranchEfCoreRepository<ScrapClaims, Guid> _repository;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public ScrapClaimsAppService(IGuidGenerator guidGenerator,
ISettleAccountBranchEfCoreRepository<ScrapClaimsVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<ScrapClaims, Guid> repository,
IDistributedCache<ScrapClaims> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_versionRepository = versionRepository;
_guidGenerator = guidGenerator;
_excelImportService = excelImportService;
_repository = repository;
}
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ScrapClaimsUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode)
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<ScrapClaimsImportDto>(files, _excelImportService);
var entityList = ObjectMapper.Map<List<ScrapClaimsImportDto>, List<ScrapClaims>>(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<ErrorExportDto>();
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<ScrapClaimsVersion>();
_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<ScrapClaims>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(_bomList);
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<ScrapClaimsDto> GetAsync(Guid id)
{
var result = await GetFromCacheAsync(id);
var dto = ObjectMapper.Map<ScrapClaims, ScrapClaimsDto>(result);
return dto;
}
private async Task<ScrapClaims> GetFromCacheAsync(Guid id)
{
var result = await _repository.GetAsync(id);
return result;
}
private async Task<long> GetCountAsync(ScrapClaimsRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
private async Task<long> GetCountAsync(ScrapClaimsVersionRequestDto input)
{
return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
/// <summary>
/// 导出文件
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<string> 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<ScrapClaims>, List<ScrapClaimsExportDto>>(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;
}
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<ScrapClaimsDto>> 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<ScrapClaimsDto>(0, new List<ScrapClaimsDto>());
}
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<ScrapClaims>, List<ScrapClaimsDto>>(entities);
return new PagedResultDto<ScrapClaimsDto>(totalCount, dtos);
}
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
}
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
[Route("all")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<ListResultDto<ScrapClaimsDto>> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);
var dtos = ObjectMapper.Map<List<ScrapClaims>, List<ScrapClaimsDto>>(entities);
return new ListResultDto<ScrapClaimsDto>(dtos);
}
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
/// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task DeleteAsync(Guid id)
{
await _repository.DeleteAsync(id);
}
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
[HttpPost]
[Route("delete")]
// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{
foreach (var id in ids)
{
var entity = await GetFromCacheAsync(id);
//await Cache.DeleteAsync<SettleAccount>(id.ToString());
}
return await _repository.DeleteListAsync(ids);
}
/// <summary>
/// 版本列表查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("listversion")]
public async Task<PagedResultDto<ScrapClaimsVersionDto>> 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<ScrapClaimsVersion>, List<ScrapClaimsVersionDto>>(entities);
return new PagedResultDto<ScrapClaimsVersionDto>(totalCount, dtos);
}
}
}

322
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/VWSparePart/SparePartAppService.cs

@ -0,0 +1,322 @@
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;
using Volo.Abp;
namespace Win.Sfs.SettleAccount.Entities.VWSparePart
{
/// <summary>
/// 大众备件服务
/// </summary>
[Route("api/settleaccount/SparePart")]
public class SparePartAppService : SettleAccountApplicationBase<SparePart>, ISparePartAppService
{
private readonly IGuidGenerator _guidGenerator;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository< SparePartVersion, Guid> _versionRepository;
private readonly ISettleAccountBranchEfCoreRepository<SparePart, Guid> _repository;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public SparePartAppService(IGuidGenerator guidGenerator,
ISettleAccountBranchEfCoreRepository< SparePartVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<SparePart, Guid> repository,
IDistributedCache<SparePart> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_versionRepository = versionRepository;
_guidGenerator = guidGenerator;
_excelImportService = excelImportService;
_repository = repository;
}
/// <summary>
/// 导入功能
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> 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< SparePartImportDto>, List<SparePart>>(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<ErrorExportDto>();
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));
foreach (var itm in entityList)
{
itm.SetValue(GuidGenerator.Create(), branchId, year, period, version);
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
await _repository.GetDbContext().BulkInsertAsync<SparePart>(entityList);
await _versionRepository.GetDbContext().BulkInsertAsync(_bomList);
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<SparePartDto> GetAsync(Guid id)
{
var result = await GetFromCacheAsync(id);
var dto = ObjectMapper.Map<SparePart, SparePartDto>(result);
return dto;
}
private async Task<SparePart> GetFromCacheAsync(Guid id)
{
var result = await _repository.GetAsync(id);
return result;
}
private async Task<long> GetCountAsync(SparePartRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
private async Task<long> GetCountAsync(SparePartVersionRequestDto input)
{
return await _versionRepository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
/// <summary>
/// 导出文件
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<string> ExportAsync(SparePartRequestDto input)
{
if (string.IsNullOrEmpty(input.Version))
{
throw new BusinessException("版本不能空,必须传入!");
}
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
if (!string.IsNullOrEmpty(input.Version))
{
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);
var dtoDetails = ObjectMapper.Map<List<SparePart>, List<SparePartExportDto>>(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;
}
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<SparePartDto>> GetListAsync(SparePartRequestDto input)
{
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
else
{
return new PagedResultDto<SparePartDto>(0, new List<SparePartDto>());
}
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<SparePart>, List<SparePartDto>>(entities);
return new PagedResultDto<SparePartDto>(totalCount, dtos);
}
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
}
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
[Route("all")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<ListResultDto<SparePartDto>> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);
var dtos = ObjectMapper.Map<List<SparePart>, List<SparePartDto>>(entities);
return new ListResultDto<SparePartDto>(dtos);
}
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
/// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task DeleteAsync(Guid id)
{
await _repository.DeleteAsync(id);
}
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
[HttpPost]
[Route("delete")]
// [Authorize(SettleAccountPermissions.SettleAccounts.Delete)]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{
foreach (var id in ids)
{
var entity = await GetFromCacheAsync(id);
//await Cache.DeleteAsync<SettleAccount>(id.ToString());
}
return await _repository.DeleteListAsync(ids);
}
/// <summary>
/// 版本列表查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("listversion")]
public async Task<PagedResultDto<SparePartVersionDto>> 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< SparePartVersion>, List<SparePartVersionDto>>(entities);
return new PagedResultDto<SparePartVersionDto>(totalCount, dtos);
}
}
}

2
src/Modules/SettleAccount/src/SettleAccount.Application/ImportExcelCommon/ExportImporter.cs

@ -110,7 +110,7 @@ namespace Win.Sfs.SettleAccount.ExcelImporter
{ {
if (import.TemplateErrors.Count > 0) if (import.TemplateErrors.Count > 0)
{ {
throw new BusinessException("8989","模板错误!当前模板中字段不匹配!!请正确上传模板数据!"); throw new BusinessException("8989","模板错误!当前模板中字段不匹配!!请正确上传模板数据!导入不对的列名:"+import.TemplateErrors.FirstOrDefault().RequireColumnName);
} }
import.ShouldNotBeNull(); import.ShouldNotBeNull();
if (import.Exception != null) if (import.Exception != null)

230
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -1159,7 +1159,7 @@
</member> </member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountAppService"> <member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountAppService">
<summary> <summary>
区域相关应用服务 大众准时化结算明细导入-R3已结
</summary> </summary>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager,Win.Sfs.SettleAccount.Entities.TaskJobs.TaskJobService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.FISes.FIS,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Prebatches.Prebatch,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.MaterialRelationships.MaterialRelationship,System.Guid})"> <member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager,Win.Sfs.SettleAccount.Entities.TaskJobs.TaskJobService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.FISes.FIS,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Prebatches.Prebatch,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.MaterialRelationships.MaterialRelationship,System.Guid})">
@ -1259,7 +1259,7 @@
</member> </member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountAppService"> <member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountAppService">
<summary> <summary>
区域相关应用服务 大众FIS未结算明细导入功能
</summary> </summary>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager,Win.Sfs.SettleAccount.Entities.TaskJobs.TaskJobService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.FISes.FIS,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Prebatches.Prebatch,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.MaterialRelationships.MaterialRelationship,System.Guid})"> <member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccount},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager,Win.Sfs.SettleAccount.Entities.TaskJobs.TaskJobService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.FISes.FIS,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Prebatches.Prebatch,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.MaterialRelationships.MaterialRelationship,System.Guid})">
@ -1272,7 +1272,7 @@
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountAppService.UnSettleAccountUploadExcelImport(Microsoft.AspNetCore.Http.IFormFileCollection,System.Guid,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.UnSettleAccountAppService.UnSettleAccountUploadExcelImport(Microsoft.AspNetCore.Http.IFormFileCollection,System.Guid,System.String,System.String,System.String,System.String,System.String)">
<summary> <summary>
导入功能 导入功能,做成任务下载
</summary> </summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
@ -1504,7 +1504,7 @@
大众看板结算明细导入 大众看板结算明细导入
</summary> </summary>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWKanBan.VWKanBanAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.VWKanBan.KanBan,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.VWKanBan.KanBan},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager)"> <member name="M:Win.Sfs.SettleAccount.Entities.VWKanBan.VWKanBanAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanSettle,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.VWKanBan.KanBanSettle},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager)">
<summary> <summary>
构建方法 构建方法
</summary> </summary>
@ -1536,7 +1536,7 @@
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWKanBan.VWKanBanAppService.GetListAsync(System.Guid,Win.Sfs.SettleAccount.Entities.VWKanBan.VWKanBanRequestDto)"> <member name="M:Win.Sfs.SettleAccount.Entities.VWKanBan.VWKanBanAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.VWKanBan.VWKanBanRequestDto)">
<summary> <summary>
根据筛选条件获取实体列表 根据筛选条件获取实体列表
</summary> </summary>
@ -1579,6 +1579,166 @@
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="T:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService">
<summary>
大众CP7报废和索赔导入
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaims,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaims},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager)">
<summary>
构建方法
</summary>
<param name="guidGenerator">构建UID</param>
<param name="repository">仓储接口</param>
<param name="cache">缓存</param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.ScrapClaimsUploadExcelImport(Microsoft.AspNetCore.Http.IFormFileCollection,System.Guid,System.String,System.String,System.String,System.String)">
<summary>
导入功能
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.GetAsync(System.Guid)">
<summary>
按ID获取唯一实体
</summary>
<remarks>
返回实体全部属性
</remarks>
<param name="id">ID</param>
<returns>实体DTO</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.ExportAsync(Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsRequestDto)">
<summary>
导出文件
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.GetListAsync(System.Guid,Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsRequestDto)">
<summary>
根据筛选条件获取实体列表
</summary>
<remarks>
请求条件包括:筛选条件列表,排序条件,数据数量,页码
</remarks>
<param name="input">请求条件</param>
<returns>实体DTO列表</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.GetTotalCountAsync(System.Guid)">
<summary>
获取实体总数
</summary>
<returns>实体总数</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.GetAllAsync(System.Guid)">
<summary>
获取全部实体列表
</summary>
<returns>实体DTO列表</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.DeleteAsync(System.Guid)">
<summary>
删除实体
</summary>
<param name="id">ID</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.DeleteListAsync(System.Collections.Generic.List{System.Guid})">
<summary>
按IDs删除实体列表
</summary>
<param name="ids">IDs</param>
<returns>是否执行成功</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsAppService.GetVersionListAsync(Win.Sfs.SettleAccount.Entities.VWScrapClaims.ScrapClaimsVersionRequestDto)">
<summary>
版本列表查询
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService">
<summary>
大众备件服务
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.VWSparePart.SparePart,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.VWSparePart.SparePart},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager)">
<summary>
构建方法
</summary>
<param name="guidGenerator">构建UID</param>
<param name="repository">仓储接口</param>
<param name="cache">缓存</param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.SparePartUploadExcelImport(Microsoft.AspNetCore.Http.IFormFileCollection,System.Guid,System.String,System.String,System.String,System.String)">
<summary>
导入功能
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.GetAsync(System.Guid)">
<summary>
按ID获取唯一实体
</summary>
<remarks>
返回实体全部属性
</remarks>
<param name="id">ID</param>
<returns>实体DTO</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.ExportAsync(Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartRequestDto)">
<summary>
导出文件
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartRequestDto)">
<summary>
根据筛选条件获取实体列表
</summary>
<remarks>
请求条件包括:筛选条件列表,排序条件,数据数量,页码
</remarks>
<param name="input">请求条件</param>
<returns>实体DTO列表</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.GetTotalCountAsync(System.Guid)">
<summary>
获取实体总数
</summary>
<returns>实体总数</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.GetAllAsync(System.Guid)">
<summary>
获取全部实体列表
</summary>
<returns>实体DTO列表</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.DeleteAsync(System.Guid)">
<summary>
删除实体
</summary>
<param name="id">ID</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.DeleteListAsync(System.Collections.Generic.List{System.Guid})">
<summary>
按IDs删除实体列表
</summary>
<param name="ids">IDs</param>
<returns>是否执行成功</returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartAppService.GetVersionListAsync(Win.Sfs.SettleAccount.Entities.VWSparePart.SparePartVersionRequestDto)">
<summary>
版本列表查询
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.FISes.FISAppService"> <member name="T:Win.Sfs.SettleAccount.FISes.FISAppService">
<summary> <summary>
区域相关应用服务 区域相关应用服务
@ -2148,6 +2308,66 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapVWKanBan">
<summary>
大众看板导入
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapVWKanBanVersion">
<summary>
大众看板导入-版本
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapInvoice">
<summary>
大众发票导入
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapInvoiceVersion">
<summary>
大众发票导入-版本
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapScrapClaims">
<summary>
报废和索赔导入
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapScrapClaimsVersion">
<summary>
报废和索赔导入-版本
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapSparePart">
<summary>
大众备件导入
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapSparePartVersion">
<summary>
大众备件导入-版本
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapSettleAccount">
<summary>
大众准时化结算明细导入
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapSettleAccountVersion">
<summary>
大众准时化结算明细导入--版本
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapUnSettleAccount">
<summary>
大众FIS未结算明细导入
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapUnSettleAccountVersion">
<summary>
大众FIS未结算明细导入-版本
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapSettlementCrossReference"> <member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapSettlementCrossReference">
<summary> <summary>
结算件对照表 结算件对照表

263
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.SettlementPakAndSparePartss;
using Win.Sfs.SettleAccount.Entities.SecMatch; using Win.Sfs.SettleAccount.Entities.SecMatch;
using Win.Sfs.SettleAccount.Entities.VWKanBan; 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 namespace Win.Sfs.SettleAccount
{ {
@ -83,7 +86,7 @@ namespace Win.Sfs.SettleAccount
{ {
public SettleAccountApplicationAutoMapperProfile() public SettleAccountApplicationAutoMapperProfile()
{ {
#region 天合
CreateMapSettlementPart(); CreateMapSettlementPart();
CreateMapSettlementPartVersion(); CreateMapSettlementPartVersion();
@ -95,7 +98,7 @@ namespace Win.Sfs.SettleAccount
CreateMapBomVersion(); CreateMapBomVersion();
CreateMapEstimatedInventoryDetail(); CreateMapEstimatedInventoryDetail();
CreateMapInventoryDetail(); CreateMapInventoryDetail();
CreateMapSettleAccount();
CreateMapEstimatedSum(); CreateMapEstimatedSum();
CreateMapMaterial(); CreateMapMaterial();
CreateMapMaterialRelationship(); CreateMapMaterialRelationship();
@ -109,7 +112,7 @@ namespace Win.Sfs.SettleAccount
CreateMapEstimatedInventoryVersion(); CreateMapEstimatedInventoryVersion();
CreateMapInventoryDetailVersion(); CreateMapInventoryDetailVersion();
CreateMapSettleAccountVersion();
CreateMapEstimatedSumVersion(); CreateMapEstimatedSumVersion();
CreateMapFISVersion(); CreateMapFISVersion();
CreateMapFactory(); CreateMapFactory();
@ -172,8 +175,7 @@ namespace Win.Sfs.SettleAccount
CreateMapHQNotConsignReport(); CreateMapHQNotConsignReport();
CreateMapHQSPNotConsignReport(); CreateMapHQSPNotConsignReport();
CreateMapImportColumnMap(); CreateMapImportColumnMap();
CreateMapInvoice();
CreateMapInvoiceVersion();
CreateMapInvoiceSettledDiff(); CreateMapInvoiceSettledDiff();
CreateMapInvoiceSettledDiffVersion(); CreateMapInvoiceSettledDiffVersion();
CreateMapPriceList(); CreateMapPriceList();
@ -186,21 +188,198 @@ namespace Win.Sfs.SettleAccount
CreateMapSettlementPakAndSpareParts(); CreateMapSettlementPakAndSpareParts();
CreateMapSettlementPakAndSparePartsVersion(); CreateMapSettlementPakAndSparePartsVersion();
CreateMapSecMatchBaseDto(); CreateMapSecMatchBaseDto();
#endregion
#region 派格
CreateMapInvoice();
CreateMapInvoiceVersion();
CreateMapVWKanBan(); CreateMapVWKanBan();
CreateMapVWKanBanVersion();
CreateMapScrapClaims();
CreateMapScrapClaimsVersion();
CreateMapSparePart();
CreateMapSparePartVersion();
CreateMapSettleAccount();
CreateMapSettleAccountVersion();
CreateMapUnSettleAccount();
CreateMapUnSettleAccountVersion();
#endregion
} }
#region PG-派格映射 #region PG-派格映射
/// <summary>
/// 大众看板导入
/// </summary>
private void CreateMapVWKanBan() private void CreateMapVWKanBan()
{ {
CreateMap<KanBan, VWKanBanDto>().ReverseMap(); CreateMap<KanBanSettle, VWKanBanDto>().ReverseMap();
//CreateMap<MaterialRelationshipDetail, MaterialRelationshipDetailRequestDto>().ReverseMap(); CreateMap<KanBanSettle, VWKanBanRequestDto>().ReverseMap();
//CreateMap<MaterialRelationshipDetail, MaterialRelationshipDetailImportDto>().ReverseMap(); CreateMap<VWKanBanImportDto, KanBanSettle>()
//CreateMap<MaterialRelationshipDetail, MaterialRelationshipDetailExportDto>().ReverseMap(); .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<KanBanSettle, VWKanBanExportDto>().ReverseMap();
}
/// <summary>
/// 大众看板导入-版本
/// </summary>
private void CreateMapVWKanBanVersion()
{
CreateMap<KanBanVersion, VWKanBanVersionDto>().ReverseMap();
CreateMap<KanBanVersion, VWKanBanVersionCreateDto>();
CreateMap<KanBanVersion, VWKanBanVersionUpdateDto>();
CreateMap<VWKanBanVersionCreateDto, KanBanVersion>();
CreateMap<VWKanBanVersionUpdateDto, KanBanVersion>();
}
/// <summary>
/// 大众发票导入
/// </summary>
private void CreateMapInvoice()
{
CreateMap<Invoice, InvoiceDto>().ReverseMap();
CreateMap<Invoice, InvoiceRequestDto>().ReverseMap();
CreateMap<Invoice, InvoiceImportDto>().ReverseMap();
CreateMap<Invoice, InvoiceExportDto>().ReverseMap();
CreateMap<Invoice, InvoiceTHExportDto>().ReverseMap();
}
/// <summary>
/// 大众发票导入-版本
/// </summary>
private void CreateMapInvoiceVersion()
{
CreateMap<InvoiceVersion, InvoiceVersionDto>().ReverseMap();
CreateMap<InvoiceVersion, InvoiceVersionRequestDto>().ReverseMap();
CreateMap<InvoiceVersion, InvoiceVersionImportDto>().ReverseMap();
CreateMap<InvoiceVersion, InvoiceVersionExportDto>().ReverseMap();
}
/// <summary>
/// 报废和索赔导入
/// </summary>
private void CreateMapScrapClaims()
{
CreateMap<ScrapClaims, ScrapClaimsDto>().ReverseMap();
CreateMap<ScrapClaims, ScrapClaimsRequestDto>().ReverseMap();
CreateMap<ScrapClaims, ScrapClaimsImportDto>().ReverseMap();
CreateMap<ScrapClaims, ScrapClaimsExportDto>().ReverseMap();
CreateMap<ScrapClaims, ScrapClaimsExportDto>().ReverseMap();
}
/// <summary>
/// 报废和索赔导入-版本
/// </summary>
private void CreateMapScrapClaimsVersion()
{
CreateMap<ScrapClaimsVersion, ScrapClaimsVersionDto>().ReverseMap();
CreateMap<ScrapClaimsVersion, ScrapClaimsVersionCreateDto>();
CreateMap<ScrapClaimsVersion, ScrapClaimsVersionUpdateDto>();
CreateMap<ScrapClaimsVersionCreateDto, ScrapClaimsVersion>();
CreateMap<ScrapClaimsVersionUpdateDto, ScrapClaimsVersion>();
}
/// <summary>
/// 大众备件导入
/// </summary>
private void CreateMapSparePart()
{
CreateMap<SparePart, SparePartDto>().ReverseMap();
CreateMap<SparePart, SparePartRequestDto>().ReverseMap();
CreateMap<SparePart, SparePartImportDto>().ReverseMap();
CreateMap<SparePart, SparePartExportDto>().ReverseMap();
CreateMap<SparePart, SparePartExportDto>().ReverseMap();
}
/// <summary>
/// 大众备件导入-版本
/// </summary>
private void CreateMapSparePartVersion()
{
CreateMap<SparePartVersion, SparePartVersionDto>().ReverseMap();
CreateMap<SparePartVersion, SparePartVersionCreateDto>();
CreateMap<SparePartVersion, SparePartVersionUpdateDto>();
CreateMap<SparePartVersionCreateDto, SparePartVersion>();
CreateMap<SparePartVersionUpdateDto, SparePartVersion>();
}
/// <summary>
/// 大众准时化结算明细导入
/// </summary>
private void CreateMapSettleAccount()
{
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountDto>().ReverseMap();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountCreateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountUpdateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountExportDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountCreateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountUpdateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
}
/// <summary>
/// 大众准时化结算明细导入--版本
/// </summary>
private void CreateMapSettleAccountVersion()
{
CreateMap<SettleAccountVersion, SettleAccountVersionDto>().ReverseMap();
CreateMap<SettleAccountVersion, SettleAccountVersionCreateDto>();
CreateMap<SettleAccountVersion, SettleAccountVersionUpdateDto>();
CreateMap<SettleAccountVersionCreateDto, SettleAccountVersion>();
CreateMap<SettleAccountVersionUpdateDto, SettleAccountVersion>();
} }
/// <summary>
/// 大众FIS未结算明细导入
/// </summary>
private void CreateMapUnSettleAccount()
{
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountDto>().ReverseMap();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountCreateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountUpdateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountExportDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountCreateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountUpdateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
}
/// <summary>
/// 大众FIS未结算明细导入-版本
/// </summary>
private void CreateMapUnSettleAccountVersion()
{
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion, SettleAccountVersionDto>().ReverseMap();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion, SettleAccountVersionCreateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion, SettleAccountVersionUpdateDto>();
CreateMap<SettleAccountVersionCreateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
CreateMap<SettleAccountVersionUpdateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
}
#endregion #endregion
#region 天合
private void CreateMapMaterialRelationshipDetail() private void CreateMapMaterialRelationshipDetail()
@ -270,25 +449,9 @@ namespace Win.Sfs.SettleAccount
private void CreateMapInvoice()
{
CreateMap<Invoice, InvoiceDto>().ReverseMap();
CreateMap<Invoice, InvoiceRequestDto>().ReverseMap();
CreateMap<Invoice, InvoiceImportDto>().ReverseMap();
CreateMap<Invoice, InvoiceExportDto>().ReverseMap();
CreateMap<Invoice, InvoiceTHExportDto>().ReverseMap();
}
private void CreateMapInvoiceVersion()
{
CreateMap<InvoiceVersion, InvoiceVersionDto>().ReverseMap();
CreateMap<InvoiceVersion, InvoiceVersionRequestDto >().ReverseMap();
CreateMap<InvoiceVersion, InvoiceVersionImportDto >().ReverseMap();
CreateMap<InvoiceVersion, InvoiceVersionExportDto >().ReverseMap();
}
private void CreateMapEstimatedStockDiffReport() private void CreateMapEstimatedStockDiffReport()
@ -630,55 +793,6 @@ namespace Win.Sfs.SettleAccount
CreateMap<InventoryDetailImportDto, InventoryDetail>(); CreateMap<InventoryDetailImportDto, InventoryDetail>();
} }
private void CreateMapSettleAccount()
{
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, VWKanBanDto>().ReverseMap();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, VWKanBanCreateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, VWKanBantUpdateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, VWKanBanExportDto>();
CreateMap<VWKanBanCreateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
CreateMap<VWKanBantUpdateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
}
private void CreateMapSettleAccountVersion()
{
CreateMap<SettleAccountVersion, SettleAccountVersionDto>().ReverseMap();
CreateMap<SettleAccountVersion, SettleAccountVersionCreateDto>();
CreateMap<SettleAccountVersion, SettleAccountVersionUpdateDto>();
CreateMap<SettleAccountVersionCreateDto,SettleAccountVersion>();
CreateMap<SettleAccountVersionUpdateDto, SettleAccountVersion>();
}
private void CreateMapUnSettleAccount()
{
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, VWKanBanDto>().ReverseMap();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, VWKanBanCreateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, VWKanBantUpdateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount, VWKanBanExportDto>();
CreateMap<VWKanBanCreateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
CreateMap<VWKanBantUpdateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
}
private void CreateMapUnSettleAccountVersion()
{
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion, SettleAccountVersionDto>().ReverseMap();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion, SettleAccountVersionCreateDto>();
CreateMap<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion, SettleAccountVersionUpdateDto>();
CreateMap<SettleAccountVersionCreateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
CreateMap<SettleAccountVersionUpdateDto, Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
}
@ -1060,5 +1174,6 @@ namespace Win.Sfs.SettleAccount
//CreateMap<MaterialRelationshipVersion, MaterialRelationshipVersionImportDto>().ReverseMap(); //CreateMap<MaterialRelationshipVersion, MaterialRelationshipVersionImportDto>().ReverseMap();
//CreateMap<MaterialRelationshipVersion, MaterialRelationshipVersionExportDto>().ReverseMap(); //CreateMap<MaterialRelationshipVersion, MaterialRelationshipVersionExportDto>().ReverseMap();
} }
#endregion
} }
} }

14
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 namespace Win.Sfs.SettleAccount.Entities.Invoices
{ {
/// <summary>
/// 大众发票汇总导入
/// </summary>
public class Invoice : FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase public class Invoice : FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase
{ {
public Invoice() 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, public Invoice(Guid Id,string year, string period, string version, string factory,
string materialCode, string materialDesc, decimal qty, string materialCode, string materialDesc, decimal qty,
decimal amt):base(Id) decimal amt):base(Id)
@ -89,7 +101,7 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// 备注 /// 备注
/// </summary> /// </summary>
[Display(Name = "备注")] [Display(Name = "备注")]
public string Remark { set; get; } public string Extend { set; get; }
///// <summary> ///// <summary>
///// 记账号码 ///// 记账号码

28
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBan.cs

@ -27,7 +27,10 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
* *
* *
*/ */
public class KanBan : FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase /// <summary>
/// 大众看板
/// </summary>
public class KanBanSettle : FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase
{ {
/// <summary> /// <summary>
///年度 ///年度
@ -46,7 +49,6 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <summary> /// <summary>
/// 看板条码号 /// 看板条码号
/// </summary> /// </summary>
[Display(Name = "看板条码号")]
public string Kanban { set; get; } public string Kanban { set; get; }
/// <summary> /// <summary>
@ -79,38 +81,33 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
/// <summary> /// <summary>
/// 批次 /// 批次
/// </summary> /// </summary>
[Display(Name = "")]
public string Batch { set; get; } public string Batch { set; get; }
/// <summary> /// <summary>
/// 入库结算标识 /// 入库结算标识
/// </summary> /// </summary>
[Display(Name = "")]
public string Flag { set; get; } public string Flag { set; get; }
/// <summary> /// <summary>
/// 数量 /// 数量
/// </summary> /// </summary>
[Display(Name = "数量")]
public decimal Qty { set; get; } public decimal Qty { set; get; }
/// <summary> /// <summary>
/// R3结算时间 /// R3结算时间
/// </summary> /// </summary>
[Display(Name = "结算日期")]
public DateTime SettleDate { set; get; } public DateTime SettleDate { set; get; }
/// <summary> /// <summary>
/// 结算状态 /// 结算状态
/// </summary> /// </summary>
[Display(Name = "结算状态")] public string State { set; get; }
public int State { set; get; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>
[Display(Name = "备注")] [Display(Name = "备注")]
public string Remark { set; get; } public string Extend { set; get; }
public Guid ParentId { get; protected set; } public Guid ParentId { get; protected set; }
@ -123,9 +120,9 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
BranchId = branchId; BranchId = branchId;
ParentId = parentId; ParentId = parentId;
} }
public KanBan() public KanBanSettle()
{ } { }
public KanBan( public KanBanSettle(
Guid id, Guid id,
Guid branchId, Guid branchId,
string year, string year,
@ -141,14 +138,14 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
string batch, string batch,
string flag, string flag,
DateTime settleDate, DateTime settleDate,
int state, string state,
string remark,
Guid parentId, Guid parentId,
DateTime creationTime, //DateTime creationTime,
Guid guid) : base(id) Guid guid) : base(id)
{ {
BranchId = branchId; BranchId = branchId;
Year = year; Year = year;
Version = version;
Kanban = kanban; Kanban = kanban;
Relation = relation; Relation = relation;
Factory = factory; Factory = factory;
@ -161,9 +158,8 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
Flag = flag; Flag = flag;
SettleDate = settleDate; SettleDate = settleDate;
State = state; State = state;
Remark = remark;
ParentId = parentId; ParentId = parentId;
CreationTime = creationTime; //CreationTime = creationTime;
CreatorId = guid; CreatorId = guid;
} }

4
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/KanBan/KanBanManager.cs

@ -12,10 +12,10 @@ namespace Win.Sfs.SettleAccount.Entities.VWKanBan
{ {
public class KanBanManager:DomainService public class KanBanManager:DomainService
{ {
private readonly ISettleAccountBranchEfCoreRepository<KanBan, Guid> _repository; private readonly ISettleAccountBranchEfCoreRepository<KanBanSettle, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> _versionRepository; private readonly ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> _versionRepository;
public KanBanManager( public KanBanManager(
ISettleAccountBranchEfCoreRepository<KanBan, Guid> repository, ISettleAccountBranchEfCoreRepository<KanBanSettle, Guid> repository,
ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> versionRepository ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> versionRepository

8
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 namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{ {
/// <summary>
/// 大众准时化结算明细导入
/// </summary>
public class SettleAccount: FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase public class SettleAccount: FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase
{ {
@ -44,7 +47,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// </summary> /// </summary>
public DateTime CP5A { set; get; } public DateTime CP5A { set; get; }
/// <summary> /// <summary>
/// CP7 /// CP7日期
/// </summary> /// </summary>
public DateTime CP7 { set; get; } public DateTime CP7 { set; get; }
@ -72,9 +75,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
public Guid ParentId { get; protected set; } public Guid ParentId { get; protected set; }
public int state { get; set; } public int state { get; set; }
/// <summary> /// <summary>

5
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 namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{ {
/// <summary>
/// 大众FIS未结算明细导入
/// </summary>
public class UnSettleAccount: FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase public class UnSettleAccount: FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase
{ {
@ -44,7 +47,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// </summary> /// </summary>
public DateTime CP5A { set; get; } public DateTime CP5A { set; get; }
/// <summary> /// <summary>
/// CP7 /// CP7日期
/// </summary> /// </summary>
public DateTime CP7 { set; get; } public DateTime CP7 { set; get; }

101
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
{
/// <summary>
/// CP7报废和索赔
/// </summary>
public class ScrapClaims : FullAuditedAggregateRootBase<Guid>, 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;
}
//类型 零件号 零件名称 数 量 金 额
/// <summary>
///年
/// </summary>
[Display(Name = "年")]
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
[Display(Name = "版本号")]
public string Version { set; get; }
/// <summary>
/// 类型:CP7报废和索赔两种
/// </summary>
[Display(Name = "类型")]
public string Type { set; get; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string MaterialCode { get; set; }
/// <summary>
/// 零件名称
/// </summary>
[Display(Name = "零件名称")]
public string MaterialDesc { get; set; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
public decimal Qty { set; get; }
/// <summary>
/// 金额
/// </summary>
[Display(Name = "金额")]
public decimal Amt { set; get; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
public string Extend { set; get; }
}
}

47
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<Guid>, ISettleAccountEntityBase
{
public ScrapClaimsVersion()
{ }
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
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;
}
}
}

203
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/VWSparePart/SparePart.cs

@ -0,0 +1,203 @@
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
{
/// <summary>
/// 大众备件
/// </summary>
public class SparePart : FullAuditedAggregateRootBase<Guid>, ISettleAccountEntityBase
{
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,
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 单号
/// <summary>
///年
/// </summary>
[Display(Name = "年")]
public string Year { get; set; }
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本号
/// </summary>
[Display(Name = "版本号")]
public string Version { set; get; }
/// <summary>
/// 行号
/// </summary>
[Display(Name = "行号")]
public string LineNumber { set; get; }
/// <summary>
/// 采购类型
/// </summary>
[Display(Name = "采购类型")]
public string PurchaseType { get; set; }
/// <summary>
/// 采购订单号
/// </summary>
[Display(Name = "采购订单号")]
public string PurchaseOrderNo { get; set; }
/// <summary>
/// 采购订单行项目
/// </summary>
[Display(Name = "采购订单行项目")]
public string PurchaseOrderNoItem { get; set; }
/// <summary>
/// 采购订单文本
/// </summary>
[Display(Name = "采购订单文本")]
public string PurchaseOrderNoText { get; set; }
/// <summary>
/// 收货数量
/// </summary>
[Display(Name = "收货数量")]
public decimal ReceiptQty { get; set; }
/// <summary>
/// 开票数量
/// </summary>
[Display(Name = "开票数量")]
public decimal InvoicedQty { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
[Display(Name = "不含税金额")]
public decimal AmountNoTax { get; set; }
/// <summary>
/// 采购价格不含税
/// </summary>
[Display(Name = "采购价格不含税")]
public decimal PurchasePriceNoTax { get; set; }
/// <summary>
/// 科目号
/// </summary>
[Display(Name = "科目号")]
public string AccountNum { get; set; }
/// <summary>
/// 物料代码
/// </summary>
[Display(Name = "物料代码")]
public string MaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 日期
/// </summary>
[Display(Name = "日期")]
public DateTime SpareDate { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[Display(Name = "交货单号")]
public string DeliveryOrderNo { get; set; }
/// <summary>
/// 交货行号
/// </summary>
[Display(Name = "交货行号")]
public string DeliveryLineNum { get; set; }
/// <summary>
/// 批次号
/// </summary>
[Display(Name = "批次号")]
public string BatchNo { get; set; }
/// <summary>
/// 单位
/// </summary>
[Display(Name = "单位")]
public string Unit { get; set; }
/// <summary>
/// 税率
/// </summary>
[Display(Name = "税率")]
public decimal TaxRate { get; set; }
/// <summary>
/// 税码
/// </summary>
[Display(Name = "税码")]
public string TaxCode { get; set; }
/// <summary>
/// 德国发票号
/// </summary>
[Display(Name = "德国发票号")]
public string GermanInvoiceNo { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// 工厂名称
/// </summary>
[Display(Name = "工厂名称")]
public string FactoryName { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
public string Extend { set; get; }
}
}

47
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<Guid>, ISettleAccountEntityBase
{
public SparePartVersion()
{ }
public string Year { get; private set; }
/// <summary>
/// 期间
/// </summary>
public string Period { get; private set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
/// <summary>
/// 客户号
/// </summary>
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;
}
}
}

395
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.SettlementCrossReference;
using Win.Sfs.SettleAccount.Entities.SecMatch; using Win.Sfs.SettleAccount.Entities.SecMatch;
using Win.Sfs.SettleAccount.Entities.VWKanBan; using Win.Sfs.SettleAccount.Entities.VWKanBan;
using Win.Sfs.SettleAccount.Entities.VWScrapClaims;
using Win.Sfs.SettleAccount.Entities.VWSparePart;
namespace Win.Sfs.SettleAccount namespace Win.Sfs.SettleAccount
{ {
@ -83,7 +85,7 @@ namespace Win.Sfs.SettleAccount
// optionsAction?.Invoke(options); // optionsAction?.Invoke(options);
#region old #region 天合
//产品结构 //产品结构
builder.ConfigureBom(options); builder.ConfigureBom(options);
@ -108,8 +110,8 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureMaterial(options); builder.ConfigureMaterial(options);
builder.ConfigureEstimatedInventoryDetail(options); builder.ConfigureEstimatedInventoryDetail(options);
builder.ConfigureInventoryDetail(options); builder.ConfigureInventoryDetail(options);
builder.ConfigureSettleAccount(options);
builder.ConfigureUnSettleAccount(options);
builder.ConfigureMaterialRelationship(options); builder.ConfigureMaterialRelationship(options);
builder.ConfigureFIS(options); builder.ConfigureFIS(options);
builder.ConfigureFISExtend(options); builder.ConfigureFISExtend(options);
@ -125,8 +127,8 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureEstimatedSumVersion(options); builder.ConfigureEstimatedSumVersion(options);
builder.ConfigureEstimatedInventoryVersion(options); builder.ConfigureEstimatedInventoryVersion(options);
builder.ConfigureInventoryDetailVersion(options); builder.ConfigureInventoryDetailVersion(options);
builder.ConfigureSettleAccountVersion(options);
builder.ConfigureUnSettleAccountVersion(options);
builder.ConfigureSecondaryAdjustmentVersion(options); builder.ConfigureSecondaryAdjustmentVersion(options);
builder.ConfigureSecondaryPriceRatioVersion(options); builder.ConfigureSecondaryPriceRatioVersion(options);
@ -240,9 +242,7 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureTaskJob(options); builder.ConfigureTaskJob(options);
builder.ConfigureImportMap(options); builder.ConfigureImportMap(options);
builder.ConfigureInvoice(options);
builder.ConfigureInvoiceVersion(options);
builder.ConfigureInvoiceSettledDiff(options); builder.ConfigureInvoiceSettledDiff(options);
@ -265,6 +265,30 @@ namespace Win.Sfs.SettleAccount
#endregion #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);
#endregion
} }
#region PG-派格 #region PG-派格
@ -274,13 +298,13 @@ namespace Win.Sfs.SettleAccount
/// </summary> /// </summary>
/// <param name="builder"></param> /// <param name="builder"></param>
/// <param name="options"></param> /// <param name="options"></param>
private static void ConfigureKanBanVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) private static void ConfigureKanBan(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{ {
builder.Entity<KanBan>(b => builder.Entity<KanBanSettle>(b =>
{ {
b.ToTable($"{options.TablePrefix}_VWKanBan", options.Schema); b.ToTable($"{options.TablePrefix}_KanBanSettle", options.Schema);
b.ConfigureByConvention(); b.ConfigureByConvention();
b.Property(x => x.Kanban).IsRequired().HasMaxLength(150);//必填项 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<KanBanVersion>(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);
});
}
/// <summary> /// <summary>
/// 大众发票汇总导入 /// 大众发票汇总导入
/// </summary> /// </summary>
@ -320,12 +359,249 @@ namespace Win.Sfs.SettleAccount
}); });
} }
/// <summary>
/// 大众发票汇总导入-版本
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureInvoiceVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<InvoiceVersion>(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);
});
}
/// <summary>
/// CP7报废和索赔
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureScrapClaims(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<ScrapClaims>(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);
});
}
/// <summary>
/// CP7报废和索赔-版本
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureScrapClaimsVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<ScrapClaimsVersion>(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);
});
}
/// <summary>
/// 大众备件发票导入
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureSparePart(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<SparePart>(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);
});
}
/// <summary>
/// 大众备件发票导入-版本
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureSparePartVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<SparePartVersion>(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);
});
}
/// <summary>
/// 大众FIS未结算明细导入
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureUnSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<UnSettleAccount>(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();
});
}
/// <summary>
/// 大众FIS未结算明细导入-版本
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureUnSettleAccountVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<UnSettleAccountVersion>(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);
});
}
/// <summary>
/// 大众准时化结算明细导入
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureSettleAccount(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>(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 });
});
}
/// <summary>
/// 大众准时化结算明细导入-版本
/// </summary>
/// <param name="builder"></param>
/// <param name="options"></param>
private static void ConfigureSettleAccountVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<SettleAccountVersion>(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 #endregion
#region old #region 天合
private static void ConfigureHangfire(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) 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<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>(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<UnSettleAccount>(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) private static void ConfigureEstimatedInventoryDetail(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{ {
builder.Entity<EstimatedInventoryDetail>(b => builder.Entity<EstimatedInventoryDetail>(b =>
@ -1333,42 +1560,10 @@ namespace Win.Sfs.SettleAccount
b.HasIndex(x => new {x.Version,x.Factory }).IsUnique().HasFilter(IsDeletedFilter); b.HasIndex(x => new {x.Version,x.Factory }).IsUnique().HasFilter(IsDeletedFilter);
}); });
} }
private static void ConfigureSettleAccountVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<SettleAccountVersion>(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<UnSettleAccountVersion>(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) 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<InvoiceVersion>(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) private static void ConfigureSettlementPartVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)

3
src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs

@ -15,6 +15,9 @@ using Win.Sfs.SettleAccount.Repository.SettleAccount;
namespace TaskJob.Services namespace TaskJob.Services
{ {
/// <summary>
/// 大众FIS未结数据-服务
/// </summary>
public class UnSettleAccountImportService : ITransientDependency, IImportJob public class UnSettleAccountImportService : ITransientDependency, IImportJob
{ {
private readonly UnSettleAccountRepository _repository; private readonly UnSettleAccountRepository _repository;

Loading…
Cancel
Save