From 9f6816fd0824aafc360bee29c9ec1eb76fa0aa16 Mon Sep 17 00:00:00 2001 From: yxj <yxj@hz-kingdee.com> Date: 星期四, 25 五月 2023 16:51:38 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- Pub_Class/CustomerCls/ClsPub.cs | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 92 insertions(+), 0 deletions(-) diff --git a/Pub_Class/CustomerCls/ClsPub.cs b/Pub_Class/CustomerCls/ClsPub.cs index fdc5f20..70be5da 100644 --- a/Pub_Class/CustomerCls/ClsPub.cs +++ b/Pub_Class/CustomerCls/ClsPub.cs @@ -2503,5 +2503,97 @@ } return sb.ToString(); } + + //鎷兼帴sql锛屾寜杞﹂棿锛屽伐浣滀腑蹇冩煡璇� + public static string SpliceSQL(string czymc,string ListName) + { + DataSet ds; + ClsSqlHelper oCN = new ClsSqlHelper(); + string sql = ""; + + //鍒ゆ柇鏄惁鏈夋煡璇㈠垪琛ㄦ墍鏈変俊鎭潈闄� + if (!Security_Log("Xt_List_All", 1, false, czymc)) + { + //鏃� + switch (ListName) + { + case "宸ヨ壓璺嚎鍒楄〃": + sql = " and HCenterID in (select HWorkCenterID from Gy_UserWorkCenterRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + break; + case "鐢熶骇璁㈠崟鍒楄〃": + sql = " and HDeptID in (select HDeptID from Gy_UserDeptRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + break; + case "宸ュ簭娲惧伐鍗曞垪琛�": + sql = " and HDeptID in (select HDeptID from Gy_UserDeptRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + break; + case "宸ュ簭娲惧伐鍗曟槑缁嗗垪琛�": + sql = " and HDeptID in (select HDeptID from Gy_UserDeptRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + break; + case "宸ュ簭姹囨姤鍗曞垪琛�": + sql = " and HCenterID in (select HWorkCenterID from Gy_UserWorkCenterRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + break; + case "鐢熶骇杞﹂棿宸ュ簭鎶ヨ〃": + sql = ",'" + czymc +"'"; + break; + case "宸ュ簭鍦ㄥ埗鍝佹姤琛�": + sql = ",'" + czymc + "'"; + break; + case "宸ュ簭姹囨姤鏃ユ姤琛�": + sql = ",'" + czymc + "'"; + break; + case "璁′欢宸ヨ祫鎶ヨ〃": + sql = ",'" + czymc + "'"; + break; + case "璁′欢宸ヨ祫姹囨�绘姤琛�": + sql = ",'" + czymc + "'"; + break; + } + return sql; + } + else + { + //鏈� + return sql; + } + + //ds = oCN.RunProcReturn("select * from gy_czygl where Czymc='" + czymc + "'", "gy_czygl"); + ////鍒ゆ柇鏄惁鏌ヨ鍒扮浉鍏崇敤鎴蜂俊鎭� + //if (ds != null || ds.Tables[0].Rows.Count != 0) + //{ + // Int64 HManagerFlag = Convert.ToInt64(ds.Tables[0].Rows[0]["ManagerFlag"]); + // if (HManagerFlag == 1)//鏈夌鐞嗗憳鏉冮檺 + // { + // return sql; + // } + // else //娌℃湁绠$悊鍛樻潈闄� + // { + // switch (ListName) + // { + // case "宸ヨ壓璺嚎鍒楄〃": + // sql = " and HCenterID in (select HWorkCenterID from Gy_UserWorkCenterRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + // break; + // case "鐢熶骇璁㈠崟鍒楄〃": + // sql = " and HDeptID in (select HDeptID from Gy_UserDeptRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + // break; + // case "宸ュ簭娲惧伐鍗曞垪琛�": + // sql = " and HDeptID in (select HDeptID from Gy_UserDeptRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + // break; + // case "宸ュ簭娲惧伐鍗曟槑缁嗗垪琛�": + // sql = " and HDeptID in (select HDeptID from Gy_UserDeptRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + // break; + // case "宸ュ簭姹囨姤鍗曞垪琛�": + // sql = " and HCenterID in (select HWorkCenterID from Gy_UserWorkCenterRelation where HUserID = (select Czybm from gy_czygl where czymc = '" + czymc + "'))"; + // break; + // } + // return sql; + // } + //} + //else + //{ + // sql = "娌℃湁鏌ヨ鍒扮浉鍏崇敤鎴蜂俊鎭�"; + // return sql; + //} + } + } } -- Gitblit v1.9.1