Quellcode durchsuchen

添加红外计数器

callm vor 4 Wochen
Ursprung
Commit
739ba4021f
1 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen
  1. 6 3
      UAS_MES_YTDZ/FunctionCode/Make/Make_SplitBoard.cs

+ 6 - 3
UAS_MES_YTDZ/FunctionCode/Make/Make_SplitBoard.cs

@@ -101,9 +101,12 @@ namespace UAS_MES_NEW.Make
                 }
                 NowQTY.Text = qty.ToString();
                 string ma_endqty = dh.getFieldDataByCondition("make", "nvl(ma_endqty,0)", "ma_code='" + ma_code.Text + "'").ToString();
-                dh.ExecuteSql("update make set ma_endqty=nvl(ma_endqty,0)+'" + (qty - lastqty) + "' where ma_code='" + ma_code.Text + "' ", "update");
-                dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,mhc_qty,mhc_sourcecode,mhc_inman,mhc_linecode,mhc_stepcode,mhc_pcbcount)" +
-                         "values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + (qty - lastqty) + "','" + User.UserSourceCode + "','" + User.UserCode + "','" + User.UserLineCode + "','" + User.CurrentStepCode + "','" + pr_pcbacount.Value + "')", "insert");
+                //dh.ExecuteSql("update make set ma_endqty=nvl(ma_endqty,0)+'" + (qty - lastqty) + "' where ma_code='" + ma_code.Text + "' ", "update");
+                if (qty - lastqty > 0) {
+                    dh.ExecuteSql("insert into makehourcount(mhc_id,mhc_macode,mhc_indate,mhc_qty,mhc_sourcecode,mhc_inman,mhc_linecode,mhc_stepcode,mhc_pcbcount)" +
+           "values(makehourcount_seq.nextval,'" + ma_code.Text + "',sysdate,'" + (qty - lastqty) + "','" + User.UserSourceCode + "','" + User.UserCode + "','" + User.UserLineCode + "','" + User.CurrentStepCode + "','" + pr_pcbacount.Value + "')", "insert");
+                }
+  
                 lastqty = qty;
             }
         }