浏览代码

调整复核内容和数据上传BUG

章政 6 年之前
父节点
当前提交
69d8cad7e6

+ 7 - 4
UAS-出货标签管理(吉利通)/PublicMethod/LogicHandler.cs

@@ -108,11 +108,14 @@ namespace UAS_LabelMachine.PublicMethod
         public static bool CheckUploadData(string iInoutno)
         {
             DataTable dt = (DataTable)adh.ExecuteSql("select pib_id,pib_outboxcode1,pib_outboxcode2,pib_custmidboxcode,pib_custoutboxcode,pib_lotno,pib_datecode,pib_ifmodify,-1 as pib_ifupload,pib_ifpick,pib_ifprint,pib_ifrecheck from prodiobarcode where pib_inoutno='" + iInoutno + "' and pib_ifupload=0 and pib_ifrecheck=-1  ", "select");
-            dh.CallProcedure("sp_uploadbarcode", dt);
-            //更新本地数据为已上传
-            if (adh.UpdateByCondition("prodiobarcode", "pib_ifupload=-1", "pib_inoutno='" + iInoutno + "' and pib_ifrecheck=-1 and pib_ifupload<>-1") > 0)
+            if (dt.Rows.Count > 0)
             {
-                return true;
+                dh.CallProcedure("sp_uploadbarcode", dt);
+                //更新本地数据为已上传
+                if (adh.UpdateByCondition("prodiobarcode", "pib_ifupload=-1", "pib_inoutno='" + iInoutno + "' and pib_ifrecheck=-1 and pib_ifupload<>-1") > 0)
+                {
+                    return true;
+                }
             }
             return false;
         }

+ 6 - 1
UAS-出货标签管理(吉利通)/UAS_出货标签管理.cs

@@ -540,7 +540,7 @@ namespace UAS_LabelMachine
                     if (cu_print_outlotno.Checked)
                     {
                         string TempData = LastRowData.Rows[0]["pib_lotno"].ToString();
-                        if (TempData!=""&& TempData != LabelInf.Rows[CurrentRowIndex].Cells["pib_lotno"].Value.ToString() && !GetBarcode)
+                        if (TempData != "" && TempData != LabelInf.Rows[CurrentRowIndex].Cells["pib_lotno"].Value.ToString() && !GetBarcode)
                         {
                             LogicHandler.GetBarCode(PI_ID, pd_id, 1, out OutBoxBarCode);
                             LabelInf.Rows[CurrentRowIndex].Cells["pib_custoutboxcode"].Value = OutBoxBarCode;
@@ -1939,6 +1939,7 @@ namespace UAS_LabelMachine
             }
             else
             {
+                LoadGridData();
                 DetailRange1.Enabled = true;
                 DetailRange2.Enabled = true;
             }
@@ -2106,6 +2107,10 @@ namespace UAS_LabelMachine
                 }
                 MessageLog.AppendText(">>上传数据成功\n", Color.Green);
             }
+            else
+            {
+                MessageLog.AppendText(">>无可上传数据\n", Color.Red);
+            }
         }
 
         private void DocRefresh_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)