Browse Source

优化数据库链接

callm 1 month ago
parent
commit
527a04b7c2

+ 1 - 1
UAS_MES_ZKLH/CustomControl/HeadBar/HeadBar.cs

@@ -122,7 +122,7 @@ namespace UAS_MES_NEW.CustomControl
                 if (logout_confirm == "Yes")
                 {
                     //注销的时候切换回默认数据库
-                    SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.1.80)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+                    SystemInf.ConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_ZK;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.1.80)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
                     DataHelper.DBConnectionString = SystemInf.ConnectionString;
                     //清除上个用户的权限信息
                     SystemInf.Caller.Clear();

+ 15 - 15
UAS_MES_ZKLH/FunctionCode/Make/Make_Repair.cs

@@ -208,20 +208,20 @@ namespace UAS_MES_NEW.Make
                     ms_paststep = dt.Rows[0]["ms_paststep"].ToString();
                     ifrework = dt.Rows[0]["ms_ifrework"].ToString();
                     reworkstatus = dt.Rows[0]["ms_reworkstatus"].ToString();
-                    if (ms_qccheck != "-1")
-                    {
-                        OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "未转维修,请先进行维修转数\n", Color.Red);
-                        BaseUtil.CleanForm(this);
-                        BadCodeTree.Nodes.Clear();
-                        return;
-                    }
-                    if (ms_repair == "2" && User.CurrentStepCode != "B_REPAIR1")
-                    {
-                        OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "已转维修二部,请登录清尾维修资源\n", Color.Red);
-                        BaseUtil.CleanForm(this);
-                        BadCodeTree.Nodes.Clear();
-                        return;
-                    }
+                    //if (ms_qccheck != "-1")
+                    //{
+                    //    OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "未转维修,请先进行维修转数\n", Color.Red);
+                    //    BaseUtil.CleanForm(this);
+                    //    BadCodeTree.Nodes.Clear();
+                    //    return;
+                    //}
+                    //if (ms_repair == "2" && User.CurrentStepCode != "B_REPAIR1")
+                    //{
+                    //    OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "已转维修二部,请登录清尾维修资源\n", Color.Red);
+                    //    BaseUtil.CleanForm(this);
+                    //    BadCodeTree.Nodes.Clear();
+                    //    return;
+                    //}
                     if (dt.Rows[0]["ms_outboxcode"].ToString() != "")
                     {
                         OperatResult.AppendText(">>序列号:" + GetSNCode.Text + "已装箱,请先进行拆箱\n", Color.Red);
@@ -646,7 +646,7 @@ namespace UAS_MES_NEW.Make
                     SQLS.Add("update makebad set mb_status=-1 where (mb_sncode='" + ms_sncode.Text + "' or mb_mscode='" + ms_sncode.Text + "') and mb_makecode='" + ms_makecode.Text + "'");
                     //取消最近拆解部件
                     SQLS.Add("update craftmaterial set cm_lastdeco=0 where cm_sncode='" + ms_sncode.Text + "' and cm_makecode='" + ms_makecode.Text + "' and nvl(cm_lastdeco,0)<>0");
-                    SQLS.Add("update MakeBadCount_using set mbc_status=-1 where mbc_sncode='" + ms_sncode.Text + "'");
+                    //SQLS.Add("update MakeBadCount_using set mbc_status=-1 where mbc_sncode='" + ms_sncode.Text + "'");
                     dh.ExecuteSQLTran(SQLS.ToArray());
                     LogicHandler.InsertMakeProcess(ms_sncode.Text, ms_makecode.Text, User.UserSourceCode, "回流工序", "完成维修回流", User.UserCode);
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, macode, User.UserLineCode, User.UserSourceCode, "回流工序", "完成维修回流", ms_sncode.Text, ms_checkno.Text);