From 2bf6de5d4748d28f7f3a098af25503d6a0c619d1 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期三, 19 十一月 2025 11:16:03 +0800
Subject: [PATCH] 多码合一
---
WebAPI/Controllers/MateOutController.cs | 143 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 143 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs
index ae20b46..cfbae7f 100644
--- a/WebAPI/Controllers/MateOutController.cs
+++ b/WebAPI/Controllers/MateOutController.cs
@@ -1212,6 +1212,149 @@
}
}
+ #region 杞﹂棿瀹氫綅 杞﹂棿鏌ヨ鏉$爜鏄惁瀛樺湪
+ [Route("KF_ICInventory_WorkShop/SearchHBarCode")]
+ [HttpGet]
+ public object checkHBarCode_Batch(string HBarCode, string user, int HOrgID)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "h_v_Gy_BarCodeBill");
+
+ //鍒ゆ柇鏉$爜鏄惁瀛樺湪鏉$爜妗f
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "[0000-1-037]鏍¢獙鎴愬姛";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛佸綋鍓嶆壒娆$爜鏃犲叆搴撲俊鎭妫�鏌ユ槸鍚︽壂閿�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 杞﹂棿瀹氫綅 鍒犻櫎鏉$爜搴撳瓨璁板綍
+ [Route("KF_ICInventory_WorkShop/ClearHBarCode")]
+ [HttpGet]
+ public object ClearHBarCode(string HBarCode, long HWHID, long HSPID, string user, int HOrgID)
+ {
+ try
+ {
+
+ //淇濆瓨鍚庢帶鍒�=========================================
+ ds = oCN.RunProcReturn($"exec h_p_KF_MaterialUpper_Clear '{HBarCode}','{HWHID}',{HSPID},'{user}',{HOrgID}", "h_p_KF_ICInventory_Clear");
+
+ //鍐欏叆鏃ュ織
+ ClsPub.Add_Log("", "鍒犻櫎椤圭洰锛岀墿鏂欎唬鐮侊細" + HBarCode + ",浠撲綅id锛�" + HSPID, user);
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "[0000-1-010]娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ //杞﹂棿瀹氫綅 杞﹂棿涓婁笅鏋舵椂闂存煡璇�
+ [Route("Kf_WorkShopICStockBill/List")]
+ [HttpGet]
+ public object Kf_WorkShopICStockBillList(string HBillType, string HCarBarCode, string HProcExBillNo, string HMaterNumber, long HWHID, long HSPID, string sWhere)
+ {
+ try
+ {
+
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ List<object> columnNameList = new List<object>();
+ if(sWhere!=null)
+ {
+ sWhere = sWhere.Replace("'", "''");
+ }
+ DataSet ds = oCN.RunProcReturn("exec h_p_KF_WorkShopICStockBillList '" + HBillType + "','" + HCarBarCode + "','" + HProcExBillNo + "','" + HMaterNumber + "'," + HWHID + "," + HSPID + ",'" + sWhere + "'", "h_p_KF_WorkShopICStockBillList");
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
[Route("MateOutBill/Delete_Json")]
[HttpGet]
public object Delete_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType)
--
Gitblit v1.9.1