Browse Source

彩盒称重序列号有多个工单时去ms_id最大的

shim 8 years ago
parent
commit
039ed82ca6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -78,7 +78,7 @@ namespace UAS_MES.Make
                 sql.Clear();
                 sql.Append("select ms_makecode,mcd_inqty,ma_qty,ma_qty-mcd_inqty as mcd_waitqty,ma_salecode,pr_detail,pr_colorboxunit,pr_code,pr_colorboxgw,");
                 sql.Append("pr_colorboxunit,pr_colorboxmaxw,pr_colorboxminw from makeserial left join make on ms_makecode=ma_code left join product on ");
-                sql.Append("ms_prodcode=pr_code left join makecraftdetail on ms_makecode=mcd_macode where ms_sncode='" + sncode.Text + "'");
+                sql.Append("ms_prodcode=pr_code left join makecraftdetail on ms_makecode=mcd_macode where ms_sncode='" + sncode.Text + "' order by ms_id desc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
                 {