This commit is contained in:
@ -650,6 +650,7 @@ namespace Epost.DAL
|
||||
sendModel.W_unit = ControlDetail[i].W_unit;
|
||||
sendModel.W_quantity = ControlDetail[i].W_quantity;
|
||||
sendModel.Loc = ControlDetail[i].Loc;
|
||||
sendModel.PicChoose = ControlDetail[i].PicChoose;
|
||||
|
||||
sendModel.Timeout ="0.5";
|
||||
list.Add(sendModel);
|
||||
|
@ -10,7 +10,7 @@ namespace Epost.DAL
|
||||
public class DB_Oracle
|
||||
{
|
||||
private DataBaseOpration.OprationOraDAL db;
|
||||
private string _strOracleMIDConnString = ConfigurationManager.ConnectionStrings["OraMidConnString"].ConnectionString;
|
||||
//private string _strOracleMIDConnString = ConfigurationManager.ConnectionStrings["OraMidConnString"].ConnectionString;
|
||||
|
||||
public DB_Oracle()
|
||||
{
|
||||
@ -31,12 +31,12 @@ namespace Epost.DAL
|
||||
{
|
||||
|
||||
//如实例不存在,则New一个新实例,否则返回已有实例
|
||||
if (db == null)
|
||||
{
|
||||
//if (db == null)
|
||||
//{
|
||||
|
||||
db = new DataBaseOpration.OprationOraDAL(_strOracleMIDConnString);
|
||||
// db = new DataBaseOpration.OprationOraDAL(_strOracleMIDConnString);
|
||||
|
||||
}
|
||||
//}
|
||||
return db;
|
||||
|
||||
|
||||
|
@ -36,19 +36,23 @@ namespace Epost.DAL
|
||||
|
||||
|
||||
#region 获取订单信息
|
||||
public DataTable GetOrderList_Car(string matchid, string sku, string area, string block)
|
||||
public DataTable GetOrderList_Car(string orderid, string sku, string area, string block)
|
||||
{
|
||||
try
|
||||
{
|
||||
string strwhere = string.Empty;
|
||||
if (!string.IsNullOrEmpty(matchid))
|
||||
if (!string.IsNullOrEmpty(orderid))
|
||||
{
|
||||
strwhere = "and matchid= '" + matchid + "'";
|
||||
strwhere = "and orderid= '" + orderid + "'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(sku))
|
||||
{
|
||||
strwhere = "and sku= '" + sku + "' ";
|
||||
}
|
||||
string sql = string.Empty;
|
||||
if (!string.IsNullOrEmpty(area))
|
||||
{
|
||||
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP,area, block,unit,shopid from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + "",
|
||||
sql = string.Format("select id,transderDid,orderid,Sku,genericname,GoodsName,Spec,unit,batchno,manufactname,Quantity,stockquantity,shopname,Tolocation,labelcolor,looklisten,labelIP,labelno,Matchid,barcode,BatchId,DownDate,Discount,address,ControlIP,area,block,shopid from v_orders where state = 0 and oprationstate <>3 and block = '{1}' and area='{2}' " + strwhere + "",
|
||||
|
||||
sku,
|
||||
block, area);
|
||||
@ -56,7 +60,7 @@ namespace Epost.DAL
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP, area , block,unit,shopid from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' " + strwhere + "",
|
||||
sql = string.Format("select id,transderDid,orderid,Sku,genericname,GoodsName,Spec,unit,batchno,manufactname,Quantity,stockquantity,shopname,Tolocation,labelcolor,looklisten,labelIP,labelno,Matchid,barcode,BatchId,DownDate,Discount,address,ControlIP,area,block,shopid from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' " + strwhere + "",
|
||||
|
||||
sku,
|
||||
block);
|
||||
@ -74,6 +78,24 @@ namespace Epost.DAL
|
||||
}
|
||||
}
|
||||
|
||||
public DataTable GetOrderList(string area, string block)
|
||||
{
|
||||
try
|
||||
{
|
||||
string strwhere = string.Empty;
|
||||
|
||||
string sql = string.Format("select id,transderDid,orderid,Sku,genericname,GoodsName,Spec,unit,batchno,manufactname,Quantity,stockquantity,shopname,Tolocation,labelcolor,looklisten,labelIP,labelno,Matchid,barcode,BatchId,DownDate,Discount,address,ControlIP,area,block,shopid from v_orders where state = 0 and oprationstate <>3 and block = '{0}' and area='{1}' " + strwhere + "",
|
||||
|
||||
block, area);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("获取订单信息异常:" + ex.Message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@ -622,7 +644,7 @@ 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 orderid, int truequantity, string sku, string id, int checkquantity, string usercode = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -646,10 +668,10 @@ namespace Epost.DAL
|
||||
// }
|
||||
// truequantity = trueqty + 1;
|
||||
// }
|
||||
string upsql = string.Format("update orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity='{1}' where matchid='{2}' and id='{4}' ",
|
||||
string upsql = string.Format("update orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity='{1}' where orderid='{2}' and id='{4}' ",
|
||||
DateTime.Now.ToString(),
|
||||
truequantity,
|
||||
matchid,
|
||||
orderid,
|
||||
oprationstate,
|
||||
id,
|
||||
// checkquantity,
|
||||
@ -718,7 +740,7 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#region 修改当前小车拣货状态
|
||||
public bool UpdateStateByCar(string matchid, string block = "", string sku = "")
|
||||
public bool UpdateStateByCar(string OrderID, string block = "", string sku = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -731,9 +753,9 @@ namespace Epost.DAL
|
||||
{
|
||||
strwhere += " and sku='" + sku + "'";
|
||||
}
|
||||
string upsql = string.Format("update orders set state=3 where matchid = '{0}'" + strwhere,
|
||||
matchid);
|
||||
LogHelper.WriteLogInfo("修改波次拣货状态:" + upsql);
|
||||
string upsql = string.Format("update orders set state=3 where OrderID = '{0}'" + strwhere,
|
||||
OrderID);
|
||||
LogHelper.WriteLogInfo("修改单据拣货状态:" + upsql);
|
||||
long x = db.UpdateSql(upsql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
@ -1040,7 +1062,7 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#region 判断当前sku是否为已完成
|
||||
public bool IsFinishWork(int endcount, string block, string usercode = "", string area = "", string sku = "", string shopid = "", string matchid = "")
|
||||
public bool IsFinishWork(int endcount, string block, string usercode = "", string area = "", string sku = "", string shopid = "", string orderid = "")
|
||||
{
|
||||
string strwheres = "";
|
||||
if (!string.IsNullOrEmpty(usercode))
|
||||
@ -1061,9 +1083,9 @@ namespace Epost.DAL
|
||||
{
|
||||
strwheres += " and shopid ='" + shopid + "'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(matchid))
|
||||
if (!string.IsNullOrEmpty(orderid))
|
||||
{
|
||||
strwheres += " and matchid ='" + matchid + "'";
|
||||
strwheres += " and orderid ='" + orderid + "'";
|
||||
}
|
||||
string sql = "select matchid, sku from V_orders where oprationstate <> 3 and state<>99 and block ='" + block + "' " + strwheres;
|
||||
|
||||
@ -2838,22 +2860,22 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#region 判断订单状态为已完成
|
||||
public bool IsFinishWork_box(string boxcode, int endcount, string matchid = "")
|
||||
public bool IsFinishWork_box(string boxcode, int endcount, string OrderID = "")
|
||||
{
|
||||
string sql = string.Format("select matchid from Orders where (matchid='{0}') and oprationstate<>3",
|
||||
matchid);
|
||||
string sql = string.Format("select OrderID from Orders where (OrderID='{0}') and oprationstate<>3",
|
||||
OrderID);
|
||||
|
||||
|
||||
LogHelper.WriteLogInfo("判断整箱状态为已完成" + sql);
|
||||
LogHelper.WriteLogInfo("判断单据状态为已完成" + sql);
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
if (dt == null || dt.Rows.Count == endcount)
|
||||
{
|
||||
LogHelper.WriteLogInfo("判断整箱状态为已完成true");
|
||||
LogHelper.WriteLogInfo("判断单据状态为已完成true");
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo("判断整箱状态为已完成false");
|
||||
LogHelper.WriteLogInfo("判断单据状态为已完成false");
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -2861,5 +2883,12 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
public DataTable GetDataIfRepeat(string transderMid, string transderDid)
|
||||
{
|
||||
string sql = string.Format("select distinct orderid,transderDid from Orders where orderid='" + transderMid + "' and transderDid='" + transderDid + "' ");
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ namespace Epost.DAL
|
||||
#region 获取任务信息
|
||||
public DataTable getQueuesbyState()
|
||||
{
|
||||
string sql = "select * from OrdersQueue where state<>0 and state<>3";
|
||||
string sql = "select * from OrdersQueue where state<>3";
|
||||
return db.GetsqlForDT(sql);
|
||||
|
||||
}
|
||||
@ -290,10 +290,9 @@ namespace Epost.DAL
|
||||
{
|
||||
strwhere += "and Taskarea='" + model.Taskarea + "'";
|
||||
}
|
||||
string sql = string.Format("update OrdersQueue set state='{0}' where state<>3 and sku = '{1}' and matchid='{2}' and usercode='{3}'"+ strwhere,
|
||||
model.State
|
||||
,model.Sku,
|
||||
model.Matchid,model.UserCode
|
||||
string sql = string.Format("update OrdersQueue set state='{0}' where state<>3 and orderid='{1}' and usercode='{2}'" + strwhere,
|
||||
model.State,
|
||||
model.Orderid,model.UserCode
|
||||
|
||||
);
|
||||
LogHelper.WriteLogInfo("修改作业区段"+sql);
|
||||
|
Reference in New Issue
Block a user