From 3495df4f340b2027dbe6c2d5ab40b91cc11dec5f Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期六, 26 七月 2025 12:49:04 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/仓存管理/条码出入库记录/Kf_ICStockInOutBillController.cs |   69 ++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 0 deletions(-)

diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs"
index 172c721..50ddd72 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\345\207\272\345\205\245\345\272\223\350\256\260\345\275\225/Kf_ICStockInOutBillController.cs"
@@ -1,5 +1,6 @@
 锘縰sing Newtonsoft.Json;
 using Newtonsoft.Json.Converters;
+using Newtonsoft.Json.Linq;
 using System;
 using System.Collections.Generic;
 using System.Data;
@@ -162,6 +163,74 @@
         }
         #endregion
 
+        #region 鍑哄叆搴撳崟鎹潯鐮佹槑缁� 璁剧疆鏁版嵁
+        class BarCodeDetailSaveData
+        {
+            public long HInterID;
+            public string HBillNo;
+            public string HBillType;
+            public string HBarCode;
+            public double HMaterialJQty;
+            public double HWeight_TL;
+            public double HWeight_CP;
+        }
+
+        [Route("Kf_ICStockInOutBill/Kf_BarCodeDetailQuery_saveData")]
+        [HttpPost]
+        public json Kf_BarCodeDetailQuery_saveData([FromBody] JObject sMainSub)
+        {
+            try
+            {
+                var _value = sMainSub["msg"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString(); //瀛愯〃鏁版嵁
+                string user = sArray[1].ToString();
+
+                msg2 = msg2.ToString();
+                List<BarCodeDetailSaveData> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<BarCodeDetailSaveData>>(msg2);
+
+                oCN.BeginTran();
+                foreach (BarCodeDetailSaveData oSub in mainList)
+                {
+                    long HInterID = oSub.HInterID;
+                    string HBillNo = oSub.HBillNo;
+                    string HBillType = oSub.HBillType;
+                    string HBarCode = oSub.HBarCode;
+                    double HMaterialJQty = oSub.HMaterialJQty;
+                    double HWeight_TL = oSub.HWeight_TL;
+                    double HWeight_CP = oSub.HWeight_CP;
+
+                    string sql = "update Kf_ICStockBillSub_WMS set " +
+                        "HMaterialJQty = " + HMaterialJQty + "" +
+                        ",HWeight_TL = " + HWeight_TL + "" +
+                        ",HWeight_CP = " + HWeight_CP + "" +
+                        "where HInterID = " + HInterID + " " +
+                        "and HBillNo = '" + HBillNo + "' " +
+                        "and HBillType = '" + HBillType + "' " +
+                        "and HBarCode = '" + HBarCode + "' ";
+                    oCN.RunProc(sql);
+                }
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+
+        #endregion
 
         #region 鏉$爜鍑哄叆搴撶紦瀛�
         #region 鏉$爜鍑哄叆搴撶紦瀛樺垪琛�

--
Gitblit v1.9.1