diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DB/StockMaterrialDBHelp.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DB/StockMaterrialDBHelp.cs index c25e60e..be1644b 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DB/StockMaterrialDBHelp.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/DB/StockMaterrialDBHelp.cs @@ -80,7 +80,13 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.DB { string sql = $"select Code from lj_stock_material where Id={id}"; var dataTable = DBHelp.GetTable(sql); - return Convert.ToInt16(dataTable.Rows[0][0]); + if (dataTable.Rows.Count == 1) + { + return Convert.ToInt16(dataTable.Rows[0][0]); + } + + return id; + } return id;