From d61b04059a763aab67d1db107b729f5ed609cb2f Mon Sep 17 00:00:00 2001
From: black-goat-me <226547893@qq.com>
Date: 星期三, 24 五月 2023 10:06:14 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/BLL/Xt_UserController.cs | 82 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/BLL/Xt_UserController.cs b/WebAPI/Controllers/BLL/Xt_UserController.cs
index a00f4c3..0ce6b23 100644
--- a/WebAPI/Controllers/BLL/Xt_UserController.cs
+++ b/WebAPI/Controllers/BLL/Xt_UserController.cs
@@ -1137,5 +1137,87 @@
}
#endregion
+ #region 鏍规嵁鐢ㄦ埛缂栫爜鏌ユ壘宸插垎閰嶅伐搴忓垪琛�
+ [Route("Xt_User/ProcessPlaylist")]
+ [HttpGet]
+ public object ProcessPlaylist(string HUserID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select HProcID,宸ュ簭浠g爜 HProcNumber,宸ュ簭鍚嶇О HProcName from h_v_Gy_UserProcessList where HUserID='" + HUserID + "' ", "h_v_Gy_UserProcessList");
+ 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 鐢ㄦ埛鍏宠仈宸ュ簭淇濆瓨
+ [Route("Xt_User/SaveUserProcess")]
+ [HttpPost]
+ public object SaveUserProcess([FromBody] JObject msg)
+ {
+ var _value = msg["msg"].ToString();
+ string msg1 = _value.ToString();
+ string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+ string msg2 = sArray[0].ToString();
+ string msg3 = sArray[1].ToString();
+
+ ListModels oListModels = new ListModels();
+ try
+ {
+ List<Models.Gy_UserProcess> lsmain = new List<Models.Gy_UserProcess>();
+ msg2 = msg2.Substring(1, msg2.Length - 2);
+ msg2 = msg2.Replace("\\", "");
+ msg2 = msg2.Replace("\n", ""); //\n
+ lsmain = oListModels.getObjectByJson_Gy_UserProcess(msg2);
+ oCN.BeginTran();
+ //鍒犻櫎宸茬粡鍏宠仈鐨勬暟鎹�
+ oCN.RunProc("Delete From Gy_UserByProcess where HUserID='" + msg3.ToString() + "'");
+ foreach (Models.Gy_UserProcess oItem in lsmain)
+ {
+ //閲嶆柊鍐欏叆鍏宠仈鏁版嵁
+ oCN.RunProc("insert into Gy_UserByProcess (HProcID,HUserID) values ('" + oItem.HProcID + "','" + msg3.ToString() + "')");
+ }
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = 1;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1