This commit is contained in:
jl
2023-12-05 14:35:20 +08:00
parent 9d64ef5d7a
commit 40557a235e
11 changed files with 501 additions and 511 deletions

View File

@ -822,7 +822,7 @@ namespace Epost.DAL
#region
public DataTable QueryControlList(string strwhere)
{
string sql = string.Format(" select distinct controlip ,port,waveno,address from v_address where 1=1 " + strwhere);
string sql = string.Format(" select distinct controlip ,port,address from v_address where type<>6 " + strwhere);
return db.GetsqlForDT(sql);
}

View File

@ -48,7 +48,7 @@ namespace Epost.DAL
string sql = string.Empty;
if (!string.IsNullOrEmpty(area))
{
sql = string.Format("select id, ProdArea, LotNo, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, GoodsType, corlorcode, address, ControlIP,area, block,boxcode,bkbarcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + "",
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 + "",
sku,
block, area);
@ -56,7 +56,7 @@ namespace Epost.DAL
}
else
{
sql = string.Format("select id,ProdArea, LotNo, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, GoodsType, corlorcode, address, ControlIP, area , block,boxcode,bkbarcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' " + strwhere + "",
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 + "",
sku,
block);
@ -622,38 +622,17 @@ namespace Epost.DAL
#endregion
#region
public bool UpdateWorkState_Car(string matchid, int truequantity, string sku, string id, int checkquantity, string usercode = "")
public bool UpdateWorkState_Car(string matchid,string fromlocation,string oprationstate )
{
try
{
lock (uplock)
{
int oprationstate = 3;
// string sql = string.Format("select quantity,truequantity from orders where matchid='{0}' and sku = '{1}' and batchid='{2}'",
// matchid,
// sku,
// batchid);
//DataTable dt= db.GetsqlForDT(sql);
// if (dt!=null&&dt.Rows.Count > 0)
// {
// int trueqty =Convert.ToInt32( dt.Rows[0]["truequantity"].ToString());
// int quantity =Convert.ToInt32( dt.Rows[0]["quantity"].ToString());
// if (trueqty + 1 == quantity)
// {
// oprationstate = 3;
// }
// truequantity = trueqty + 1;
// }
string upsql = string.Format("update orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity='{1}' where matchid='{2}' and id='{4}' ",
DateTime.Now.ToString(),
truequantity,
string upsql = string.Format("update orders set oprationstate = '{0}' ,oprationtime='{1}' ,truequantity=quantity where matchid='{2}' and fromlocation='{3}' ",
oprationstate,
DateTime.Now.ToString(),
matchid,
oprationstate,
id,
// checkquantity,
usercode
fromlocation
);
long x = db.UpdateSql(upsql);
if (x > 0)