From 7d074703a8364c27ca38cbb8f82ebd2f6e85cf22 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期二, 07 一月 2025 14:46:27 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/WebAPIController.cs | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 161 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 744423fb..1536146 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -388,6 +388,51 @@
}
}
/// <summary>
+ /// 鐧诲綍鏍规嵁ic鍗¤幏鍙栦俊鎭�
+ /// </summary>
+ /// <param name="HBarCode"></param>
+ /// <returns></returns>
+ [Route("Web/GetUserByICCard")]
+ [HttpGet]
+ public object GetUserByICCard(string HBarCode)
+ {
+ try
+ {
+ DataSet ds = null;
+ ClsCN oCnLoc = new ClsCN();
+ DAL.ClsUser oUser = new DAL.ClsUser();
+ string sql = string.Format(@" select a.* from h_v_Gy_Czygl_Login a
+ where a.HICNumber = '{0}'", HBarCode);
+ ds = oCnLoc.RunProcReturn(sql, "h_v_Gy_Czygl_Login");
+
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鏃犳ic鍗″搴斿憳宸ヤ俊鎭紒";
+ objjson.data = null;
+ return objjson;
+ }
+
+ objjson.code = "1";
+ objjson.count = 1;
+ objjson.Message = "淇℃伅鑾峰彇鎴愬姛锛�";
+ objjson.data = ds.Tables[0];
+ return objjson;
+
+ }
+ catch (Exception e)
+ {
+
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鐧诲綍寮傚父锛�" + e.Message;
+ objjson.data = null;
+ return objjson; ;
+ }
+ }
+
+ /// <summary>
/// 鑿滃崟鏍�
/// </summary>
/// <returns></returns>
@@ -15079,6 +15124,46 @@
}
/// <summary>
+ /// 鏍规嵁鐗╂枡+宸ュ簭鑾峰彇妫�楠屾柟妗�
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/GetCheckItemID")]
+ [HttpGet]
+ public object GetCheckItemID(string HName,string HProName)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_QCCheckProjectList_Main where 鐗╂枡鍚嶇О='"+HName+ "' and 宸ュ簭鍚嶇О='" + HProName + "' order by 鏃ユ湡 desc ", "h_v_Gy_QCCheckProjectList_Main");
+ 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 = "1";
+ 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>
@@ -16199,8 +16284,15 @@
ds = oCn.RunProcReturn(sql, "Gy_MenuDefineSet"); //鏌ヨ褰撳墠鐢ㄦ埛鐨勮嚜瀹氫箟鑿滃崟鏁版嵁
if (ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0) //鍒ゆ柇褰撳墠鐢ㄦ埛鏄惁鏈夎缃繃鑷畾涔変俊鎭紝鑻ヨ褰曟暟涓�0锛屽垯娌℃湁璁剧疆杩囷紝鍔犺浇鎵�鏈夌殑鑿滃崟淇℃伅
{
- sql = "Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID ";
- ds = oCn.RunProcReturn(sql, "Gy_Menu");
+ string sql1 = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum from Gy_MenuDefineSet where HMakeName=" +
+ "(select top 1 c.GroupName from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId " +
+ "left join System_UserGroup c on b.GroupId = c.GroupID where a.Czymc ='"+HMakeName+"' order by len(c.GroupName ))";
+ ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //鏌ヨ鐢ㄦ埛缁戝畾鐨勮鑹� 鏄惁璁剧疆鑿滃崟淇℃伅 鍙栬鑹插悕绉版渶鐭殑涓�涓�
+ if ((ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0))
+ {
+ sql = "Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID ";
+ ds = oCn.RunProcReturn(sql, "Gy_Menu");
+ }
}
for (int i = 0; i < ds.Tables[0].Rows.Count; i++) //灏嗚彍鍗曠殑鏍硅妭鐐逛繚瀛樺埌鍒楄〃menu涓�
@@ -16644,6 +16736,12 @@
string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' Order by a.HItemID";
ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //鑾峰彇Xt_UserFastMenu涓鐢ㄦ埛璁剧疆鐨勮嚜瀹氫箟鑿滃崟淇℃伅锛岀敤浜庡湪鍓嶇鍔犺浇
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = 'admin' and b.HType = '" + HType + "' Order by a.HItemID";
+ ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //鑾峰彇Xt_UserFastMenu涓鐢ㄦ埛璁剧疆鐨勮嚜瀹氫箟鑿滃崟淇℃伅锛岀敤浜庡湪鍓嶇鍔犺浇
+ }
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鏌ヨ鎴愬姛锛�";
@@ -17114,6 +17212,67 @@
}
}
+
+ /// <summary>
+ /// 閲戝竻WMS鎺ュ彛
+ /// </summary>
+ /// <returns></returns>
+ [Route("Web/WMSBarcodeQuery")]
+ [HttpGet]
+ public object WMSBarcodeQuery(DateTime dateTime, string UserName, string PassWord)
+ {
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ //鏉冮檺鍒ゅ畾
+ DAL.ClsUser oUser = new DAL.ClsUser();
+ DataSet DS;
+ DS = oCN.RunProcReturn("select * from Gy_Czygl where Czymc='" + UserName.Trim() + "' and Czmm='" + DBUtility.ClsPub.StrToPsd(PassWord.Trim()) + "' ", "Gy_Czygl");
+ if (UserName == "" || UserName != "鍞悗鏉$爜鏌ヨ")
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "鐢ㄦ埛涓嶅锛�";
+ objjson.data = null;
+ return objjson;
+ }
+ if (DS == null || DS.Tables[0].Rows.Count == 0)
+ {
+ objjson.code = "0";
+ objjson.count = 0;
+ objjson.Message = "瀵嗙爜閿欒锛�";
+ objjson.data = null;
+ return objjson;
+ }
+ ds = oCN.RunProcReturn("exec h_p_WMSBarcodeQuery '" + dateTime + "'", "h_p_WMSBarcodeQuery");
+
+ 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 = "1";
+ 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;
+ }
+ }
+
}
}
--
Gitblit v1.9.1