From a50fb2af1d614e5651eeb2f063703b95dc81a5f7 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期五, 13 十二月 2024 21:21:15 +0800
Subject: [PATCH] 生产领料单的扫码接口,待扫物料和已扫物料的展示接口,条码拆分的接口

---
 service/Warehouse/WomdaaManager.cs |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 59 insertions(+), 1 deletions(-)

diff --git a/service/Warehouse/WomdaaManager.cs b/service/Warehouse/WomdaaManager.cs
index b6ad5b0..e08cc88 100644
--- a/service/Warehouse/WomdaaManager.cs
+++ b/service/Warehouse/WomdaaManager.cs
@@ -35,7 +35,7 @@
         string _intSum = "";
         using (var conn = new SqlConnection(DbHelperSQL.strConn))
         {
-            using (var cmd =new SqlCommand("[prc_sys_role_set_menuOrAction]", conn))
+            using (var cmd =new SqlCommand("[prc_pda_SCLL]", conn))
             {
                 try
                 {
@@ -93,6 +93,64 @@
         }
     }
 
+    //prC_pda_SCLL_CF
+    public ProductionPickDto ScanCodeCF(WarehouseQuery query)
+    {
+        string _strMsg = "";
+        string _intSum = "";
+        using (var conn = new SqlConnection(DbHelperSQL.strConn))
+        {
+            using (var cmd =new SqlCommand("[prc_pda_SCLL_CF]", conn))
+            {
+                try
+                {
+                    conn.Open();
+                    cmd.CommandType = CommandType.StoredProcedure;
+                    SqlParameter[] parameters =
+                    {
+                        new("@outMsg", SqlDbType.NVarChar, 300),
+                        new("@outSum", SqlDbType.NVarChar, 300),
+                        new("@c_User", query.userName),
+                        new("@p_biLL_no", query.daa001),
+                        new("@p_item_barcode", query.barcode),
+                        new("@num", query.num),
+                    };
+                    parameters[0].Direction = ParameterDirection.Output;
+                    parameters[1].Direction = ParameterDirection.Output;
+                    foreach (var parameter in parameters)
+                        cmd.Parameters.Add(parameter);
+                    cmd.ExecuteNonQuery();
+                    _strMsg  = parameters[0].Value.ToString();
+                    _intSum = parameters[1].Value.ToString();
+                    
+
+                    var result = Convert.ToInt32(_intSum);
+                    if (result <= 0)
+                    {
+                        throw new Exception(_strMsg);
+                    }
+                    
+                    var dto = new ProductionPickDto
+                    {
+                        daa001 = query.daa001,
+                        barcode = query.barcode
+                    };
+
+                    return dto;
+                    
+                }
+                catch (Exception ex)
+                {
+                    throw new Exception(ex.Message);
+                }
+                finally
+                {
+                    conn.Close();
+                }
+            }
+        }
+    }
+
     private ProductionPickDto getDaa001(WarehouseQuery query)
     {
         if (string.IsNullOrEmpty(query.daa001)) throw new Exception("宸ュ崟鍙蜂负绌�");

--
Gitblit v1.9.3