From 38748f8fbe700cc65721fc2d9b74306ca5590e01 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期二, 09 九月 2025 00:21:08 +0800
Subject: [PATCH] 1.PDA条码重打
---
service/base/MesPrintMangeer.cs | 26 ++++++++++++++++++++++++++
Controllers/Warehouse/MesBarCFController.cs | 27 +++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/Controllers/Warehouse/MesBarCFController.cs b/Controllers/Warehouse/MesBarCFController.cs
index 3199bfb..09436ea 100644
--- a/Controllers/Warehouse/MesBarCFController.cs
+++ b/Controllers/Warehouse/MesBarCFController.cs
@@ -97,6 +97,33 @@
/// <summary>
+ /// PDA閲嶆墦鏉$爜
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("BarRePrint")]
+ public ResponseResult BarRePrint(WarehouseQuery unity)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.tbBillList = new ExpandoObject();
+ resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(unity);
+ resultInfos.tbBillList.cfBarInfo = _mCf.getPrintBarInfo(unity);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+ /// <summary>
/// 鑾峰彇鏉$爜淇℃伅鍜岀墿鏂欎俊鎭�
/// </summary>
/// <returns></returns>
diff --git a/service/base/MesPrintMangeer.cs b/service/base/MesPrintMangeer.cs
index 5ee9f12..b73c912 100644
--- a/service/base/MesPrintMangeer.cs
+++ b/service/base/MesPrintMangeer.cs
@@ -56,6 +56,32 @@
return mergedData;
}
+ /// <summary>
+ /// PDA閲嶆墦鏉$爜
+ /// </summary>
+ /// <param name="query"></param>
+ /// <returns></returns>
+ /// <exception cref="ArgumentException"></exception>
+ public dynamic getPrintBarInfo(dynamic query) // 浣跨敤鍏蜂綋绫诲瀷鏇夸唬dynamic
+ {
+ // 鍙傛暟鏍¢獙
+ if (string.IsNullOrEmpty(query?.barcode))
+ throw new ArgumentException("鍘熷鏉$爜涓嶈兘涓虹┖");
+
+ // 浣跨敤寮虹被鍨嬪弬鏁�
+ var sqlParams = new List<SugarParameter> {
+ new("@pi_Bar", query.barcode.Trim())
+ };
+
+ var sql = @"EXEC prc_pda_basePrint_selBarInfo @pi_Bar ";
+
+ var mergedData = Db.Ado.SqlQuery<dynamic>(sql, sqlParams);
+
+ //if (mergedData.Count < 2) throw new Exception("鏉$爜淇℃伅瀛樺湪寮傚父锛岃鑱旂郴绠$悊鍛橈紒");
+
+ return mergedData;
+ }
+
// // 鐜板満鏀舵枡灞曠ず鍒楄〃
// public class PrintBarInfo
// {
--
Gitblit v1.9.3