From 0bcdaa2fb91b3f961e5c33ae6afd9a8587e1ec5a Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 02 八月 2024 15:14:24 +0800
Subject: [PATCH] 钉钉工作汇报功能优化

---
 WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs |  107 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 107 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs b/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs
index 9b417d9..ba6bd32 100644
--- a/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs
+++ b/WebAPI/Controllers/XSGL/Kf_SellOutBillController.cs
@@ -593,6 +593,28 @@
                     oCN.RunProc("exec h_p_Kf_SellOutBill_Check " + HInterID + ",'" + oBill.BillType + "','" + CurUserName + "'");
                     //瀹℃牳鏇存柊 鍙婃椂搴撳瓨琛� 鍑忓皯搴撳瓨
                     ds = oCN.RunProcReturn("exec h_KF_UPDateICinventory  '" + HInterID + "','" + oBill.BillType + "','1'", "h_KF_UPDateICinventory");
+                    //=========================瀹℃牳鍙嶅鏍稿悗璐熷簱瀛樻帶鍒�  
+                    DataSet ds2 = oCN.RunProcReturn("Exec h_p_KF_ICinventoryStockCtrl '" + HInterID + "', '" + oBill.BillType + "'", "h_p_KF_ICinventoryStockCtrl");
+                    if (ds2 == null)
+                    {
+                        oCN.RollBack();
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + "搴撳瓨鏇存柊鍚庢帶鍒跺垽鏂け璐�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                    {
+                        oCN.RollBack();
+                        string sReturn = "搴撳瓨鏇存柊澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + sReturn;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //============================
                     //鍐欏叆鏃ュ織
                     string WorkList = "瀹℃牳鍗曟嵁锛屽崟鎹彿锛�" + oBill.omodel.HBillNo;
                     string SystemName = "LMES-閿�鍞嚭搴撳崟妯″潡";
@@ -1188,5 +1210,90 @@
             }
         }
         #endregion
+
+        #region 閿�鍞嚭搴撳崟 涓嬫煡
+        /// <summary>
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <returns></returns>
+        [Route("Kf_SellOutBill/SellOutBill_LookDown")]
+        [HttpGet]
+        public object SellOutBill_LookDown(int HInterID)
+        {
+            try
+            {
+                List<object> columnNameListSum = new List<object>();
+                List<object> columnNameList0 = new List<object>();
+                //List<object> columnNameList1 = new List<object>();
+                //List<object> columnNameList2 = new List<object>();
+                //List<object> columnNameList3 = new List<object>();
+                //List<object> columnNameList4 = new List<object>();
+
+                string sql = "exec h_p_Kf_SellOutBill_lookdown " + HInterID;
+                ds = oCN.RunProcReturn(sql, "h_p_Kf_SellOutBill_lookdown");
+
+                //娣诲姞 閿�鍞皟浠峰崟 鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList0.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                ////娣诲姞 鐢熶骇璁㈠崟 鍒楀悕
+                //foreach (DataColumn col in ds.Tables[1].Columns)
+                //{
+                //    Type dataType = col.DataType;
+                //    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                //    columnNameList1.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                //}
+
+                ////娣诲姞 鐗规壒鐢宠鍗� 鍒楀悕
+                //foreach (DataColumn col in ds.Tables[2].Columns)
+                //{
+                //    Type dataType = col.DataType;
+                //    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                //    columnNameList2.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                //}
+
+                ////娣诲姞 閿�鍞嚭搴撳崟 鍒楀悕
+                //foreach (DataColumn col in ds.Tables[3].Columns)
+                //{
+                //    Type dataType = col.DataType;
+                //    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                //    columnNameList3.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                //}
+
+                ////娣诲姞 宸ュ簭娴佽浆鍗� 鍒楀悕
+                //foreach (DataColumn col in ds.Tables[4].Columns)
+                //{
+                //    Type dataType = col.DataType;
+                //    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                //    columnNameList4.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                //}
+
+                columnNameListSum.Add(columnNameList0);
+                //columnNameListSum.Add(columnNameList1);
+                //columnNameListSum.Add(columnNameList2);
+                //columnNameListSum.Add(columnNameList3);
+                //columnNameListSum.Add(columnNameList4);
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables;
+                objJsonResult.list = columnNameListSum;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1