73 changed files with 1527 additions and 208267 deletions
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,80 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202108300001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "Set_MaterialRelationshipDetail", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Version = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
CustomerCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
ErpMaterialCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
MaterialDesc = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
MaterialProperty = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SettleMaterialCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
ShipMaterailCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
AppraisalCategory = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Qty = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(50)", maxLength: 50, 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(50)", maxLength: 50, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_Set_MaterialRelationshipDetail", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "Set_MaterialRelationshipVersion", |
|||
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), |
|||
Factory = 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(50)", maxLength: 50, 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(50)", maxLength: 50, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_Set_MaterialRelationshipVersion", x => x.Id); |
|||
}); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Set_MaterialRelationshipDetail"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "Set_MaterialRelationshipVersion"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,95 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _201209010001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
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_settlement_part", |
|||
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), |
|||
CustomerCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true), |
|||
Factory = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true), |
|||
Model = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Version = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true), |
|||
SettlementPartCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false), |
|||
SettlementPartDesc = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true), |
|||
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
Uom = 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_settlement_part", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_settle_version_Version", |
|||
table: "Set_settle_version", |
|||
column: "Version", |
|||
unique: true, |
|||
filter: "IsDeleted=0"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_settlement_part_Period_CustomerCode_Version_SettlementPartCode", |
|||
table: "Set_settlement_part", |
|||
columns: new[] { "Period", "CustomerCode", "Version", "SettlementPartCode" }, |
|||
unique: true, |
|||
filter: "IsDeleted=0"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Set_settle_version"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "Set_settlement_part"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,39 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202109010002 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_Set_InvoiceVersion", |
|||
table: "Set_InvoiceVersion"); |
|||
|
|||
migrationBuilder.RenameTable( |
|||
name: "Set_InvoiceVersion", |
|||
newName: "Set_settlement_part_version"); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_Set_settlement_part_version", |
|||
table: "Set_settlement_part_version", |
|||
column: "Id"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_Set_settlement_part_version", |
|||
table: "Set_settlement_part_version"); |
|||
|
|||
migrationBuilder.RenameTable( |
|||
name: "Set_settlement_part_version", |
|||
newName: "Set_InvoiceVersion"); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_Set_InvoiceVersion", |
|||
table: "Set_InvoiceVersion", |
|||
column: "Id"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,45 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202109020001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
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), |
|||
Factory = 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); |
|||
}); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Set_InvoiceVersion"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,61 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _20210908 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "Set_item_invoice_price", |
|||
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), |
|||
Factory = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: true), |
|||
MaterialCode = table.Column<string>(type: "nvarchar(36)", maxLength: 36, nullable: false), |
|||
MaterialDesc = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
UM = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Sales = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
SubAcct = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
CC = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Backorder = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
ExtendedPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
ExtendedMargin = table.Column<decimal>(type: "decimal(18,2)", 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_item_invoice_price", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_item_invoice_price_Period_Version_MaterialCode", |
|||
table: "Set_item_invoice_price", |
|||
columns: new[] { "Period", "Version", "MaterialCode" }, |
|||
unique: true, |
|||
filter: "IsDeleted=0"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Set_item_invoice_price"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,45 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _2021090801 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "Set_item_invoice_price_version", |
|||
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), |
|||
Factory = 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_item_invoice_price_version", x => x.Id); |
|||
}); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Set_item_invoice_price_version"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,34 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class data0902 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpMaterialCode", |
|||
table: "Set_fis", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "SettleState", |
|||
table: "Set_fis", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "ErpMaterialCode", |
|||
table: "Set_fis"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SettleState", |
|||
table: "Set_fis"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,75 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202109110001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Set_fis_ChassisNumber2_Version_Model_ItemCode", |
|||
table: "Set_fis"); |
|||
|
|||
migrationBuilder.AddColumn<decimal>( |
|||
name: "DiffQty", |
|||
table: "Set_InvoiceSettledDiff", |
|||
type: "decimal(18,2)", |
|||
nullable: false, |
|||
defaultValue: 0m); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Version", |
|||
table: "Set_InvoiceSettledDiff", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpMaterialCode", |
|||
table: "Set_fis_extend", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "SettleState", |
|||
table: "Set_fis_extend", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_fis_ChassisNumber2_Version_Model_ItemCode", |
|||
table: "Set_fis", |
|||
columns: new[] { "ChassisNumber2", "Version", "Model", "ItemCode" }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Set_fis_ChassisNumber2_Version_Model_ItemCode", |
|||
table: "Set_fis"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "DiffQty", |
|||
table: "Set_InvoiceSettledDiff"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Version", |
|||
table: "Set_InvoiceSettledDiff"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpMaterialCode", |
|||
table: "Set_fis_extend"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SettleState", |
|||
table: "Set_fis_extend"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_fis_ChassisNumber2_Version_Model_ItemCode", |
|||
table: "Set_fis", |
|||
columns: new[] { "ChassisNumber2", "Version", "Model", "ItemCode" }, |
|||
unique: true, |
|||
filter: "[ChassisNumber2] IS NOT NULL AND [Model] IS NOT NULL"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,93 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202109230001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Model", |
|||
table: "Set_fis", |
|||
type: "nvarchar(36)", |
|||
maxLength: 36, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "KENNCode", |
|||
table: "Set_fis", |
|||
type: "nvarchar(36)", |
|||
maxLength: 36, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(450)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "ErpMaterialCode", |
|||
table: "Set_fis", |
|||
type: "nvarchar(36)", |
|||
maxLength: 36, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "ChassisNumber2", |
|||
table: "Set_fis", |
|||
type: "nvarchar(36)", |
|||
maxLength: 36, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(450)", |
|||
oldNullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Model", |
|||
table: "Set_fis", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(36)", |
|||
oldMaxLength: 36, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "KENNCode", |
|||
table: "Set_fis", |
|||
type: "nvarchar(450)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(36)", |
|||
oldMaxLength: 36, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "ErpMaterialCode", |
|||
table: "Set_fis", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(36)", |
|||
oldMaxLength: 36, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "ChassisNumber2", |
|||
table: "Set_fis", |
|||
type: "nvarchar(450)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(36)", |
|||
oldMaxLength: 36, |
|||
oldNullable: true); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,57 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202109230003 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "YearKennCode", |
|||
table: "Set_prebatch", |
|||
type: "nvarchar(36)", |
|||
maxLength: 36, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(36)", |
|||
oldMaxLength: 36); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "CarCode", |
|||
table: "Set_prebatch", |
|||
type: "nvarchar(36)", |
|||
maxLength: 36, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(36)", |
|||
oldMaxLength: 36); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "YearKennCode", |
|||
table: "Set_prebatch", |
|||
type: "nvarchar(36)", |
|||
maxLength: 36, |
|||
nullable: false, |
|||
defaultValue: "", |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(36)", |
|||
oldMaxLength: 36, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "CarCode", |
|||
table: "Set_prebatch", |
|||
type: "nvarchar(36)", |
|||
maxLength: 36, |
|||
nullable: false, |
|||
defaultValue: "", |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(36)", |
|||
oldMaxLength: 36, |
|||
oldNullable: true); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,24 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class data20190928 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Year", |
|||
table: "Set_prebatch", |
|||
type: "nvarchar(36)", |
|||
maxLength: 36, |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "Year", |
|||
table: "Set_prebatch"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,55 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _2021093001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "Set_SettlementPakAndSpareParts", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Period = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
ApplicableFunction = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SettlementPartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
SettlementPartDesc = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
ErpSparePartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
ErpSparePartName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PartType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
QADCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SupplierCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SupplierName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
ProductLine = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PerCarNum = table.Column<decimal>(type: "decimal(18,2)", maxLength: 50, nullable: false), |
|||
Price = table.Column<decimal>(type: "decimal(18,2)", maxLength: 50, nullable: false), |
|||
SupplyProportion = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
QuantityPrice = table.Column<decimal>(type: "decimal(18,2)", maxLength: 50, 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_SettlementPakAndSpareParts", x => x.Id); |
|||
}); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Set_SettlementPakAndSpareParts"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,58 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _2021100801 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "Set_SettlementCrossReference", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Period = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
Model = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Factory = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PartType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SettlementMaterialCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
BomMaterialCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
MaterialDesc = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SupplierCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SupplierDesc = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Buyer = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Version = 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_SettlementCrossReference", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_SettlementCrossReference_Period_SettlementMaterialCode_BomMaterialCode", |
|||
table: "Set_SettlementCrossReference", |
|||
columns: new[] { "Period", "SettlementMaterialCode", "BomMaterialCode" }, |
|||
unique: true, |
|||
filter: "IsDeleted=0"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Set_SettlementCrossReference"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,23 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _2021100802 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Version", |
|||
table: "Set_SettlementPakAndSpareParts", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "Version", |
|||
table: "Set_SettlementPakAndSpareParts"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,126 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _2021100901 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Version", |
|||
table: "Set_SettlementPakAndSpareParts", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CustomerCode", |
|||
table: "Set_SettlementPakAndSpareParts", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Version", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "Set_SettlementCrossReference_Version", |
|||
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), |
|||
Factory = 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_SettlementCrossReference_Version", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "Set_SettlementPakAndSpareParts_Version", |
|||
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), |
|||
Factory = 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_SettlementPakAndSpareParts_Version", x => x.Id); |
|||
}); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Set_SettlementCrossReference_Version"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "Set_SettlementPakAndSpareParts_Version"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CustomerCode", |
|||
table: "Set_SettlementPakAndSpareParts"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Version", |
|||
table: "Set_SettlementPakAndSpareParts", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Version", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,24 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _2021100902 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CustomerCode", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "CustomerCode", |
|||
table: "Set_SettlementCrossReference"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,23 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _2021100900012 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Model", |
|||
table: "Set_SettlementPakAndSpareParts", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "Model", |
|||
table: "Set_SettlementPakAndSpareParts"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,17 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202110100001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
|
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,62 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202110100002 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "Set_SecMatchBase", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Version = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Index = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Factory = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Model = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
PartType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SettleMentPartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
MaterialPartCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
MaterialDesc = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SupplierCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SupplierName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
UsedNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
SupplyProportion = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Buyer = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true), |
|||
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
SettlementPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
DiffPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
SettlementNumber = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
TheoreticalSettlementNumber = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
RealSettlementNumber = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
RealSettlementPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
IsDiffNumber = table.Column<bool>(type: "bit", nullable: false), |
|||
DiffAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: false), |
|||
Remark = 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(50)", maxLength: 50, 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) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_Set_SecMatchBase", x => x.Id); |
|||
}); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "Set_SecMatchBase"); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,89 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202110110001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "SupplierDesc", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(128)", |
|||
maxLength: 128, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<decimal>( |
|||
name: "UsedNumber", |
|||
table: "Set_SecMatchBase", |
|||
type: "decimal(18,2)", |
|||
maxLength: 50, |
|||
nullable: false, |
|||
defaultValue: 0m, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<decimal>( |
|||
name: "SupplyProportion", |
|||
table: "Set_SecMatchBase", |
|||
type: "decimal(18,2)", |
|||
maxLength: 50, |
|||
nullable: false, |
|||
defaultValue: 0m, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "IsSettle", |
|||
table: "Set_SecMatchBase", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "IsSettle", |
|||
table: "Set_SecMatchBase"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "SupplierDesc", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(128)", |
|||
oldMaxLength: 128, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "UsedNumber", |
|||
table: "Set_SecMatchBase", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(decimal), |
|||
oldType: "decimal(18,2)", |
|||
oldMaxLength: 50); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "SupplyProportion", |
|||
table: "Set_SecMatchBase", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(decimal), |
|||
oldType: "decimal(18,2)", |
|||
oldMaxLength: 50); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,68 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _20211012 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Version", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: false, |
|||
defaultValue: "", |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Period", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(50)", |
|||
oldMaxLength: 50); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Year", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "Year", |
|||
table: "Set_SettlementCrossReference"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Version", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(50)", |
|||
oldMaxLength: 50); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Period", |
|||
table: "Set_SettlementCrossReference", |
|||
type: "nvarchar(50)", |
|||
maxLength: 50, |
|||
nullable: false, |
|||
defaultValue: "", |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(50)", |
|||
oldMaxLength: 50, |
|||
oldNullable: true); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,35 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _2021101201 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Set_SettlementCrossReference_Period_SettlementMaterialCode_BomMaterialCode", |
|||
table: "Set_SettlementCrossReference"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_SettlementCrossReference_Version_SettlementMaterialCode_BomMaterialCode", |
|||
table: "Set_SettlementCrossReference", |
|||
columns: new[] { "Version", "SettlementMaterialCode", "BomMaterialCode" }, |
|||
unique: true, |
|||
filter: "IsDeleted=0"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Set_SettlementCrossReference_Version_SettlementMaterialCode_BomMaterialCode", |
|||
table: "Set_SettlementCrossReference"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_SettlementCrossReference_Period_SettlementMaterialCode_BomMaterialCode", |
|||
table: "Set_SettlementCrossReference", |
|||
columns: new[] { "Period", "SettlementMaterialCode", "BomMaterialCode" }, |
|||
unique: true, |
|||
filter: "IsDeleted=0"); |
|||
} |
|||
} |
|||
} |
@ -1,12 +1,30 @@ |
|||
using System; |
|||
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 Win.Sfs.SettleAccount.Entities.Invoices.Win.Sfs.SettleAccount.Entities.Invoices; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.Invoices |
|||
{ |
|||
public interface IInvoiceAppService |
|||
{ |
|||
Task<string> InvoiceUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory); |
|||
|
|||
Task<InvoiceDto> GetAsync(Guid id); |
|||
Task<PagedResultDto<InvoiceDto>> GetListAsync(InvoiceRequestDto input); |
|||
|
|||
Task<ListResultDto<InvoiceDto>> GetAllAsync(Guid branchId); |
|||
Task<InvoiceDto> UpdateAsync(Guid id, InvoiceDto input); |
|||
Task DeleteAsync(Guid id); |
|||
|
|||
Task<bool> DeleteListAsync(List<Guid> ids); |
|||
Task<PagedResultDto<InvoiceVersionDto>> GetVersionListAsync(InvoiceVersionRequestDto input); |
|||
|
|||
Task<string> ExportAsync(InvoiceRequestDto input); |
|||
|
|||
} |
|||
} |
|||
|
@ -0,0 +1,131 @@ |
|||
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.Application.Services; |
|||
using Win.Sfs.SettleAccount.Entities.VWKanBanVersion; |
|||
|
|||
using Win.Sfs.Shared.ApplicationBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.VWKanBan |
|||
{ |
|||
public interface IVWKanBanAppService |
|||
|
|||
{ |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 导入功能
|
|||
/// </summary>
|
|||
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
|
|||
/// <returns></returns>
|
|||
|
|||
Task<string> VWKanBanUploadExcelImport([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<VWKanBanDto> GetAsync(Guid id); |
|||
|
|||
/// <summary>
|
|||
/// 根据筛选条件获取实体列表
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
|
|||
/// </remarks>
|
|||
/// <param name="input">请求条件</param>
|
|||
/// <returns>实体DTO列表</returns>
|
|||
|
|||
Task<PagedResultDto<VWKanBanDto>> GetListAsync(Guid parentId, VWKanBanRequestDto input); |
|||
|
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 根据筛选条件获取实体列表
|
|||
/// </summary>
|
|||
/// <remarks>
|
|||
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
|
|||
/// </remarks>
|
|||
/// <param name="input">请求条件</param>
|
|||
/// <returns>实体DTO列表</returns>
|
|||
|
|||
Task<PagedResultDto<VWKanBanVersionDto>> GetVersionListAsync(VWKanBanVersionRequestDto input); |
|||
|
|||
|
|||
Task<string> ExportAsync(VWKanBanRequestDto input); |
|||
|
|||
/// <summary>
|
|||
/// 获取实体总数
|
|||
/// </summary>
|
|||
/// <returns>实体总数</returns>
|
|||
|
|||
Task<long> GetTotalCountAsync(Guid branchId); |
|||
|
|||
|
|||
///// <summary>
|
|||
///// 获取全部实体列表
|
|||
///// </summary>
|
|||
///// <returns>实体DTO列表</returns>
|
|||
|
|||
//Task<ListResultDto<SettleAccountDto>> GetAllAsync(Guid branchId);
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
///// <summary>
|
|||
///// 新增实体
|
|||
///// </summary>
|
|||
///// <param name="input">新增实体DTO</param>
|
|||
///// <returns>实体DTO</returns>
|
|||
|
|||
|
|||
//Task<SettleAccountDto> CreateAsync(SettleAccountCreateDto input);
|
|||
|
|||
|
|||
///// <summary>
|
|||
///// 修改实体
|
|||
///// </summary>
|
|||
///// <param name="id">ID</param>
|
|||
///// <param name="input">修改实体DTO</param>
|
|||
///// <returns>实体DTO</returns>
|
|||
|
|||
//Task<SettleAccountDto> UpdateAsync(Guid id, SettleAccountUpdateDto input);
|
|||
|
|||
|
|||
|
|||
|
|||
///// <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,16 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win.Sfs.SettleAccount.Entities.VWKanBan; |
|||
using Win.Sfs.Shared; |
|||
using Win.Sfs.Shared.DomainBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts |
|||
{ |
|||
public class VWKanBanCreateDto : VWKanBanDtoBase, IBranch<Guid> |
|||
{ |
|||
public virtual Guid BranchId { get ; set ; } |
|||
} |
|||
} |
@ -0,0 +1,85 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win.Sfs.Shared; |
|||
using Win.Sfs.Shared.DomainBase; |
|||
using Win.Sfs.Shared.DtoBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.VWKanBan |
|||
{ |
|||
public class VWKanBanDto: AuditedEntityDtoBase<Guid> |
|||
{ |
|||
/// <summary>
|
|||
/// 期间
|
|||
/// </summary>
|
|||
public string Period { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 版本
|
|||
/// </summary>
|
|||
public virtual string Version { get; set; } |
|||
|
|||
/// <summary>
|
|||
///看板条码号
|
|||
/// </summary>
|
|||
public string Kanban { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 入库关联号
|
|||
/// </summary>
|
|||
public virtual string Relation { set; get; } |
|||
/// <summary>
|
|||
/// 工厂
|
|||
/// </summary>
|
|||
public virtual string Factory { set; get; } |
|||
/// <summary>
|
|||
/// 零件号
|
|||
/// </summary>
|
|||
public virtual string MaterialCode { set; get; } |
|||
/// <summary>
|
|||
/// 零件类型
|
|||
/// </summary>
|
|||
public virtual string PartType { set; get; } |
|||
/// <summary>
|
|||
/// R3入库时间
|
|||
/// </summary>
|
|||
public virtual DateTime SettleInputDate { set; get; } |
|||
|
|||
|
|||
/// <summary>
|
|||
///供应商编码
|
|||
/// </summary>
|
|||
public virtual string SupplierCode { get; set; } |
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
public virtual decimal Qty { get; set; } |
|||
/// <summary>
|
|||
/// 批次
|
|||
/// </summary>
|
|||
|
|||
public virtual string Batch { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入库结算标识
|
|||
/// </summary>
|
|||
public virtual string Flag { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结算日期
|
|||
/// </summary>
|
|||
public virtual DateTime SettleDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结算状态
|
|||
/// </summary>
|
|||
public virtual int State { get ; set ; } |
|||
|
|||
/// <summary>
|
|||
/// 备注
|
|||
/// </summary>
|
|||
public virtual string Remark { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,86 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win.Sfs.Shared.DomainBase; |
|||
using Win.Sfs.Shared.DtoBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.VWKanBan |
|||
{ |
|||
public class VWKanBanDtoBase: CreateOrUpdateEntityDtoBase<Guid> |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 期间
|
|||
/// </summary>
|
|||
public string Period { set; get; } |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
///看板条码号
|
|||
/// </summary>
|
|||
public string Kanban { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 入库关联号
|
|||
/// </summary>
|
|||
public virtual string Relation { set; get; } |
|||
/// <summary>
|
|||
/// 工厂
|
|||
/// </summary>
|
|||
public virtual string Factory { set; get; } |
|||
/// <summary>
|
|||
/// 零件号
|
|||
/// </summary>
|
|||
public virtual string MaterialCode { set; get; } |
|||
/// <summary>
|
|||
/// 零件类型
|
|||
/// </summary>
|
|||
public virtual string PartType { set; get; } |
|||
/// <summary>
|
|||
/// R3入库时间
|
|||
/// </summary>
|
|||
public virtual DateTime SettleInputDate { set; get; } |
|||
|
|||
|
|||
/// <summary>
|
|||
///供应商编码
|
|||
/// </summary>
|
|||
public virtual string SupplierCode { get; set; } |
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
public virtual decimal Qty { get; set; } |
|||
/// <summary>
|
|||
/// 批次
|
|||
/// </summary>
|
|||
|
|||
public virtual string Batch { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入库结算标识
|
|||
/// </summary>
|
|||
public virtual string Flag { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结算日期
|
|||
/// </summary>
|
|||
public virtual DateTime SettleDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结算状态
|
|||
/// </summary>
|
|||
public virtual int State { get; set; } |
|||
|
|||
|
|||
public virtual string Version { get; set; } |
|||
/// <summary>
|
|||
/// 备注
|
|||
/// </summary>
|
|||
public virtual string Remark { get; set; } |
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,93 @@ |
|||
using Magicodes.ExporterAndImporter.Core; |
|||
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.VWKanBan |
|||
{ |
|||
public class VWKanBanExportDto |
|||
{ |
|||
|
|||
/// <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 Kanban { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 入库关联号
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "入库关联号")] |
|||
public virtual string Relation { set; get; } |
|||
/// <summary>
|
|||
/// 工厂
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "工厂")] |
|||
public virtual string Factory { set; get; } |
|||
/// <summary>
|
|||
/// 零件号
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "零件号")] |
|||
public virtual string MaterialCode { set; get; } |
|||
/// <summary>
|
|||
/// 零件类型
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "零件类型")] |
|||
public virtual string PartType { set; get; } |
|||
/// <summary>
|
|||
/// R3入库日期
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "R3入库日期")] |
|||
public virtual DateTime SettleInputDate { set; get; } |
|||
|
|||
|
|||
/// <summary>
|
|||
///供应商编码
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "供应商")] |
|||
public virtual string SupplierCode { get; set; } |
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "数量")] |
|||
public virtual decimal Qty { get; set; } |
|||
/// <summary>
|
|||
/// 批次
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "批次")] |
|||
public virtual string Batch { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入库结算标识
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "入库结算标识")] |
|||
public virtual string Flag { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结算日期
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "R3结算时间")] |
|||
public virtual DateTime SettleDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结算状态
|
|||
/// </summary>
|
|||
[ExporterHeader(DisplayName = "结算状态")] |
|||
public virtual int State { get; set; } |
|||
} |
|||
} |
@ -0,0 +1,95 @@ |
|||
using Magicodes.ExporterAndImporter.Core; |
|||
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.VWKanBan |
|||
{ |
|||
public class VWKanBanImportDto |
|||
{ |
|||
|
|||
/// <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 DateTime 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 DateTime SettleDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结算状态
|
|||
/// </summary>
|
|||
[ImporterHeader(Name = "结算状态")] |
|||
public virtual int State { get; set; } |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,94 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win.Sfs.Shared; |
|||
using Win.Sfs.Shared.DomainBase; |
|||
using Win.Sfs.Shared.DtoBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.VWKanBan |
|||
{ |
|||
public class VWKanBanRequestDto: RequestDtoBase |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// 期间
|
|||
/// </summary>
|
|||
public string Period { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 版本
|
|||
/// </summary>
|
|||
public virtual string Version { get; set; } |
|||
|
|||
/// <summary>
|
|||
///看板条码号
|
|||
/// </summary>
|
|||
public string Kanban { set; get; } |
|||
|
|||
/// <summary>
|
|||
/// 入库关联号
|
|||
/// </summary>
|
|||
public virtual string Relation { set; get; } |
|||
/// <summary>
|
|||
/// 工厂
|
|||
/// </summary>
|
|||
public virtual string Factory { set; get; } |
|||
/// <summary>
|
|||
/// 零件号
|
|||
/// </summary>
|
|||
public virtual string MaterialCode { set; get; } |
|||
/// <summary>
|
|||
/// 零件类型
|
|||
/// </summary>
|
|||
public virtual string PartType { set; get; } |
|||
/// <summary>
|
|||
/// R3入库时间
|
|||
/// </summary>
|
|||
public virtual DateTime SettleInputDate { set; get; } |
|||
|
|||
|
|||
/// <summary>
|
|||
///供应商编码
|
|||
/// </summary>
|
|||
public virtual string SupplierCode { get; set; } |
|||
/// <summary>
|
|||
/// 数量
|
|||
/// </summary>
|
|||
public virtual decimal Qty { get; set; } |
|||
/// <summary>
|
|||
/// 批次
|
|||
/// </summary>
|
|||
|
|||
public virtual string Batch { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 入库结算标识
|
|||
/// </summary>
|
|||
public virtual string Flag { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结算日期
|
|||
/// </summary>
|
|||
public virtual DateTime SettleDate { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 结算状态
|
|||
/// </summary>
|
|||
public virtual int State { get; set; } |
|||
|
|||
/// <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,103 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Win.Sfs.Shared; |
|||
using Win.Sfs.Shared.DomainBase; |
|||
using Win.Sfs.Shared.DtoBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.VWKanBanVersion |
|||
{ |
|||
/// <summary>
|
|||
/// SettleAccountVersion
|
|||
/// </summary>
|
|||
public class VWKanBanVersionDtoBase : 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 VWKanBanVersionDto : 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 VWKanBanVersionCreateDto : VWKanBanVersionDtoBase |
|||
{ } |
|||
public class VWKanBanVersionUpdateDto : VWKanBanVersionDtoBase |
|||
{ } |
|||
public class VWKanBanVersionRequestDto : 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 VWKanBanVersionImportDto |
|||
{ |
|||
|
|||
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,16 @@ |
|||
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.VWKanBan |
|||
{ |
|||
public class VWKanBantUpdateDto: VWKanBanDtoBase |
|||
{ |
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,316 @@ |
|||
using Magicodes.ExporterAndImporter.Core; |
|||
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.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.ExcelImporter; |
|||
using Win.Sfs.SettleAccount.ExportReports; |
|||
using Win.Sfs.Shared.Filter; |
|||
using EFCore.BulkExtensions; |
|||
using Win.Sfs.SettleAccount.Constant; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Win.Sfs.SettleAccount.Entities.VWKanBanVersion; |
|||
using Magicodes.ExporterAndImporter.Csv; |
|||
using Magicodes.ExporterAndImporter.Excel; |
|||
using Shouldly; |
|||
|
|||
|
|||
|
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.VWKanBan |
|||
{ |
|||
/// <summary>
|
|||
/// 大众看板结算明细导入
|
|||
/// </summary>
|
|||
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
|
|||
//[AllowAnonymous]
|
|||
[Route("api/settleaccount/VWKanBan")] |
|||
public class VWKanBanAppService : SettleAccountApplicationBase<KanBan>, IVWKanBanAppService |
|||
{ |
|||
private readonly IGuidGenerator _guidGenerator; |
|||
|
|||
private readonly IExcelImportAppService _excelImportService; |
|||
|
|||
private readonly ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> _versionRepository; |
|||
|
|||
private readonly ISettleAccountBranchEfCoreRepository<KanBan, Guid> _repository; |
|||
/// <summary>
|
|||
/// 构建方法
|
|||
/// </summary>
|
|||
/// <param name="guidGenerator">构建UID</param>
|
|||
/// <param name="repository">仓储接口</param>
|
|||
/// <param name="cache">缓存</param>
|
|||
public VWKanBanAppService(IGuidGenerator guidGenerator, |
|||
ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> versionRepository, |
|||
ISettleAccountBranchEfCoreRepository<KanBan, Guid> repository, |
|||
IDistributedCache<KanBan> 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> VWKanBanUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode) |
|||
{ |
|||
ExportImporter _exportImporter = new ExportImporter(); |
|||
var result = await _exportImporter.UploadExcelImport<VWKanBanImportDto>(files, _excelImportService); |
|||
var entityList = ObjectMapper.Map<List<VWKanBanImportDto>, List<KanBan>>(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.Kanban, x.MaterialCode, x.Version }).Select(p => new { Count = p.Count(), Kanban = p.Key.Kanban, MaterialCode = p.Key.MaterialCode }); |
|||
foreach (var itm in _group) |
|||
{ |
|||
if (itm.Count > 1) |
|||
{ |
|||
checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("导入的零件号{0},其看板条码号{1}有重复数据,请检查!", itm.MaterialCode, itm.Kanban), string.Empty)); |
|||
} |
|||
} |
|||
var _id = GuidGenerator.Create(); |
|||
var _bomList = new List<KanBanVersion>(); |
|||
_bomList.Add(new KanBanVersion(_id, branchId, year, period, version, customerCode)); |
|||
|
|||
if (checkList.Count > 0) |
|||
{ |
|||
return await ExportErrorReportAsync(checkList); |
|||
} |
|||
await _repository.GetDbContext().BulkInsertAsync<KanBan>(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<VWKanBanDto> GetAsync(Guid id) |
|||
{ |
|||
var result = await GetFromCacheAsync(id); |
|||
var dto = ObjectMapper.Map<KanBan, VWKanBanDto>(result); |
|||
return dto; |
|||
} |
|||
|
|||
|
|||
private async Task<KanBan> GetFromCacheAsync(Guid id) |
|||
{ |
|||
var result = await _repository.GetAsync(id); |
|||
return result; |
|||
} |
|||
|
|||
|
|||
private async Task<long> GetCountAsync(VWKanBanRequestDto input) |
|||
{ |
|||
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters); |
|||
} |
|||
|
|||
private async Task<long> GetCountAsync(VWKanBanVersionRequestDto 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(VWKanBanRequestDto 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<KanBan>, List<VWKanBanExportDto>>(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<VWKanBanDto>> GetListAsync(Guid id, VWKanBanRequestDto 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<VWKanBanDto>(0, new List<VWKanBanDto>()); |
|||
} |
|||
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<KanBan>, List<VWKanBanDto>>(entities); |
|||
|
|||
return new PagedResultDto<VWKanBanDto>(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<VWKanBanDto>> GetAllAsync(Guid branchId) |
|||
{ |
|||
var entities = await _repository.GetAllAsync(branchId, true); |
|||
|
|||
|
|||
var dtos = ObjectMapper.Map<List<KanBan>, List<VWKanBanDto>>(entities); |
|||
|
|||
|
|||
return new ListResultDto<VWKanBanDto>(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<VWKanBanVersionDto>> GetVersionListAsync(VWKanBanVersionRequestDto 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<KanBanVersion>, List<VWKanBanVersionDto>>(entities); |
|||
|
|||
return new PagedResultDto<VWKanBanVersionDto>(totalCount, dtos); |
|||
} |
|||
|
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
using EFCore.BulkExtensions; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.IO; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.Domain.Repositories; |
|||
using Volo.Abp.Domain.Services; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.VWKanBan |
|||
{ |
|||
public class KanBanManager:DomainService |
|||
{ |
|||
private readonly ISettleAccountBranchEfCoreRepository<KanBan, Guid> _repository; |
|||
private readonly ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> _versionRepository; |
|||
public KanBanManager( |
|||
ISettleAccountBranchEfCoreRepository<KanBan, Guid> repository, |
|||
ISettleAccountBranchEfCoreRepository<KanBanVersion, Guid> versionRepository |
|||
|
|||
|
|||
) |
|||
{ |
|||
_versionRepository = versionRepository; |
|||
_repository = repository; |
|||
|
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Diagnostics.CodeAnalysis; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Guids; |
|||
using Win.Sfs.Shared.DomainBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.VWKanBan |
|||
{ |
|||
|
|||
public class KanBanVersion : FullAuditedAggregateRootBase<Guid>,ISettleAccountEntityBase |
|||
{ |
|||
|
|||
public KanBanVersion() |
|||
{ } |
|||
|
|||
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 KanBanVersion( |
|||
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