From 258c4add3e9a831ecfd01a92e26a5d1b61b40e31 Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期四, 11 七月 2024 17:19:42 +0800 Subject: [PATCH] 根据系统参数区分斯莫尔自动获取上级 --- WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs index 7da0faa..5352023 100644 --- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs @@ -6853,14 +6853,28 @@ { try { + string sReturn = ""; List<object> columnNameList = new List<object>(); //鏍规嵁褰撳墠浜鸿幏鍙栬亴鍔� string sql = "select a.Czymc 鐢ㄦ埛鍚嶇О,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 = '"+HName+"'"; ds = oCN.RunProcReturn(sql, "Gy_ErrMsgBackType"); string Job = ds.Tables[0].Rows[0]["鑱屽姟"].ToString(); + if (oSystemParameter.ShowBill(ref sReturn) == true) + { + //绯荤粺鍙傛暟鏄惁涓虹鏈変簯妯″紡,N涓烘湰鍦帮紝Y涓烘柉鑾皵 + if (oSystemParameter.omodel.OA_ErrMsgBackBill_SendDingDingMsg == "N") + { + Job = ds.Tables[0].Rows[0]["鑱屽姟"].ToString(); + } + else + { + Job = "娉ㄥ鐝粍闀�"; + } + } + //鏍规嵁鑱屽姟鎵惧埌浠栫殑涓婄骇 string sql1 = "select * from Gy_Duty where HParentID=(select HParentID from Gy_Duty where HItemID =(select HParentID from Gy_Duty group by HParentID, HName having HName = '"+Job+"' and count(*) = 1))"; - ds = oCN.RunProcReturn(sql1, "Gy_Duty"); + ds = oCN.RunProcReturn(sql1, "Gy_Duty"); string Job1= ds.Tables[0].Rows[0]["HName"].ToString(); //鐢ㄤ笂绾х殑鑱屽姟鎵惧埌鐢ㄦ埛 string sql2 = "select a.Czymc 鐢ㄦ埛鍚嶇О 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 c.GroupName = '"+Job1+"'"; -- Gitblit v1.9.1