From 15031be43df31d7ec6d60aaff2ba55dff36394bb Mon Sep 17 00:00:00 2001 From: "ruoxing.wang" <88384874@qq.com> Date: Mon, 11 Aug 2025 13:52:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E5=96=B7=E6=B6=82=E4=B8=8A=E4=BB=B6?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=95=B0=E6=8D=AE,=E6=9C=89=E9=87=8D?= =?UTF-8?q?=E5=A4=8D.=20=E5=8F=96=E6=9C=80=E8=BF=91=E4=B8=80=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PaintingPC/Function.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);