Browse Source

上传日志功能修改

callm 4 months ago
parent
commit
134c3841be

+ 1 - 0
UAS_MES_JC/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -557,6 +557,7 @@ namespace UAS_MES_NEW.Make
                     if (dt.Rows.Count > 0)
                         BaseUtil.SetFormValue(Controls, dt);
                 }
+                ClearSn_code_Click(sender, e);
                 code.Text = LogicHandler.GetSN(ma_code.Text);
                 code_KeyDown(sender, new KeyEventArgs(Keys.Enter));
             }

+ 15 - 15
UAS_MES_JC/FunctionCode/Make/Make_RePrintLabel.cs

@@ -216,23 +216,23 @@ namespace UAS_MES_NEW.Make
             //{
             //    return;
             //}
-            if (fuselagel.Checked)
-                type = "机身标";
-            else if (giftBox.Checked)
-                type = "SN标签";
-            else
-                type = "卡通箱标";
+            //if (fuselagel.Checked)
+            //    type = "机身标";
+            //else if (giftBox.Checked)
+            //    type = "SN标签";
+            //else
+            //    type = "卡通箱标";
 
-            getlabel = "select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where  la_templatetype='" + type + "' and la_statuscode='AUDITED' order by la_isdefault";
+            //getlabel = "select la_id,substr(la_url,instr(la_url,'\\',-1)+1)la_name,la_url,la_isdefault from label where  la_templatetype='" + type + "' and la_statuscode='AUDITED' order by la_isdefault";
 
-            listA = (DataTable)dh.ExecuteSql(getlabel, "select");
-            if (listA.Rows.Count == 0)
-            {
-                OperateResult.AppendText("<<产品:" + pr_code.Text + "未维护" + type + "模板\n", Color.Red);
-            }
-            PrintLabel.DataSource = listA;
-            PrintLabel.DisplayMember = "la_url";
-            PrintLabel.ValueMember = "la_id";
+            //listA = (DataTable)dh.ExecuteSql(getlabel, "select");
+            //if (listA.Rows.Count == 0)
+            //{
+            //    OperateResult.AppendText("<<产品:" + pr_code.Text + "未维护" + type + "模板\n", Color.Red);
+            //}
+            //PrintLabel.DataSource = listA;
+            //PrintLabel.DisplayMember = "la_url";
+            //PrintLabel.ValueMember = "la_id";
         }
         private void print_Click(object sender, EventArgs e)
         {

+ 48 - 7
UAS_MES_JC/FunctionCode/Make/Make_TestCollectionModule.Designer.cs

@@ -96,6 +96,9 @@
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.passqty = new System.Windows.Forms.NumericUpDown();
             this.label1 = new System.Windows.Forms.Label();
+            this.ImportExcel1 = new System.Windows.Forms.OpenFileDialog();
+            this.FilePath = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label8 = new System.Windows.Forms.Label();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.passqty)).BeginInit();
@@ -283,7 +286,7 @@
             this.ChoosedRejectList.Location = new System.Drawing.Point(736, 564);
             this.ChoosedRejectList.Margin = new System.Windows.Forms.Padding(6);
             this.ChoosedRejectList.Name = "ChoosedRejectList";
-            this.ChoosedRejectList.Size = new System.Drawing.Size(528, 408);
+            this.ChoosedRejectList.Size = new System.Drawing.Size(528, 351);
             this.ChoosedRejectList.TabIndex = 50;
             this.ChoosedRejectList.UseCompatibleStateImageBehavior = false;
             this.ChoosedRejectList.View = System.Windows.Forms.View.Details;
@@ -583,7 +586,7 @@
             this.Lock_label.AutoSize = true;
             this.Lock_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Lock_label.ForeColor = System.Drawing.Color.Red;
-            this.Lock_label.Location = new System.Drawing.Point(990, 302);
+            this.Lock_label.Location = new System.Drawing.Point(169, 303);
             this.Lock_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.Lock_label.Name = "Lock_label";
             this.Lock_label.Size = new System.Drawing.Size(250, 41);
@@ -642,7 +645,7 @@
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = null;
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(958, 983);
+            this.Save.Location = new System.Drawing.Point(958, 995);
             this.Save.Margin = new System.Windows.Forms.Padding(4);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
@@ -748,7 +751,7 @@
             this.OperateResult.Location = new System.Drawing.Point(1288, 362);
             this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(410, 610);
+            this.OperateResult.Size = new System.Drawing.Size(410, 553);
             this.OperateResult.TabIndex = 52;
             this.OperateResult.Text = "";
             // 
@@ -826,7 +829,7 @@
             this.ms_sncode.BackColor = System.Drawing.Color.White;
             this.ms_sncode.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ms_sncode.ID = null;
-            this.ms_sncode.Location = new System.Drawing.Point(569, 990);
+            this.ms_sncode.Location = new System.Drawing.Point(564, 1001);
             this.ms_sncode.Margin = new System.Windows.Forms.Padding(6);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Power = null;
@@ -851,7 +854,7 @@
             // 
             // passqty
             // 
-            this.passqty.Location = new System.Drawing.Point(1262, 995);
+            this.passqty.Location = new System.Drawing.Point(1262, 1004);
             this.passqty.Name = "passqty";
             this.passqty.Size = new System.Drawing.Size(120, 35);
             this.passqty.TabIndex = 195;
@@ -865,19 +868,54 @@
             // 
             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(1107, 989);
+            this.label1.Location = new System.Drawing.Point(1107, 1001);
             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);
             this.label1.TabIndex = 196;
             this.label1.Text = "过站数量";
             // 
+            // ImportExcel1
+            // 
+            this.ImportExcel1.FileName = "ImportExcel";
+            // 
+            // FilePath
+            // 
+            this.FilePath.AllPower = "ifall";
+            this.FilePath.BackColor = System.Drawing.Color.White;
+            this.FilePath.Enabled = false;
+            this.FilePath.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.FilePath.ID = null;
+            this.FilePath.Location = new System.Drawing.Point(736, 945);
+            this.FilePath.Margin = new System.Windows.Forms.Padding(6);
+            this.FilePath.Name = "FilePath";
+            this.FilePath.Power = null;
+            this.FilePath.Size = new System.Drawing.Size(962, 40);
+            this.FilePath.Str = null;
+            this.FilePath.Str1 = null;
+            this.FilePath.Str2 = null;
+            this.FilePath.TabIndex = 197;
+            this.FilePath.Tag = "IfRead";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(573, 944);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(146, 41);
+            this.label8.TabIndex = 198;
+            this.label8.Text = "文件路径";
+            // 
             // Make_TestCollectionModule
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Control;
             this.ClientSize = new System.Drawing.Size(1724, 1070);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.FilePath);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.passqty);
             this.Controls.Add(this.StepCount);
@@ -1006,5 +1044,8 @@
         private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
         private System.Windows.Forms.NumericUpDown passqty;
         private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.OpenFileDialog ImportExcel1;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox FilePath;
+        private System.Windows.Forms.Label label8;
     }
 }

+ 77 - 57
UAS_MES_JC/FunctionCode/Make/Make_TestCollectionModule.cs

@@ -9,6 +9,8 @@ using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
 using System.Collections.Generic;
 using UAS_MES_NEW.CustomControl.PowerControlForm;
+using DevExpress.XtraScheduler;
+using System.Web.Services.Description;
 
 namespace UAS_MES_NEW.Make
 {
@@ -50,6 +52,8 @@ namespace UAS_MES_NEW.Make
 
         List<string> passsnlist = new List<string>();
 
+        ftpOperater ftp = new ftpOperater();
+
         public Make_TestCollectionModule()
         {
             InitializeComponent();
@@ -187,85 +191,101 @@ namespace UAS_MES_NEW.Make
                 if (passsnlist.ToArray().Length == passqty.Value)
                 {
                     string[] arr = passsnlist.ToArray();
-                    for (int i = 0; i < arr.Length; i++)
+                    ImportExcel1.Filter = "(*.xls)|*.xls";
+                    DialogResult result;
+                    result = ImportExcel1.ShowDialog();
+                    if (result == DialogResult.OK)
                     {
-                        ms_sncode.Text = arr[i];
-                        ChoosedRejectList.Items.Clear();
-                        WaitList.Clear();
-                        ChoosedList.Clear();
-                        if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
+                        string sn = "";
+                        for (int i = 0; i < arr.Length; i++)
                         {
-                            //是否提示过工单切换框,检测前执行
-                            bool NoteAlready = LogicHandler.CheckDiffMakeCodeBeforeStepCheck(ms_sncode.Text, ma_code.Text, NoteForChange.Checked, out oMakeCode, out ErrorMessage);
-                            if (!NoteAlready)
-                            {
-                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
-                                return;
-                            }
-                            if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
+                            sn += arr[i] + "_";
+                        }
+                        string ftppath = "/" + DateTime.Now.ToString("yyyy-MM-dd") + "/";
+                        FilePath.Text = ImportExcel1.FileName;
+                        ftp.UpLoadFile(FilePath.Text, sn + ".xls", ftppath);
+                        for (int i = 0; i < arr.Length; i++)
+                        {
+                            ms_sncode.Text = arr[i];
+                            ChoosedRejectList.Items.Clear();
+                            WaitList.Clear();
+                            ChoosedList.Clear();
+                            if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
                             {
-                                //是否提示过工单切换框,检测前后执行
-                                if (!LogicHandler.CheckDiffMakeCodeAfterStepCheck(ms_sncode.Text, oMakeCode, NoteForChange.Checked, NoteAlready, ma_code, out ErrorMessage))
+                                //是否提示过工单切换框,检测前执行
+                                bool NoteAlready = LogicHandler.CheckDiffMakeCodeBeforeStepCheck(ms_sncode.Text, ma_code.Text, NoteForChange.Checked, out oMakeCode, out ErrorMessage);
+                                if (!NoteAlready)
                                 {
                                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                                     return;
                                 }
-                                if (ma_code.Text != oMakeCode && oMakeCode != null)
+                                if (LogicHandler.CheckStepSNAndMacode(oMakeCode, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
                                 {
-                                    dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,ma_softversion,ma_salecode,pr_detail,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
-                                    if (dt.Rows.Count > 0)
+                                    dh.ExecuteSql("insert into STEPTESTDETAIL (std_id,std_sn,std_makecode,std_indate,STD_RESCODE,std_stepcode,STD_TESTRESULT,std_class)select STEPTESTDETAIL_seq.nextval,'" + arr[i] + "','" + oMakeCode + "',sysdate,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "','','http://172.16.51.3:8099/ftp" + ftppath + sn + ".xls" + "' from dual", "insert");
+
+                                    //是否提示过工单切换框,检测前后执行
+                                    if (!LogicHandler.CheckDiffMakeCodeAfterStepCheck(ms_sncode.Text, oMakeCode, NoteForChange.Checked, NoteAlready, ma_code, out ErrorMessage))
                                     {
-                                        BaseUtil.SetFormValue(this.Controls, dt);
-                                        LockMakeCode.Checked = true;
+                                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                                        return;
                                     }
-                                }
-                                //if (dh.CheckExist("makeserial LEFT JOIN craft ON ms_craftcode = cr_code and ms_prodcode = cr_prodcode LEFT JOIN craftdetail ON cr_id = cd_crid LEFT JOIN STEP ON  CD_NEXTSTEPCODE = ST_CODE ", "ms_id = '"+ oMSID + "' AND CD_STEPCODE = '" + User.CurrentStepCode + "'  AND ST_IFOQC = -1 "))
-                                //{
-                                //    OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号即将送检,此序列号经过维修,提示\n", Color.Purple);
-                                //}
-                                string mscode = dh.getFieldDataByCondition("makeserial LEFT JOIN craft ON ms_craftcode = cr_code and ms_prodcode = cr_prodcode LEFT JOIN craftdetail ON cr_id = cd_crid LEFT JOIN STEP ON  CD_NEXTSTEPCODE = ST_CODE", "ms_code", "ms_id = '" + oMSID + "' AND CD_STEPCODE = '" + User.CurrentStepCode + "'  AND ST_IFOQC = -1").ToString();
-                                if (mscode != "" && (dh.CheckExist("makeserial", "ms_id = '" + oMSID + "' and NVL(MS_BADTIMES,0)>0 ") || dh.CheckExist("makeserial", "ms_sncode = '" + mscode + "' and NVL(MS_BADTIMES,0)>0 ")))
-                                {
-                                    OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号即将送检,此序列号经过维修,提示\n", Color.Purple);
-                                }
-
-                                dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_sncode,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework,ms_stepcode,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
-                                string status = dt.Rows[0]["ms_status"].ToString();
-                                reworkstatus = dt.Rows[0]["ms_reworkstatus"].ToString();
-                                string stepcode = dt.Rows[0]["ms_stepcode"].ToString();
-                                string ifrepair = dt.Rows[0]["st_ifrepair"].ToString();
-                                string sncode = dt.Rows[0]["ms_sncode"].ToString();
-                                if (sncode != ms_sncode.Text)
-                                {
-                                    OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);
-                                    return;
-                                }
-                                ifrework = dt.Rows[0]["ms_ifrework"].ToString();
-                                if (GoodProduct.Checked)
-                                {
-                                    if (ifrework != "0")
+                                    if (ma_code.Text != oMakeCode && oMakeCode != null)
                                     {
-                                        if (stepcode == User.CurrentStepCode && (reworkstatus == "1" || reworkstatus == "2") && ifrepair == "0")
+                                        dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,ma_softversion,ma_salecode,pr_detail,nvl(pr_sendchecktype,'LineCode')pr_sendchecktype,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
+                                        if (dt.Rows.Count > 0)
                                         {
-                                            OperateResult.AppendText(">>" + ms_sncode.Text + "序列号已执行过" + User.CurrentStepCode + "工序,采集结果为良品\n", Color.Red, ms_sncode);
-                                            return;
+                                            BaseUtil.SetFormValue(this.Controls, dt);
+                                            LockMakeCode.Checked = true;
                                         }
                                     }
-                                    else
+                                    //if (dh.CheckExist("makeserial LEFT JOIN craft ON ms_craftcode = cr_code and ms_prodcode = cr_prodcode LEFT JOIN craftdetail ON cr_id = cd_crid LEFT JOIN STEP ON  CD_NEXTSTEPCODE = ST_CODE ", "ms_id = '"+ oMSID + "' AND CD_STEPCODE = '" + User.CurrentStepCode + "'  AND ST_IFOQC = -1 "))
+                                    //{
+                                    //    OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号即将送检,此序列号经过维修,提示\n", Color.Purple);
+                                    //}
+                                    string mscode = dh.getFieldDataByCondition("makeserial LEFT JOIN craft ON ms_craftcode = cr_code and ms_prodcode = cr_prodcode LEFT JOIN craftdetail ON cr_id = cd_crid LEFT JOIN STEP ON  CD_NEXTSTEPCODE = ST_CODE", "ms_code", "ms_id = '" + oMSID + "' AND CD_STEPCODE = '" + User.CurrentStepCode + "'  AND ST_IFOQC = -1").ToString();
+                                    if (mscode != "" && (dh.CheckExist("makeserial", "ms_id = '" + oMSID + "' and NVL(MS_BADTIMES,0)>0 ") || dh.CheckExist("makeserial", "ms_sncode = '" + mscode + "' and NVL(MS_BADTIMES,0)>0 ")))
+                                    {
+                                        OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号即将送检,此序列号经过维修,提示\n", Color.Purple);
+                                    }
+
+                                    dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_sncode,ms_reworkstatus,nvl(ms_ifrework,0)ms_ifrework,ms_stepcode,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
+                                    string status = dt.Rows[0]["ms_status"].ToString();
+                                    reworkstatus = dt.Rows[0]["ms_reworkstatus"].ToString();
+                                    string stepcode = dt.Rows[0]["ms_stepcode"].ToString();
+                                    string ifrepair = dt.Rows[0]["st_ifrepair"].ToString();
+                                    string sncode = dt.Rows[0]["ms_sncode"].ToString();
+                                    if (sncode != ms_sncode.Text)
                                     {
-                                        if (stepcode == User.CurrentStepCode && (status == "1" || status == "2") && ifrepair == "0")
+                                        OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过转号,不允许使用TSN采集\n", Color.Red, ms_sncode);
+                                        return;
+                                    }
+                                    ifrework = dt.Rows[0]["ms_ifrework"].ToString();
+                                    if (GoodProduct.Checked)
+                                    {
+                                        if (ifrework != "0")
                                         {
-                                            OperateResult.AppendText(">>" + ms_sncode.Text + "序列号已执行过" + User.CurrentStepCode + "工序,采集结果为良品\n", Color.Red, ms_sncode);
-                                            return;
+                                            if (stepcode == User.CurrentStepCode && (reworkstatus == "1" || reworkstatus == "2") && ifrepair == "0")
+                                            {
+                                                OperateResult.AppendText(">>" + ms_sncode.Text + "序列号已执行过" + User.CurrentStepCode + "工序,采集结果为良品\n", Color.Red, ms_sncode);
+                                                return;
+                                            }
+                                        }
+                                        else
+                                        {
+                                            if (stepcode == User.CurrentStepCode && (status == "1" || status == "2") && ifrepair == "0")
+                                            {
+                                                OperateResult.AppendText(">>" + ms_sncode.Text + "序列号已执行过" + User.CurrentStepCode + "工序,采集结果为良品\n", Color.Red, ms_sncode);
+                                                return;
+                                            }
                                         }
                                     }
+                                    SetCollectResult();
+                                    passsnlist.Clear();
                                 }
-                                SetCollectResult();
-                                passsnlist.Clear();
+                                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                             }
                             else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                         }
-                        else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
                     }
                 }
             }

+ 4 - 1
UAS_MES_JC/FunctionCode/Make/Make_TestCollectionModule.resx

@@ -259,7 +259,7 @@
         RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
         lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
         f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
-        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEQAACxEBf2RfkQAACfBJREFUeF7t3dtuFFcC
+        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEAAACxABrSO9dQAACfBJREFUeF7t3dtuFFcC
         heFc5VWQRsrL5T0iRcrDkJAjJOADNjbdbvD5iE9tu302RIq0Z6+ynWkmS6oZrlys/+KT8FJX3f2bcmPa
         X5RSAISyI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0BZLAjgAx2BJDBjgAy2BFABjsCyGBHABnsCCCD
         HQFksCOADHYEkMGOADLYEUAGOwLIYEcAGewIIIMdAWSwI4AMdgSQwY4AMtgRQAY7AshgRwAZ7Agggx0B
@@ -369,4 +369,7 @@
         fgAAAABJRU5ErkJggg==
 </value>
   </data>
+  <metadata name="ImportExcel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>1244, 17</value>
+  </metadata>
 </root>

+ 6 - 4
UAS_MES_JC/PublicMethod/BaseUtil.cs

@@ -42,11 +42,12 @@ namespace UAS_MES_NEW.PublicMethod
             return !((c.Client.Poll(1000, SelectMode.SelectRead) && (c.Client.Available == 0)) || !c.Client.Connected);
         }
 
-        public static Control GetControl(Control ctl,string Name) {
+        public static Control GetControl(Control ctl, string Name)
+        {
             if (ctl.Name == Name)
                 return ctl;
             else
-               return GetControl(ctl.Parent, Name);
+                return GetControl(ctl.Parent, Name);
         }
 
         public static string DToAny(double DB, int Type)
@@ -60,7 +61,8 @@ namespace UAS_MES_NEW.PublicMethod
             {
                 return GetRandomChar(H1);
             }
-            else {
+            else
+            {
                 D = (long)DB;
                 B = DB - D;
                 if (D == 0)
@@ -91,7 +93,7 @@ namespace UAS_MES_NEW.PublicMethod
                 }
             }
         }
-        
+
         public static string GetRandomChar(string str)
         {
             byte[] buffer = Guid.NewGuid().ToByteArray();

+ 4 - 4
UAS_MES_JC/PublicMethod/ftpOperater.cs

@@ -11,7 +11,7 @@ namespace UAS_MES_NEW.PublicMethod
     class ftpOperater
     {
         //从配置文件读取FTP信息
-        public static string FTPAddress = Properties.Settings.Default.Properties["FTPAddress"].DefaultValue.ToString().Split('|')[0];
+        public static string FTPAddress = "";
 
         public static string DownLoadTo = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\" + @"打印标签\";
 
@@ -23,7 +23,7 @@ namespace UAS_MES_NEW.PublicMethod
 
         public ftpOperater()
         {
-            string[] FTPInf = Properties.Settings.Default.Properties["FTPAddress"].DefaultValue.ToString().Split('|');
+            string[] FTPInf = "ftp://10.8.0.185|vsftpd|vsftpd3cd79014ef".Split('|');
             this.ftpServerIP = FTPInf[0];
             this.ftpUser = FTPInf[1];
             this.ftpPwd = FTPInf[2];
@@ -56,7 +56,7 @@ namespace UAS_MES_NEW.PublicMethod
             reqFTP.UseBinary = true;
             reqFTP.Credentials = new NetworkCredential(ftpUser, ftpPwd);
             reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
-            FileInfo file = new FileInfo(filepath + "/" + filename);
+            FileInfo file = new FileInfo(filepath);
             const int BufferSize = 2048;
             byte[] content = new byte[BufferSize - 1 + 1];
             int dataRead;
@@ -76,7 +76,7 @@ namespace UAS_MES_NEW.PublicMethod
                 fs.Close();
             }
             Thread.Sleep(1000);
-            File.Delete(filepath + "/" + filename);
+            //File.Delete(filepath + "/" + filename);
         }
 
         private static void BeginWriteCallBack(IAsyncResult ar)