This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user