From 5b0c45a5813e7cbff1cf4871dbeb239b7e3900bc Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期四, 20 一月 2022 11:05:16 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs | 44 ++++++++++++++++----------------------------
1 files changed, 16 insertions(+), 28 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs b/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs
index c064d67..c763c47 100644
--- a/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs
+++ b/WebAPI/Controllers/BaseSet/Xt_ORGANIZATIONSController.cs
@@ -25,37 +25,25 @@
/// </summary>
[Route("Xt_ORGANIZATIONS/list")]
[HttpGet]
- public object list(string sWhere)
+ public object list(string sWhere, string Organization)
{
try
-
{
+ string sql1 = string.Format(@"select * from h_v_IF_ORGANIZATIONSList where 缁勭粐鍚嶇О='" + Organization + "'");
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_IF_ORGANIZATIONSList " + sWhere, "h_v_IF_ORGANIZATIONSList");
+ ds = oCN.RunProcReturn(sql1 + sWhere + "order by HItemID desc", "h_v_IF_ORGANIZATIONSList");
}
else
{
- string sql1 = "select * from h_v_IF_ORGANIZATIONSList where 1 = 1 ";
- string sql = sql1 + sWhere;
+ string sql = sql1 + sWhere + "order by HItemID desc";
ds = oCN.RunProcReturn(sql, "h_v_IF_ORGANIZATIONSList");
}
- 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;
- }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
}
catch (Exception e)
{
@@ -86,12 +74,12 @@
long HItemID = list[0].HItemID;
string HNumber = list[0].HNumber;
string HName = list[0].HName;
-
+
long HParentID = list[0].HParentID;
-
+
string HRemark = list[0].HRemark;
bool HStopflag = list[0].HStopflag;
-
+
if (!DBUtility.ClsPub.AllowNumber(HNumber))
{
objJsonResult.code = "0";
@@ -168,7 +156,7 @@
bool HStopflag = list[0].HStopflag;
////鍒ゆ柇鏉冮檺
- //if (!ClsPub.Security_Log(msg5, 1, true, msg4))
+ //if (!ClsPub.Security_Log(msg5, 1, false, msg4))
//{
// objJsonResult.code = "0";
// objJsonResult.count = 0;
@@ -204,7 +192,7 @@
",HStopflag,HMakeTime" +
",HRemark) " +
" Values('" + HNumber + "','" + HName + "'," + HParentID.ToString() +
- "," + HStopflag + "getdate()"+
+ "," + HStopflag + "getdate()" +
",'" + HRemark + "')", ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼涓婄骇涓洪潪鏈骇浠g爜
@@ -247,7 +235,7 @@
/// </summary>
/// <returns></returns>
[Route("DeltetXt_ORGANIZATIONSList")]
-
+
[HttpGet]
public object DeltetXt_ORGANIZATIONSList(string HItemID)
{
@@ -256,7 +244,7 @@
try
{
//鍒犻櫎鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
+ //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
//{
// objJsonResult.code = "0";
// objJsonResult.count = 0;
--
Gitblit v1.9.1