From 9e13bff7663cbf3aaf112364c9f81664cb1229d5 Mon Sep 17 00:00:00 2001
From: wyb <1qaz@123>
Date: 星期四, 27 五月 2021 17:49:30 +0800
Subject: [PATCH] 职务列表查询逻辑编写

---
 WebAPI/Controllers/WebAPIController.cs |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 524b2e6..fe43521 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -1367,6 +1367,65 @@
 
 
         #endregion
+
+        /// <summary>
+        /// 鑾峰彇鑱屽姟鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        [Route("Web/GetDutyList_Json")]
+        [HttpGet]
+        public object GetDutyList_Json(string Duty)
+        {
+            //sWhere = " Where HStopFlag=0  and HEndFlag=1";
+            //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
+            if (Duty != "")
+            {
+                sWhere = sWhere + " and ( HNumber like '%" + Duty + "%' or HName like '%" + Duty + "%' ) ";
+            }
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName  from Gy_Duty where HStopflag=0 Order by HItemID ", "Gy_Duty");
+                }
+                else
+                {
+                    string sql1 = "Select HItemID,HNumber ,HName  from Gy_Duty where HStopflag=0 and HEndFlag=1 ";
+                    string sql = sql1 + sWhere;
+                    ds = oCN.RunProcReturn(sql, "Gy_Duty");
+                }
+
+                //ds = webserver.GetUnitList(sWhere, ref DBUtility.ClsPub.sErrInfo);
+
+
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
+                {
+                    objjson.code = "0";
+                    objjson.count = 0;
+                    objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+                    objjson.data = null;
+                    return objjson;
+                }
+                else
+                {
+                    objjson.code = "0";
+                    objjson.count = 1;
+                    objjson.Message = "鑾峰彇鎴愬姛!";
+                    objjson.data = ds.Tables[0];
+                    return objjson;
+                }
+            }
+            catch (Exception ex)
+            {
+
+                objjson.code = "0";
+                objjson.count = 0;
+                objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+                objjson.data = null;
+                return objjson;
+            }
+        }
     }
 
 }

--
Gitblit v1.9.1