旧版报表、仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

43 lines
1.2 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Warehouse.Models.mesModel;
namespace Warehouse.DAL.Report
{
public class PressureResistant
{
public List<dynamic> QueryData(string lot,string bt, string et)
{
using (var context = new mesModel())
{
string strwhere = "";
if (!string.IsNullOrEmpty(bt.ToString()))
{
strwhere += "and [LastTime] >= '" + Convert.ToString(bt) + "'";
strwhere += "and [LastTime] <= '" + Convert.ToString(et) + "'";
}
strwhere += String.IsNullOrEmpty(lot) ? "" : " AND [BarCode] in (" + Convert.ToString(lot) + ")";
string sql = @"SELECT [BarCode]
,[MemoryId]
,[StepId]
,[UserId]
,[ReadMode]
,[Source]
,[ReadData1]
,[Limit]
,[ReadData2]
,[ReadTime]
,[ReadResult]
,[LastTime]
FROM [mes_level2_iface].[dbo].[PressureResistant]
where 1=1 " + strwhere;
var res = context.DynamicListFromSql(sql, null);
return res.ToList();
}
}
}
}