条件查询,前端分页
This commit is contained in:
1 parent
75c580115c
commit
720cf26a59
10 files changed
+648
-81
No files matched your search
@@ -33,9 +33,31 @@ public class XWMSPTHController : BaseController
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
public ActionResult Search()
|
||||
public ActionResult Search(string address, string billno, string supply, string materialcode, string cgsh)
|
||||
{
|
||||
var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSPTH where rownum <=30").Tables[0];
|
||||
var sql = @"select * from QREQ3.XWMSPTH where 1=1";
|
||||
if (!string.IsNullOrEmpty(address))
|
||||
{
|
||||
sql += $" and PRHFCY_0 = '{address}'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(billno))
|
||||
{
|
||||
sql += $" and POHNUM_0 like '%{billno}%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(supply))
|
||||
{
|
||||
sql += $" and BPSNUM_0 like '%{supply}%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(materialcode))
|
||||
{
|
||||
sql += $"and ITMREF_0 like '%{materialcode}%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cgsh))
|
||||
{
|
||||
sql += $"and PTHNUM_0 like '%{cgsh}%'";
|
||||
}
|
||||
|
||||
var data = OracleHelper.GetDataSet(sql).Tables[0];
|
||||
var list = data.AsEnumerable().Select
|
||||
(x => new
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user