From 6585cda35b87eb1a3a05a948faf7dc5d08ef8ff7 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期日, 25 六月 2023 09:21:50 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 Pub_Class/CustomerCls/ClsPub.cs |  309 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 296 insertions(+), 13 deletions(-)

diff --git a/Pub_Class/CustomerCls/ClsPub.cs b/Pub_Class/CustomerCls/ClsPub.cs
index 8114dd5..70be5da 100644
--- a/Pub_Class/CustomerCls/ClsPub.cs
+++ b/Pub_Class/CustomerCls/ClsPub.cs
@@ -399,7 +399,7 @@
                 case 0:
                     switch (Glida)
                     {
-                        case 0:
+                        case 0://绾祦姘村彿
                             Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "'", "Gy_MaxNum");
                             if (Ds.Tables[0].Rows.Count != 0)
                             {
@@ -418,11 +418,30 @@
                             }
                             return sBillNo;
 
-                        case 1:
+                        case 1://鏍规嵁 YY骞�+MM鏈� 鏃� + 娴佹按鍙�  鐢熸垚鍗曟嵁鍙� 锛堟棩 閲囩敤浜� 浠撳簱鐨勫瓧娈碉級
+                            sKjYear = sKjYear.Substring(2, 2);
+                            sPeriod = "0" + sPeriod;
+                            sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
+                            sDay = "";
+                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'", "Gy_MaxNum");
+                            if (Ds.Tables[0].Rows.Count != 0)
+                            {
+                                sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
+                                sBillNo = Profix.Trim() + sKjYear +  sPeriod  +  sDay  + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim();
+                            }
+                            else //鎻掑叆鏂拌褰�
+                            {
+                                sStr = new string(c, CodeLen - 1);
+                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber)  values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)");
+                                sBillNo = Profix.Trim() + sKjYear +  sPeriod +  sDay + sStr + "1";
+                            }
+                            if (Add == true)
+                            {
+                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'");
+                            }
                             return sBillNo;
-
-                        case 2:      //褰撳墠骞村綋鍓嶆湡闂� 鐢熸垚鍗曟嵁鍙�
-                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear=" + sKjYear + " and Period=" + sPeriod + " and Day=" + sDay, "Gy_MaxNum");
+                        case 2:      //鏍规嵁骞�+鏈�+鏃�  鐢熸垚鍗曟嵁鍙�
+                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'", "Gy_MaxNum");
                             if (Ds.Tables[0].Rows.Count != 0)
                             {
                                 sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
@@ -431,12 +450,185 @@
                             else //鎻掑叆鏂拌褰�
                             {
                                 sStr = new string(c, CodeLen - 1);
-                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,Day,NowNumber)  values('" + BillCode.Trim() + "'," + sKjYear + "," + sPeriod + "," + sDay + ",1)");
+                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber)  values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)");
                                 sBillNo = Profix.Trim() + sKjYear + ClsPub.isStrNull(("0" + sPeriod)).Substring(ClsPub.isStrNull(("0" + sPeriod)).Length - 2, 2) + ClsPub.isStrNull(("0" + sDay)).Substring(ClsPub.isStrNull(("0" + sDay)).Length - 2, 2) + sStr + 1;
                             }
                             if (Add == true)
                             {
-                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear=" + sKjYear + " and Period=" + sPeriod + " and Day=" + sDay);
+                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'");
+                            }
+                            return sBillNo;
+                        case 3: //鏍规嵁 涔斾竴 锛圫 + 骞达紙23锛�+浜斾綅娴佹按鍙凤級瀹炰緥锛歋2300001
+                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='0'  and whcode=''", "Gy_MaxNum");
+                            sKjYear = sKjYear.Substring(2, 2);
+                            if (Ds.Tables[0].Rows.Count != 0)
+                            {
+                                sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
+                                Profix = Profix.Substring(0, 1);
+                                sBillNo = Profix.Trim() + sKjYear + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim();
+                            }
+                            else //鎻掑叆鏂拌褰�
+                            {
+                                sStr = new string(c, CodeLen - 1);
+                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber)  values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)");
+                                sBillNo = Profix.Trim() + sKjYear + sStr + 1;
+                            }
+                            if (Add == true)
+                            {
+                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='0'  and whcode=''");
+                            }
+                            return sBillNo;
+                        case 4: //鏍规嵁 涔斾竴 宸ュ簭娴佽浆鍗″彿鏀规垚骞�+鏈�+鍥涗綅娴佹按鍙凤紙23050001锛�
+                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='0'  and whcode=''", "Gy_MaxNum");
+                            sKjYear = sKjYear.Substring(2, 2);
+                            sPeriod = "0" + sPeriod;
+                            sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
+                            if (Ds.Tables[0].Rows.Count != 0)
+                            {
+                                sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
+                                sBillNo = sKjYear + sPeriod + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim();
+                            }
+                            else //鎻掑叆鏂拌褰�
+                            {
+                                sStr = new string(c, CodeLen - 1);
+                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber)  values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)");
+                                sBillNo = sKjYear + sPeriod + sStr + 1;
+                            }
+                            if (Add == true)
+                            {
+                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='0'  and whcode=''");
+                            }
+                            return sBillNo;
+                        default:
+                            return sBillNo;
+
+                    }
+
+                case 1:
+                    return sBillNo;
+
+                default:
+                    return sBillNo;
+
+            }
+            oCn.CnClose();
+            oCn.CnDispose();
+            oCn = null;
+        }
+
+        //寰楀埌鏈�澶у崟鎹彿
+        public static string CreateBillCode(string BillCode,string HOrgNumber,Int64 HOrgID,string HWhNumber, ref string sReturn, bool Add)
+        {
+            Int64 BillCodeMode;
+            string Profix;
+            Int64 Glida;
+            Int32 CodeLen;
+            string sBillNo = "";
+            char c = Convert.ToChar("0");
+            string sKjYear = DateTime.Today.Year.ToString();
+            string sPeriod = DateTime.Today.Month.ToString();
+            string sDay = DateTime.Today.Day.ToString();
+            //寰楀埌鍗曟嵁鍙疯〃 淇℃伅
+            ClsSqlHelper oCn = new ClsSqlHelper();
+            DataSet Ds = new DataSet();
+            Ds = oCn.RunProcReturn("Select * from Gy_BillNumber where BillCode='" + BillCode.Trim() + "'", "Gy_BillNumber");
+            if (Ds.Tables[0].Rows.Count != 0)
+            {
+                BillCodeMode = ClsPub.isLong(Ds.Tables[0].Rows[0]["BillCodeMode"].ToString());
+                Profix = ClsPub.isStrNull(Ds.Tables[0].Rows[0]["Profix"].ToString());
+                Glida = ClsPub.isLong(Ds.Tables[0].Rows[0]["Glida"].ToString());
+                CodeLen = ClsPub.isInt(Ds.Tables[0].Rows[0]["CodeLen"].ToString());
+            }
+            else
+            {
+                return "";
+            }
+            //
+            string sStr;
+            switch (BillCodeMode)
+            {
+                case 0:
+                    switch (Glida)
+                    {
+                        case 0://绾祦姘村彿
+                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "'", "Gy_MaxNum");
+                            if (Ds.Tables[0].Rows.Count != 0)
+                            {
+                                sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
+                                sBillNo = Profix.Trim() + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim();
+                            }
+                            else //鎻掑叆鏂拌褰�
+                            {
+                                sStr = new string(c, CodeLen - 1);
+                                oCn.RunProc("insert into Gy_MaxNum(BillCode,NowNumber) values('" + BillCode.Trim() + "',1)");
+                                sBillNo = Profix.Trim() + sStr + 1;
+                            }
+                            if (Add == true)
+                            {
+                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "'");
+                            }
+                            return sBillNo;
+
+                        case 1://鏍规嵁 YY骞�+MM鏈� 鏃� + 娴佹按鍙�  鐢熸垚鍗曟嵁鍙� 锛堟棩 閲囩敤浜� 浠撳簱鐨勫瓧娈碉級
+                            sKjYear = sKjYear.Substring(2, 2);
+                            sPeriod = "0" + sPeriod;
+                            sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
+                            sDay = "";
+                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'", "Gy_MaxNum");
+                            if (Ds.Tables[0].Rows.Count != 0)
+                            {
+                                sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
+                                sBillNo = Profix.Trim() + sKjYear + sPeriod + sDay + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim();
+                            }
+                            else //鎻掑叆鏂拌褰�
+                            {
+                                sStr = new string(c, CodeLen - 1);
+                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber)  values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)");
+                                sBillNo = Profix.Trim() + sKjYear + sPeriod + sDay + sStr + "1";
+                            }
+                            if (Add == true)
+                            {
+                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'");
+                            }
+                            return sBillNo;
+                        case 2:      //鏍规嵁骞�+鏈�+鏃�  鐢熸垚鍗曟嵁鍙� (杩欏姛鑳� 濂藉儚鏄綔搴熶簡锛�
+                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'", "Gy_MaxNum");
+                            if (Ds.Tables[0].Rows.Count != 0)
+                            {
+                                sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
+                                sBillNo = Profix.Trim() + sKjYear + ClsPub.isStrNull(("0" + sPeriod)).Substring(ClsPub.isStrNull(("0" + sPeriod)).Length - 2, 2) + ClsPub.isStrNull(("0" + sDay)).Substring(ClsPub.isStrNull(("0" + sDay)).Length - 2, 2) + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim();
+                            }
+                            else //鎻掑叆鏂拌褰�
+                            {
+                                sStr = new string(c, CodeLen - 1);
+                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber)  values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + sDay + "',1)");
+                                sBillNo = Profix.Trim() + sKjYear + ClsPub.isStrNull(("0" + sPeriod)).Substring(ClsPub.isStrNull(("0" + sPeriod)).Length - 2, 2) + ClsPub.isStrNull(("0" + sDay)).Substring(ClsPub.isStrNull(("0" + sDay)).Length - 2, 2) + sStr + 1;
+                            }
+                            if (Add == true)
+                            {
+                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + sDay + "'");
+                            }
+                            return sBillNo;
+                        case 3://鏍规嵁 鍓嶇紑+缁勭粐+ YY骞�+MM鏈�   + 娴佹按鍙�  鐢熸垚鍗曟嵁鍙�  锛堢粍缁� 閲囩敤浜� 浠撳簱鐨勫瓧娈碉級
+                            sKjYear = sKjYear.Substring(2, 2);
+                            sPeriod = "0" + sPeriod;
+                            sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
+                            
+                            Ds = oCn.RunProcReturn("Select * from Gy_MaxNum where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + HOrgNumber + "'", "Gy_MaxNum");
+                            if (Ds.Tables[0].Rows.Count != 0)
+                            {
+                                sStr = new string(c, CodeLen - (Ds.Tables[0].Rows[0]["NowNumBer"].ToString()).Length);
+                                sBillNo = Profix.Trim() + HOrgNumber + sKjYear + sPeriod  + sStr + Ds.Tables[0].Rows[0]["NowNumBer"].ToString().Trim();
+                            }
+                            else //鎻掑叆鏂拌褰�
+                            {
+                                sStr = new string(c, CodeLen - 1);
+                                oCn.RunProc("insert into Gy_Maxnum(BillCode,Kjyear,Period,whcode,NowNumber)  values('" + BillCode.Trim() + "','" + sKjYear + "','" + sPeriod + "','" + HOrgNumber + "',1)");
+                                sBillNo = Profix.Trim() + sKjYear + sPeriod + sDay + sStr + "1";
+                            }
+                            if (Add == true)
+                            {
+                                oCn.RunProc("update Gy_Maxnum set NowNumBer=NowNumBer+1 where BillCode='" + BillCode.Trim() + "' and KjYear='" + sKjYear + "' and Period='" + sPeriod + "' and whcode='" + HOrgNumber + "'");
                             }
                             return sBillNo;
                         default:
@@ -557,8 +749,6 @@
                 return "ERROR";
             }
         }
-
-
 
         //寰楀埌鏈�澶INTERID 瀛樺偍杩囩▼
         public static Int64 CreateBillID_Prod(string BillCode, ref string sReturn)
@@ -740,7 +930,7 @@
                 if (LogTF == 1 || LogTF == 3)//闇�瑕佸垽鏂潈闄�
                 {
                     //鏍规嵁鐢ㄦ埛鍚嶇О鍒ゆ柇鏉冮檺
-                    DsUser = oCn.RunProcReturn("select * from gy_czygl where czymc='" + UserID.Trim() + "'", "gy_czygl");
+                    DsUser = oCn.RunProcReturn("select ManagerFlag,isnull(AuthorityID,'') AuthorityID,Czybm from gy_czygl where czymc='" + UserID.Trim() + "'", "gy_czygl");
                     if (DsUser.Tables[0].Rows.Count == 0)
                     {
                         if (Msg == true)
@@ -756,7 +946,8 @@
                     }
                     else
                     {
-                        if (DsUser.Tables[0].Rows[0]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1")
+                        if (ClsPub.isStrNull(DsUser.Tables[0].Rows[0]["AuthorityID"]).Length > ModID
+                            && DsUser.Tables[0].Rows[0]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1")
                         {
                             HavRight = true;
                         }
@@ -765,7 +956,7 @@
                             //鑾峰彇鐢ㄦ埛缁�  骞跺惊鐜垽鏂潈闄�
                             //鍒ゆ柇瑙掕壊鏄惁鏈夋潈闄�
                             DsJS = oCn.RunProcReturn("select isnull(AuthorityID,'') AuthorityID from System_UserGroupinfo a inner join System_UserGroup b on a.GroupID=b.GroupID " + 
-                                " Where a.USERID='" + UserID.Trim() + "'", "gy_czygl");
+                                " Where a.USERID='" + DsUser.Tables[0].Rows[0]["Czybm"].ToString().Trim() + "'", "gy_czygl");
                             if (DsJS == null)
                             {
                                 HavRight = false;
@@ -1331,7 +1522,7 @@
         {
             try
             {
-                if(oGrd.RowCount<=1  )
+                if (oGrd.RowCount <= 1)
                 {
                     return;
                 }
@@ -2312,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