条件查询,前端分页
This commit is contained in:
1 parent
75c580115c
commit
720cf26a59
10 files changed
+648
-81
No files matched your search
@@ -33,9 +33,36 @@ public class XWMSMFMController : BaseController
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
public ActionResult Search()
|
||||
public ActionResult Search(string address, string zjcode, string materialcode, string gdbill, int gdline = 0, int ms = 0)
|
||||
{
|
||||
var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSMFM where rownum <=30").Tables[0];
|
||||
var sql = @"select * from QREQ3.XWMSMFM where 1=1";
|
||||
if (!string.IsNullOrEmpty(address))
|
||||
{
|
||||
sql += $" and MFGFCY_0 = '{address}'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(zjcode))
|
||||
{
|
||||
sql += $" and MFIITMREF_0 like '%{zjcode}%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(materialcode))
|
||||
{
|
||||
sql += $"and ITMREF_0 like '%{materialcode}%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(gdbill))
|
||||
{
|
||||
sql += $" and MFGNUM_0 like '%{gdbill}%'";
|
||||
}
|
||||
if (gdline != 0)
|
||||
{
|
||||
sql += $" and MFGLIN_0 = '{gdline}'";
|
||||
}
|
||||
if (ms != 0)
|
||||
{
|
||||
sql += $" and STOCOD_0 = '{ms}'";
|
||||
}
|
||||
|
||||
var data = OracleHelper.GetDataSet(sql).Tables[0];
|
||||
|
||||
var list = data.AsEnumerable().Select
|
||||
(x => new
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ public class XWMSPOHController : BaseController
|
||||
{
|
||||
sql += $"and ITMREF_0 like '%{materialcode}%'";
|
||||
}
|
||||
sql += " and rownum <=30";
|
||||
|
||||
var data = OracleHelper.GetDataSet(sql).Tables[0];
|
||||
var list = data.AsEnumerable().Select
|
||||
(x => new
|
||||
@@ -83,6 +83,7 @@ public class XWMSPOHController : BaseController
|
||||
STA_0 = x.Field<string>("STA_0"),
|
||||
}
|
||||
).ToList();
|
||||
|
||||
return JsonMore(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -33,9 +33,27 @@ public class XWMSSHIPController : BaseController
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
public ActionResult Search()
|
||||
public ActionResult Search(string address, string billno, string sbill, string materialcode)
|
||||
{
|
||||
var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSSHIP where rownum <=30").Tables[0];
|
||||
var sql = @"select * from QREQ3.XWMSSHIP where 1=1";
|
||||
if (!string.IsNullOrEmpty(address))
|
||||
{
|
||||
sql += $" and FCY_0 = '{address}'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(billno))
|
||||
{
|
||||
sql += $" and POHNUM_0 like '%{billno}%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(sbill))
|
||||
{
|
||||
sql += $" and SDHNUM_0 like '%{sbill}%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(materialcode))
|
||||
{
|
||||
sql += $"and ITMREF_0 like '%{materialcode}%'";
|
||||
}
|
||||
|
||||
var data = OracleHelper.GetDataSet(sql).Tables[0];
|
||||
var list = data.AsEnumerable().Select
|
||||
(x => new
|
||||
{
|
||||
|
||||
@@ -33,9 +33,28 @@ public class XWMSSOHController : BaseController
|
||||
}
|
||||
|
||||
[ActionDescription("Sys.Search")]
|
||||
public ActionResult Search()
|
||||
public ActionResult Search(string address, string billno, string cust, string materialcode)
|
||||
{
|
||||
var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSSOH where rownum <=30").Tables[0];
|
||||
var sql = @"select * from QREQ3.XWMSSOH where 1=1";
|
||||
if (!string.IsNullOrEmpty(address))
|
||||
{
|
||||
sql += $" and SALFCY_0 = '{address}'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(billno))
|
||||
{
|
||||
sql += $" and SOHNUM_0 like '%{billno}%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cust))
|
||||
{
|
||||
sql += $" and BPCNAM_0 like '%{cust}%'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(materialcode))
|
||||
{
|
||||
sql += $"and ITMREF_0 like '%{materialcode}%'";
|
||||
}
|
||||
|
||||
var data = OracleHelper.GetDataSet(sql).Tables[0];
|
||||
|
||||
var list = data.AsEnumerable().Select
|
||||
(x => new
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user