From 35ede7c9c6277fcbaeabf8d475c802f43b51627c Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 10 九月 2024 09:32:57 +0800
Subject: [PATCH] 进站单控制打开 开工单 保存后控制往后放

---
 WebAPI/Controllers/CGGL/Cg_PayableBillController.cs |   76 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 76 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs b/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs
index da93c5a..cca61bc 100644
--- a/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_PayableBillController.cs
@@ -239,6 +239,31 @@
                 {
                     bResult = false;
                 }
+
+                //鑷姩瀹℃牳璁剧疆
+                if (refSav == "Add")
+                {
+                    objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D
+                    //绯荤粺鍙傛暟  鑷姩瀹℃牳
+                    string sReturn = "";
+                    if (oSystemParameter.ShowBill(ref sReturn) == true)
+                    {
+                        if (oSystemParameter.omodel.Cg_PayableBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                        {
+                            objJsonResult.Verify = "Y";
+                        }
+                        else
+                        {
+                            objJsonResult.Verify = "N";
+                        }
+                    }
+                }
+                else if (refSav == "Update")
+                {
+                    objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D
+                    objJsonResult.Verify = "N";
+                }
+
                 if (bResult)
                 {
                     objJsonResult.code = "0";
@@ -1474,5 +1499,56 @@
         }
         #endregion
 
+        #region 搴斾粯鍗曞垪琛� 鏌ヨ渚涘簲鍟嗕粯娆捐鍒掕〃
+        /// <summary>
+        /// 杩斿洖搴旀敹鍗曞垪琛�
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Cg_PayableBill/SupplierPayPlanList")]
+        [HttpGet]
+        public object SupplierPayPlanList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Gy_SupplierPayPlanList order by 鍗曟嵁鍙� desc", "h_v_Gy_SupplierPayPlanList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Gy_SupplierPayPlanList where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+                    ds = oCN.RunProcReturn(sql, "h_v_Gy_SupplierPayPlanList");
+                }
+
+                //娣诲姞鍒楀悕
+                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