Browse Source

[CI SKIP] 迁移印度件价格单表

master
马昊 1 year ago
parent
commit
a7f0e819c2
  1. 125
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListYinDu.cs
  2. 13
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  3. 5906
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20231011011841_20231011-1.Designer.cs
  4. 201
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20231011011841_20231011-1.cs
  5. 100
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

125
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListYinDu.cs

@ -0,0 +1,125 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
namespace Win.Sfs.SettleAccount.Entities.Prices
{
/// <summary>
/// 印度价格单
/// </summary>
public class PriceListYinDu : AuditedAggregateRoot<Guid>
{
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 价格
/// </summary>
[Display(Name = "价格")]
public decimal Price { set; get; }
/// <summary>
/// 开始时间
/// </summary>
[Display(Name = "开始时间")]
public DateTime BeginDate { set; get; }
/// <summary>
/// 结束时间
/// </summary>
[Display(Name = "结算时间")]
public DateTime EndDate { set; get; }
/// <summary>
/// 客户编码
/// </summary>
[Display(Name = "客户编码")]
public string ClientCode { get; set; }
/// <summary>
/// 合同签订时间
/// </summary>
[Display(Name = "合同签订时间")]
public DateTime Date { get; set; }
/// <summary>
/// 合同号
/// </summary>
[Display(Name = "合同号")]
public string ContractNo { get; set; }
/// <summary>
/// 是否作废
/// </summary>
[Display(Name = "是否作废")]
public bool IsCancel { get; set; }
/// <summary>
/// 客户
/// </summary>
[Display(Name = "客户")]
public string CustomerCode { get; set; }
/// <summary>
///版本
/// </summary>
[Display(Name = "版本")]
public string Version { set; get; }
/// <summary>
/// 物料编号
/// </summary>
[Display(Name = "物料编号")]
public string MaterialCode { set; get; }
/// <summary>
/// 类型
/// </summary>
[Display(Name = "价格类型")]
public int Type { set; get; }
/// <summary>
/// 父Id
/// </summary>
[Display(Name = "父Id")]
public Guid ParentId { set; get; }
public PriceListYinDu()
{ }
public PriceListYinDu(Guid Id, DateTime beginDate, DateTime endDate, decimal price, string materialCode, int type, Guid parentId, string version, string customerCode) : base(Id)
{
BeginDate = beginDate;
EndDate = endDate;
Price = price;
MaterialCode = materialCode;
Type = type;
ParentId = parentId;
Version = version;
CustomerCode = customerCode;
}
public PriceListYinDu(Guid Id, string lu, decimal price, DateTime beginDate, DateTime endDate, string clientCode, DateTime date, string contractNo) : base(Id)
{
LU = lu;
Price = price;
BeginDate = beginDate;
EndDate = endDate;
Price = price;
ClientCode = clientCode;
Date = date;
ContractNo = contractNo;
}
public void Set(DateTime beginDate, DateTime endDate, decimal price, string materialCode, int type, string customerCode)
{
BeginDate = beginDate;
EndDate = endDate;
Price = price;
MaterialCode = materialCode;
Type = type;
CustomerCode = customerCode;
}
public void Update(Guid id)
{
Id = id;
}
public void Update(Guid id, string version)
{
Id = id;
Version = version;
}
}
}

13
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -45,6 +45,8 @@ namespace Win.Sfs.SettleAccount
//BJ备件价格
builder.ConfigurePriceListVersionBJ(options);
builder.ConfigurePriceListBJ(options);
//印度件价格单
builder.ConfigurePriceListYinDu(options);
//物料、物料关系
builder.ConfigureMaterial(options);
@ -164,6 +166,17 @@ namespace Win.Sfs.SettleAccount
});
}
private static void ConfigurePriceListYinDu(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<PriceListYinDu>(b =>
{
b.ToTable($"{options.TablePrefix}_PriceListYinDu", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.MaterialCode).HasMaxLength(50);
b.Property(x => x.CustomerCode).HasMaxLength(50);
});
}
private static void ConfigureCentralizedControl(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<CentralizedControl>(b =>

5906
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20231011011841_20231011-1.Designer.cs

File diff suppressed because it is too large

201
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20231011011841_20231011-1.cs

@ -0,0 +1,201 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202310111 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Set_PriceListYinDu",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
LU = table.Column<string>(type: "nvarchar(max)", nullable: true),
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
BeginDate = table.Column<DateTime>(type: "datetime2", nullable: false),
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
ClientCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
Date = table.Column<DateTime>(type: "datetime2", nullable: false),
ContractNo = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsCancel = table.Column<bool>(type: "bit", nullable: false),
CustomerCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Version = table.Column<string>(type: "nvarchar(max)", nullable: true),
MaterialCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Type = table.Column<int>(type: "int", nullable: false),
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)
},
constraints: table =>
{
table.PrimaryKey("PK_Set_PriceListYinDu", x => x.Id);
});
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "1a1e601cecf048be81c05fef8276da45");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "173befe56a454211b5e7a34055c05028");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "ece4fb3c94d84db49b29bb7ce5403e0f");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "55e773e2549a4b8eb37290f10b2217de");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "8df83c3b351c4501af06cb28800daf40");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "2f67425d15004f4fbca4ce530ba6fd78");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "39237411d84b425d82b192f2d34fa311");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "c6ff3a457eab4058aa63aee66825624e");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "e59e2f6af2c44e40b0f9b82817789e1d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "4ce40eb18ef0488d81ba2906a4c80b0b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "facdc1ba48df49138b67cf266a4936f2");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Set_PriceListYinDu");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "6a9373e21c0046e898c85945682ed701");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "ccf0bc1715bb4b018f9b23159de6f116");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "b92e0a5372a94a48ad3fbb607281ca6f");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "e3b9c33400904b0ab07576195a37abcb");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "7fd1b85332d1410f8f5aac9f8133f6e7");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "6d7c4e44083641e0913905c25f6f56ba");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "888e0398751e4ceeb33dd04d2a60c5de");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "e924e50c1001490b823fd36acdd81e79");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "3923d323cd3a40d8ab1c62119737cac8");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "7a57abf3c29d4c62af03344a83ec0e0b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "ca3c9634e73c454a81fe88127622b8db");
}
}
}

100
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

@ -4510,7 +4510,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
ConcurrencyStamp = "7a57abf3c29d4c62af03344a83ec0e0b",
ConcurrencyStamp = "4ce40eb18ef0488d81ba2906a4c80b0b",
Cron = "0 0 8 26 *",
IsDisabled = false,
IsRunning = false,
@ -4520,7 +4520,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
ConcurrencyStamp = "6a9373e21c0046e898c85945682ed701",
ConcurrencyStamp = "1a1e601cecf048be81c05fef8276da45",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4530,7 +4530,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
ConcurrencyStamp = "ccf0bc1715bb4b018f9b23159de6f116",
ConcurrencyStamp = "173befe56a454211b5e7a34055c05028",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4540,7 +4540,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
ConcurrencyStamp = "888e0398751e4ceeb33dd04d2a60c5de",
ConcurrencyStamp = "39237411d84b425d82b192f2d34fa311",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4550,7 +4550,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
ConcurrencyStamp = "b92e0a5372a94a48ad3fbb607281ca6f",
ConcurrencyStamp = "ece4fb3c94d84db49b29bb7ce5403e0f",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4560,7 +4560,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
ConcurrencyStamp = "7fd1b85332d1410f8f5aac9f8133f6e7",
ConcurrencyStamp = "8df83c3b351c4501af06cb28800daf40",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4570,7 +4570,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
ConcurrencyStamp = "e3b9c33400904b0ab07576195a37abcb",
ConcurrencyStamp = "55e773e2549a4b8eb37290f10b2217de",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4580,7 +4580,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
ConcurrencyStamp = "ca3c9634e73c454a81fe88127622b8db",
ConcurrencyStamp = "facdc1ba48df49138b67cf266a4936f2",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4590,7 +4590,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
ConcurrencyStamp = "6d7c4e44083641e0913905c25f6f56ba",
ConcurrencyStamp = "2f67425d15004f4fbca4ce530ba6fd78",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4600,7 +4600,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
ConcurrencyStamp = "3923d323cd3a40d8ab1c62119737cac8",
ConcurrencyStamp = "e59e2f6af2c44e40b0f9b82817789e1d",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4610,7 +4610,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
ConcurrencyStamp = "e924e50c1001490b823fd36acdd81e79",
ConcurrencyStamp = "c6ff3a457eab4058aa63aee66825624e",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -5645,6 +5645,84 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_PriceListVersionBJ");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.Prices.PriceListYinDu", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("BeginDate")
.HasColumnType("datetime2");
b.Property<string>("ClientCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ContractNo")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("CustomerCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("Date")
.HasColumnType("datetime2");
b.Property<DateTime>("EndDate")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsCancel")
.HasColumnType("bit");
b.Property<string>("LU")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("MaterialCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<Guid>("ParentId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<int>("Type")
.HasColumnType("int");
b.Property<string>("Version")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Set_PriceListYinDu");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.TaskJob", b =>
{
b.Property<Guid>("Id")

Loading…
Cancel
Save