diff --git a/PaintingPC/Function.cs b/PaintingPC/Function.cs index a28a7e0..f5fb11c 100644 --- a/PaintingPC/Function.cs +++ b/PaintingPC/Function.cs @@ -2093,7 +2093,7 @@ namespace PaintingPC Stopwatch sw5 = new Stopwatch(); sw5.Start(); #region 从WMS系统获得喷涂上件的颜色信息 - string wmsSql = $"select TypeCode,WMSColor as paintcode from {tableName} where ProductBarcode='{barcode}'"; + string wmsSql = $"select top 1 TypeCode,WMSColor as paintcode from {tableName} where ProductBarcode='{barcode}' order by UpdateTime desc "; string wmsSqlConnString = ConfigurationManager.ConnectionStrings["WmsSqlConnString"].ToString(); DataTable dtColor = SqlHelper.GetDataDateTable(wmsSqlConnString, CommandType.Text, wmsSql, null);