From ca80cd37b443624cc69b9bad23c6fcb8550c15ee Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 22 十月 2025 10:15:41 +0800
Subject: [PATCH] 新增 物料 收料入库 生产入库 出厂 检验方案ID 字段 新增 惠康 生产领料单 获取单据 API

---
 WebAPI/Controllers/WebAPIController.cs |   70 +++++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index c9d8afc..ac39ea9 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -20179,6 +20179,7 @@
             }
         }
 
+       
         /// <summary>
         /// 鏍规嵁鐗╂枡+宸ュ簭鑾峰彇妫�楠屾柟妗�
         /// </summary>
@@ -22614,6 +22615,7 @@
             }
         }
 
+        #region 灏忓崼鐢靛櫒鑾峰彇鐗╂枡鏉$爜瀵瑰簲鍗曟嵁
         /// <summary>
         /// 灏忓崼鐢靛櫒鑾峰彇鐗╂枡鏉$爜瀵瑰簲鍗曟嵁
         /// </summary>
@@ -22655,5 +22657,73 @@
             }
         }
 
+        #endregion
+
+
+        #region 鎯犲悍 鐢熶骇棰嗘枡鍗曟牎楠� 鎵弿婧愬崟 鑾峰彇鐢熶骇棰嗘枡鍗曞拰涓嬫父棰嗘枡鍗曟湭瀹℃牳 鍗曟嵁
+        [Route("web/get_BillBarCode_BillCheck_Json_MateOut_HuiKang")]
+        [HttpGet]
+        public Object get_BillBarCode_BillCheck_Json_MateOut_HuiKang(string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID)
+        {
+            WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
+            WebS.WebService1 oWebs = new WebS.WebService1();
+            try
+            {
+                WebSoBar = null;
+                // 1. 鏌ヨ閲戣澏浜戜腑 鎵�鏈夌鍚堢殑鐢熶骇棰嗘枡鍗曞拰涓嬫父棰嗘枡鍗�
+                ds = oCN.RunProcReturn($@"
+                    select HBillNo from h_v_Kf_MateOutBillList_K3 where HBillNo like '%{HBillNo}%'
+                ", "h_v_Kf_MateOutBillList_K3");
+
+                List<string> HBillNoList = new List<string>();
+                foreach(var row in ds.Tables[0].Rows)
+                {
+                    HBillNoList.Add(row.ToString());
+                }
+
+                // 2. 閬嶅巻鑾峰彇鐨勭敓浜ч鏂欏崟
+                foreach(string HBillNoOne in HBillNoList)
+                {
+                    WebSoBar = oWebs.get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+
+                    if(WebSoBar != null)
+                    {
+                        // 3. 鑾峰彇鍒扮鍚堟潯浠剁殑杩斿洖鍊硷紝绔嬪嵆杩斿洖
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛";
+                        objJsonResult.data = WebSoBar;
+                        return objJsonResult;
+                    }
+                }
+
+                // 3. 鎵�鏈夊崟鎹兘琚鏍革紝鎴栬�呮病鏈夌鍚堣姹傜殑鍗曟嵁锛岃繑鍥為敊璇俊鎭�
+                if (WebSoBar == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = WebSoBar;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵弿鍗曟嵁鏉$爜澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }

--
Gitblit v1.9.1