From 4863bad404c2fa64079f588d3cd9c0e212f358fb Mon Sep 17 00:00:00 2001
From: chenhaozhe <gaozhechen26@gmail.com>
Date: 星期一, 04 八月 2025 22:20:36 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/WebAPIController.cs | 90 +++++++++++++++++++++++++++++++++++++++------
1 files changed, 78 insertions(+), 12 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 1bcc961..ab5325f 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -343,6 +343,8 @@
{
try
{
+ string sErrMsg = "";
+ oSystemParameter.ShowBill(ref sErrMsg);
DataSet ds = null;
ClsCN oCnLoc = new ClsCN();
DAL.ClsUser oUser = new DAL.ClsUser();
@@ -368,14 +370,18 @@
string sql = string.Format(@" select a.* from Gy_UserByOrgRelation a
where a.HUserID = '{0}' and a.HOrgID = '{1}'", UserName, HOrgName);
DataSet _ds = oCnLoc.RunProcReturn(sql, "h_p_Xt_UserRelationOrg_Check");
- //if (_ds == null || _ds.Tables[0].Rows.Count == 0)
- //{
- // objjson.code = "0";
- // objjson.count = 0;
- // objjson.Message = "鐢ㄦ埛" + UserName + "娌℃湁璇ョ粍缁囨潈闄�";
- // objjson.data = null;
- // return objjson;
- //}
+
+ if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�")
+ {
+ if (_ds == null || _ds.Tables[0].Rows.Count == 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鐢ㄦ埛" + UserName + "娌℃湁璇ョ粍缁囨潈闄�";
+ objjson.data = null;
+ return objjson;
+ }
+ }
objjson.code = "0";
objjson.count = 1;
@@ -19220,6 +19226,60 @@
}
/// <summary>
+ /// 鏍规嵁妯″叿浠撳簱缂栧彿鑾峰彇妯″叿鏁版嵁
+ /// </summary>
+ /// <param name="sWhere">绛涢�夋潯浠�</param>
+ /// <param name="user">鎿嶄綔鐢ㄦ埛</param>
+ /// <param name="Organization">缁勭粐</param>
+ /// <returns>妯″叿鏁版嵁娓呭崟</returns>
+ [Route("Web/Get_Sc_MouldStatusAnalysisList")]
+ [HttpGet]
+ public object Get_Sc_MouldStatusAnalysisList(string sWhere, string user, string Organization)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select * from h_v_Sc_MouldStatusAnalysisList where 1=1 Order by HInterID DESC", "h_v_Sc_MouldStatusAnalysisList");
+ }
+ else
+ {
+ string sql1 = "Select * from h_v_Sc_MouldStatusAnalysisList where 1=1 ";
+ string sql = sql1 + sWhere + " Order by HInterID DESC";
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldStatusAnalysisList");
+ }
+
+
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.data = null;
+ return objjson;
+ }
+ else
+ {
+ objjson.code = "0";
+ objjson.count = 1;
+ objjson.Message = "鑾峰彇鎴愬姛!";
+ objjson.data = ds.Tables[0];
+ return objjson;
+ }
+ }
+ catch (Exception ex)
+ {
+
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+ objjson.data = null;
+ return objjson;
+ }
+ }
+
+ /// <summary>
/// 鑾峰彇鍣ㄥ叿鍒楄〃
/// </summary>
/// <returns></returns>
@@ -19914,7 +19974,7 @@
{
objjson.code = "0";
objjson.count = 0;
- objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+ objjson.Message = "鑾峰彇澶辫触,鏈缃粯璁ゆ楠屾柟妗�";
objjson.data = null;
return objjson;
}
@@ -20474,7 +20534,7 @@
{
objjson.code = "0";
objjson.count = 0;
- objjson.Message = "鑾峰彇澶辫触,鏌ユ棤鏁版嵁" + DBUtility.ClsPub.sErrInfo;
+ objjson.Message = "鑾峰彇澶辫触,鏄庣粏鏌ユ棤鏁版嵁";
objjson.data = null;
return objjson;
}
@@ -21072,8 +21132,14 @@
ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //鏌ヨ鐢ㄦ埛缁戝畾鐨勮鑹� 鏄惁璁剧疆鑿滃崟淇℃伅 鍙栬鑹插悕绉版渶鐭殑涓�涓�
if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0))
{
- sql = "Select HitemID,HNumber,HName,HPartentID,HLevel,Hurl,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain,HPicNum from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID ";
- ds = oCn.RunProcReturn(sql, "Gy_Menu_1");
+ sql1 = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Gy_MenuDefineSet where HMakeName = 'admin' and HType = '" + HType + "' order by HPosition";
+ ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //鏌ヨadmin 鏄惁璁剧疆鑿滃崟淇℃伅
+ if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0))
+ {
+ sql = "Select HitemID,HNumber,HName,HPartentID,HLevel,Hurl,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain,HPicNum from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID ";
+ ds = oCn.RunProcReturn(sql, "Gy_Menu_1");
+ }
+
}
}
--
Gitblit v1.9.1