From cfa8ce1f0b9350a203d10cf90f8b8c224b6784f4 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 26 九月 2024 10:53:34 +0800
Subject: [PATCH] 工序出站汇报单:分页

---
 WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs |   96 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 76cbab4..578696e 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -1715,6 +1715,102 @@
         }
         #endregion
 
+        #region 杩斿洖宸ュ簭鍑虹珯姹囨姤鍗曞垪琛�-鍒嗛〉
+        [Route("Cj_StationOutBill/get_Display_byPage")]
+        [HttpGet]
+        public object get_Display_byPage(string sWhere, string user, string Organization, int page, int size, string HBillSubType)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (HBillSubType == "SUB")
+                {
+                    //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                    if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Query", 1, false, user))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "瀹屽伐鍗曟棤鏌ヨ鏉冮檺!";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                    if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍑虹珯鍗曟棤鏌ヨ鏉冮檺!";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+
+                //鑾峰彇绯荤粺鍙傛暟
+                string Ret = "";
+                if (oSystemParameter.ShowBill(ref Ret))
+                {
+                    //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
+                    if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
+                    {
+                        //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
+                        string sql_splice = DBUtility.ClsPub.SpliceSQL(user, "宸ュ簭姹囨姤鍗曞垪琛�");
+
+                        if (sql_splice == "娌℃湁鏌ヨ鍒扮浉鍏崇敤鎴蜂俊鎭�")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "娌℃湁鏌ヨ鍒扮浉鍏崇敤鎴蜂俊鎭�!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            sWhere += sql_splice;
+                        }
+                    }
+                }
+
+                sWhere = sWhere.Replace("'", "''");
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",'" + Organization + "'," + "''", "h_p_MES_StationOutBillList");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",'" + Organization + "','" + sWhere + "'", "h_p_MES_StationOutBillList");
+                }
+
+                //娣诲姞鍒楀悕
+                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 = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.list = columnNameList;
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 宸ュ簭鍑虹珯姹囨姤鍗� 瀛愯〃鏌ヨ
         [Route("Cj_StationOutBill/get_SubDisplay")]
         [HttpGet]

--
Gitblit v1.9.1