Browse Source

EDI发运对比

master
mahao 1 year ago
parent
commit
16de739eaa
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs
  2. 34
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/JisSaSeCompareRequestDto.cs
  3. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs
  4. 22
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs
  5. 48
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
  6. 83
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
  7. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs
  8. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs
  9. 5413
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230814052555_20230814-1.Designer.cs
  10. 67
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230814052555_20230814-1.cs
  11. 5407
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230814073646_20230814-2.Designer.cs
  12. 56
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230814073646_20230814-2.cs
  13. 7
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs

@ -58,7 +58,7 @@ public class Startup
app.UseEndpoints(endpoints => endpoints.MapHub<PageHub>("/api/hub"));
app.ApplicationServices.UseScheduler(scheduler =>
{
scheduler.Schedule<JisBBACSeEdiCompareAppService>().EverySeconds(10);
//scheduler.Schedule<JisBBACSeEdiCompareAppService>().EverySeconds(10);
//scheduler.Schedule<JisHBPOSeEdiCompareAppService>().EverySeconds(10);
});
var contentTypeProvider = new FileExtensionContentTypeProvider();

34
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/JisSaSeCompareRequestDto.cs

@ -14,40 +14,34 @@ public class JisSaSeCompareRequestDto
[Display(Name = "期间")]
[Required(ErrorMessage = "{0}不能为空")]
public string Version { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 通用码
/// </summary>
[Display(Name = "通用码")]
public string PN { get; set; }
/// <summary>
/// 发运开始时间
/// </summary>
[Display(Name = "发运开始时间")]
public DateTime SeStartDateTime { get; set; }
public DateTime? SeStartDateTime { get; set; }
/// <summary>
/// 发运结束时间
/// </summary>
[Display(Name = "发运结束时间")]
public DateTime SeEndDateTime { get; set; }
public DateTime? SeEndDateTime { get; set; }
/// <summary>
/// 下线开始时间
/// </summary>
[Display(Name = "下线开始时间")]
public DateTime DownLineStartDateTime { get; set; }
public DateTime? DownLineStartDateTime { get; set; }
/// <summary>
/// 下线结束时间
/// </summary>
[Display(Name = "下线结束时间")]
public DateTime DownLineEndDateTime { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 通用码
/// </summary>
[Display(Name = "通用码")]
public string PN { get; set; }
public DateTime? DownLineEndDateTime { get; set; }
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs

@ -1,12 +1,10 @@
using System;
using System.Collections.Generic;
using System.LinqAsync;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Shouldly;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;

22
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs

@ -1,12 +1,13 @@
using System;
using System.Collections.Generic;
using System.LinqAsync;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using SettleAccount.Job.Services.Report;
using Shouldly;
using Volo.Abp;
using TaskJob.EventArgs;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;
@ -96,8 +97,21 @@ public class HBPO_SA_DETAIL_SERVICE : SettleAccountApplicationBase<HBPO_SA_DETAI
[HttpPost]
public async Task<string> HBPOSaSeCompare(JisSaSeCompareRequestDto jisSaSeCompareRequestDto)
{
await Task.CompletedTask;
throw new NotImplementedException();
var projectName = $"JisHBPO结算与发运数据对比";
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = jisSaSeCompareRequestDto.Version });
customConditionList.Add(new CustomCondition() { Name = "LU", Value = jisSaSeCompareRequestDto.LU });
customConditionList.Add(new CustomCondition() { Name = "PN", Value = jisSaSeCompareRequestDto.PN });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = projectName });
customConditionList.Add(new CustomCondition() { Name = "SeStartDateTime", Value = jisSaSeCompareRequestDto.SeStartDateTime?.ToString("yyyy-MM-dd 00:00:00") });
customConditionList.Add(new CustomCondition() { Name = "SeEndDateTime", Value = jisSaSeCompareRequestDto.SeEndDateTime?.ToString("yyyy-MM-dd 23:59:59") });
var _taskid = "";
//var _taskid = await _taskJobService.ExportEnqueueAsync(projectName, ExportExtentsion.Excel, jisSaSeCompareRequestDto.Version, string.Empty, CurrentUser, typeof(JisHBPOSaSeCompareExportService), customConditionList, (rs) =>
//{
//}).ConfigureAwait(false);
return _taskid;
}
#endregion
}

48
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs

@ -28,22 +28,21 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
/// </summary>
public async Task Invoke()
{
using var serviceScope = _serviceProvider.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
await HandDelEdiDataAsync().ConfigureAwait(false);
//using var serviceScope = _serviceProvider.CreateScope();
//var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
//var query = db.Set<BBAC_SE_DETAIL>().Join(db.Set<BBAC_SE_EDI>(), a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se, edi }).Where(t => t.se.IsHaveEdiData == false && t.edi.IsHaveSeData == false && t.edi.IsDeleted == false);
//query.ForEach(t =>
//{
// t.edi.SeId = t.se.Id;
// t.edi.IsHaveSeData = true;
// t.se.IsHaveEdiData = true;
//});
//var ses = query.Select(t => t.se);
//var edis = query.Select(t => t.edi);
//db.Set<BBAC_SE_DETAIL>().UpdateRange(ses);
//db.Set<BBAC_SE_EDI>().UpdateRange(edis);
//await db.SaveChangesAsync().ConfigureAwait(false);
var seDetailGroup = db.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
var ediDetailGroup = db.Set<BBAC_SE_EDI>().Where(t => t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
var keyCodes = seDetailGroup.Join(ediDetailGroup, a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se.PN, se.LU });
var seDetails = db.Set<BBAC_SE_DETAIL>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<BBAC_SE_EDI>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
seDetails.ForEach(t => t.IsHaveEdiData = true);
ediDetails.ForEach(t => t.IsHaveSeData = true);
db.Set<BBAC_SE_DETAIL>().UpdateRange(seDetails);
db.Set<BBAC_SE_EDI>().UpdateRange(ediDetails);
await db.SaveChangesAsync().ConfigureAwait(false);
}
/// <summary>
@ -59,18 +58,15 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
*/
using var serviceScope = _serviceProvider.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var query = db.Set<BBAC_SE_EDI>().Join(db.Set<BBAC_SE_DETAIL>(), a => a.SeId, b => b.Id, (edi, se) => new { se, edi }).Where(t => t.edi.IsDeleted == true && t.edi.IsHaveSeData == true);
//query.ForEach(t =>
//{
// t.edi.SeId = default;
// t.edi.IsHaveSeData = false;
// t.se.IsHaveEdiData = false;
//});
//var ses = query.Select(t => t.se);
//var edis = query.Select(t => t.edi);
//Edi 删除的数据(有发运数据)
var ediDelKeyCodes = db.Set<BBAC_SE_EDI>().Where(t => t.IsDeleted == true && t.IsHaveSeData == true).Select(t => new { t.PN, t.LU }).Distinct();
//db.Set<BBAC_SE_DETAIL>().UpdateRange(ses);
//db.Set<BBAC_SE_EDI>().UpdateRange(edis);
//await db.SaveChangesAsync().ConfigureAwait(false);
var seDetails = db.Set<BBAC_SE_DETAIL>().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<BBAC_SE_EDI>().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
seDetails.ForEach(t => t.IsHaveEdiData = false);
ediDetails.ForEach(t => t.IsHaveSeData = false);
db.Set<BBAC_SE_DETAIL>().UpdateRange(seDetails);
db.Set<BBAC_SE_EDI>().UpdateRange(ediDetails);
await db.SaveChangesAsync().ConfigureAwait(false);
}
}

83
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading.Tasks;
using Coravel.Invocable;
using LinqToDB;
@ -48,36 +49,47 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
Debug.WriteLine($"执行了:{this.GetType()}");
using var serviceScope = _serviceProvider.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
//var query = from se in db.Set<HBPO_SE_DETAIL>()
// join edi in db.Set<HBPO_SE_EDI>() on new
// {
// se.LU,
// se.PN,
// se.Qty
// } equals new
// {
// edi.LU,
// edi.PN,
// edi.Qty
// }
// where se.IsHaveEdiData == false && edi.IsHaveSeData == false
// select new
// {
// se,
// edi
// };
var query = db.Set<HBPO_SE_DETAIL>().Join(db.Set<HBPO_SE_EDI>(), a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se, edi }).Where(t => t.se.IsHaveEdiData == false && t.edi.IsHaveSeData == false && t.edi.IsDeleted == false);
var ses = query.Select(t => t.se);
var edis = query.Select(t => t.edi);
ses.ForEach(t => t.IsHaveEdiData = true);
edis.ForEach(t => t.IsHaveSeData = true);
await HandDelEdiDataAsync().ConfigureAwait(false);
db.Set<HBPO_SE_DETAIL>().UpdateRange(ses);
db.Set<HBPO_SE_EDI>().UpdateRange(edis);
var seDetailGroup = from se in db.Set<HBPO_SE_DETAIL>()
where se.IsHaveEdiData == false
group se by new { se.PN, se.LU }
into a
select new { a.Key.PN, a.Key.LU, Qty = a.Sum(t => t.Qty) };
var ediDetailGroup = from edi in db.Set<HBPO_SE_EDI>()
where edi.IsHaveSeData == false
group edi by new { edi.PN, edi.LU }
into a
select new { a.Key.PN, a.Key.LU, Qty = a.Sum(t => t.Qty) };
var keyCodes = from se in seDetailGroup
join edi in ediDetailGroup on new
{
se.PN,
se.LU,
se.Qty
} equals new
{
edi.PN,
edi.LU,
edi.Qty
}
select new { se.PN, se.LU };
//var seDetailGroup2 = db.Set<HBPO_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
//var ediDetailGroup2 = db.Set<HBPO_SE_EDI>().Where(t => t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
//var keyCodes2 = seDetailGroup2.Join(ediDetailGroup2, a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se.PN, se.LU });
var seDetails = db.Set<HBPO_SE_DETAIL>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<HBPO_SE_EDI>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
seDetails.ForEach(t => t.IsHaveEdiData = true);
ediDetails.ForEach(t => t.IsHaveSeData = true);
db.Set<HBPO_SE_DETAIL>().UpdateRange(seDetails);
db.Set<HBPO_SE_EDI>().UpdateRange(ediDetails);
await db.SaveChangesAsync().ConfigureAwait(false);
Debug.WriteLine($"处理数量:{query.Count()}");
Debug.WriteLine($"处理数量:{keyCodes.Count()}");
}
/// <summary>
@ -87,18 +99,15 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
{
using var serviceScope = _serviceProvider.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var query = db.Set<HBPO_SE_EDI>().Join(db.Set<HBPO_SE_DETAIL>(), a => a.SeId, b => b.Id, (edi, se) => new { se, edi }).Where(t => t.edi.IsDeleted == true && t.edi.IsHaveSeData == true);
query.ForEach(t =>
{
t.edi.SeId = default;
t.edi.IsHaveSeData = false;
t.se.IsHaveEdiData = false;
});
var ses = query.Select(t => t.se);
var edis = query.Select(t => t.edi);
//Edi 删除的数据(有发运数据)
var ediDelKeyCodes = db.Set<HBPO_SE_EDI>().Where(t => t.IsDeleted == true && t.IsHaveSeData == true).Select(t => new { t.PN, t.LU }).Distinct();
db.Set<HBPO_SE_DETAIL>().UpdateRange(ses);
db.Set<HBPO_SE_EDI>().UpdateRange(edis);
var seDetails = db.Set<HBPO_SE_DETAIL>().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<HBPO_SE_EDI>().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
seDetails.ForEach(t => t.IsHaveEdiData = false);
ediDetails.ForEach(t => t.IsHaveSeData = false);
db.Set<HBPO_SE_DETAIL>().UpdateRange(seDetails);
db.Set<HBPO_SE_EDI>().UpdateRange(ediDetails);
await db.SaveChangesAsync().ConfigureAwait(false);
}
}

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs

@ -50,12 +50,6 @@ public class BBAC_SE_EDI:FullAuditedAggregateRoot<Guid>
[Display(Name = "是否有发运数据")]
public bool IsHaveSeData { get; set; }
/// <summary>
/// 发运Id
/// </summary>
[Display(Name = "是否有发运数据")]
public Guid SeId { get; set; }
public BBAC_SE_EDI()
{ }
public BBAC_SE_EDI(Guid guid, string keyCode, string version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs

@ -53,12 +53,6 @@ public class HBPO_SE_EDI :FullAuditedAggregateRoot<Guid>
[Display(Name = "是否有发运数据")]
public bool IsHaveSeData { get; set; }
/// <summary>
/// 发运Id
/// </summary>
[Display(Name = "是否有发运数据")]
public Guid SeId { get; set; }
public HBPO_SE_EDI(Guid guid ,string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate, string site, string extend1, string extend2, string extend3, string extend4)
{
Id = guid;

5413
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230814052555_20230814-1.Designer.cs

File diff suppressed because it is too large

67
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230814052555_20230814-1.cs

@ -0,0 +1,67 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308141 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("427dcb95-130f-40c7-8e7e-bf9cc2749dec"));
migrationBuilder.AddColumn<Guid>(
name: "SeId",
table: "Set_HBPO_SE_EDI",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<Guid>(
name: "SeId",
table: "Set_BBAC_SE_EDI",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<int>(
name: "BusinessType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("8b20c772-ad8d-4733-9edc-986e1c9ba15a"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "f86cd4516dc2499a9a9aa43bb053416b", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("8b20c772-ad8d-4733-9edc-986e1c9ba15a"));
migrationBuilder.DropColumn(
name: "SeId",
table: "Set_HBPO_SE_EDI");
migrationBuilder.DropColumn(
name: "SeId",
table: "Set_BBAC_SE_EDI");
migrationBuilder.DropColumn(
name: "BusinessType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("427dcb95-130f-40c7-8e7e-bf9cc2749dec"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "a20e124c6b89416ba16a2c424034dd37", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
}
}

5407
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230814073646_20230814-2.Designer.cs

File diff suppressed because it is too large

56
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230814073646_20230814-2.cs

@ -0,0 +1,56 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308142 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("8b20c772-ad8d-4733-9edc-986e1c9ba15a"));
migrationBuilder.DropColumn(
name: "SeId",
table: "Set_HBPO_SE_EDI");
migrationBuilder.DropColumn(
name: "SeId",
table: "Set_BBAC_SE_EDI");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("27b08950-27f6-42ae-aeff-c7d19315b467"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "86c4ebf001bf4993a0cca2af4216ba92", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("27b08950-27f6-42ae-aeff-c7d19315b467"));
migrationBuilder.AddColumn<Guid>(
name: "SeId",
table: "Set_HBPO_SE_EDI",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AddColumn<Guid>(
name: "SeId",
table: "Set_BBAC_SE_EDI",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("8b20c772-ad8d-4733-9edc-986e1c9ba15a"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "f86cd4516dc2499a9a9aa43bb053416b", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
}
}

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

@ -624,6 +624,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<DateTime>("BillTime")
.HasColumnType("datetime2");
b.Property<int>("BusinessType")
.HasColumnType("int");
b.Property<string>("CodeType")
.HasColumnType("nvarchar(max)");
@ -4393,10 +4396,10 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("427dcb95-130f-40c7-8e7e-bf9cc2749dec"),
Id = new Guid("27b08950-27f6-42ae-aeff-c7d19315b467"),
BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
BillType = 1,
ConcurrencyStamp = "a20e124c6b89416ba16a2c424034dd37",
ConcurrencyStamp = "86c4ebf001bf4993a0cca2af4216ba92",
DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
ErpToLoc = "ErpToLoc",
OrderNum = "OrderNum",

Loading…
Cancel
Save