From a04ee7ab3b4cb4e4bb73cda632233f043e7422f9 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 16 五月 2025 08:31:31 +0800
Subject: [PATCH] 1.条码拆分实现无线打印拆分条码.

---
 service/Warehouse/MesBarCFManager.cs        |   17 +++++++++++++++--
 Controllers/Warehouse/MesBarCFController.cs |   12 ++++++++++--
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/Controllers/Warehouse/MesBarCFController.cs b/Controllers/Warehouse/MesBarCFController.cs
index adfe372..33abddd 100644
--- a/Controllers/Warehouse/MesBarCFController.cs
+++ b/Controllers/Warehouse/MesBarCFController.cs
@@ -1,9 +1,12 @@
 锘縰sing System.Dynamic;
+using Masuit.Tools.Win32.AntiVirus;
 using Microsoft.AspNetCore.Mvc;
 using NewPdaSqlServer.Dto.service;
 using NewPdaSqlServer.entity;
+using NewPdaSqlServer.service.@base;
 using NewPdaSqlServer.service.Warehouse;
 using NewPdaSqlServer.util;
+using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
 
 namespace NewPdaSqlServer.Controllers.Warehouse;
 
@@ -12,6 +15,8 @@
 public class MesBarCFController : ControllerBase
 {
     private readonly MesBarCFManager m = new();
+
+    private readonly MesPrintMangeer _mCf = new();
 
     /// <summary>
     ///     鑾峰彇鏉$爜淇℃伅鍜岀墿鏂欎俊鎭�
@@ -48,11 +53,14 @@
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.BarCF(unity);
+            resultInfos.tbBillList = new ExpandoObject();
+            resultInfos.tbBillList.printInfo = _mCf.getPrintInfo(unity);
+            var scanResult = m.BarCF(unity);
+            resultInfos.tbBillList.cfBarInfo = _mCf.getCfInfo(scanResult);
             return new ResponseResult
             {
                 status = 0,
-                message = resultInfos.tbBillList,
+                message = "OK",
                 data = resultInfos
             };
         }
diff --git a/service/Warehouse/MesBarCFManager.cs b/service/Warehouse/MesBarCFManager.cs
index ac3e4de..b7e431b 100644
--- a/service/Warehouse/MesBarCFManager.cs
+++ b/service/Warehouse/MesBarCFManager.cs
@@ -32,10 +32,11 @@
         return itemInfo;
     }
 
-    public string BarCF(WarehouseQuery unity)
+    public ProductionPickDto BarCF(WarehouseQuery unity)
     {
         var _strMsg = "";
         var _intSum = "";
+        var _cfBar = "";//鎷嗗垎鍚庢潯鐮�
         using (var conn = new SqlConnection(DbHelperSQL.strConn))
         {
             if (unity.userName.IsNullOrEmpty()) throw new Exception("鐢ㄦ埛鍚嶄笉鍏佽涓虹┖");
@@ -67,11 +68,23 @@
                     cmd.ExecuteNonQuery();
                     _strMsg = parameters[0].Value.ToString();
                     _intSum = parameters[1].Value.ToString();
+                    _cfBar = parameters[2].Value.ToString();
+
 
                     var result = Convert.ToInt32(_intSum);
                     if (result <= 0) throw new Exception(_strMsg);
 
-                    return _strMsg;
+                    var dto = new ProductionPickDto
+                    {
+                        barcode = unity.barcode,//鍘熸潯鐮�
+                        cfBarcode = _cfBar//鎷嗗垎鍚庢潯鐮�
+                    };
+                    return dto;
+
+                    //var result = Convert.ToInt32(_intSum);
+                    //if (result <= 0) throw new Exception(_strMsg);
+
+                    //return _strMsg;
 
                     //return 0;
 

--
Gitblit v1.9.3