Administrator
3 years ago
53 changed files with 16383 additions and 377 deletions
File diff suppressed because it is too large
@ -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"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -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); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -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; } |
|||
|
|||
} |
|||
} |
@ -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); |
|||
|
|||
} |
|||
} |
@ -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; } |
|||
} |
|||
} |
@ -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; } |
|||
} |
|||
} |
@ -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; } |
|||
|
|||
} |
|||
} |
@ -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; } |
|||
|
|||
|
|||
} |
|||
} |
@ -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; } |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -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; } |
|||
|
|||
} |
|||
} |
@ -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; } |
|||
|
|||
|
|||
} |
|||
} |
@ -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); |
|||
|
|||
} |
|||
} |
@ -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; } |
|||
} |
|||
} |
@ -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; } |
|||
} |
|||
} |
@ -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; } |
|||
|
|||
} |
|||
} |
@ -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; } |
|||
|
|||
|
|||
} |
|||
} |
@ -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; } |
|||
|
|||
} |
|||
} |
@ -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; } |
|||
} |
|||
} |
@ -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; } |
|||
|
|||
|
|||
} |
|||
} |
@ -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); |
|||
} |
|||
|
|||
} |
|||
} |
@ -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); |
|||
} |
|||
|
|||
} |
|||
} |
@ -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; } |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -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; |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
} |
@ -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; } |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -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; |
|||
|
|||
} |
|||
|
|||
|
|||
} |
|||
} |
Loading…
Reference in new issue