帮助手册

机明程序单接收端演示(JmSetupSheetReceiver)

.NET Framework 4.8 控制台程序:接收机明推送的程序单 JSON,还原为强类型 SetupsheetData,并明文 / 分行落盘。

源码文件

文件说明
Program.csHttpListener、命令行交互
SetupSheetOps.cs反序列化、明文、对象操作
Models/SetupsheetModels.cs强类型模型
程序单提交.txt.example机明侧配置样例
Samples/sample-setupsheet.json联调样例

编译与运行

msbuild JmSetupSheetReceiver.csproj /p:Configuration=Release
bin\Release\JmSetupSheetReceiver.exe

默认监听:http://127.0.0.1:1234/

收到 POST 后落盘

  1. Received\*.json — 原文(机明真实推送一般为单行)
  2. Received\*.pretty.json — 分行稿(便于阅读)
  3. Received\*.txt — 中英对照明文

Body 固定按 UTF-8 解码。

常用参数 / 命令

JmSetupSheetReceiver.exe --fail

控制台:summary / text / tools / tool <名> / images / dump / load / help / quit

自测样例

$body = Get-Content -Raw -Encoding UTF8 Samples\sample-setupsheet.json
Invoke-RestMethod -Uri http://127.0.0.1:1234/ -Method Post -Body $body -ContentType "application/json; charset=utf-8"

仅供联调学习,不含鉴权与生产级持久化。

下载完整源码包 · 源码文件列表 · 返回联调说明