From 573f9f23ac3fce69ea7bf1daffeb228033e3d828 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 17 一月 2024 10:28:44 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/WebAPIController.cs | 79 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 77 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 74a7860..032d2d6 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -7872,6 +7872,69 @@
return model;
}
+ /// <summary>
+ /// 鐢ㄦ埛鍏宠仈鐢ㄦ埛鍒犻櫎
+ /// </summary>
+ /// <returns></returns>
+ [Route("Xt_User/Gy_UserByUserListDrop")]
+ [HttpGet]
+ public object DeltetGy_Material(string HItemID, string user)
+ {
+ DataSet ds;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ //鍒犻櫎鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Gy_UserByUser_Drop", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (string.IsNullOrWhiteSpace(HItemID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HItemID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+ ds = oCN.RunProcReturn("select * from Gy_UserByUserRelation where HItemID=" + HItemID, "Gy_UserByUserRelation");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ oCN.RollBack();//鍥炴粴浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+
+ oCN.RunProc("delete from Gy_UserByUserRelation where HItemID=" + HItemID);
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "* 鏁版嵁鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();//鍥炴粴浜嬪姟
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
/// <summary>
/// 鐢ㄥ叧鑱旂墿鏂欒幏鍙栦俊鎭�
@@ -7895,6 +7958,18 @@
public ApiResult<DataSet> GetGy_UserStockRelationDetail(string HID)
{
var model = LuBaoSevice.GetGy_UserStockRelationDetail(HID);
+ return model;
+ }
+
+ /// <summary>
+ /// 鐢ㄥ叧鑱旂敤鎴疯幏鍙栦俊鎭�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Gy_UserByUserEdit")]
+ [HttpGet]
+ public ApiResult<DataSet> Gy_UserByUserEdit(string HID)
+ {
+ var model = LuBaoSevice.Gy_UserByUserEdit(HID);
return model;
}
@@ -8996,11 +9071,11 @@
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("Select HItemID,HNumber 浠g爜,HName 鍚嶇О ,HQCCheckClassID 妫�楠岄」鐩被鍒� from Gy_QCCheckItem where HStopflag=0 Order by HItemID ", "Gy_QCCheckItem");
+ ds = oCN.RunProcReturn("Select HItemID,HNumber 浠g爜,HName 鍚嶇О ,HQCCheckClassID 妫�楠岄」鐩被鍒�,HDefaultResult 榛樿缁撹 from Gy_QCCheckItem where HStopflag=0 Order by HItemID ", "Gy_QCCheckItem");
}
else
{
- string sql = "Select HItemID,HNumber 浠g爜,HName 鍚嶇О ,HQCCheckClassID 妫�楠岄」鐩被鍒� from Gy_QCCheckItem where HStopflag=0 " + sWhere + "Order by HItemID ";
+ string sql = "Select HItemID,HNumber 浠g爜,HName 鍚嶇О ,HQCCheckClassID 妫�楠岄」鐩被鍒�,HDefaultResult 榛樿缁撹 from Gy_QCCheckItem where HStopflag=0 " + sWhere + "Order by HItemID ";
ds = oCN.RunProcReturn(sql, "Gy_QCCheckItem");
}
if (ds == null || ds.Tables[0].Rows.Count <= 0)
--
Gitblit v1.9.1