From c6d97fdc861beb8092c783ff7d1db2c5b57e6700 Mon Sep 17 00:00:00 2001 From: CZY <2817212736@qq.com> Date: Mon, 26 Feb 2024 09:26:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B8=85=E7=90=86=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MesETL.App/Program.cs | 16 +++++++++++++++- MesETL.App/appsettings.json | 4 ++-- MesETL.sln | 6 ++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/MesETL.App/Program.cs b/MesETL.App/Program.cs index ee25d1c..c2299aa 100644 --- a/MesETL.App/Program.cs +++ b/MesETL.App/Program.cs @@ -260,6 +260,13 @@ async Task RunProgram() return false; break; } + // OrderDataParts删除对应Order.OrderNo不存在的对象 + case TableNames.OrderDataParts: + { + if (!await cache.ExistsAsync(CacheKeysFunc.Order_OrderNo_CompanyID(record["OrderNo"]))) + return false; + break; + } // OrderBlockPlan删除CreateTime < 202301的 case TableNames.OrderBlockPlan: { @@ -409,7 +416,14 @@ async Task RunProgram() record["CompanyID"] = // 获取Order.OrderNo -> CompanyID ThrowIfNoCached(await cache.GetStringAsync(CacheKeysFunc.Order_OrderNo_CompanyID(record["OrderNo"])), - TableNames.OrderBoxBlock, TableNames.Order, "OrderNo", "无法获取对应的CompanyID"); + TableNames.OrderDataBlock, TableNames.Order, "OrderNo", "无法获取对应的CompanyID"); + break; + // 修正OrderDataParts.CompanyID: + case TableNames.OrderDataParts: + record["CompanyID"] = + // 获取Order.OrderNo -> CompanyID + ThrowIfNoCached(await cache.GetStringAsync(CacheKeysFunc.Order_OrderNo_CompanyID(record["OrderNo"])), + TableNames.OrderDataParts, TableNames.Order, "OrderNo", "无法获取对应的CompanyID"); break; // OrderModule添加ShardKey列,移除ViewFileName列 case TableNames.OrderModule: diff --git a/MesETL.App/appsettings.json b/MesETL.App/appsettings.json index 3fda32a..afe2598 100644 --- a/MesETL.App/appsettings.json +++ b/MesETL.App/appsettings.json @@ -11,7 +11,7 @@ "InputDir": "D:\\Dump\\NewMockData", // Csv数据输入目录 "UseMock": false, // 使用模拟数据进行测试 "MockCountMultiplier": 1, // 模拟数据量级的乘数 - "TableOrder": ["order", "order_data_block"], // 按顺序输入的表 + "TableOrder": ["order", "order_data_parts"], // 按顺序输入的表 "TableIgnoreList": [] // 忽略输入的表 }, "Transform":{ @@ -30,7 +30,7 @@ "NoOutput": ["order"], "ForUpdate": { - "order_data_block": "CompanyID = new.CompanyID" + "order_data_parts": "CompanyID = new.CompanyID" } }, "RecordQueue":{ diff --git a/MesETL.sln b/MesETL.sln index 20f6502..1bc248f 100644 --- a/MesETL.sln +++ b/MesETL.sln @@ -8,6 +8,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MesETL.Tool", "MesETL.Tool\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MesETL.Shared", "MesETL.Shared\MesETL.Shared.csproj", "{FE134001-0E22-458B-BEF2-29712A29087E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MesETL.Clean", "MesETL.Clean\MesETL.Clean.csproj", "{E1B2BED0-EBA6-4A14-BAD5-8EC4E528D7E0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,5 +32,9 @@ Global {FE134001-0E22-458B-BEF2-29712A29087E}.Debug|Any CPU.Build.0 = Debug|Any CPU {FE134001-0E22-458B-BEF2-29712A29087E}.Release|Any CPU.ActiveCfg = Release|Any CPU {FE134001-0E22-458B-BEF2-29712A29087E}.Release|Any CPU.Build.0 = Release|Any CPU + {E1B2BED0-EBA6-4A14-BAD5-8EC4E528D7E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E1B2BED0-EBA6-4A14-BAD5-8EC4E528D7E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E1B2BED0-EBA6-4A14-BAD5-8EC4E528D7E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E1B2BED0-EBA6-4A14-BAD5-8EC4E528D7E0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal