提交当前本机整理版本
This commit is contained in:
@@ -6,4 +6,31 @@ using System.Runtime.InteropServices;
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("ExecPythonPDF")]
|
||||
[assembly: Assemb
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ExecPythonPDF")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2026")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("cfb86248-5da9-4f84-b2bb-6044b62c1ddc")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
@@ -36,4 +36,28 @@ namespace ExecPythonPDF.Properties {
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static glo
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ExecPythonPDF.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <a
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ExecPythonPDF.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,4 +588,32 @@ namespace ExecPythonPDF
|
||||
int endLimit = nextMatch != null ? nextMatch.Index : content.Length;
|
||||
|
||||
int endP = p;
|
||||
|
||||
while (endP < endLimit && !char.IsWhiteSpace(content[endP])) endP++;
|
||||
|
||||
return content.Substring(p, endP - p).Trim();
|
||||
}
|
||||
}
|
||||
|
||||
// --- 工厂类 ---
|
||||
public static class BankExtractorFactory
|
||||
{
|
||||
private static readonly Dictionary<string, BankExtractor> Extractors = new Dictionary<string, BankExtractor>
|
||||
{
|
||||
{ "中国银行", new BOCExtractor() },
|
||||
{ "工商银行", new ICBCExtractor() },
|
||||
{ "成都银行", new ChengduBankExtractor() },
|
||||
{ "民生银行", new CMBCExtractor() },
|
||||
{ "浙商银行", new CZBankExtractor() }
|
||||
};
|
||||
|
||||
public static BankExtractor GetExtractor(string bankName) =>
|
||||
Extractors.ContainsKey(bankName) ? Extractors[bankName] : null;
|
||||
|
||||
public static string IdentifyBank(string filename)
|
||||
{
|
||||
foreach (var key in Extractors.Keys)
|
||||
if (filename.Contains(key)) return key;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -11,4 +11,35 @@ namespace PDFApi.Controllers
|
||||
[Route("Api/ProcessPDF")] // 自定义路由
|
||||
public IHttpActionResult ProcessPDF([FromBody] PDFRequest request)
|
||||
{
|
||||
|
||||
JObject rtnJobject = new JObject();
|
||||
rtnJobject.Add("success", "false");
|
||||
rtnJobject.Add("code", "0");
|
||||
rtnJobject.Add("msg", "");
|
||||
rtnJobject.Add("data", new JArray());
|
||||
try
|
||||
{
|
||||
if (request != null)
|
||||
{
|
||||
rtnJobject = PDFConvert.ExecutePdfExtraction(request.FileUrl, request.FileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("空数据");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
rtnJobject["success"] = "false";
|
||||
rtnJobject["code"] = "0";
|
||||
rtnJobject["msg"] = ex.Message;
|
||||
}
|
||||
return Ok(rtnJobject);
|
||||
}
|
||||
// 定义接收参数的实体类
|
||||
public class PDFRequest
|
||||
{
|
||||
public string FileUrl { get; set; }
|
||||
public string FileName { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,8 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的常规信息通过下列特性集
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("PDFApi")]
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的常规信息通过下列特性集
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("PDFApi")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PDFApi")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2026")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
// 对 COM 组件不可见。如果需要
|
||||
// 从 COM 访问此程序集中的某个类型,请针对该类型将 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
|
||||
[assembly: Guid("dd0c73ce-e2c0-4fff-9a0f-3e40fce1d46a")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 内部版本号
|
||||
// 修订版本
|
||||
//
|
||||
// 可以指定所有值,也可以使用“修订号”和“内部版本号”的默认值,
|
||||
// 方法是按如下所示使用 "*":
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
Reference in New Issue
Block a user