From 10310e5258249ff7c77f4575bda809131952cde3 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期五, 15 十月 2021 10:03:56 +0800
Subject: [PATCH] 直接调拨
---
WebAPI/Controllers/PublicPageMethodController.cs | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 108 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs
index 2ec055e..95086de 100644
--- a/WebAPI/Controllers/PublicPageMethodController.cs
+++ b/WebAPI/Controllers/PublicPageMethodController.cs
@@ -2991,5 +2991,113 @@
#endregion
#endregion
+
+ #region 閫夋嫨鐧诲綍缁勭粐鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ缁勭粐鍒楄〃
+ [Route("PublicPageMethod/OrganizationsList")]
+ [HttpGet]
+ public object OrganizationsList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Xt_ORGANIZATIONS " + sWhere + " Order by HItemID ", "Xt_ORGANIZATIONS");
+ 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/OrganizationsCX")]
+ [HttpGet]
+ public object OrganizationsCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_CusType Xt_ORGANIZATIONS HitemID=" + HInterID + " UNION ALL select s.* from Xt_ORGANIZATIONS AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Xt_ORGANIZATIONS");
+ 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/OrganizationsLoadTree")]
+ [HttpGet]
+ public object OrganizationsLoadTree(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 Xt_ORGANIZATIONS " + sWhere + "", "Xt_ORGANIZATIONS");
+ 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
+
+
+
}
}
--
Gitblit v1.9.1