wanggang
1 year ago
32 changed files with 21535 additions and 157 deletions
@ -0,0 +1,192 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Threading.Tasks; |
||||
|
using Coravel.Invocable; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using SettleAccount.Domain.BQ; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
||||
|
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
||||
|
using Win.Sfs.SettleAccount.Entities.Prices; |
||||
|
using Win.Sfs.SettleAccount.EntityFrameworkCore; |
||||
|
using Win.Sfs.Shared.RepositoryBase; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// HBPO发运数据同步服务
|
||||
|
/// </summary>
|
||||
|
[AllowAnonymous] |
||||
|
[Route("api/settleaccount/[controller]/[action]")]
|
||||
|
public class HBPOSeSyncAppService : ApplicationService, IInvocable //IJobService
|
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// WMS数据上下文
|
||||
|
/// </summary>
|
||||
|
private readonly WMSBJBMPTDbContext _wmsBJBMPTContext; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步位置标记
|
||||
|
/// </summary>
|
||||
|
private readonly INormalEfCoreRepository<SyncPositionFlag, Guid> _syncPositionFlagRepository; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// HBPO发运数据仓储
|
||||
|
/// </summary>
|
||||
|
private readonly INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> _hbpoSeDetailRepository; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 构造
|
||||
|
/// </summary>
|
||||
|
public HBPOSeSyncAppService( |
||||
|
WMSBJBMPTDbContext wmsBJBMPTContext, |
||||
|
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository, |
||||
|
INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> hbpoSeDetailRepository) |
||||
|
{ |
||||
|
_wmsBJBMPTContext = wmsBJBMPTContext; |
||||
|
_syncPositionFlagRepository = syncPositionFlagRepository; |
||||
|
_hbpoSeDetailRepository = hbpoSeDetailRepository; |
||||
|
} |
||||
|
|
||||
|
//private readonly IRepository<TM_BJBMPT_JIT_RECORD> _TMBJBMPTJITRECORDRepository;
|
||||
|
|
||||
|
//public HBPOSeSyncAppService(IRepository<TM_BJBMPT_JIT_RECORD> TMBJBMPTJITRECORDRepository)
|
||||
|
//{
|
||||
|
// _TMBJBMPTJITRECORDRepository = TMBJBMPTJITRECORDRepository;
|
||||
|
//}
|
||||
|
|
||||
|
[HttpPost] |
||||
|
public async Task Invoke() |
||||
|
{ |
||||
|
//await SyncJitRecord();
|
||||
|
//await SyncJisRecord();
|
||||
|
//if (!dbContext.GetService<IRelationalDatabaseCreator>().Exists() && dbContext.Database.EnsureCreated())
|
||||
|
//{
|
||||
|
// this._balanceRepository.AsNoTracking().ForEachAsync(o =>
|
||||
|
// {
|
||||
|
// dbContext.Set<VmiBalance>().Add(o);
|
||||
|
// });
|
||||
|
// dbContext.SaveChanges();
|
||||
|
// var snapshot = new VmiSnapshot { Name = date, Path = connectionString };
|
||||
|
// this._snapshotRepository.InsertAsync(snapshot).Wait();
|
||||
|
//}
|
||||
|
|
||||
|
|
||||
|
//using (var context = new HouseDbContext(optionsBuilder.Options))
|
||||
|
//{
|
||||
|
// var one = context.Notices.FirstOrDefault(n => n.Id == notice.Id);
|
||||
|
// // 当然你也可以直接初始化其他的Service
|
||||
|
// var nService = new NoticeService(context, null);
|
||||
|
// var one = nService.FindOne(notice.Id);
|
||||
|
//}
|
||||
|
|
||||
|
|
||||
|
|
||||
|
//var TM_BJBMPT_JIT_RECORDs = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD
|
||||
|
// .Where(b => b.UID > 3)
|
||||
|
// .OrderBy(b => b.BillTime)
|
||||
|
// .ToList();
|
||||
|
//foreach (var TM_BJBMPT_JIT_RECORD in TM_BJBMPT_JIT_RECORDs)
|
||||
|
//{
|
||||
|
// Console.WriteLine($"{TM_BJBMPT_JIT_RECORD.UID}");
|
||||
|
//}
|
||||
|
|
||||
|
//using (var db = new WMSBJBMPTDbContext())
|
||||
|
//{
|
||||
|
// var blogs = db.TM_BJBMPT_JIT_RECORD
|
||||
|
// .Where(b => b.UID > 3)
|
||||
|
// .OrderBy(b => b.BillTime)
|
||||
|
// .ToList();
|
||||
|
|
||||
|
// foreach (var blog in blogs)
|
||||
|
// {
|
||||
|
// Console.WriteLine($"{blog.UID}");
|
||||
|
// }
|
||||
|
//}
|
||||
|
Console.WriteLine($"{this.GetType().FullName}执行了"); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步JitRecord
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
private async Task SyncJitRecord() |
||||
|
{ |
||||
|
//同步表名称
|
||||
|
var syncTableName = "TM_BJBMPT_JIT_RECORD"; |
||||
|
Expression<Func<TM_BJBMPT_JIT_RECORD, bool>> predicate = (t) => true; |
||||
|
var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName); |
||||
|
if (syncPositionFlag != null) |
||||
|
{ |
||||
|
predicate = (t) => t.UID > int.Parse(syncPositionFlag.Position); |
||||
|
} |
||||
|
|
||||
|
var jitRecords = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD |
||||
|
.Where(predicate) |
||||
|
.OrderBy(b => b.UID) |
||||
|
.ToList(); |
||||
|
|
||||
|
var hbpoSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<HBPO_SE_DETAIL>>(jitRecords); |
||||
|
if (hbpoSeDetails.Any()) |
||||
|
{ |
||||
|
await _hbpoSeDetailRepository.InsertManyAsync(hbpoSeDetails); |
||||
|
|
||||
|
if (syncPositionFlag != null) |
||||
|
{ |
||||
|
syncPositionFlag.Position = jitRecords.Last().UID.ToString(); |
||||
|
await _syncPositionFlagRepository.UpdateAsync(syncPositionFlag); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
syncPositionFlag = new SyncPositionFlag() |
||||
|
{ |
||||
|
TableName = syncTableName, |
||||
|
Position = jitRecords.Last().UID.ToString() |
||||
|
}; |
||||
|
await _syncPositionFlagRepository.InsertAsync(syncPositionFlag); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private async Task SyncJisRecord() |
||||
|
{ |
||||
|
//同步表名称
|
||||
|
var syncTableName = "TM_BJBMPT_JIS_RECORD"; |
||||
|
Expression<Func<TM_BJBMPT_JIS_RECORD, bool>> predicate = (t) => true; |
||||
|
var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName); |
||||
|
if (syncPositionFlag != null) |
||||
|
{ |
||||
|
predicate = (t) => t.UID > int.Parse(syncPositionFlag.Position); |
||||
|
} |
||||
|
|
||||
|
var jisRecords = _wmsBJBMPTContext.TM_BJBMPT_JIS_RECORD |
||||
|
.Where(predicate) |
||||
|
.OrderBy(b => b.UID) |
||||
|
.ToList(); |
||||
|
|
||||
|
var hbpoSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIS_RECORD>, List<HBPO_SE_DETAIL>>(jisRecords); |
||||
|
if (hbpoSeDetails.Any()) |
||||
|
{ |
||||
|
await _hbpoSeDetailRepository.InsertManyAsync(hbpoSeDetails); |
||||
|
|
||||
|
if (syncPositionFlag != null) |
||||
|
{ |
||||
|
syncPositionFlag.Position = jisRecords.Last().UID.ToString(); |
||||
|
await _syncPositionFlagRepository.UpdateAsync(syncPositionFlag); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
syncPositionFlag = new SyncPositionFlag() |
||||
|
{ |
||||
|
TableName = syncTableName, |
||||
|
Position = jisRecords.Last().UID.ToString() |
||||
|
}; |
||||
|
await _syncPositionFlagRepository.InsertAsync(syncPositionFlag); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步位置标记
|
||||
|
/// </summary>
|
||||
|
public class SyncPositionFlag : AuditedAggregateRoot<Guid> |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 表名称
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "表名称")] |
||||
|
public string TableName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 位置(可排序)
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "位置")] |
||||
|
public string Position { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 构造
|
||||
|
/// </summary>
|
||||
|
public SyncPositionFlag() { } |
||||
|
} |
@ -0,0 +1,104 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
||||
|
|
||||
|
public class TM_BJBMPT_JIS_RECORD |
||||
|
{ |
||||
|
[Key] |
||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
||||
|
public int UID { get; set; } |
||||
|
|
||||
|
[DisplayName("JIS单据编号")] |
||||
|
public string JISNum { get; set; } |
||||
|
|
||||
|
[DisplayName("发货时间")] |
||||
|
public DateTime? BillTime { get; set; } |
||||
|
|
||||
|
[DisplayName("发货人")] |
||||
|
public string Oper { get; set; } |
||||
|
|
||||
|
[DisplayName("JIS排序单号")] |
||||
|
public string OrderNum { get; set; } |
||||
|
|
||||
|
[DisplayName("订单序号")] |
||||
|
public string Seq { get; set; } |
||||
|
|
||||
|
[DisplayName("JIS实际生产码")] |
||||
|
public string RealCode { get; set; } |
||||
|
|
||||
|
[DisplayName("订单生产码")] |
||||
|
public string VinCode { get; set; } |
||||
|
|
||||
|
[DisplayName("JIS生产码类型")] |
||||
|
public string CodeType { get; set; } |
||||
|
|
||||
|
[DisplayName("订单零件号")] |
||||
|
public string PartCode { get; set; } |
||||
|
|
||||
|
[DisplayName("数量")] |
||||
|
public decimal? Qty { get; set; } |
||||
|
|
||||
|
[DisplayName("发货单号")] |
||||
|
public string BillNum { get; set; } |
||||
|
|
||||
|
public string MESConfigCode { get; set; } |
||||
|
|
||||
|
[DisplayName("来源库位")] |
||||
|
public string FromLoc { get; set; } |
||||
|
|
||||
|
[DisplayName("目标库位")] |
||||
|
public string ToLoc { get; set; } |
||||
|
|
||||
|
public string RealPartCode { get; set; } |
||||
|
|
||||
|
public string Batch { get; set; } |
||||
|
|
||||
|
[DisplayName("参照订单生产码")] |
||||
|
public string RefVinCode { get; set; } |
||||
|
|
||||
|
//[DisplayName("单据类型")]
|
||||
|
//public EnumBillType BillType { get; set; }
|
||||
|
|
||||
|
//[DisplayName("子单据类型")]
|
||||
|
//public EnumSubBillType SubBillType { get; set; }
|
||||
|
|
||||
|
[DisplayName("单据性质")] |
||||
|
public string BillCharacter { get; set; } |
||||
|
|
||||
|
public int? TransType { get; set; } |
||||
|
|
||||
|
public int? DeliverBillType { get; set; } |
||||
|
|
||||
|
public int? DeliverSubBillType { get; set; } |
||||
|
|
||||
|
[DisplayName("发货关联单号")] |
||||
|
public string RefBillNum { get; set; } |
||||
|
|
||||
|
[DisplayName("Erp目标库位")] |
||||
|
public string ErpToLoc { get; set; } |
||||
|
|
||||
|
[DisplayName("原生产码")] |
||||
|
public string OrigiCode { get; set; } |
||||
|
|
||||
|
[DisplayName("备注")] |
||||
|
public string Remark { get; set; } |
||||
|
|
||||
|
[DisplayName("塑件唯一码")] |
||||
|
public string UniqueCode { get; set; } |
||||
|
|
||||
|
[DisplayName("PJS顺序号")] |
||||
|
public string PjsNum { get; set; } |
||||
|
|
||||
|
[DisplayName("虚拟小总成")] |
||||
|
public string MatchNumber { get; set; } |
||||
|
|
||||
|
//[DisplayName("业务类型")]
|
||||
|
//public EnumProTpe ProType { get; set; }
|
||||
|
|
||||
|
public string DeliverCode { get; set; } |
||||
|
|
||||
|
public string Position { get; set; } |
||||
|
} |
@ -0,0 +1,126 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.ComponentModel.DataAnnotations.Schema; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
||||
|
|
||||
|
public class TM_BJBMPT_JIT_RECORD |
||||
|
{ |
||||
|
[Key] |
||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] |
||||
|
public int UID { get; set; } |
||||
|
|
||||
|
[DisplayName("JIT订单号")] |
||||
|
public string JISNum { get; set; } |
||||
|
|
||||
|
[DisplayName("JIT排序生产码")] |
||||
|
public string VinCode { get; set; } |
||||
|
|
||||
|
[DisplayName("JIT排序生产码类型")] |
||||
|
public string CodeType { get; set; } |
||||
|
|
||||
|
[DisplayName("订单零件号")] |
||||
|
public string PartCode { get; set; } |
||||
|
|
||||
|
[DisplayName("订单零件号")] |
||||
|
public string RealPartCode { get; set; } |
||||
|
|
||||
|
[DisplayName("订单序号")] |
||||
|
public string Seq { get; set; } |
||||
|
|
||||
|
[DisplayName("发货条码")] |
||||
|
public string DeliverCode { get; set; } |
||||
|
|
||||
|
[DisplayName("数量")] |
||||
|
public decimal? Qty { get; set; } |
||||
|
|
||||
|
[DisplayName("发货单号")] |
||||
|
public string BillNum { get; set; } |
||||
|
|
||||
|
[DisplayName("发货时间")] |
||||
|
public DateTime? BillTime { get; set; } |
||||
|
|
||||
|
[DisplayName("发货人")] |
||||
|
public string Oper { get; set; } |
||||
|
|
||||
|
[DisplayName("客户位置")] |
||||
|
public string Position { get; set; } |
||||
|
|
||||
|
public string MESConfigCode { get; set; } |
||||
|
|
||||
|
[DisplayName("生产线")] |
||||
|
public string Line { get; set; } |
||||
|
|
||||
|
[DisplayName("目标库位")] |
||||
|
public string ToLoc { get; set; } |
||||
|
|
||||
|
[DisplayName("备注")] |
||||
|
public string Remark { get; set; } |
||||
|
|
||||
|
//[DisplayName("单据类型")]
|
||||
|
//public EnumBillType BillType { get; set; }
|
||||
|
|
||||
|
//[DisplayName("子单据类型")]
|
||||
|
//public EnumSubBillType SubBillType { get; set; }
|
||||
|
|
||||
|
public int? TransType { get; set; } |
||||
|
|
||||
|
public int? DeliverBillType { get; set; } |
||||
|
|
||||
|
public int? DeliverSubBillType { get; set; } |
||||
|
|
||||
|
[DisplayName("单据性质")] |
||||
|
public string BillCharacter { get; set; } |
||||
|
|
||||
|
//[DisplayName("业务类型")]
|
||||
|
//public EnumProTpe ProType { get; set; }
|
||||
|
|
||||
|
public string OrderNum { get; set; } |
||||
|
|
||||
|
public string RealCode { get; set; } |
||||
|
|
||||
|
public string FromLoc { get; set; } |
||||
|
|
||||
|
public string RefBillNum { get; set; } |
||||
|
|
||||
|
public string ErpToLoc { get; set; } |
||||
|
|
||||
|
public string UniqueCode { get; set; } |
||||
|
|
||||
|
public string PjsNum { get; set; } |
||||
|
|
||||
|
public string MatchNumber { get; set; } |
||||
|
|
||||
|
public string RefVinCode { get; set; } |
||||
|
} |
||||
|
|
||||
|
public enum EnumProTpe |
||||
|
{ |
||||
|
无 = 0, |
||||
|
Jit发货 = 1, |
||||
|
Jit补发订单 = 2, |
||||
|
Jit备件 = 3, |
||||
|
Jit买单件 = 4, |
||||
|
Jit匹配件 = 5, |
||||
|
Jis发货 = 6, |
||||
|
Jis备件 = 7, |
||||
|
Jis买单件 = 8, |
||||
|
Jis匹配件 = 9, |
||||
|
Jis补发订单 = 10, |
||||
|
Jis退货 = 11, |
||||
|
Jis备件退货 = 12, |
||||
|
Jis买单件退货 = 13, |
||||
|
Jis匹配件退货 = 14, |
||||
|
Jis补发订单退货 = 15, |
||||
|
Jit退货 = 16, |
||||
|
Jit备件退货 = 17, |
||||
|
Jit买单件退货 = 18, |
||||
|
Jit匹配件退货 = 19, |
||||
|
Jit补发订单退货 = 20, |
||||
|
} |
||||
|
|
||||
|
public enum EnumBillType { } |
||||
|
|
||||
|
public enum EnumSubBillType { } |
||||
|
|
@ -0,0 +1,38 @@ |
|||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Volo.Abp.Data; |
||||
|
using Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.EntityFrameworkCore; |
||||
|
|
||||
|
[ConnectionStringName("WMSBJBMPT")] |
||||
|
public class WMSBJBMPTDbContext : DbContext |
||||
|
{ |
||||
|
public DbSet<TM_BJBMPT_JIT_RECORD> TM_BJBMPT_JIT_RECORD { get; set; } |
||||
|
public DbSet<TM_BJBMPT_JIS_RECORD> TM_BJBMPT_JIS_RECORD { get; set; } |
||||
|
|
||||
|
public WMSBJBMPTDbContext() |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public WMSBJBMPTDbContext(DbContextOptions<WMSBJBMPTDbContext> options) : base(options) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
//protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
|
//{
|
||||
|
// if (!optionsBuilder.IsConfigured)
|
||||
|
// {
|
||||
|
// IConfiguration config = new ConfigurationBuilder()
|
||||
|
// .SetBasePath(Directory.GetCurrentDirectory())
|
||||
|
// .AddJsonFile("appsettings.json")
|
||||
|
// .Build();
|
||||
|
// var ConnectStr = config.GetConnectionString("WMSBJBMPT");
|
||||
|
// optionsBuilder.UseSqlServer(ConnectStr);
|
||||
|
// }
|
||||
|
//}
|
||||
|
|
||||
|
protected override void OnModelCreating(ModelBuilder modelBuilder) |
||||
|
{ |
||||
|
base.OnModelCreating(modelBuilder); |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,24 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class _202307262 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.InsertData( |
||||
|
table: "Set_JobItem", |
||||
|
columns: new[] { "Id", "ConcurrencyStamp", "Cron", "IsRunning", "Name", "Service" }, |
||||
|
values: new object[] { new Guid("92cce083-20a8-5335-31ea-e390c57cac1f"), null, "0 0/1 * * * ?", false, "HBPO发运数据同步", "Win.Sfs.SettleAccount.Entities.BQ.HBPOSeSyncAppService" }); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("92cce083-20a8-5335-31ea-e390c57cac1f")); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,34 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class _202307263 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("92cce083-20a8-5335-31ea-e390c57cac1f")); |
||||
|
|
||||
|
migrationBuilder.InsertData( |
||||
|
table: "Set_JobItem", |
||||
|
columns: new[] { "Id", "ConcurrencyStamp", "Cron", "IsRunning", "Name", "Service" }, |
||||
|
values: new object[] { new Guid("d50400b0-b0d4-38d1-fcdf-b1e7ac1d3a68"), null, "0 0/1 * * * ?", false, "HBPO发运数据同步", "Win.Sfs.SettleAccount.Entities.BQ.HBPOSeSyncAppService" }); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("d50400b0-b0d4-38d1-fcdf-b1e7ac1d3a68")); |
||||
|
|
||||
|
migrationBuilder.InsertData( |
||||
|
table: "Set_JobItem", |
||||
|
columns: new[] { "Id", "ConcurrencyStamp", "Cron", "IsRunning", "Name", "Service" }, |
||||
|
values: new object[] { new Guid("92cce083-20a8-5335-31ea-e390c57cac1f"), null, "0 0/1 * * * ?", false, "HBPO发运数据同步", "Win.Sfs.SettleAccount.Entities.BQ.HBPOSeSyncAppService" }); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,58 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class _202307270001 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Extend3", |
||||
|
table: "Set_INVOICE_WAIT_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Extend4", |
||||
|
table: "Set_INVOICE_WAIT_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "BeginDate", |
||||
|
table: "Set_INVOICE_WAIT_DETAIL", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "EndDate", |
||||
|
table: "Set_INVOICE_WAIT_DETAIL", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "BeginDate", |
||||
|
table: "Set_INVOICE_WAIT_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "EndDate", |
||||
|
table: "Set_INVOICE_WAIT_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Extend3", |
||||
|
table: "Set_INVOICE_WAIT_DETAIL", |
||||
|
type: "nvarchar(50)", |
||||
|
maxLength: 50, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Extend4", |
||||
|
table: "Set_INVOICE_WAIT_DETAIL", |
||||
|
type: "nvarchar(50)", |
||||
|
maxLength: 50, |
||||
|
nullable: true); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,46 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class _202307271 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("d50400b0-b0d4-38d1-fcdf-b1e7ac1d3a68")); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "Set_SyncPositionFlag", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TableName = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
Position = 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) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_Set_SyncPositionFlag", x => x.Id); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "Set_SyncPositionFlag"); |
||||
|
|
||||
|
migrationBuilder.InsertData( |
||||
|
table: "Set_JobItem", |
||||
|
columns: new[] { "Id", "ConcurrencyStamp", "Cron", "IsDisabled", "IsRunning", "Name", "Service" }, |
||||
|
values: new object[] { new Guid("d50400b0-b0d4-38d1-fcdf-b1e7ac1d3a68"), null, "0 0/1 * * * ?", false, false, "HBPO发运数据同步", "Win.Sfs.SettleAccount.Entities.BQ.HBPOSeSyncAppService" }); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue