From b57da8b5cc90a4f9a66f830fad03d76c8512d2fc Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 29 十一月 2024 14:37:59 +0800
Subject: [PATCH] 采购销售部分单据添加 编辑视图

---
 WebAPI/Controllers/XSGL/Xs_CusBalanceReportController.cs |   63 ++++++++++++++++++++++++++++++-
 1 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Xs_CusBalanceReportController.cs b/WebAPI/Controllers/XSGL/Xs_CusBalanceReportController.cs
index 4aa172b..1631778 100644
--- a/WebAPI/Controllers/XSGL/Xs_CusBalanceReportController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_CusBalanceReportController.cs
@@ -111,12 +111,12 @@
                 //鏌ヨ
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    string sql = "exec h_p_Xs_CusBalanceReport_Query '','" + userid + "'";
+                    string sql = "exec h_p_Xs_CusBalanceReport_HIsUsingBalanceEntry_Query '','" + userid + "'," + HCusID;
                     ds = oCN.RunProcReturn(sql, "h_p_Xs_CusBalanceReport_Query");
                 }
                 else
                 {
-                    string sql = "exec h_p_Xs_CusBalanceReport_Query '" + sWhere + "','" + userid + "'";
+                    string sql = "exec h_p_Xs_CusBalanceReport_HIsUsingBalanceEntry_Query '" + sWhere +"','" + userid + "'," + HCusID;
                     ds = oCN.RunProcReturn(sql, "h_p_Xs_CusBalanceReport_Query");
                 }
 
@@ -145,5 +145,64 @@
             }
         }
         #endregion
+
+        #region 鍑哄簱鏉$爜鏄庣粏鎶ヨ〃 鏌ヨ
+        /// <summary>
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Xs_SellOutCompareToProductReport/list")]
+        [HttpGet]
+        public object getXs_SellOutCompareToProductReport(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Xs_SellOutCompareToProductReport", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Xs_SellOutCompareToProductReport order by 鏃ユ湡 desc", "h_v_Xs_SellOutCompareToProductReport");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Xs_SellOutCompareToProductReport where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鏃ユ湡 desc";
+                    ds = oCN.RunProcReturn(sql, "h_v_Xs_SellOutCompareToProductReport");
+                }
+
+                //娣诲姞鍒楀悕
+                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 = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                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