查询条件

This commit is contained in:
zgf committed 2023-12-22 11:41:36 +08:00
1 parent 7ff2c6fe3b
commit 75c580115c
3 files changed
+383 -86

No files matched your search

@@ -33,9 +33,27 @@ public class XWMSPOHController : BaseController
}
[ActionDescription("Sys.Search")]
public ActionResult Search()
public ActionResult Search(string address, string billno, string supply, string materialcode)
{
var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSPOH where rownum <=30").Tables[0];
var sql = @"select * from QREQ3.XWMSPOH where 1=1";
if (!string.IsNullOrEmpty(address))
{
sql += $" and POHFCY_0 = '{address}'";
}
if (!string.IsNullOrEmpty(billno))
{
sql += $" and POHNUM_0 like '%{billno}%'";
}
if (!string.IsNullOrEmpty(supply))
{
sql += $" and BPRNAM_0 like '%{supply}%'";
}
if (!string.IsNullOrEmpty(materialcode))
{
sql += $"and ITMREF_0 like '%{materialcode}%'";
}
sql += " and rownum <=30";
var data = OracleHelper.GetDataSet(sql).Tables[0];
var list = data.AsEnumerable().Select
(x => new
{
@@ -69,4 +87,10 @@ public class XWMSPOHController : BaseController
}
#endregion Search
[HttpPost]
[Public]
public ActionResult Create(List<XWMSPOH> data)
{
return JsonMore(null);
}
}