分离KJD WebService
This commit is contained in:
1 parent
b512ee992f
commit
c7bcae3565
1479 files changed
+376
-595675
No files matched your search
@@ -1,27 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.4" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
|
||||
<PackageReference Include="NUnit" Version="4.3.2" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.7.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\TEMUKJD\KJD.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="NUnit.Framework" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,113 +0,0 @@
|
||||
using System.Text;
|
||||
using TemuKJD.BLL;
|
||||
using TemuKJD.BLL.ImportConverts;
|
||||
using Work.GoodDetail;
|
||||
|
||||
namespace KJD.Test
|
||||
{
|
||||
public class Tests
|
||||
{
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Test1()
|
||||
{
|
||||
string json = File.ReadAllText(@"C:\Users\chaih\Documents\xwechat_files\hongfei357_a567\msg\file\2026-08\850\531430339344.txt");
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestWXToPDD()
|
||||
{
|
||||
string folderPath = @"C:\Users\chaih\Documents\xwechat_files\hongfei357_a567\msg\file\2026-08\破局(1)";
|
||||
if (!Directory.Exists(folderPath))
|
||||
{
|
||||
Console.WriteLine($"文件夹不存在: {folderPath}");
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取所有 txt 文件
|
||||
var txtFiles = Directory.GetFiles(folderPath, "*.txt", SearchOption.AllDirectories);
|
||||
|
||||
if (txtFiles.Length == 0)
|
||||
{
|
||||
Console.WriteLine("未找到任何 .txt 文件");
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine($"共找到 {txtFiles.Length} 个 txt 文件,开始扫描...\n");
|
||||
Console.WriteLine(new string('-', 60));
|
||||
|
||||
var matchedFiles = new List<string>();
|
||||
var unmatchedFiles = new List<string>();
|
||||
var errorFiles = new List<string>();
|
||||
|
||||
foreach (var filePath in txtFiles)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 读取文件内容
|
||||
var frontProdInfo = ConverterToPddFactory.Convert(filePath);
|
||||
var isMatch = frontProdInfo != null;
|
||||
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
string result = isMatch ? "✅ 匹配" : "❌ 不匹配";
|
||||
|
||||
Console.WriteLine($"[{result}] {fileName}");
|
||||
|
||||
if (isMatch)
|
||||
{
|
||||
matchedFiles.Add(fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
unmatchedFiles.Add(fileName);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
Console.WriteLine($"[⚠️ 读取失败] {fileName} - {ex.Message}");
|
||||
errorFiles.Add(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
// 输出统计结果
|
||||
Console.WriteLine(new string('-', 60));
|
||||
Console.WriteLine($"\n📊 扫描完成统计:");
|
||||
Console.WriteLine($" ✅ 匹配: {matchedFiles.Count} 个");
|
||||
Console.WriteLine($" ❌ 不匹配: {unmatchedFiles.Count} 个");
|
||||
Console.WriteLine($" ⚠️ 读取失败: {errorFiles.Count} 个");
|
||||
|
||||
if (matchedFiles.Count > 0)
|
||||
{
|
||||
Console.WriteLine($"\n📋 匹配文件列表:");
|
||||
foreach (var file in matchedFiles)
|
||||
{
|
||||
Console.WriteLine($" - {file}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void TestWXToPDDV2()
|
||||
{
|
||||
string filePath = @"C:\Users\chaih\Documents\xwechat_files\hongfei357_a567\msg\file\2026-08\10000525304068.txt";
|
||||
var frontProdInfo = ConverterToPddFactory.Convert(filePath);
|
||||
var isMatch = frontProdInfo != null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestWXToPDDV3()
|
||||
{
|
||||
string filePath = @"C:\Users\chaih\Documents\xwechat_files\hongfei357_a567\msg\file\2026-08\10000528322732(1).json";
|
||||
var frontProdInfo = ConverterToPddFactory.Convert(filePath);
|
||||
var isMatch = frontProdInfo != null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user