From 05469c534399f7ff3e1d495b8558f812754fbc26 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期五, 22 三月 2024 17:22:10 +0800
Subject: [PATCH]  销售订单执行汇总表 报表的 存储过程编写。 销售毛利估算分析表 报表的 存储过程编写。 销售出库汇总表 报表的 存储过程编写。 客户发货及时率表 报表的 存储过程编写。

---
 WebAPI/WebAPI.csproj                             |    1 
 WebAPI/Controllers/XSGL/Xs_SeReportController.cs |  196 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 197 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/XSGL/Xs_SeReportController.cs b/WebAPI/Controllers/XSGL/Xs_SeReportController.cs
new file mode 100644
index 0000000..4660234
--- /dev/null
+++ b/WebAPI/Controllers/XSGL/Xs_SeReportController.cs
@@ -0,0 +1,196 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers
+{
+    //閿�鍞姤琛–ontroller
+    public class Xs_SeReportController : ApiController
+    {
+        //閿�鍞姤琛�
+        
+
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+
+
+        #region 閿�鍞瘺鍒╀及绠楀垎鏋愭姤琛� 鏌ヨ
+        /// <summary>
+        /// 杩斿洖椤圭洰闃舵鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Xs_SeReport/Xs_SeOrderBillProfitReportList")]
+        [HttpGet]
+        public object Xs_SeOrderBillProfitReportList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec  h_p_Xs_SeOrderBillProfitReport   '" + sWhere + "',''", "h_p_Xs_SeOrderBillProfitReport");
+
+                //娣诲姞鍒楀悕
+                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
+
+
+        #region 閿�鍞嚭搴撴眹鎬绘姤琛� 鏌ヨ
+        /// <summary>
+        /// 杩斿洖椤圭洰闃舵鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Xs_SeReport/Xs_SellOutStockSumReportList")]
+        [HttpGet]
+        public object Xs_SellOutStockSumReportList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec  h_p_Xs_SellOutStockSumReport   '" + sWhere + "',''  ", "h_p_Xs_SellOutStockSumReport");
+
+                //娣诲姞鍒楀悕
+                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
+
+        #region 閿�鍞鍗曟墽琛屾眹鎬绘姤琛� 鏌ヨ
+        /// <summary>
+        /// 杩斿洖椤圭洰闃舵鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Xs_SeReport/Xs_SeOrderBillProcessSumReportList")]
+        [HttpGet]
+        public object Xs_SeOrderBillProcessSumReportList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec  h_p_Xs_SeOrderBillProcessSumReport    '" + sWhere + "','',''", "h_p_Xs_SeOrderBillProcessSumReport");
+
+                //娣诲姞鍒楀悕
+                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
+
+        #region 瀹㈡埛鍙戣揣鍙婃椂鐜囨姤琛� 鏌ヨ
+        /// <summary>
+        /// 杩斿洖椤圭洰闃舵鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Xs_SeReport/Xs_SeOrderSendDaySumReportList")]
+        [HttpGet]
+        public object Xs_SeOrderSendDaySumReportList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec  h_p_Xs_SeOrderSendDaySumReport    '" + sWhere + "','',''", "h_p_Xs_SeOrderSendDaySumReport");
+
+                //娣诲姞鍒楀悕
+                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
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 203c43a..f5b1510 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -483,6 +483,7 @@
     <Compile Include="Controllers\CGGL\YF_PayMentBillController.cs" />
     <Compile Include="Controllers\XSGL\YS_ReceiveBackBillController.cs" />
     <Compile Include="Controllers\CGGL\YF_PayMentOtherBillController.cs" />
+    <Compile Include="Controllers\XSGL\Xs_SeReportController.cs" />
     <Compile Include="Controllers\XSGL\YS_ReceiveOtherBillController.cs" />
     <Compile Include="Controllers\XSGL\YS_ReceiveBillController.cs" />
     <Compile Include="Controllers\XSGL\Kf_SellOutBillController.cs" />

--
Gitblit v1.9.1