From a130b773af5dc9464b1c79fe0d979b89f940131d Mon Sep 17 00:00:00 2001
From: black-goat-me <226547893@qq.com>
Date: 星期三, 17 五月 2023 14:29:48 +0800
Subject: [PATCH] 按钮隐藏:不可编辑按钮不显示在隐藏设置窗口
---
WebAPI/Controllers/LMESController.cs | 101 +++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 79 insertions(+), 22 deletions(-)
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 212335f..bdd3b1a 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -81,23 +81,13 @@
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
- //if (ds.Tables[0].Rows.Count != 0 || ds != null)
- //{
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.list = columnNameList;
objJsonResult.data = ds.Tables[0];
return objJsonResult;
- //}
- //else
- //{
- //objJsonResult.code = "0";
- //objJsonResult.count = 0;
- //objJsonResult.Message = "鏃犳暟鎹�";
- //objJsonResult.data = null;
- //return objJsonResult;
- //}
}
catch (Exception e)
{
@@ -568,6 +558,83 @@
return GetObjectJson(ds);
}
+ #region 鍒ゆ柇涓嬫帹鐨勭敓浜ц鍗曟槸鍚﹀鏍�
+ [Route("LEMS/ICMOBillCheck")]
+ [HttpGet]
+ public object ICMOBillCheck(string hmainid,string HEntryID,int OrganizationID)
+ {
+ DataSet ds;
+ try
+ {
+ ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1 = 1 and hmainid=" + hmainid + " and HEntryID=" + HEntryID + " order by 鍗曟嵁鍙� desc", "h_v_IF_ICMOBillList");
+ string HNumber = ds.Tables[0].Rows[0]["浜у搧浠g爜"].ToString();
+
+ if (ds.Tables[0].Rows[0]["瀹℃牳浜�"].ToString() == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵�閫夌敓浜ц鍗曚负鏈鏍哥姸鎬侊紝涓嶅厑璁镐笅鎺ㄧ敓鎴愬伐搴忔祦杞崱锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["鍏抽棴浜�"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵�閫夌敓浜ц鍗曚负宸插叧闂姸鎬侊紝涓嶅厑璁镐笅鎺ㄧ敓鎴愬伐搴忔祦杞崱锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["浣滃簾浜�"].ToString() != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵�閫夌敓浜ц鍗曚负宸蹭綔搴熺姸鎬侊紝涓嶅厑璁镐笅鎺ㄧ敓鎴愬伐搴忔祦杞崱锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from h_v_S_Sc_ICMOBillList where hmainid=" + hmainid + " and HEntryID=" + HEntryID + " and HSTOCKINORGID='" + OrganizationID + "'", "h_v_S_Sc_ICMOBillList");
+
+ if (double.Parse(ds.Tables[0].Rows[0]["娴佽浆鍗℃暟閲�"].ToString()) == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵�閫夌敓浜ц鍗曞凡鍏ㄩ儴涓嬫帹鐢熸垚宸ュ簭娴佽浆鍗★紝鍓╀綑鍙笅鎺ㄦ暟閲忎负0锛屼笉鍏佽涓嬫帹鐢熸垚宸ュ簭娴佽浆鍗★紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select top 1000 * from h_v_Gy_RoutingBillList where 鐗╂枡浠g爜='" + HNumber + "'", "h_v_Gy_RoutingBillList");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵�閫夌敓浜ц鍗曞搴旂墿鏂欐湭璁剧疆瀵瑰簲鐨勫伐鑹鸿矾绾匡紝涓嶅厑璁镐笅鎺ㄧ敓鎴愬伐搴忔祦杞崱锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
/// <summary>
/// 杩斿洖宸ュ簭濮斿鎺ユ敹鍗曞垪琛�
///鍙傛暟锛歴tring sql銆�
@@ -610,8 +677,7 @@
try
{
List<object> columnNameList = new List<object>();
- //if (ds.Tables[0].Rows.Count != 0 || ds != null)
- //{
+
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
{
@@ -626,15 +692,6 @@
objJsonResult.list = columnNameList;
objJsonResult.data = ds.Tables[0];
return objJsonResult;
- //}
- //else
- //{
- //objJsonResult.code = "0";
- //objJsonResult.count = 0;
- //objJsonResult.Message = "鏃犳暟鎹�";
- //objJsonResult.data = null;
- //return objJsonResult;
- //}
}
catch (Exception e)
{
--
Gitblit v1.9.1