This commit is contained in:
jl
2024-01-04 15:30:23 +08:00
parent 40557a235e
commit 36a20b88ce
10 changed files with 316 additions and 286 deletions

View File

@ -48,7 +48,7 @@ namespace Epost.DAL
string sql = string.Empty;
if (!string.IsNullOrEmpty(area))
{
sql = string.Format("select distinct fromlocation,sku,block,area from v_orders where state = 0 and oprationstate <>3 and (sku = '{0}' or fromlocation='{0}') and block = '{1}' and area='{2}' " + strwhere + "",
sql = string.Format("select distinct tolocation,fromlocation,sku,block,area,address,controlip from v_orders where state = 0 and oprationstate <>3 and (sku = '{0}' or tolocation='{0}') and block = '{1}' and area='{2}' " + strwhere + "",
sku,
block, area);
@ -56,7 +56,7 @@ namespace Epost.DAL
}
else
{
sql = string.Format("select distinct fromlocation,block,area from v_orders where state = 0 and oprationstate <>3 (and sku = '{0}'or fromlocation='{0}') and block = '{1}' " + strwhere + "",
sql = string.Format("select distinct tolocation,fromlocation,block,area ,address,controlip from v_orders where state = 0 and oprationstate <>3 (and sku = '{0}'or tolocation='{0}') and block = '{1}' " + strwhere + "",
sku,
block);
@ -622,17 +622,17 @@ namespace Epost.DAL
#endregion
#region
public bool UpdateWorkState_Car(string matchid,string fromlocation,string oprationstate )
public bool UpdateWorkState_Car(string matchid,string tolocation, string oprationstate )
{
try
{
lock (uplock)
{
string upsql = string.Format("update orders set oprationstate = '{0}' ,oprationtime='{1}' ,truequantity=quantity where matchid='{2}' and fromlocation='{3}' ",
string upsql = string.Format("update orders set oprationstate = '{0}' ,oprationtime='{1}' ,truequantity=quantity where matchid='{2}' and tolocation='{3}' ",
oprationstate,
DateTime.Now.ToString(),
matchid,
fromlocation
tolocation
);
long x = db.UpdateSql(upsql);
if (x > 0)