浏览代码

修改数据库里连接,正式包

callm 3 年之前
父节点
当前提交
15302fd5ec

+ 1 - 1
UAS_MES_KTK/App.config

@@ -72,7 +72,7 @@
   <applicationSettings>
     <UAS_MES_NEW.Properties.Settings>
       <setting name="MES" serializeAs="String">
-        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_PGK;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.191)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES_NEW.Properties.Settings>
   </applicationSettings>

+ 3 - 3
UAS_MES_KTK/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -141,7 +141,7 @@ namespace UAS_MES_NEW.Packing
             {
                 string choose_pd_barcode = dt.Rows[0]["pd_barcode"].ToString();
                 string choose_pd_makecode = dt.Rows[0]["pd_makecode"].ToString();
-                PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + choose_pd_barcode + "' and ms_makecode='" + choose_pd_makecode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
+                PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + choose_pd_barcode + "' and ms_makecode='" + choose_pd_makecode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
             }
             //更新界面的采集数量
             pa_currentqty.Text = dh.getFieldDataByCondition("package", "pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString();
@@ -222,7 +222,7 @@ namespace UAS_MES_NEW.Packing
                         {
                             string prodcode = dt.Rows[0]["ms_prodcode"].ToString();
                             string craftcode = dt.Rows[0]["ms_craftcode"].ToString();
-                            string craftstepcode = dh.getFieldDataByCondition("craft left join craftdetail on cr_id =cd_crid", "(cd_stepcode)", "cr_prodcode='" + prodcode + "' and cr_code='" + craftcode + "' and cd_stepcode='" + User.CurrentStepCode + "'").ToString();
+                            string craftstepcode = dh.getFieldDataByCondition("craft left join craftdetail on cr_id =cd_crid", "(cd_stepcode)", "cr_code='" + craftcode + "' and cd_stepcode='" + User.CurrentStepCode + "'").ToString();
                             if (craftstepcode == "")
                             {
                                 OperateResult.AppendText("工序" + User.CurrentStepCode + "不在途程" + craftcode + "内,不允许采集\n", Color.Red);
@@ -239,7 +239,7 @@ namespace UAS_MES_NEW.Packing
                             }
                             return;
                         }
-                        PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code and cr_prodcode = ms_prodcode", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
+                        PR_CHECKCARTONW = dh.getFieldDataByCondition("craftdetail left join craft on cr_id=cd_crid left join makeserial on ms_craftcode =cr_code", "nvl(cd_ifweigh,'0') cd_ifweigh", "ms_sncode='" + sn_code.Text + "' and ms_makecode='" + oMakeCode + "' and cd_stepcode = '" + User.CurrentStepCode + "'").ToString();
                         //获取序列号信息
                         sql.Clear();
                         sql.Append("select nvl(ms_iostatus,0) ms_iostatus,pa_salecode,ms_salecode,ms_outno,ms_makecode,ms_prodcode,nvl(pa_downstatus,0) pa_downstatus,pa_sccode,pa_checkno,pr_packrule,");

+ 8 - 8
UAS_MES_KTK/FunctionCode/SystemSetting/SystemSetting_PrinterTest.Designer.cs

@@ -64,7 +64,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(162, 333);
+            this.label3.Location = new System.Drawing.Point(174, 333);
             this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(146, 41);
@@ -75,7 +75,7 @@
             // 
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label2.Location = new System.Drawing.Point(1321, 107);
+            this.label2.Location = new System.Drawing.Point(238, 409);
             this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(82, 41);
@@ -87,7 +87,7 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(162, 258);
+            this.label1.Location = new System.Drawing.Point(174, 258);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(146, 41);
@@ -96,7 +96,7 @@
             // 
             // Date
             // 
-            this.Date.Location = new System.Drawing.Point(1470, 125);
+            this.Date.Location = new System.Drawing.Point(356, 415);
             this.Date.Name = "Date";
             this.Date.Size = new System.Drawing.Size(278, 35);
             this.Date.TabIndex = 26;
@@ -106,12 +106,12 @@
             // 
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(162, 187);
+            this.label4.Location = new System.Drawing.Point(206, 187);
             this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(170, 41);
+            this.label4.Size = new System.Drawing.Size(114, 41);
             this.label4.TabIndex = 33;
-            this.label4.Text = "工单号XX-";
+            this.label4.Text = "工单号";
             // 
             // SN
             // 
@@ -160,7 +160,7 @@
             this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
             this.Export.Image = null;
             this.Export.IsShowBorder = true;
-            this.Export.Location = new System.Drawing.Point(356, 656);
+            this.Export.Location = new System.Drawing.Point(356, 548);
             this.Export.Margin = new System.Windows.Forms.Padding(6);
             this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
             this.Export.Name = "Export";

+ 11 - 8
UAS_MES_KTK/FunctionCode/SystemSetting/SystemSetting_PrinterTest.cs

@@ -5,6 +5,7 @@ using System.Drawing.Printing;
 using System.Windows.Forms;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.SystemSetting
 {
@@ -67,25 +68,27 @@ namespace UAS_MES_NEW.SystemSetting
                         {
                             case "SN":
                                 format.SubStrings[j].Value = (ma_code.Text.Replace("XX-", "") + lpad(4, (temp).ToString()));
-                                if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "'"))
-                                {
-                                    dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
-                                };
+                                //if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "'"))
+                                //{
+                                //    dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
+                                //};
                                 break;
                             case "SN2":
                                 format.SubStrings[j].Value = (ma_code.Text.Replace("XX-", "") + lpad(4, (temp + 1).ToString()));
-                                if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "'"))
-                                {
-                                    dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
-                                };
+                                //if (!dh.CheckExist("makesnlist", "msl_sncode='" + format.SubStrings[j].Value + "'"))
+                                //{
+                                //    dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
+                                //};
                                 break;
                             default:
                                 break;
                         }
                     }
+                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "打印报工条码", "打印成功", "", "");
                     format.PrintSetup.PrinterName = PrinterList.Text;
                     format.PrintSetup.IdenticalCopiesOfLabel = 1;
                     format.Print();
+
                 }
             }
         }

+ 3 - 3
UAS_MES_KTK/Properties/Settings.Designer.cs

@@ -121,9 +121,9 @@ namespace UAS_MES_NEW.Properties {
         
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false" +
-            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91" +
-            ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
+        [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_PGK;Pooling" +
+            "=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.1" +
+            "68.0.191)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         public string MES {
             get {
                 return ((string)(this["MES"]));

+ 1 - 1
UAS_MES_KTK/Properties/Settings.settings

@@ -27,7 +27,7 @@
       <Value Profile="(Default)">ftp://10.8.0.82|vsftpd|vsftpd</Value>
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
-      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=81.71.42.91)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=N_MES_PGK;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.191)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
     </Setting>
   </Settings>
 </SettingsFile>