From ade73bb3949d5634fd6e34f2dc416b15096bcbc5 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 09 一月 2024 15:29:51 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/BaseSet/Gy_CustomerController.cs |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
index 7b1ef6a..c5d51b0 100644
--- a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
@@ -131,6 +131,45 @@
             }
         }
 
+
+        #region 鑾峰彇褰撳墠鏈�澶х殑瀹㈡埛浠g爜
+        [Route("Gy_Customer/getMaxCusNumber")]
+        [HttpGet]
+        public object getMaxCusNumber()
+        {
+            try
+            {
+                string sql = "select top(1) * from Gy_Customer order by HNumber desc";
+                ds = oCN.RunProcReturn(sql, "Gy_Customer");
+
+                if (ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "灏氭湭瀛樺湪瀹㈡埛锛岃鑷富缁存姢瀹㈡埛浠g爜!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "";
+                    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
+
         /// <summary>
         /// 鑾峰彇鏈�澶у熀纭�璧勬枡ID
         ///鍙傛暟锛歴tring sql銆�

--
Gitblit v1.9.1