This commit is contained in:
陈向学 2024-11-19 15:56:38 +08:00
parent 6d2c044512
commit 60d05d6e4b
2 changed files with 12 additions and 3 deletions

View File

@ -426,7 +426,7 @@ namespace Competition.Mysql.DAL
else
{
T2 = "(select * FROM T_STK_STORAGE WHERE ";
string tmp1="",tmp2="",tmp3="",tmp4="";
string tmp1="",tmp2="",tmp3="",tmp4="",tmp5="";
if(!string.IsNullOrEmpty(req.SHIP_NAME_EN))
{
tmp1 = string.Format("SHIP_NAME_EN LIKE '%{0}%' AND ", req.SHIP_NAME_EN);
@ -442,14 +442,19 @@ namespace Competition.Mysql.DAL
tmp3 = string.Format("STANDARD_NAME LIKE '%{0}%' AND ", req.STANDARD_NAME);
}
if(!string.IsNullOrEmpty (req.MONITOR_ID))
if(!string.IsNullOrEmpty(req.MONITOR_ID))
{
tmp4 = string.Format("MONITOR_ID = '{0}' AND ", req.MONITOR_ID);
}
if(!string.IsNullOrEmpty(req.BILL_NO))
{
tmp5 = string.Format("BILL_NO LIKE '%{0}%' AND ",req.BILL_NO);
}
//拼接
T2 = T2 + tmp1 + tmp2 + tmp3+tmp4;
T2 = T2 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5;
T2 = T2.TrimEnd(" AND ".ToCharArray());
//结尾

View File

@ -32,5 +32,9 @@ namespace Competition.Mysql.Other
/// 卸货地(堆场名称)
/// </summary>
public string SILO_NAME;
/// <summary>
/// 提单号
/// </summary>
public string BILL_NO;
}
}