Browse Source

去喷涂上件系统数据,有重复. 取最近一条

master
ruoxing.wang 21 hours ago
parent
commit
15031be43d
  1. 2
      PaintingPC/Function.cs

2
PaintingPC/Function.cs

@ -2093,7 +2093,7 @@ namespace PaintingPC
Stopwatch sw5 = new Stopwatch(); Stopwatch sw5 = new Stopwatch();
sw5.Start(); sw5.Start();
#region 从WMS系统获得喷涂上件的颜色信息 #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(); string wmsSqlConnString = ConfigurationManager.ConnectionStrings["WmsSqlConnString"].ToString();
DataTable dtColor = SqlHelper.GetDataDateTable(wmsSqlConnString, CommandType.Text, wmsSql, null); DataTable dtColor = SqlHelper.GetDataDateTable(wmsSqlConnString, CommandType.Text, wmsSql, null);

Loading…
Cancel
Save