From 4b563b13db15d5bafa9b9d6be687bac0eaac250f Mon Sep 17 00:00:00 2001 From: "ruoxing.wang" <88384874@qq.com> Date: Fri, 23 May 2025 14:23:14 +0800 Subject: [PATCH] 1 --- MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs b/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs index 6b85e1e..c01ebf9 100644 --- a/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs +++ b/MESClassLibrary/DAL/BasicInfo/BarCodeDAl.cs @@ -499,6 +499,17 @@ namespace MESClassLibrary.DAL.BasicInfo dbo.tb_Station ON dbo.tb_BarCode5.StationID = dbo.tb_Station.StationID where dbo.tb_Station.StationNo=@stationNo and IsDel=0 and IsBad=0 " + " order by [CreateTime] desc"; } + if (stationNo.Substring(2, 2) == "22" || stationNo.Substring(2, 2) == "23" || + stationNo.Substring(2, 2) == "24" || stationNo.Substring(2, 2) == "25") + { + sql = @"SELECT top 100 dbo.tb_BarCode6.BarCode,dbo.tb_BarCode6.OneBarCode, dbo.tb_Product.ProductName, dbo.tb_BarCode6.BoxNo, + CASE dbo.tb_BarCode6.PrintType WHEN 0 THEN '自动打印' when 1 then '手动打印' when 2 then '补打' END AS PrintType, + dbo.tb_BarCode6.CreateTime + FROM dbo.tb_BarCode6 with (nolock) LEFT OUTER JOIN + dbo.tb_Product ON dbo.tb_BarCode6.StockNo = dbo.tb_Product.StockNo LEFT OUTER JOIN + dbo.tb_Station ON dbo.tb_BarCode6.StationID = dbo.tb_Station.StationID + where dbo.tb_Station.StationNo=@stationNo and IsDel=0 and IsBad=0 " + " order by [CreateTime] desc"; + } SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@stationNo", SqlDbType.VarChar);