增加小格口绑定
This commit is contained in:
@ -947,5 +947,13 @@ namespace Epost.BLL
|
|||||||
return dal.GetOrderList_echo(matchid, sku, sarea, sblock);
|
return dal.GetOrderList_echo(matchid, sku, sarea, sblock);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 修改小格口号
|
||||||
|
public bool UpdateSkuLoc(string sku, string smallloc)
|
||||||
|
{
|
||||||
|
return dal.UpdateSkuLoc(sku,smallloc);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -851,23 +851,40 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
else if (isnum)//sku
|
else if (isnum)//sku
|
||||||
{
|
{
|
||||||
#region 扫描SKU
|
if (data.Parameter.Length <= 2)
|
||||||
//根据扫描商品内码获取商品码
|
{
|
||||||
data.ScanCode = data.Parameter;
|
#region 扫描小格口号
|
||||||
DataTable skudt = queueBLL.GetOrderQueue(data.Block, data.Area, "3");
|
DataTable quedt = queueBLL.getQueueList();
|
||||||
List<ResultMessageModel> scanlist = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Address == data.Address && m.Parameter == scanStr && m.Parameter != "888888" && m.Block == data.Block && m.Area == data.Area);
|
if (quedt != null && quedt.Rows.Count > 0)
|
||||||
|
{
|
||||||
if (scanlist.Count > 1 || (skudt != null && skudt.Rows.Count > 0))
|
LogHelper.WriteLogInfo(quedt.Rows[0]["sku"].ToString()+"绑定小格口" + data.Parameter);
|
||||||
{
|
//更新订单记录
|
||||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
orderbll.UpdateSkuLoc(quedt.Rows[0]["sku"].ToString(),data.Parameter);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LogHelper.WriteLogInfo("没有可绑定物料" + data.Parameter);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
#region 扫描SKU
|
||||||
DataTable OrderDt = orderbll.GetOrderList_Car(matchid, scanStr, data.Area, data.Block);
|
//根据扫描商品内码获取商品码
|
||||||
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
data.ScanCode = data.Parameter;
|
||||||
{
|
DataTable skudt = queueBLL.GetOrderQueue(data.Block, data.Area, "3");
|
||||||
OrdersQueueModel qmodel = new OrdersQueueModel();
|
List<ResultMessageModel> scanlist = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Address == data.Address && m.Parameter == scanStr && m.Parameter != "888888" && m.Block == data.Block && m.Area == data.Area);
|
||||||
|
|
||||||
|
if (scanlist.Count > 1 || (skudt != null && skudt.Rows.Count > 0))
|
||||||
|
{
|
||||||
|
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataTable OrderDt = orderbll.GetOrderList_Car(matchid, scanStr, data.Area, data.Block);
|
||||||
|
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||||
qmodel.Sku = scanStr;
|
qmodel.Sku = scanStr;
|
||||||
qmodel.Taskblock = data.Block;
|
qmodel.Taskblock = data.Block;
|
||||||
qmodel.Taskarea = data.Area;
|
qmodel.Taskarea = data.Area;
|
||||||
@ -876,21 +893,23 @@ namespace Epost.BLL
|
|||||||
qmodel.Location = scanStr;
|
qmodel.Location = scanStr;
|
||||||
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||||
queueBLL.insertQueueOrders(qmodel);
|
queueBLL.insertQueueOrders(qmodel);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logBLL.SaveShowMesError("扫描:" + scanStr + "无任务!", "扫描:" + scanStr + "无任务!");
|
logBLL.SaveShowMesError("扫描:" + scanStr + "无任务!", "扫描:" + scanStr + "无任务!");
|
||||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -246,5 +246,14 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 获取最新一条记录
|
||||||
|
public DataTable getQueueList()
|
||||||
|
{
|
||||||
|
|
||||||
|
return dal.getQueueList();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2471,6 +2471,28 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 修改小格口号
|
||||||
|
public bool UpdateSkuLoc(string sku,string smallloc)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string sql = string.Format(" update orders set partcode = '{0}' where sku='{1}'",
|
||||||
|
smallloc,
|
||||||
|
sku);
|
||||||
|
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo(x+"修改小格口信息"+sql);
|
||||||
|
if (x > 0)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("修改小格口号出错1" + ex.Message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,5 +408,14 @@ namespace Epost.DAL
|
|||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 获取最新一条记录
|
||||||
|
public DataTable getQueueList()
|
||||||
|
{
|
||||||
|
string sql = string.Format("select top 1 * from OrdersQueue where state=3 order by id desc");
|
||||||
|
return db.GetsqlForDT(sql);
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,29 +21,5 @@
|
|||||||
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||||
<Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
|
<Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions />
|
||||||
<VisualStudio>
|
|
||||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
|
||||||
<WebProjectProperties>
|
|
||||||
<StartPageUrl>
|
|
||||||
</StartPageUrl>
|
|
||||||
<StartAction>CurrentPage</StartAction>
|
|
||||||
<AspNetDebugging>True</AspNetDebugging>
|
|
||||||
<SilverlightDebugging>False</SilverlightDebugging>
|
|
||||||
<NativeDebugging>False</NativeDebugging>
|
|
||||||
<SQLDebugging>False</SQLDebugging>
|
|
||||||
<ExternalProgram>
|
|
||||||
</ExternalProgram>
|
|
||||||
<StartExternalURL>
|
|
||||||
</StartExternalURL>
|
|
||||||
<StartCmdLineArguments>
|
|
||||||
</StartCmdLineArguments>
|
|
||||||
<StartWorkingDirectory>
|
|
||||||
</StartWorkingDirectory>
|
|
||||||
<EnableENC>True</EnableENC>
|
|
||||||
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
|
|
||||||
</WebProjectProperties>
|
|
||||||
</FlavorProperties>
|
|
||||||
</VisualStudio>
|
|
||||||
</ProjectExtensions>
|
|
||||||
</Project>
|
</Project>
|
Reference in New Issue
Block a user