From da00f1a9f67ddcc1f4d543c43fd9ec7cd19b45be Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期一, 01 十一月 2021 09:38:46 +0800
Subject: [PATCH] nothing

---
 WebAPI/Controllers/PublicPageMethodController.cs |  241 +++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 227 insertions(+), 14 deletions(-)

diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs
index c9f1e67..6315e17 100644
--- a/WebAPI/Controllers/PublicPageMethodController.cs
+++ b/WebAPI/Controllers/PublicPageMethodController.cs
@@ -543,6 +543,219 @@
 
         #endregion
 
+
+        #region 閫夋嫨璁㈠崟绛夌骇鍩虹璧勬枡
+
+        #region 鏉′欢鏌ヨ璁㈠崟绛夌骇
+        [Route("PublicPageMethod/OrderLevList")]
+        [HttpGet]
+        public object OrderLevList(string sWhere)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_OrderLev " + sWhere + " Order by HItemID ", "Gy_OrderLev");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳暟鎹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    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  鏍规嵁鏍戝瀷id鏌ユ壘璁㈠崟绛夌骇   
+        [Route("Gy_MaintenanceMode/OrderLevCX")]
+        [HttpGet]
+        public object OrderLevCX(long HInterID)
+        {
+            try
+            {
+
+                ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_OrderLev WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_OrderLev AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_OrderLev");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "false锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    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("Gy_MaintenanceMode/OrderLevLoadTree")]
+        [HttpGet]
+        public object OrderLevLoadTree(string sWhere)
+        {
+            SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+            //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+            ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_OrderLev " + sWhere + "", "Gy_OrderLev");
+            if (ds == null || ds.Tables[0].Rows.Count == 0)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犳暟鎹紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            else
+            {
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #endregion
+
+
+        #region 閫夋嫨璁㈠崟鍙嶉鐘舵�佸熀纭�璧勬枡
+
+        #region 鏉′欢鏌ヨ璁㈠崟鍙嶉鐘舵��
+        [Route("PublicPageMethod/OrderBackInfoList")]
+        [HttpGet]
+        public object OrderBackInfoList(string sWhere)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_OrderBackInfo " + sWhere + " Order by HItemID ", "Gy_OrderBackInfo");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳暟鎹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    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  鏍规嵁鏍戝瀷id鏌ユ壘璁㈠崟鍙嶉鐘舵��   
+        [Route("Gy_MaintenanceMode/OrderBackInfoCX")]
+        [HttpGet]
+        public object OrderBackInfoCX(long HInterID)
+        {
+            try
+            {
+
+                ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_OrderBackInfo WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_OrderBackInfo AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_OrderBackInfo");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "false锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    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("Gy_MaintenanceMode/OrderBackInfoLoadTree")]
+        [HttpGet]
+        public object OrderBackInfoLoadTree(string sWhere)
+        {
+            SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+            //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+            ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_OrderBackInfo " + sWhere + "", "Gy_OrderBackInfo");
+            if (ds == null || ds.Tables[0].Rows.Count == 0)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犳暟鎹紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            else
+            {
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #endregion
+
+
         #region 閫夋嫨鎴愬搧妯″叿鍩虹璧勬枡
 
         #region 鏉′欢鏌ヨ鎴愬搧妯″叿鍒楄〃
@@ -895,22 +1108,22 @@
             try
             {
                 ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Supplier "+sWhere+" Order by HItemID", "Gy_Supplier");
-                if (ds == null || ds.Tables[0].Rows.Count == 0)
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "false锛�";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
-                else
-                {
+                //if (ds == null || ds.Tables[0].Rows.Count == 0)
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "false锛�";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+                //else
+                //{
                     objJsonResult.code = "1";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "Sucess锛�";
                     objJsonResult.data = ds.Tables[0];
                     return objJsonResult;
-                }
+                //}
             }
             catch (Exception e)
             {
@@ -1229,13 +1442,13 @@
             {
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_EquipMent where HStopflag=0 Order by HItemID", "Gy_EquipMent");
+                    ds = oCN.RunProcReturn("Select HInterID,HEquipFileNumber,HName from Gy_EquipFileBillMain Order by HInterID", "Gy_EquipFileBillMain");
                 }
                 else
                 {
-                    string sql1 = "Select HItemID,HParentID,HNumber,HName from Gy_EquipMent where 1 = 1 ";
+                    string sql1 = "Select HInterID,HEquipFileNumber,HName from Gy_EquipFileBillMain where 1 = 1 ";
                     string sql = sql1 + sWhere;
-                    ds = oCN.RunProcReturn(sql, "Gy_EquipMent");
+                    ds = oCN.RunProcReturn(sql, "HEquipFileNumber");
                 }
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {

--
Gitblit v1.9.1