Compare commits
9 Commits
NanJing711
...
SanYing_DA
Author | SHA1 | Date | |
---|---|---|---|
aee2063646 | |||
53c4b66485 | |||
3648692781 | |||
e2c1d127a0 | |||
7e11ca5d4d | |||
70ebea6292 | |||
efe0835c4e | |||
c4fe9e1a9b | |||
c53719f69b |
@ -154,9 +154,9 @@ namespace Epost.BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取参数中文
|
#region 获取参数中文
|
||||||
public string GETDISPLAYJOBPAR_CN(string no,string Lightcolor,string IsTwinkle,string Title,string BigQuantity, string BigUnit,string Quantity, string Unit,string Content,string Rfcode)
|
public string GETDISPLAYJOBPAR_CN(string no, string Lightcolor, string IsTwinkle, string Title, string BigQuantity, string BigUnit, string Quantity, string Unit, string Content, string Rfcode)
|
||||||
{
|
{
|
||||||
string parar = no+"00" + Lightcolor + IsTwinkle+"30CQ" + Title + "\n\n" + BigQuantity + "\n" + BigUnit + "\n" + Quantity + "\n" + Unit + "\n" + Content + "\n00\n\n" + Rfcode + "\n"; ;
|
string parar = no + "00" + Lightcolor + IsTwinkle + "30CQ" + Title + "\n\n" + BigQuantity + "\n" + BigUnit + "\n" + Quantity + "\n" + Unit + "\n" + Content + "\n00\n\n" + Rfcode + "\n"; ;
|
||||||
return parar;
|
return parar;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -246,7 +246,7 @@ namespace Epost.BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 任务指令(传参地址)
|
#region 任务指令(传参地址)
|
||||||
public void DISPLAY_JOB_M(LabelParamModel model, bool clear = false, bool islock = false )
|
public void DISPLAY_JOB_M(LabelParamModel model, bool clear = false, bool islock = false)
|
||||||
{
|
{
|
||||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||||
if (clear)
|
if (clear)
|
||||||
@ -259,14 +259,14 @@ namespace Epost.BLL
|
|||||||
clearModel.Command = "REMOVE_JOB";
|
clearModel.Command = "REMOVE_JOB";
|
||||||
clearModel.Timeout = "0.5";
|
clearModel.Timeout = "0.5";
|
||||||
clearModel.Type = model.Type;
|
clearModel.Type = model.Type;
|
||||||
// dal.REMOVE_JOB(clearModel);
|
// dal.REMOVE_JOB(clearModel);
|
||||||
list.Add(clearModel);
|
list.Add(clearModel);
|
||||||
}
|
}
|
||||||
LabelParamModel DisplayModel = new LabelParamModel();
|
LabelParamModel DisplayModel = new LabelParamModel();
|
||||||
DisplayModel.Address = model.Address;
|
DisplayModel.Address = model.Address;
|
||||||
DisplayModel.ControlIP = model.ControlIP;
|
DisplayModel.ControlIP = model.ControlIP;
|
||||||
DisplayModel.Content =model.Content;
|
DisplayModel.Content = model.Content;
|
||||||
DisplayModel.Title =model.Title;
|
DisplayModel.Title = model.Title;
|
||||||
DisplayModel.Loc = model.Loc;
|
DisplayModel.Loc = model.Loc;
|
||||||
DisplayModel.Quantity = model.Quantity;
|
DisplayModel.Quantity = model.Quantity;
|
||||||
DisplayModel.Uid = model.Uid;
|
DisplayModel.Uid = model.Uid;
|
||||||
@ -553,7 +553,7 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
// DataTable dt = addrBLL.getAddresslist(block,area,type);
|
// DataTable dt = addrBLL.getAddresslist(block,area,type);
|
||||||
|
|
||||||
if(offList.Any())
|
if (offList.Any())
|
||||||
{
|
{
|
||||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||||
foreach (JobModel item in offList)
|
foreach (JobModel item in offList)
|
||||||
@ -615,8 +615,8 @@ namespace Epost.BLL
|
|||||||
#region 点亮显示标签
|
#region 点亮显示标签
|
||||||
public void ShowBoxMessage_M(ShowMessageModel_M show)
|
public void ShowBoxMessage_M(ShowMessageModel_M show)
|
||||||
{
|
{
|
||||||
//获取作业区对应的显示标签地址
|
//获取作业区对应的显示标签地址
|
||||||
DataTable showaddrDT = addrBLL.GetBoxAddress(show.Block,show.Area,show.Type);
|
DataTable showaddrDT = addrBLL.GetBoxAddress(show.Block, show.Area, show.Type);
|
||||||
if (showaddrDT != null && showaddrDT.Rows.Count > 0)
|
if (showaddrDT != null && showaddrDT.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (DataRow addritem in showaddrDT.Rows)
|
foreach (DataRow addritem in showaddrDT.Rows)
|
||||||
@ -626,9 +626,9 @@ namespace Epost.BLL
|
|||||||
lablemodel.Address = addritem["address"].ToString();
|
lablemodel.Address = addritem["address"].ToString();
|
||||||
lablemodel.ControlIP = addritem["controlip"].ToString();
|
lablemodel.ControlIP = addritem["controlip"].ToString();
|
||||||
lablemodel.Command = "DISPLAY_JOB";
|
lablemodel.Command = "DISPLAY_JOB";
|
||||||
lablemodel.Uid =show.Uid;
|
lablemodel.Uid = show.Uid;
|
||||||
if (string.IsNullOrEmpty(show.Uid))
|
if (string.IsNullOrEmpty(show.Uid))
|
||||||
{ lablemodel.Uid = addritem["address"].ToString(); }
|
{ lablemodel.Uid = show.No + addritem["address"].ToString(); }
|
||||||
|
|
||||||
lablemodel.Mode = show.Color + "0";
|
lablemodel.Mode = show.Color + "0";
|
||||||
if (addritem["addresstype"].ToString() == "2")
|
if (addritem["addresstype"].ToString() == "2")
|
||||||
@ -691,7 +691,7 @@ namespace Epost.BLL
|
|||||||
model.Type = "T";
|
model.Type = "T";
|
||||||
model.Address = item["address"].ToString();
|
model.Address = item["address"].ToString();
|
||||||
model.ControlIP = item["ControlIP"].ToString();
|
model.ControlIP = item["ControlIP"].ToString();
|
||||||
model.Parameter = ConvertHexHelper.ConvertString(item["addresstype"].ToString(), 10, 16).ToString().PadLeft(2,'0')+ isoff;
|
model.Parameter = ConvertHexHelper.ConvertString(item["addresstype"].ToString(), 10, 16).ToString().PadLeft(2, '0') + isoff;
|
||||||
list.Add(model);
|
list.Add(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -715,11 +715,11 @@ namespace Epost.BLL
|
|||||||
LabelParamModel model = new LabelParamModel();
|
LabelParamModel model = new LabelParamModel();
|
||||||
model.Address = addritem["address"].ToString();
|
model.Address = addritem["address"].ToString();
|
||||||
model.ControlIP = addritem["controlip"].ToString();
|
model.ControlIP = addritem["controlip"].ToString();
|
||||||
model.Parameter =show.No;
|
model.Parameter = show.No;
|
||||||
model.Command = "REMOVE_JOB";
|
model.Command = "REMOVE_JOB";
|
||||||
model.Timeout = "0.5";
|
model.Timeout = "0.5";
|
||||||
list.Add(model);
|
list.Add(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list != null && list.Count > 0)
|
if (list != null && list.Count > 0)
|
||||||
{
|
{
|
||||||
@ -728,7 +728,7 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -739,12 +739,12 @@ namespace Epost.BLL
|
|||||||
List<JobModel> list = new List<JobModel>();
|
List<JobModel> list = new List<JobModel>();
|
||||||
DataTable OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
DataTable OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
||||||
bool isecho = false;
|
bool isecho = false;
|
||||||
if (OrderDt == null || OrderDt.Rows.Count == 0)//回显
|
//if (OrderDt == null || OrderDt.Rows.Count == 0)//回显
|
||||||
{
|
//{
|
||||||
OrderDt = dal.GetOrderList_echo(matchid, sku, area, block);
|
// OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
||||||
isecho = true;
|
// isecho = true;
|
||||||
|
|
||||||
}
|
//}
|
||||||
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
string usercode = string.Empty;
|
string usercode = string.Empty;
|
||||||
@ -767,21 +767,14 @@ namespace Epost.BLL
|
|||||||
demodel.BatchId = item["BatchId"].ToString();
|
demodel.BatchId = item["BatchId"].ToString();
|
||||||
demodel.ID = item["ID"].ToString();
|
demodel.ID = item["ID"].ToString();
|
||||||
demodel.GoodsName = item["GoodsName"].ToString();
|
demodel.GoodsName = item["GoodsName"].ToString();
|
||||||
demodel.GoodsType = item["GoodsType"].ToString();
|
|
||||||
demodel.Quantity = Convert.ToInt32(item["Quantity"].ToString());
|
demodel.Quantity = Convert.ToInt32(item["Quantity"].ToString());
|
||||||
demodel.CheckQuantity = Convert.ToInt32(item["CheckQuantity"].ToString());
|
|
||||||
demodel.Sku = item["Sku"].ToString();
|
demodel.Sku = item["Sku"].ToString();
|
||||||
demodel.Tolocation = item["Tolocation"].ToString();
|
demodel.Tolocation = item["Tolocation"].ToString();
|
||||||
demodel.Matchid = item["Matchid"].ToString();
|
demodel.Matchid = item["Matchid"].ToString();
|
||||||
demodel.ShopID = item["shopid"].ToString();
|
demodel.ShopID = item["shopid"].ToString();
|
||||||
demodel.BoxCode = item["boxcode"].ToString();
|
|
||||||
demodel.LotNo = item["LotNo"].ToString();
|
|
||||||
demodel.Discount = item["Discount"].ToString();
|
demodel.Discount = item["Discount"].ToString();
|
||||||
demodel.ProdArea = item["ProdArea"].ToString();
|
|
||||||
demodel.ColorCode = item["corlorcode"].ToString();
|
|
||||||
demodel.WholeUnit = item["WholeUnit"].ToString();
|
|
||||||
demodel.Unit = item["Unit"].ToString();
|
demodel.Unit = item["Unit"].ToString();
|
||||||
demodel.TrayCode = item["bkbarcode"].ToString();
|
//demodel.TrayCode = item["bkbarcode"].ToString();
|
||||||
#region 获取库位信息
|
#region 获取库位信息
|
||||||
demodel.Block = item["Block"].ToString();
|
demodel.Block = item["Block"].ToString();
|
||||||
demodel.Area = item["Area"].ToString();
|
demodel.Area = item["Area"].ToString();
|
||||||
@ -802,11 +795,11 @@ namespace Epost.BLL
|
|||||||
demodel.TaskArea = Convert.ToInt32(item["area"].ToString());
|
demodel.TaskArea = Convert.ToInt32(item["area"].ToString());
|
||||||
demodel.TaskBlock = Convert.ToInt32(item["block"].ToString());
|
demodel.TaskBlock = Convert.ToInt32(item["block"].ToString());
|
||||||
demodel.No = "01";
|
demodel.No = "01";
|
||||||
if (isecho)
|
//if (isecho)
|
||||||
{
|
//{
|
||||||
demodel.No = "04";
|
// demodel.No = "04";
|
||||||
demodel.ColorCode = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
// demodel.ColorCode = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
||||||
}
|
//}
|
||||||
list.Add(demodel);
|
list.Add(demodel);
|
||||||
if (!isecho) {
|
if (!isecho) {
|
||||||
//修改数据为已读
|
//修改数据为已读
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Data.Entity.Infrastructure;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Epost.Common;
|
using Epost.Common;
|
||||||
|
using Epost.DAL;
|
||||||
using Epost.DAL.Cache;
|
using Epost.DAL.Cache;
|
||||||
using Epost.DAL.Enum;
|
using Epost.DAL.Enum;
|
||||||
using Epost.Model;
|
using Epost.Model;
|
||||||
@ -13,8 +15,9 @@ using Epost.Model;
|
|||||||
namespace Epost.BLL
|
namespace Epost.BLL
|
||||||
{
|
{
|
||||||
|
|
||||||
public class OrderControlBLL
|
public class OrderControlBLL
|
||||||
{
|
{
|
||||||
|
OrdersDAL dal = new OrdersDAL();
|
||||||
OrderBLL orderbll = new OrderBLL();
|
OrderBLL orderbll = new OrderBLL();
|
||||||
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
||||||
CommandBLL comBLL = new CommandBLL();
|
CommandBLL comBLL = new CommandBLL();
|
||||||
@ -45,22 +48,17 @@ namespace Epost.BLL
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
bool t = addrBLL.UpdateState();
|
bool t = addrBLL.UpdateState();
|
||||||
LogHelper.WriteLogInfo("初始化@@@@@@@@@@@@!----V20220705-1---");
|
LogHelper.WriteLogInfo("初始化@@@@@@@@@@@@!----V20230418-1---");
|
||||||
JobCache.ClearJobList();
|
JobCache.ClearJobList();
|
||||||
downCacheDAL.ClearJobDownList();
|
downCacheDAL.ClearJobDownList();
|
||||||
locCache.ClearScanList();
|
locCache.ClearScanList();
|
||||||
queueBLL.UpdateQueueState();
|
queueBLL.UpdateQueueState();
|
||||||
// queueboxBLL.UpdateQueueState();
|
//queueboxBLL.UpdateQueueState();
|
||||||
orderbll.UpOrderstate();
|
orderbll.UpOrderstate();
|
||||||
UserCacheDAL.ClearUserCodeList();
|
UserCacheDAL.ClearUserCodeList();
|
||||||
boxcache.ClearBoxList();
|
boxcache.ClearBoxList();
|
||||||
ResultModel resultModel = comBLL.Initialization_M();
|
ResultModel resultModel = comBLL.Initialization_M();
|
||||||
GetOrderQueue(); //加载任务显示器信息
|
//GetOrderQueue(); //加载任务显示器信息
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LogHelper.WriteLogInfo("初始化@@@@@@@@@@@@!----V20200727-1---");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -341,38 +339,56 @@ namespace Epost.BLL
|
|||||||
skulist = queueDT.Rows[0]["sku"].ToString();
|
skulist = queueDT.Rows[0]["sku"].ToString();
|
||||||
LogHelper.WriteLogInfo("=======" + qmodel.UserCode + "=====" + area + "区===sku=" + skulist);
|
LogHelper.WriteLogInfo("=======" + qmodel.UserCode + "=====" + area + "区===sku=" + skulist);
|
||||||
}
|
}
|
||||||
|
#region 任意回显标签拍下 熄灭回显设备
|
||||||
|
//if (data.Loc == "check")//任意回显标签拍下 熄灭回显设备
|
||||||
|
//{
|
||||||
|
// List<JobModel> rejob = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 1 && m.Sku == queueDT.Rows[0]["sku"].ToString());
|
||||||
|
// if (rejob.Any())
|
||||||
|
// {
|
||||||
|
// JobModel model = rejob.FirstOrDefault();
|
||||||
|
// comBLL.ClearArea_M(rejob);
|
||||||
|
// //熄灭通道灯
|
||||||
|
// comBLL.DISPLAY_LIGHT_BLOCK(block, area, "0");
|
||||||
|
// // comBLL.UNLOCK_M(rejob);
|
||||||
|
// #region 修改任务队列状态
|
||||||
|
// OrdersQueueModel qumodel = new OrdersQueueModel();
|
||||||
|
// qumodel.State = 3;
|
||||||
|
// qumodel.Taskblock = block;
|
||||||
|
// qumodel.Taskarea = area;
|
||||||
|
// qumodel.Sku = model.Sku;
|
||||||
|
// qumodel.Matchid = model.Matchid;
|
||||||
|
// qumodel.UserCode = model.UserCode;
|
||||||
|
// queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
||||||
|
|
||||||
if (data.Loc == "check")//任意回显标签拍下 熄灭回显设备
|
// #endregion
|
||||||
{
|
// }
|
||||||
List<JobModel> rejob = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 1 && m.Sku == queueDT.Rows[0]["sku"].ToString());
|
// #region 清除当前区已做完的sku
|
||||||
if (rejob.Any())
|
// JobCache.UpdateJobModelList(rejob, EcommendType.Execute);
|
||||||
{
|
// #endregion
|
||||||
JobModel model = rejob.FirstOrDefault();
|
//}
|
||||||
comBLL.ClearArea_M(rejob);
|
#endregion
|
||||||
//熄灭通道灯
|
if (data.Result == "4")//■按键拍下
|
||||||
comBLL.DISPLAY_LIGHT_BLOCK(block, area, "0");
|
|
||||||
// comBLL.UNLOCK_M(rejob);
|
|
||||||
#region 修改任务队列状态
|
|
||||||
OrdersQueueModel qumodel = new OrdersQueueModel();
|
|
||||||
qumodel.State = 3;
|
|
||||||
qumodel.Taskblock = block;
|
|
||||||
qumodel.Taskarea = area;
|
|
||||||
qumodel.Sku = model.Sku;
|
|
||||||
qumodel.Matchid = model.Matchid;
|
|
||||||
qumodel.UserCode = model.UserCode;
|
|
||||||
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
#region 清除当前区已做完的sku
|
|
||||||
JobCache.UpdateJobModelList(rejob, EcommendType.Execute);
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
else if (data.Result == "4")//■按键拍下
|
|
||||||
{
|
{
|
||||||
data.Parameter = "0";
|
data.Parameter = "0";
|
||||||
jobdown_start(data, job, block, area, jobList);
|
jobdown_start(data, job, block, area, jobList);
|
||||||
}
|
}
|
||||||
|
else if (type == "8")//波次完成拍下
|
||||||
|
{
|
||||||
|
List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == data.Block);
|
||||||
|
if (ulist.Any())
|
||||||
|
{
|
||||||
|
UserCodeModel umodel = ulist.FirstOrDefault();
|
||||||
|
bool allfinish = dal.IsFinishWorkByCar(1, umodel.Matchid, data.Block);
|
||||||
|
if (allfinish)
|
||||||
|
{
|
||||||
|
//判断整个波次是否已完成
|
||||||
|
dal.UpdateStateByCar(umodel.Matchid);
|
||||||
|
List<JobModel> rejob = job.FindAll(m => m.Block == data.Block && m.State == 3);
|
||||||
|
if (rejob.Any()) { JobCache.UpdateJobModelList(rejob, EcommendType.Execute); }
|
||||||
|
UserCacheDAL.UpdateUserCodeList(ulist, EUserCommend.Execute);//删除波次信息
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("JOB_DOWN开始~~~~~~~~~~~~~~~~");
|
LogHelper.WriteLogInfo("JOB_DOWN开始~~~~~~~~~~~~~~~~");
|
||||||
@ -382,6 +398,8 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||||
|
List<JobModel> rjob = job.FindAll(m => m.Block == data.Block && m.State == 3);
|
||||||
|
JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -389,6 +407,8 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
public void jobdown_start(ResultMessageModel data, List<JobModel> job, string block, string area, List<JobModel> jobList)
|
public void jobdown_start(ResultMessageModel data, List<JobModel> job, string block, string area, List<JobModel> jobList)
|
||||||
{
|
{
|
||||||
|
var content = string.Empty;
|
||||||
|
var color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||||
int truequantity = 0;
|
int truequantity = 0;
|
||||||
int checkquantity = 0;
|
int checkquantity = 0;
|
||||||
string scanstr = data.Parameter;
|
string scanstr = data.Parameter;
|
||||||
@ -396,44 +416,31 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
truequantity = Convert.ToInt32(scanstr);
|
truequantity = Convert.ToInt32(scanstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (job.Any())
|
if (job.Any())
|
||||||
{
|
{
|
||||||
List<JobModel> downlist = new List<JobModel>();
|
List<JobModel> downlist = new List<JobModel>();
|
||||||
JobModel model = job.FirstOrDefault();
|
JobModel model = job.FirstOrDefault();
|
||||||
|
|
||||||
//List<JobModel> manyList = job.FindAll(m => m.ManyState == 1 && m.Tolocation == model.Tolocation);
|
|
||||||
//if (manyList.Any())//合并显示数据
|
|
||||||
//{
|
|
||||||
|
|
||||||
// downlist.AddRange(manyList);
|
|
||||||
// LogHelper.WriteLogInfo("合并显示数据=========="+ manyList .Count+ "==================");
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
downlist.Add(model);
|
downlist.Add(model);
|
||||||
// }
|
int endcount = 1;
|
||||||
//修改订单状态
|
List<JobModel> manyList = job.FindAll(m => m.ManyState == 1 && m.Tolocation == model.Tolocation && m.Sku == model.Sku);
|
||||||
|
if (manyList.Any())//合并显示数据
|
||||||
|
{
|
||||||
|
endcount = manyList.Count;
|
||||||
|
downlist.AddRange(manyList);
|
||||||
|
LogHelper.WriteLogInfo("合并显示数据" + endcount + "============================");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
downlist.Add(model);
|
||||||
|
}
|
||||||
|
|
||||||
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
||||||
LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
LogHelper.WriteLogInfo("6------" + data.Address + "------" + model.Sku + "----" + model.State + "");
|
||||||
bool skuInish = orderbll.IsFinishWork(1, block, "", area, model.Sku);
|
bool skuInish = dal.IsFinishWork(1, block, "", area, model.Sku, "", model.Matchid);
|
||||||
model.State = 3;
|
|
||||||
if (skuInish)
|
if (skuInish)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("区SKU拣选完成--------------");
|
LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
||||||
//删除sku缓存信息
|
|
||||||
List<ResultMessageModel> scanlist = downCacheDAL.GetPlanJobDownList().FindAll(p => p.Parameter == model.Sku && p.Command == "QUERY_SPECIAL_STATUS" && p.Area == area);
|
|
||||||
downCacheDAL.UpdateJobDownModelList(scanlist, EdownCommend.Execute);
|
|
||||||
//熄灭通道灯
|
|
||||||
comBLL.DISPLAY_LIGHT_BLOCK(block, area, "0");
|
|
||||||
|
|
||||||
#region 熄灭当前区显示屏
|
|
||||||
List<JobModel> offList = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 3 && m.Sku == model.Sku);
|
|
||||||
if (offList.Any())
|
|
||||||
{
|
|
||||||
comBLL.LED_OFF_CLEAR(offList);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 修改任务队列状态
|
#region 修改任务队列状态
|
||||||
OrdersQueueModel qumodel = new OrdersQueueModel();
|
OrdersQueueModel qumodel = new OrdersQueueModel();
|
||||||
qumodel.State = 3;
|
qumodel.State = 3;
|
||||||
@ -441,58 +448,44 @@ namespace Epost.BLL
|
|||||||
qumodel.Taskarea = area;
|
qumodel.Taskarea = area;
|
||||||
qumodel.Sku = model.Sku;
|
qumodel.Sku = model.Sku;
|
||||||
qumodel.Matchid = model.Matchid;
|
qumodel.Matchid = model.Matchid;
|
||||||
qumodel.UserCode = model.UserCode;
|
|
||||||
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 刷新波次信息
|
|
||||||
showSummaryMes(model.Sku, block, area, Convert.ToInt32(block), null, model.Tolocation, model.Matchid);
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
Thread.Sleep(30);
|
Thread.Sleep(30);
|
||||||
#region 整条通道当前用户所有任务分播结束
|
LogHelper.WriteLogInfo("区SKU拣选完成--------------");
|
||||||
bool blockfinish = orderbll.IsFinishWorkByCar(1, model.Matchid, block);
|
//删除sku缓存信息
|
||||||
if (blockfinish)
|
List<ResultMessageModel> scanlist = downCacheDAL.GetPlanJobDownList().FindAll(p => p.Parameter == model.Sku && p.Command == "QUERY_SCAN_STATUS" && p.Area == area);
|
||||||
|
downCacheDAL.UpdateJobDownModelList(scanlist, EdownCommend.Execute);
|
||||||
|
List<JobModel> rjob = jobList.FindAll(m => m.Block == data.Block && m.Sku == model.Sku);
|
||||||
|
JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
||||||
|
|
||||||
|
bool allfinish = dal.IsFinishWork_box("", 0, model.Matchid);
|
||||||
|
if (allfinish)
|
||||||
{
|
{
|
||||||
#region 点亮显示器
|
//修改订单状态
|
||||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
orderbll.UpdateOrderState_Car(downlist, model, 1, checkquantity);
|
||||||
show.Title = "当前波次分播完成";
|
bool lbo = dal.UpdateLocation(block, area);
|
||||||
show.Contents = "拍下熄灭所有设备\r请扫描继续作业";
|
dal.UpdateStateByCar(model.Matchid);
|
||||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
content = "此运单号作业已完成\r\r";
|
||||||
show.Qty = "0";
|
|
||||||
show.Type = 8;
|
|
||||||
show.Block = block;
|
|
||||||
show.Islock = false;
|
|
||||||
show.IsTwinkle = 1;
|
|
||||||
show.No = "01";
|
|
||||||
comBLL.ShowBoxMessage_M(show);
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
bool allfinish = orderbll.IsFinishWorkByCar(1, model.Matchid);
|
|
||||||
if (allfinish)//判断整个波次是否已完成
|
|
||||||
{ //更新state状态为已完成
|
|
||||||
orderbll.UpdateStateByCar(model.Matchid);
|
|
||||||
}
|
|
||||||
//删除波次信息
|
|
||||||
List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == block);
|
|
||||||
UserCacheDAL.UpdateUserCodeList(ulist, EUserCommend.Execute);
|
|
||||||
|
|
||||||
|
ShowMessageModel_M showmodel = new ShowMessageModel_M();
|
||||||
|
showmodel.Area = area;
|
||||||
|
showmodel.Block = block;
|
||||||
|
showmodel.Color = color;
|
||||||
|
showmodel.Islock = true;
|
||||||
|
showmodel.Title = model.Matchid;
|
||||||
|
showmodel.No = "01";
|
||||||
|
showmodel.IsTwinkle = 0;
|
||||||
|
showmodel.Contents = content;
|
||||||
|
showmodel.Type = 2;
|
||||||
|
comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 区内sku播完回传
|
|
||||||
// orderbll.UpdateStateByCar(model.Matchid, "", model.Sku);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 清除当前区已做完的sku
|
|
||||||
JobCache.UpdateJobModelList(offList, EcommendType.Execute);
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//删除已完成的拣选缓存信息
|
||||||
|
List<JobModel> finjob = JobCache.GetPlanJobList().FindAll(m => m.Block == data.Block && m.Area == data.Area && m.State == 3);
|
||||||
|
JobCache.UpdateJobModelList(finjob, EcommendType.Execute);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -562,66 +555,50 @@ namespace Epost.BLL
|
|||||||
#region 点亮任务标签
|
#region 点亮任务标签
|
||||||
foreach (JobModel item in nowJoblist.ToArray())
|
foreach (JobModel item in nowJoblist.ToArray())
|
||||||
{
|
{
|
||||||
|
if (item.State == 0)
|
||||||
#region 回显设备锁定
|
|
||||||
if (queueDT.Rows[0]["lightcolor"].ToString() == EnumHelper.EMToDescriptionString(LightColor.Color.Blue))
|
|
||||||
{
|
{
|
||||||
|
List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
|
||||||
|
int quantity = item.Quantity;
|
||||||
|
|
||||||
LabelParamModel locklamodel = new LabelParamModel();
|
#region 判断同一订单、同一货位多条数据 合并显示
|
||||||
locklamodel.Address = item.Address.ToString();
|
if (manyJoblist.Count > 1)//同一个货位的数据合并显示
|
||||||
locklamodel.ControlIP = item.ControlIP.ToString();
|
{
|
||||||
locklamodel.Command = "LOCK";
|
quantity = 0;
|
||||||
locklamodel.Parameter = "11111000";
|
if (manyJoblist.FindAll(m => m.State == 0).Any())
|
||||||
locklamodel.Type = "N";
|
{
|
||||||
list.Add(locklamodel);
|
foreach (JobModel mitem in manyJoblist)
|
||||||
|
{
|
||||||
|
quantity += mitem.Quantity;
|
||||||
|
mitem.State = 1;
|
||||||
|
mitem.ManyState = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
LabelParamModel lamodel = new LabelParamModel();
|
||||||
|
string address = item.Address.ToString();
|
||||||
|
lamodel.Address = address;
|
||||||
|
lamodel.ControlIP = item.ControlIP.ToString();
|
||||||
|
lamodel.Command = "DISPLAY_JOB";
|
||||||
|
lamodel.Uid = item.ID;
|
||||||
|
lamodel.Type = "N";
|
||||||
|
lamodel.Quantity = quantity.ToString();
|
||||||
|
lamodel.Uid = item.ID;
|
||||||
|
lamodel.Mode = queueDT.Rows[0]["lightcolor"].ToString() + "0";
|
||||||
|
|
||||||
|
list.Add(lamodel);
|
||||||
|
|
||||||
|
item.State = 1;
|
||||||
|
item.ColorCode = queueDT.Rows[0]["lightcolor"].ToString();
|
||||||
|
item.DisplayTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
// else
|
#region 点亮通道灯
|
||||||
//{
|
//comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "1");
|
||||||
|
|
||||||
List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
|
|
||||||
int quantity = item.Quantity;
|
|
||||||
|
|
||||||
LabelParamModel lamodel = new LabelParamModel();
|
|
||||||
|
|
||||||
lamodel.Address = item.Address.ToString();
|
|
||||||
lamodel.ControlIP = item.ControlIP.ToString();
|
|
||||||
lamodel.Command = "DISPLAY_JOB";
|
|
||||||
|
|
||||||
#region 同一个货位的数据合并显示
|
|
||||||
//if (manyJoblist.Count > 1)
|
|
||||||
//{
|
|
||||||
// if (manyJoblist.FindAll(m => m.State == 0).Any())
|
|
||||||
// {
|
|
||||||
// foreach (JobModel mitem in manyJoblist)
|
|
||||||
// {
|
|
||||||
// quantity += mitem.Quantity;
|
|
||||||
// mitem.State = 1;
|
|
||||||
// mitem.ManyState = 1;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
lamodel.Uid = item.ID;
|
|
||||||
lamodel.Type = "N";
|
|
||||||
lamodel.Quantity = quantity.ToString();
|
|
||||||
lamodel.Uid = item.ID;
|
|
||||||
lamodel.Mode = queueDT.Rows[0]["lightcolor"].ToString() + "0";
|
|
||||||
|
|
||||||
list.Add(lamodel);
|
|
||||||
//}
|
|
||||||
|
|
||||||
item.State = 1;
|
|
||||||
item.ColorCode = queueDT.Rows[0]["lightcolor"].ToString();
|
|
||||||
item.DisplayTime = DateTime.Now;
|
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
#region 点亮通道灯
|
|
||||||
comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "1");
|
|
||||||
#endregion
|
|
||||||
if (list != null && list.Count > 0)
|
if (list != null && list.Count > 0)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("添加到点亮的list————————————————————:" + list.Count);
|
LogHelper.WriteLogInfo("添加到点亮的list————————————————————:" + list.Count);
|
||||||
@ -644,14 +621,15 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
//else
|
||||||
|
//{
|
||||||
|
|
||||||
LogHelper.WriteLogInfo("还有未完成任务" + isJobList.Count);
|
// LogHelper.WriteLogInfo("还有未完成任务" + isJobList.Count);
|
||||||
foreach (JobModel item in isJobList)
|
// foreach (JobModel item in isJobList)
|
||||||
{
|
// {
|
||||||
LogHelper.WriteLogInfo("还有未完成任务"+item.Address+item.ID);
|
// LogHelper.WriteLogInfo("还有未完成任务" + item.Address + item.ID);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -692,13 +670,168 @@ namespace Epost.BLL
|
|||||||
if (data.Type == "5")//中分扫描枪
|
if (data.Type == "5")//中分扫描枪
|
||||||
{
|
{
|
||||||
|
|
||||||
zhongfenBind(ulist, scanStr, data);
|
//zhongfenBind(ulist, scanStr, data);
|
||||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||||
}
|
}
|
||||||
else if (data.Type == "6")//播种扫描枪
|
else if (data.Type == "6")//播种扫描枪
|
||||||
{
|
{
|
||||||
|
|
||||||
xifenBind(ulist, scanStr, data, matchid, isnum);
|
var color = EnumHelper.EMToDescriptionString(LightColor.Color.Black);
|
||||||
|
var i = 0;
|
||||||
|
var content = string.Empty;
|
||||||
|
var d = false;
|
||||||
|
if (scanStr == "Finish")
|
||||||
|
{
|
||||||
|
dal.UpBkAddresss(data.Block, data.Area);
|
||||||
|
DataTable Mdt = dal.GetOrderMatchidInfo(data.Block, data.Area);
|
||||||
|
if (Mdt != null && Mdt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("----开始强制结束----运单号:" + Mdt.Rows[0]["matchid"].ToString() + "");
|
||||||
|
dal.UpOrdersMatchid(data.Block, data.Area, Mdt.Rows[0]["matchid"].ToString());
|
||||||
|
|
||||||
|
dal.UpOrdersqueue(data.Block, data.Area, Mdt.Rows[0]["matchid"].ToString());
|
||||||
|
LabelParamModel model = new LabelParamModel();
|
||||||
|
model.Address = "9999";
|
||||||
|
model.ControlIP = Mdt.Rows[0]["ControlIP"].ToString();
|
||||||
|
model.Parameter = "01";
|
||||||
|
comBLL.REMOVE_JOB(model);
|
||||||
|
comBLL.LED_OFF_CLEAR(Mdt.Rows[0]["ControlIP"].ToString());
|
||||||
|
|
||||||
|
color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||||
|
scanStr = "强制结束成功";
|
||||||
|
content = "运单号:" + Mdt.Rows[0]["matchid"].ToString() + "\r\r";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("----开始强制结束----无任务");
|
||||||
|
scanStr = "当前无任务";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataTable ifdt = dal.GetOrdersMatchidIf(scanStr);//判断扫描的是否为运单号
|
||||||
|
if (ifdt != null && ifdt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DataTable bindt = dal.GetOrderMatchidBin(scanStr);
|
||||||
|
if (bindt == null || bindt.Rows.Count <= 0)
|
||||||
|
{
|
||||||
|
DataTable IFmatchid = dal.GetOrderMatchidLocation(data.Block, data.Area);
|
||||||
|
if (IFmatchid != null && IFmatchid.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("----------该运单号正在作业:" + IFmatchid.Rows[0]["matchid"].ToString() + "");
|
||||||
|
scanStr = "当前运单:" + scanStr + "";
|
||||||
|
content = "当前线路正在作业请勿扫描\r\r";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//循环为运单号分配货位
|
||||||
|
DataTable noadddt = dal.GetAddressNolocation(data.Block, data.Area);
|
||||||
|
foreach (DataRow item in ifdt.Rows)
|
||||||
|
{
|
||||||
|
if (noadddt.Rows.Count > i)
|
||||||
|
{
|
||||||
|
d = dal.UpOrderstolocation(item["shopid"].ToString(), noadddt.Rows[i]["location"].ToString(), scanStr);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if (d == true)
|
||||||
|
{
|
||||||
|
DataTable dtmt = dal.GetOrderinfoNumber(scanStr);
|
||||||
|
|
||||||
|
content = "车牌:" + dtmt.Rows[0]["clientname"].ToString() + "\r门店数:" + dtmt.Rows[0]["shopcount"].ToString() + "\r商品总数:" + dtmt.Rows[0]["qty"].ToString() + "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("----------该运单号已绑定:" + scanStr + "");
|
||||||
|
scanStr = "当前运单:" + scanStr + "";
|
||||||
|
content = "该运单已绑定请勿重复扫描\r\r";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataTable skutb = dal.GetSku(scanStr);
|
||||||
|
DataTable OrderDt = dal.GetOrderList_Car("", scanStr, data.Area, data.Block);
|
||||||
|
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DataTable dd = dal.getQueueState(data.Block, data.Area, "3");
|
||||||
|
|
||||||
|
if (dd != null && dd.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
content = "商品条码:" + skutb.Rows[0]["sku"].ToString() + "\r名称:" + skutb.Rows[0]["name"].ToString() + "\r";
|
||||||
|
scanStr = "该商品正在作业" + dd.Rows[0]["Sku"].ToString() + ",请勿扫描";
|
||||||
|
LogHelper.WriteLogInfo("该商品正在作业---sku:" + dd.Rows[0]["Sku"].ToString() + "");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
comBLL.LED_OFF_CLEAR(OrderDt.Rows[0]["controlip"].ToString());
|
||||||
|
|
||||||
|
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||||
|
qmodel.Taskblock = data.Block;
|
||||||
|
qmodel.Taskarea = data.Area;
|
||||||
|
qmodel.Matchid = OrderDt.Rows[0]["Matchid"].ToString();
|
||||||
|
qmodel.Sku = scanStr;
|
||||||
|
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||||
|
queueBLL.insertQueueOrders(qmodel);
|
||||||
|
|
||||||
|
#region 扫描sku点亮显示标签
|
||||||
|
DataTable dt = dal.GetSkuQuantity(scanStr, OrderDt.Rows[0]["Matchid"].ToString());
|
||||||
|
var sumqty = dt.Rows[0]["sumqty"].ToString();
|
||||||
|
|
||||||
|
string sizeinfo = string.Empty;
|
||||||
|
if (skutb != null)
|
||||||
|
{
|
||||||
|
double bigqty = 0, midqty = 0, lastqty = 0;
|
||||||
|
double bigsize = 0, midsize = 0;
|
||||||
|
if (skutb.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
bigsize = Convert.ToDouble(skutb.Rows[0]["plumn"].ToString());// 6
|
||||||
|
midsize = Convert.ToDouble(skutb.Rows[0]["spec"].ToString());// 1
|
||||||
|
if (bigsize != 0)
|
||||||
|
{
|
||||||
|
bigqty = (int)Math.Floor(Convert.ToDouble(sumqty) / bigsize);
|
||||||
|
sumqty = (Convert.ToDouble(sumqty) - (bigqty * bigsize)).ToString();
|
||||||
|
}
|
||||||
|
if (midsize != 0)
|
||||||
|
{
|
||||||
|
midqty = (int)Math.Floor(Convert.ToDouble(sumqty) / midsize);
|
||||||
|
sumqty = (Convert.ToDouble(sumqty) - (midqty * midsize)).ToString();
|
||||||
|
}
|
||||||
|
sizeinfo = "筐数:" + bigqty + "包数:" + midqty;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sizeinfo = "总数:" + sumqty;
|
||||||
|
}
|
||||||
|
content = "名称:" + skutb.Rows[0]["name"].ToString() + "\r " + sizeinfo + " \r";
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
scanStr = "当前商品:" + scanStr + "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (skutb != null && skutb.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
content = "名称:" + skutb.Rows[0]["name"].ToString() + "\r\r";
|
||||||
|
}
|
||||||
|
|
||||||
|
scanStr = "条码:" + scanStr + ",无任务";
|
||||||
|
LogHelper.WriteLogInfo("该条码无任务---条码:" + scanStr + "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ShowMessageModel_M showmodel = new ShowMessageModel_M();
|
||||||
|
showmodel.Area = data.Area;
|
||||||
|
showmodel.Block = data.Block;
|
||||||
|
showmodel.Color = color;
|
||||||
|
showmodel.Islock = true;
|
||||||
|
showmodel.Title = scanStr;
|
||||||
|
showmodel.IsTwinkle = 0;
|
||||||
|
showmodel.Contents = content;
|
||||||
|
showmodel.Type = 2;
|
||||||
|
comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签
|
||||||
|
|
||||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||||
}
|
}
|
||||||
@ -781,7 +914,7 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
foreach (AddressstorageModel item in Arealist)
|
foreach (AddressstorageModel item in Arealist)
|
||||||
{
|
{
|
||||||
DataTable skudt = orderbll.GetSumList("", scanStr, item.block,item.area);
|
DataTable skudt = orderbll.GetSumList("", scanStr, item.block, item.area);
|
||||||
if (skudt != null && skudt.Rows.Count > 0)
|
if (skudt != null && skudt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
//规格
|
//规格
|
||||||
@ -1088,7 +1221,7 @@ namespace Epost.BLL
|
|||||||
if (data != null)
|
if (data != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
show.Contents = data.ScanCode + "(" + scanStr + ")" + "\r"+ mes;
|
show.Contents = data.ScanCode + "(" + scanStr + ")" + "\r" + mes;
|
||||||
sku = data.Parameter;
|
sku = data.Parameter;
|
||||||
}
|
}
|
||||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
||||||
@ -1245,7 +1378,7 @@ namespace Epost.BLL
|
|||||||
int discount = Convert.ToInt32(sudt.Rows[0]["discount"].ToString());
|
int discount = Convert.ToInt32(sudt.Rows[0]["discount"].ToString());
|
||||||
//整件总数
|
//整件总数
|
||||||
int SumCkQuantity = 0; //Convert.ToInt32(sudt.Rows[0]["SumCkQuantity"].ToString());
|
int SumCkQuantity = 0; //Convert.ToInt32(sudt.Rows[0]["SumCkQuantity"].ToString());
|
||||||
//散件总数
|
//散件总数
|
||||||
int SumQuantity = Convert.ToInt32(sudt.Rows[0]["SumQuantity"].ToString());
|
int SumQuantity = Convert.ToInt32(sudt.Rows[0]["SumQuantity"].ToString());
|
||||||
//if (discount != 1)
|
//if (discount != 1)
|
||||||
//{
|
//{
|
||||||
@ -1262,11 +1395,11 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
if (qdt != null && qdt.Rows.Count > 0)
|
if (qdt != null && qdt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
show.Contents = qdt.Rows[0]["location"].ToString() + "(" + scanStr + ")" + "\r"+ mes;//sudt.Rows[0]["goodscode"].ToString().Replace(';','\r');
|
show.Contents = qdt.Rows[0]["location"].ToString() + "(" + scanStr + ")" + "\r" + mes;//sudt.Rows[0]["goodscode"].ToString().Replace(';','\r');
|
||||||
}
|
}
|
||||||
if (data != null)
|
if (data != null)
|
||||||
{
|
{
|
||||||
show.Contents = data.ScanCode + "(" + scanStr + ")" + "\r"+ mes;// sudt.Rows[0]["goodscode"].ToString().Replace(';', '\r');
|
show.Contents = data.ScanCode + "(" + scanStr + ")" + "\r" + mes;// sudt.Rows[0]["goodscode"].ToString().Replace(';', '\r');
|
||||||
sku = data.Parameter;
|
sku = data.Parameter;
|
||||||
}
|
}
|
||||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||||
|
@ -222,7 +222,7 @@ namespace Epost.BLL
|
|||||||
public bool UpdateQueueState()
|
public bool UpdateQueueState()
|
||||||
{
|
{
|
||||||
BoxPickBLL bll = new BoxPickBLL();
|
BoxPickBLL bll = new BoxPickBLL();
|
||||||
dal.deleteBoxpick();
|
//dal.deleteBoxpick();
|
||||||
bool bo= dal.UpdateQueueState();
|
bool bo= dal.UpdateQueueState();
|
||||||
//if (bo)
|
//if (bo)
|
||||||
//{
|
//{
|
||||||
|
@ -165,7 +165,7 @@ namespace Epost.DAL
|
|||||||
{
|
{
|
||||||
strwhere = " and area='"+area+"'";
|
strwhere = " and area='"+area+"'";
|
||||||
}
|
}
|
||||||
string sql = string.Format("select address, bkaddress, state, type, area ,way ,shelfid, ControlID ,location ,layer, slist, block, addresstype, ControlIP, ControlType, info from V_address where type='{1}' and block='{0}' " + strwhere,
|
string sql = string.Format("select address,bkaddress,state,type,area,way,shelfid,ControlID,location,layer,slist,block,addresstype,ControlIP,ControlType,info from V_address where type='{1}' and block='{0}' " + strwhere,
|
||||||
block,
|
block,
|
||||||
|
|
||||||
type);
|
type);
|
||||||
|
@ -48,7 +48,7 @@ namespace Epost.DAL
|
|||||||
string sql = string.Empty;
|
string sql = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(area))
|
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 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 + "",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block, area);
|
block, area);
|
||||||
@ -56,7 +56,7 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
else
|
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 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 + "",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block);
|
block);
|
||||||
@ -90,7 +90,7 @@ namespace Epost.DAL
|
|||||||
string sql = string.Empty;
|
string sql = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(area))
|
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 sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + "",
|
sql = string.Format("select id,Matchid,orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP,area, block,bkbarcode,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + "",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block, area);
|
block, area);
|
||||||
@ -98,7 +98,7 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
else
|
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 sku = '{0}' and block = '{1}' " + strwhere + "",
|
sql = string.Format("select id,Matchid,orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP, area , block,bkbarcode,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and sku = '{0}' and block = '{1}' " + strwhere + "",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block);
|
block);
|
||||||
@ -656,6 +656,7 @@ namespace Epost.DAL
|
|||||||
usercode
|
usercode
|
||||||
);
|
);
|
||||||
long x = db.UpdateSql(upsql);
|
long x = db.UpdateSql(upsql);
|
||||||
|
LogHelper.WriteLogInfo("修改当前标签拣货状态:" + upsql + ",成功条数:" + x + "");
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
@ -2492,6 +2493,373 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 三迎
|
||||||
|
//========三迎========
|
||||||
|
|
||||||
|
#region 查询扫描的是否为运单号
|
||||||
|
public DataTable GetOrdersMatchidIf(string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select distinct matchid,shopid,shopname,prino+0 from Orders where matchid='" + matchid + "' order by prino+0 asc");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询可分配的货位
|
||||||
|
public DataTable GetAddressNolocation(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from Addressstorage where bkaddress='0' and type='1' and block='" + block + "' and area='" + area + "' order by location+1 asc");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 为orders分配货位
|
||||||
|
public bool UpOrderstolocation(string shopid, string tolocation, string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("update Orders set tolocation='" + tolocation + "' where shopid='" + shopid + "' and matchid='" + matchid + "'");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("为orders分配货位:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
sql = string.Format("update Addressstorage set bkaddress='" + shopid + "' where location='" + tolocation + "' and bkaddress='0' ");
|
||||||
|
long b = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("更新Addressstorage货位为已占用:" + sql + ",成功条数:" + b + "");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询是否有正在作业的运单号
|
||||||
|
public DataTable GetOrderMatchidBin(string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from v_orders where tolocation!='' and matchid='" + matchid + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable GetOrderMatchidLocation(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from v_orders where tolocation!='' and block='" + block + "' and area='" + area + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable GetOrderMatchidInfo(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select distinct matchid,ControlIP from v_orders where (tolocation!='' or tolocation is not null) and block='" + block + "' and area='" + area + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 强制结束修改状态
|
||||||
|
public bool UpOrdersMatchid(string block, string area, string matchid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string sql = string.Format("update orders set state='3' where tolocation!='' and matchid='" + matchid + "' ");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("强制结束修改状态:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("强制结束修改状态异常:" + ex + "");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpBkAddresss(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("update Addressstorage set bkaddress='0' where block='" + block + "' and area='" + area + "' ");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("强制结束修改Addressstorage:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpOrdersqueue(string block, string area, string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("update ordersqueue set state='3' where Taskblock='" + block + "' and Taskarea='" + area + "' and matchid='" + matchid + "' ");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("强制结束修改ordersqueue:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询
|
||||||
|
public DataTable GetSkuQuantity(string sku, string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select sum(quantity) sumqty from Orders where sku='" + sku + "' and matchid='" + matchid + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable GetSku(string sku)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from SkuInfo where sku = '" + sku + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 释放播种位
|
||||||
|
public bool UpdateLocation(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("update Addressstorage set bkaddress='0' where block='" + block + "' and area='" + area + "' and type='1' ");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("运单完成-释放播种位:" + sql + ",条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MyRegion
|
||||||
|
public bool UpdateWorkState_DPS(string matchid, int truequantity, string sku, int batchid, int checkquantity, string usercode = "")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (uplock)
|
||||||
|
{
|
||||||
|
int oprationstate = 3;
|
||||||
|
|
||||||
|
string upsql = string.Format("update Orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity=quantity where matchid='{2}' and id='{4}' ",
|
||||||
|
DateTime.Now.ToString(),
|
||||||
|
truequantity,
|
||||||
|
matchid,
|
||||||
|
oprationstate,
|
||||||
|
batchid,
|
||||||
|
//checkquantity,
|
||||||
|
usercode
|
||||||
|
);
|
||||||
|
LogHelper.WriteLogInfo("-修改orders" + upsql);
|
||||||
|
long x = db.UpdateSql(upsql);
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("修改orders异常:" + upsql, LogHelper.Log_Type.ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("修改当前标签拣货状态异常:" + ex.Message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region
|
||||||
|
public DataTable GetOrderinfoNumber(string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select distinct matchid,clientname,COUNT(distinct shopid) 'shopcount',count(distinct sku) qty from Orders where matchid='" + matchid + "' and isnull(tolocation,0)>0 group by matchid,clientname");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MyRegion
|
||||||
|
public bool ImportOrderinfo(DataTable ds, Dictionary<string, string> diclist)
|
||||||
|
{
|
||||||
|
|
||||||
|
bool bo = db.UpdateData(ds, "orders", diclist);
|
||||||
|
if (bo)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("添加取消订单失败");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 数据维护
|
||||||
|
public bool DelOrderSku()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string sql = string.Format("delete from Orders where sku not in (select sku from SkuInfo) ");
|
||||||
|
long x = db.DeleteSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("数据维护:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("数据维护异常:" + ex + "", LogHelper.Log_Type.ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 导入数据清理之前orders
|
||||||
|
public void DelOrdersBeforeDate()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string sql = string.Format("insert into Ordershis select * from Orders");
|
||||||
|
long x = db.InsertSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("导入数据清理之前orders:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
sql = string.Format("delete from Orders");
|
||||||
|
x = db.DeleteSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("清理orders数据:" + sql + ",成功条数:" + x + "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("导入数据清理之前orders异常:" + ex.Message + "", LogHelper.Log_Type.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 运单用时
|
||||||
|
public List<OrdersModel> GetMatchUserTimeByPage(string strWhere, string orderby, int startIndex, int endIndex, out int recordCount)
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
StringBuilder strSql = new StringBuilder();
|
||||||
|
strSql.Append("SELECT * FROM ( ");
|
||||||
|
strSql.Append(" SELECT ROW_NUMBER() OVER (");
|
||||||
|
if (!string.IsNullOrEmpty(orderby.Trim()))
|
||||||
|
{
|
||||||
|
strSql.Append("order by T." + orderby);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strSql.Append("order by matchid asc");
|
||||||
|
}
|
||||||
|
strSql.Append(")AS Row,matchid as matchid,clientname as clientname,count(distinct(shopid)) as ShopCount,MIN(CONVERT(datetime,oprationtime)) AS starttime,MAX(CONVERT(datetime,oprationtime)) AS endtime,DATEDIFF(MINUTE,MIN(CONVERT(datetime,oprationtime)),MAX(CONVERT(datetime,oprationtime))) AS UseTime FROM Ordershis where 1=1 " + strWhere + " GROUP BY matchid,clientname ");
|
||||||
|
strSql.Append(" ) TT");
|
||||||
|
strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
|
||||||
|
List<OrdersModel> list = ModelConvertHelper<OrdersModel>.ConvertToList(db.GetsqlForDT(strSql.ToString()));
|
||||||
|
|
||||||
|
strSql.Remove(0, strSql.Length);
|
||||||
|
strSql.Append("SELECT count(distinct matchid) FROM Ordershis");
|
||||||
|
if (!string.IsNullOrEmpty(strWhere.Trim()))
|
||||||
|
{
|
||||||
|
strSql.AppendFormat(" WHERE 1=1 {0}", strWhere);
|
||||||
|
}
|
||||||
|
|
||||||
|
object obj = db.GetsqlForDT(strSql.ToString()).Rows[0][0];
|
||||||
|
if (obj != null)
|
||||||
|
recordCount = Convert.ToInt32(obj);
|
||||||
|
else
|
||||||
|
recordCount = 0;
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLog(GetType(), ex.Message);
|
||||||
|
recordCount = 0;
|
||||||
|
return new List<Model.OrdersModel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public DataTable GetMatchUserTime_DT(string strWhere)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string sql = string.Format("SELECT matchid as matchid,clientname as clientname,count(distinct(shopid)) as ShopCount,MIN(CONVERT(datetime,oprationtime)) AS starttime,MAX(CONVERT(datetime,oprationtime)) AS endtime,DATEDIFF(MINUTE,MIN(CONVERT(datetime,oprationtime)),MAX(CONVERT(datetime,oprationtime))) AS UseTime FROM Ordershis where 1=1 " + strWhere + " GROUP BY matchid,clientname ");
|
||||||
|
|
||||||
|
return db.GetsqlForDT(sql.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLog(GetType(), ex.Message);
|
||||||
|
return new DataTable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取当前区的作业状态
|
||||||
|
public DataTable getQueueState(string block, string area, string state)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from OrdersQueue where taskblock='{0}' and taskarea='{1}' and state!='" + state + "' order by sort",
|
||||||
|
block,
|
||||||
|
area);
|
||||||
|
return db.GetsqlForDT(sql);
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 判断订单状态为已完成
|
||||||
|
public bool IsFinishWork_box(string boxcode, int endcount, string matchid = "")
|
||||||
|
{
|
||||||
|
string sql = string.Format("select matchid from Orders where (matchid='{0}') and oprationstate<>3",
|
||||||
|
matchid);
|
||||||
|
|
||||||
|
|
||||||
|
LogHelper.WriteLogInfo("判断整箱状态为已完成" + sql);
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
if (dt == null || dt.Rows.Count == endcount)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("判断整箱状态为已完成true");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("判断整箱状态为已完成false");
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<WebStackScaffolding_LayoutPageFile>~/Views/Shared/_EpostLayoutPage.cshtml</WebStackScaffolding_LayoutPageFile>
|
<WebStackScaffolding_LayoutPageFile>~/Views/Shared/_EpostLayoutPage.cshtml</WebStackScaffolding_LayoutPageFile>
|
||||||
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
||||||
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
||||||
<NameOfLastUsedPublishProfile>E:\WORK\代码管理\播种\T系列分支\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
<NameOfLastUsedPublishProfile>D:\驿传\Epost\T_DAS_PTL\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
||||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||||
<SiteUrlToLaunchAfterPublish />
|
<SiteUrlToLaunchAfterPublish />
|
||||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||||
<publishUrl>D:\驿传\T系列</publishUrl>
|
<publishUrl>D:\驿传\SanYing_DAS-T后台</publishUrl>
|
||||||
<DeleteExistingFiles>True</DeleteExistingFiles>
|
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||||
<PrecompileBeforePublish>True</PrecompileBeforePublish>
|
<PrecompileBeforePublish>true</PrecompileBeforePublish>
|
||||||
<EnableUpdateable>True</EnableUpdateable>
|
<EnableUpdateable>true</EnableUpdateable>
|
||||||
<DebugSymbols>False</DebugSymbols>
|
<DebugSymbols>false</DebugSymbols>
|
||||||
<WDPMergeOption>DonotMerge</WDPMergeOption>
|
<WDPMergeOption>DonotMerge</WDPMergeOption>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@
|
|||||||
</configSections>
|
</configSections>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="weijie_dpsEntities" connectionString="metadata=res://*/WJDB.csdl|res://*/WJDB.ssdl|res://*/WJDB.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=weijie_dps;user id=sa;password=123456;min pool size=4;max pool size=4;packet size=3072;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
<add name="weijie_dpsEntities" connectionString="metadata=res://*/WJDB.csdl|res://*/WJDB.ssdl|res://*/WJDB.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=weijie_dps;user id=sa;password=123456;min pool size=4;max pool size=4;packet size=3072;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
||||||
<add name="SqlLocDPSConnection" connectionString="server=139.196.36.200;user id=EpostTest;password=antion;database=EpostTest_T;min pool size=512;max pool size=512;packet size=3072" providerName="System.Data.SqlClient" />
|
<add name="SqlLocDPSConnection" connectionString="server=139.196.36.200;user id=EpostTest;password=antion;database=BaBi_DAS;min pool size=512;max pool size=512;packet size=3072" providerName="System.Data.SqlClient" />
|
||||||
<add name="MysqlLocDPSConnection" connectionString="Server=localhost;Port=3306;Database=world;User=root; Password=antion;SslMode=None;Pooling=true;Allow User Variables=True;" />
|
<add name="MysqlLocDPSConnection" connectionString="Server=localhost;Port=3306;Database=world;User=root; Password=antion;SslMode=None;Pooling=true;Allow User Variables=True;" />
|
||||||
|
|
||||||
<add name="WMSConnection" connectionString="data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=139.196.36.200)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=EpostDB)));user id=C##Test;password=test" />
|
<add name="WMSConnection" connectionString="data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=139.196.36.200)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=EpostDB)));user id=C##Test;password=test" />
|
||||||
@ -27,11 +27,11 @@
|
|||||||
<add key="ControlXML" value="/App_Data/EpostController.xml" />
|
<add key="ControlXML" value="/App_Data/EpostController.xml" />
|
||||||
<add key="LabelXML" value="/App_Data/AddressStorage.xml" />
|
<add key="LabelXML" value="/App_Data/AddressStorage.xml" />
|
||||||
<add key="ResultsXML" value="/App_Data/Results.xml" />
|
<add key="ResultsXML" value="/App_Data/Results.xml" />
|
||||||
<add key="WebAPIUrl" value="http://192.168.3.65:8051/api/WebAPI/ProcessingResult"/>
|
<add key="WebAPIUrl" value="http://localhost:63119/api/WebAPI/ProcessingResult"/>
|
||||||
<add key="ShowMode" value="1" />
|
<add key="ShowMode" value="1" />
|
||||||
<add key="SetupMode" value="\Epost_P\Epost.TestToolsWeb\App_Data\SetupMode.txt" />
|
<add key="SetupMode" value="\Epost_P\Epost.TestToolsWeb\App_Data\SetupMode.txt" />
|
||||||
<add key="CARID" value="HT01" />
|
<add key="CARID" value="HT01" />
|
||||||
<add key="ServerAPIURL" value="http://192.168.3.65:8051/api/WebAPI" />
|
<add key="ServerAPIURL" value="http://localhost:63119/api/WebAPI" />
|
||||||
<add key="SleepTime" value="1" />
|
<add key="SleepTime" value="1" />
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<!--
|
<!--
|
||||||
|
Reference in New Issue
Block a user