using HH.WMS.Entitys;
|
using HH.WMS.Entitys.Basic;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using HH.WMS.Entitys.Common;
|
using HH.WMS.Common;
|
using System.Data;
|
|
namespace HH.WMS.DAL.Basic
|
{
|
public class TN_WM_LOT_INFODAL:DapperBaseDAL
|
{
|
public OperateResult GetLotList(int pageIndex, int pageSize)
|
{
|
string sql = @"(select * from TN_WM_LOT_INFO) T ";
|
|
OperateResult result = new OperateResult();
|
|
return ExecutePagingResult(sql, pageIndex, pageSize, "", "");
|
}
|
|
public DataTable GetLotList(SearchModel searchModel,out long total)
|
{
|
var condition = searchModel.SearchCondition;
|
string sql = " select * from TN_WM_LOT_INFO where 1=1 ";
|
string ConStr = "";
|
if (condition != null)
|
{
|
if (!string.IsNullOrEmpty(condition.CN_S_LOT_CODE.ToString()))
|
{
|
ConStr = ConStr + " and CN_S_LOT_CODE like '%" + Util.ToStringInput(condition.CN_S_LOT_CODE) + "%'";
|
}
|
if (!string.IsNullOrEmpty(condition.CN_S_VENDOR_NO.ToString()))
|
{
|
ConStr = ConStr + " and CN_S_VENDOR_NO like '%" + Util.ToStringInput(condition.CN_S_VENDOR_NO) + "%'";
|
}
|
}
|
if (!string.IsNullOrEmpty(ConStr))
|
{
|
sql = sql + ConStr;
|
}
|
OperateResult result = new OperateResult();
|
//DataTable dt = new DataTable();
|
//if (!isExport)
|
//{
|
return ExecutePagingData(" (" + sql + ") t ", searchModel.PageIndex, searchModel.PageSize, out total, "", "");
|
//}
|
//else
|
//{
|
// total = 0;//无效
|
// return ExecuteDataTable(sql, "");
|
//}
|
|
}
|
}
|
}
|