Browse Source

优化易来福打印

callm 4 days ago
parent
commit
15180246cd

+ 1 - 1
UAS_MES_HYSX/FunctionCode/Packing/Packing_PackageCollectionYLF.cs

@@ -679,12 +679,12 @@ namespace UAS_MES_NEW.Packing
 
         private void Packing_Click(object sender, EventArgs e)
         {
+            HttpServer.GetOutBoxInfoYLF(pa_outboxcode.Text);
             if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode.Text + "' and nvl(pa_status,0)=0"))
             {
                 string Seal = MessageBox.Show(this.ParentForm, "是否确认封箱?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (Seal == "Yes")
                 {
-                    HttpServer.GetOutBoxInfoYLF(pa_outboxcode.Text);
                     OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "采集完成,手动封箱成功\n", Color.Green);
                     dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                     pa_status.Text = "1";

+ 12 - 0
UAS_MES_HYSX/PublicMethod/HttpServer.cs

@@ -800,6 +800,18 @@ namespace UAS_MES_NEW.PublicMethod
             {
                 string enNoKey = $"en_no{i}";
                 string enNoValue = dt.Rows[i]["ZD_D_SN"].ToString();
+                if (int.Parse(dt.Rows[i]["NOTYPE"].ToString()) == 0)
+                {
+                    enNoValue = dt.Rows[i]["ZD_DEV_EN_NO"].ToString();
+                }
+                else if (int.Parse(dt.Rows[i]["NOTYPE"].ToString()) == 4)
+                {
+                    enNoValue = dt.Rows[i]["ZD_D_SN"].ToString();
+                }
+                else
+                {
+                    enNoValue = dt.Rows[i]["ZD_DEV_EN_NO"].ToString();
+                }
                 expandoDict[enNoKey] = enNoValue;
                 makecode = dt.Rows[i]["pd_makecode"].ToString();
                 po = dt.Rows[i]["po_sn"].ToString();