From a652949e0c299112797e1ed43a6b9f359d2352dc Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期二, 21 五月 2024 16:55:03 +0800
Subject: [PATCH] 器具缓存列表模块所调用方法新增,出站记录新增单据方法修正

---
 WebAPI/Controllers/条码管理/MouldController.cs |  135 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 134 insertions(+), 1 deletions(-)

diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
index 26a9602..68d9280 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/MouldController.cs"
@@ -250,6 +250,139 @@
 
         #endregion
 
+        #region 鍣ㄥ叿缂撳瓨鍒楄〃妯″潡璋冪敤鏂规硶
+
+        #region 鍣ㄥ叿缂撳瓨鍒楄〃鐣岄潰锛岃繑鍥炵紦瀛樺垪琛ㄤ俊鎭�
+
+        /// <summary>
+        /// 鍣ㄥ叿缂撳瓨鍒楄〃鐣岄潰锛岃繑鍥炵紦瀛樺垪琛ㄤ俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("MouldController/GetKf_PonderationBillMain_TempList_New_Json")]
+        [HttpGet]
+        public object GetKf_PonderationBillMain_TempList_New_Json(string HBillType, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_Sc_GetMouldStockBillMain_TempList '" + HBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Sc_GetMouldStockBillMain_TempList");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    List<object> columnNameList = new List<object>();
+                    //娣诲姞鍒楀悕
+                    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鍒楀璞$殑鍒楀悕
+                    }
+                    objJsonResult.code = "0";
+                    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;
+            }
+        }
+
+        #endregion
+
+        #region 鍣ㄥ叿缂撳瓨鍒楄〃    缂栬緫鍔熻兘璋冪敤
+
+        /// <summary>
+        /// 鍣ㄥ叿缂撳瓨鍒楄〃閫夋嫨缂栬緫鏃讹紝鍒ゆ柇鎵�閫夊崟鎹槸鍚﹀凡瀛樺湪涓婁紶璁板綍
+        /// </summary>
+        /// <returns></returns>
+        [Route("MouldController/MouldTempList_Modify_Json")]
+        [HttpGet]
+        public object MouldTempList_Modify_Json(long HInterID, string HBillNo, string HBillType)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_MouldTempList_Modify " + HInterID + ",'" + HBillNo + "','" + HBillType + "'", "h_p_WMS_MouldTempList_Modify");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "妯″叿缂撳瓨鍒楄〃缂栬緫鍓嶅垽鏂け璐ワ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎴愬姛";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "缂撳瓨鍒楄〃缂栬緫鍓嶅垽鏂け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 鍣ㄥ叿缂撳瓨鍒楄〃妯″潡  鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+
+        /// <summary>
+        /// 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+        /// </summary>
+        /// <returns></returns>
+        [Route("MouldController/set_DeleteMouldBillList_Json")]
+        [HttpGet]
+        public object set_DeleteMouldBillList_Json(long HInterID, string HBillType)
+        {
+            try
+            {
+                oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎鍣ㄥ叿缂撳瓨鍒楄〃鍗曟嵁澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #endregion
+
 
         #region 鍣ㄥ叿鎻愪氦鐢熷崟澶勭悊鏂规硶
 
@@ -620,7 +753,7 @@
                 BillNew.omodel.HDate = mainList[0].HDate;
                 BillNew.omodel.HRemark = mainList[0].HRemark;
                 BillNew.omodel.HMaker = mainList[0].HMaker;
-                BillNew.omodel.HSTOCKORGID = mainList[0].HSTOCKORGID;
+                BillNew.omodel.HSTOCKORGID = mainList[0].HStockInOrgID;
                 DBUtility.ClsPub.CurUserName = mainList[0].HMaker;
                 //====================================================
                 BillNew.omodel.HSupID = mainList[0].HSupID;

--
Gitblit v1.9.1