Browse Source

[CI SKIP] EF迁移 发票同步Qad 实体

master
mahao 1 year ago
parent
commit
88627ee47a
  1. 17
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  2. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/InvoiceSyncQad.cs
  3. 5981
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20231012062406_20231012-2.Designer.cs
  4. 188
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20231012062406_20231012-2.cs
  5. 26
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

17
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -211,12 +211,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//红冲发票提交QAD //红冲发票提交QAD
if (!string.IsNullOrEmpty(invoiceGrp.ParentInvbillNum)) if (!string.IsNullOrEmpty(invoiceGrp.ParentInvbillNum))
{ {
await SubmitToQadHongChong(invoiceGrp.ParentInvbillNum).ConfigureAwait(false); await SubmitToQadHongChongAsync(invoiceGrp.ParentInvbillNum).ConfigureAwait(false);
} }
await _exChangeCenterDbContext.Set<TEA_TASK_SUB>().AddAsync(teaTaskSub).ConfigureAwait(false); await _exChangeCenterDbContext.Set<TEA_TASK_SUB>().AddAsync(teaTaskSub).ConfigureAwait(false);
await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false); await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false);
invoiceGrp.State = SettleBillState.QAD; invoiceGrp.State = SettleBillState.QAD;
//构建发票同步Qad状态表数据
await BindInvoiceSyncQadAsync(taskId, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum).ConfigureAwait(false);
await _exChangeCenterDbContext.SaveChangesAsync().ConfigureAwait(false); await _exChangeCenterDbContext.SaveChangesAsync().ConfigureAwait(false);
var retryPolicyAsync = Policy.Handle<Exception>().WaitAndRetryAsync(new[] { var retryPolicyAsync = Policy.Handle<Exception>().WaitAndRetryAsync(new[] {
@ -235,7 +237,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <summary> /// <summary>
/// 红冲发票提交到QAD /// 红冲发票提交到QAD
/// </summary> /// </summary>
private async Task SubmitToQadHongChong(string invbillNum) private async Task SubmitToQadHongChongAsync(string invbillNum)
{ {
var invoiceGrp = _settleAccountDbContext.Set<INVOICE_GRP>() var invoiceGrp = _settleAccountDbContext.Set<INVOICE_GRP>()
.Where(t => t.State == SettleBillState.) .Where(t => t.State == SettleBillState.)
@ -296,6 +298,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
await _exChangeCenterDbContext.Set<TEA_TASK_SUB>().AddAsync(teaTaskSub).ConfigureAwait(false); await _exChangeCenterDbContext.Set<TEA_TASK_SUB>().AddAsync(teaTaskSub).ConfigureAwait(false);
await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false); await _exChangeCenterDbContext.Set<TED_SAS_INVOICE>().AddRangeAsync(tedSaInvs).ConfigureAwait(false);
//构建发票同步Qad状态表数据
await BindInvoiceSyncQadAsync(taskId, invoiceGrp.RealnvBillNum, invoiceGrp.InvbillNum).ConfigureAwait(false);
} }
} }
@ -310,6 +314,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false); await _settleAccountDbContext.SaveChangesAsync().ConfigureAwait(false);
} }
/// <summary>
/// 构建发票同步Qad状态表数据
/// </summary>
private async Task BindInvoiceSyncQadAsync(Guid taskID, string invoiceNumber, string sasInvoiceNumber)
{
var invoiceSyncQad = new InvoiceSyncQad(taskID, invoiceNumber, sasInvoiceNumber);
await _settleAccountDbContext.Set<InvoiceSyncQad>().AddAsync(invoiceSyncQad).ConfigureAwait(false);
}
/// <summary> /// <summary>
/// 通过审核 /// 通过审核
/// </summary> /// </summary>

12
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/InvoiceSyncQad.cs

@ -30,7 +30,7 @@ namespace SettleAccount.Domain.BQ
/// </summary> /// </summary>
[Display(Name = "信息")] [Display(Name = "信息")]
[MaxLength(64)] [MaxLength(64)]
public string Failedinfo { get; set; } public string FailedInfo { get; set; }
/// <summary> /// <summary>
/// 域 /// 域
/// </summary> /// </summary>
@ -54,7 +54,7 @@ namespace SettleAccount.Domain.BQ
/// </summary> /// </summary>
[Display(Name = "结算发票号")] [Display(Name = "结算发票号")]
[MaxLength(64)] [MaxLength(64)]
public string SaslnvoiceNumber { get; set; } public string SasInvoiceNumber { get; set; }
/// <summary> /// <summary>
/// 客户 /// 客户
/// </summary> /// </summary>
@ -73,11 +73,11 @@ namespace SettleAccount.Domain.BQ
} }
public InvoiceSyncQad(Guid taskID, string invoiceNumber, string saslnvoiceNumber) public InvoiceSyncQad(Guid taskID, string invoiceNumber, string sasInvoiceNumber)
{ {
TaskID = taskID; TaskID = taskID;
InvoiceNumber = invoiceNumber; InvoiceNumber = invoiceNumber;
SaslnvoiceNumber = saslnvoiceNumber; SasInvoiceNumber = sasInvoiceNumber;
} }
public void UpdateTaskState(int taskState) public void UpdateTaskState(int taskState)
@ -85,9 +85,9 @@ namespace SettleAccount.Domain.BQ
TaskState = taskState; TaskState = taskState;
} }
public void UpdateFailedinfo(string failedinfo) public void UpdateFailedInfo(string failedInfo)
{ {
Failedinfo = failedinfo; FailedInfo = failedInfo;
} }
} }
} }

5981
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20231012062406_20231012-2.Designer.cs

File diff suppressed because it is too large

188
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20231012062406_20231012-2.cs

@ -0,0 +1,188 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202310122 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Failedinfo",
table: "Set_InvoiceSyncQad",
newName: "FailedInfo");
migrationBuilder.RenameColumn(
name: "SaslnvoiceNumber",
table: "Set_InvoiceSyncQad",
newName: "SasInvoiceNumber");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "fdd5f4bfee3e45f59aca17e59904f993");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "4c070988c0794e688b142f29fa9a3dc2");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "4b00fb7915934cd59f389e1b6086f99e");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "8eed581d18514bc191b6e97bf347fab3");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "0474eac208624e88b0dced81f5c8c02b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "a350bd04db4e4fd2b8baac7aad8c8f53");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "02192df2f3a54cf2bf82bea02114fb5c");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "f26d7a21dec44400899cc71ed2f16a73");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "005ca6fbb184402e95fd273d4142088f");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "0874f575990a494fbba5def3d498c5c4");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "1c357daa79b044d29eb40312d59510e7");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "FailedInfo",
table: "Set_InvoiceSyncQad",
newName: "Failedinfo");
migrationBuilder.RenameColumn(
name: "SasInvoiceNumber",
table: "Set_InvoiceSyncQad",
newName: "SaslnvoiceNumber");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "325bc4e2a3074f7ab1b41ed5cfd1e8ca");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "a11a0e1af79040a5901a0f290cbb7936");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "d6afa4a5cbd94ca08f6a7591c80d2531");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "c2d69fd69946428bb3aaceef7d68f5b9");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "af52a9e211b247b4accd0361198621e1");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "295cdcf125a64355afa3d5974c7d79be");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "cfa9502d5e314d70b0c1ddef91853d36");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "320f864ee06b472eb196e2ad3edc412f");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "f9bed92b9cd9469c93829cdb37784b82");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "1e5f1338551448eaa8ce065e77578fc4");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "6182defa2c0b477186fa6a4de7ea7f2e");
}
}
}

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

@ -2830,7 +2830,7 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(max)") .HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties"); .HasColumnName("ExtraProperties");
b.Property<string>("Failedinfo") b.Property<string>("FailedInfo")
.HasMaxLength(64) .HasMaxLength(64)
.HasColumnType("nvarchar(64)"); .HasColumnType("nvarchar(64)");
@ -2846,7 +2846,7 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("uniqueidentifier") .HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId"); .HasColumnName("LastModifierId");
b.Property<string>("SaslnvoiceNumber") b.Property<string>("SasInvoiceNumber")
.HasMaxLength(64) .HasMaxLength(64)
.HasColumnType("nvarchar(64)"); .HasColumnType("nvarchar(64)");
@ -4585,7 +4585,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
ConcurrencyStamp = "1e5f1338551448eaa8ce065e77578fc4", ConcurrencyStamp = "0874f575990a494fbba5def3d498c5c4",
Cron = "0 0 8 26 *", Cron = "0 0 8 26 *",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4595,7 +4595,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
ConcurrencyStamp = "325bc4e2a3074f7ab1b41ed5cfd1e8ca", ConcurrencyStamp = "fdd5f4bfee3e45f59aca17e59904f993",
Cron = "0 0/1 * * * ?", Cron = "0 0/1 * * * ?",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4605,7 +4605,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
ConcurrencyStamp = "a11a0e1af79040a5901a0f290cbb7936", ConcurrencyStamp = "4c070988c0794e688b142f29fa9a3dc2",
Cron = "0 0/1 * * * ?", Cron = "0 0/1 * * * ?",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4615,7 +4615,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
ConcurrencyStamp = "cfa9502d5e314d70b0c1ddef91853d36", ConcurrencyStamp = "02192df2f3a54cf2bf82bea02114fb5c",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4625,7 +4625,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
ConcurrencyStamp = "d6afa4a5cbd94ca08f6a7591c80d2531", ConcurrencyStamp = "4b00fb7915934cd59f389e1b6086f99e",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4635,7 +4635,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
ConcurrencyStamp = "af52a9e211b247b4accd0361198621e1", ConcurrencyStamp = "0474eac208624e88b0dced81f5c8c02b",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4645,7 +4645,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
ConcurrencyStamp = "c2d69fd69946428bb3aaceef7d68f5b9", ConcurrencyStamp = "8eed581d18514bc191b6e97bf347fab3",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4655,7 +4655,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
ConcurrencyStamp = "6182defa2c0b477186fa6a4de7ea7f2e", ConcurrencyStamp = "1c357daa79b044d29eb40312d59510e7",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4665,7 +4665,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
ConcurrencyStamp = "295cdcf125a64355afa3d5974c7d79be", ConcurrencyStamp = "a350bd04db4e4fd2b8baac7aad8c8f53",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4675,7 +4675,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
ConcurrencyStamp = "f9bed92b9cd9469c93829cdb37784b82", ConcurrencyStamp = "005ca6fbb184402e95fd273d4142088f",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4685,7 +4685,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
ConcurrencyStamp = "320f864ee06b472eb196e2ad3edc412f", ConcurrencyStamp = "f26d7a21dec44400899cc71ed2f16a73",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,

Loading…
Cancel
Save