Compare commits
9 Commits
WuXi_DingS
...
SanYing_DA
Author | SHA1 | Date | |
---|---|---|---|
aee2063646 | |||
53c4b66485 | |||
3648692781 | |||
e2c1d127a0 | |||
7e11ca5d4d | |||
70ebea6292 | |||
efe0835c4e | |||
c4fe9e1a9b | |||
c53719f69b |
@ -146,9 +146,9 @@ namespace Epost.BLL
|
||||
|
||||
#endregion
|
||||
#region 获取控制器列表
|
||||
public DataTable getLabelList(string controlid,string batchno)
|
||||
public DataTable getLabelList(string controlid)
|
||||
{
|
||||
return dal.getLabelList(controlid, batchno);
|
||||
return dal.getLabelList(controlid);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -182,18 +182,10 @@ namespace Epost.BLL
|
||||
return dal.GetAreaList();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取所有小区
|
||||
public List<AddressstorageModel> GetAreaList(string block = "", string shelfid = "")
|
||||
public List<AddressstorageModel> GetAreaList(string block = "")
|
||||
{
|
||||
return dal.GetAreaList(block, shelfid);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取所有小区
|
||||
public List<AddressstorageModel> GetshelfidList(string block = "")
|
||||
{
|
||||
return dal.GetshelfidList(block);
|
||||
return dal.GetAreaList(block);
|
||||
}
|
||||
#endregion
|
||||
#region 获取所有通道
|
||||
|
@ -19,15 +19,17 @@ namespace Epost.BLL
|
||||
public class CommandBLL
|
||||
{
|
||||
CommandDAL dal = new CommandDAL();
|
||||
|
||||
XgateCacheDAL xageDAL = new XgateCacheDAL();
|
||||
AddressstorageBLL addrBLL = new AddressstorageBLL();
|
||||
public static DataTable Controls = new DataTable();
|
||||
public static DataTable Labels = new DataTable();
|
||||
|
||||
JobDownCacheDAL JobCache = new JobDownCacheDAL();
|
||||
OrdersDAL orderDal = new OrdersDAL();
|
||||
ConfigurationOperator txtbll = new ConfigurationOperator();
|
||||
string IP = ConfigurationManager.AppSettings["WebAPIUrl"];
|
||||
|
||||
#region 初始化数据
|
||||
public ResultModel Initialization_T(bool isback = true)
|
||||
public ResultModel Initialization_M(bool isback = true)
|
||||
{
|
||||
ResultModel resultModel = new ResultModel();
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
@ -60,12 +62,6 @@ namespace Epost.BLL
|
||||
model.Command = "UNLOCK";
|
||||
model.Timeout = "0.5";
|
||||
list.Add(model);
|
||||
model = new LabelParamModel();
|
||||
model.ControlIP = item["ControlIP"].ToString();
|
||||
model.Address = "9999";
|
||||
model.Command = "LED_OFF";
|
||||
model.Timeout = "0.5";
|
||||
list.Add(model);
|
||||
|
||||
}
|
||||
if (list.Any())
|
||||
@ -90,7 +86,7 @@ namespace Epost.BLL
|
||||
#endregion
|
||||
|
||||
#region 设备检测 查询所有标签
|
||||
public ResultModel GetAllLabelList_M(string batchno)
|
||||
public ResultModel GetAllLabelList_M()
|
||||
{
|
||||
ResultModel model = new ResultModel();
|
||||
try
|
||||
@ -102,12 +98,11 @@ namespace Epost.BLL
|
||||
{
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
DataTable lableDt = addrBLL.getLabelList(item["id"].ToString(), batchno);
|
||||
DataTable lableDt = addrBLL.getLabelList(item["id"].ToString());
|
||||
if (lableDt != null && lableDt.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow labelItem in lableDt.Rows)
|
||||
{
|
||||
string shopid = labelItem["address"].ToString();
|
||||
if (labelItem["addresstype"].ToString() == "2")
|
||||
{
|
||||
LabelParamModel CNlablemodel = new LabelParamModel();
|
||||
@ -122,25 +117,17 @@ namespace Epost.BLL
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!string.IsNullOrEmpty(labelItem["shopid"].ToString()))
|
||||
{
|
||||
shopid = labelItem["shopid"].ToString();
|
||||
if (shopid.Length > 4)
|
||||
{
|
||||
shopid = shopid.Substring(shopid.Length-4,4);
|
||||
}
|
||||
}
|
||||
LabelParamModel lablemodel = new LabelParamModel();
|
||||
lablemodel.Address = labelItem["address"].ToString();
|
||||
lablemodel.ControlIP = item["ControlIP"].ToString();
|
||||
lablemodel.Command = "DISPLAY_JOB";
|
||||
lablemodel.Type = "N";
|
||||
lablemodel.Quantity = shopid;
|
||||
lablemodel.Quantity = labelItem["address"].ToString();
|
||||
lablemodel.Uid = labelItem["address"].ToString();
|
||||
lablemodel.Mode = "10";
|
||||
list.Add(lablemodel);
|
||||
}
|
||||
|
||||
|
||||
//result= combll.DISPLAY_JOB(model);
|
||||
|
||||
}
|
||||
@ -164,7 +151,23 @@ namespace Epost.BLL
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取参数数字
|
||||
public string GETDISPLAYJOBPAR(string no, string Lightcolor, string IsTwinkle, string location, string Quantity, string Rfcode)
|
||||
{
|
||||
string parar = no + Lightcolor + IsTwinkle + "30NQ" + location + "\n" + Quantity + "\n" + Rfcode + "\n";
|
||||
return parar;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 清除
|
||||
public void clearALL_M()
|
||||
@ -185,7 +188,10 @@ namespace Epost.BLL
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
||||
#region M系列
|
||||
|
||||
#region 格式化任务数据
|
||||
public bool FORMATE_JOB_DATA(LabelParamModel model)
|
||||
@ -208,8 +214,39 @@ namespace Epost.BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 进入设置模式
|
||||
public bool ENTER_CONFIG_MODE(LabelParamModel model)
|
||||
{
|
||||
|
||||
|
||||
return dal.ENTER_CONFIG_MODE(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 设置地址 (传参地址 内容)
|
||||
public bool SET_ADDRESS(LabelParamModel model)
|
||||
{
|
||||
return dal.SET_ADDRESS(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除地址 (传参地址 内容)
|
||||
public bool DELETE_ADDRESS(LabelParamModel model)
|
||||
{
|
||||
return dal.DELETE_ADDRESS(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 退出设置模式
|
||||
public bool EXIT_CONFIG_MODE(LabelParamModel model)
|
||||
{
|
||||
|
||||
return dal.EXIT_CONFIG_MODE(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#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>();
|
||||
if (clear)
|
||||
@ -222,14 +259,14 @@ namespace Epost.BLL
|
||||
clearModel.Command = "REMOVE_JOB";
|
||||
clearModel.Timeout = "0.5";
|
||||
clearModel.Type = model.Type;
|
||||
// dal.REMOVE_JOB(clearModel);
|
||||
// dal.REMOVE_JOB(clearModel);
|
||||
list.Add(clearModel);
|
||||
}
|
||||
LabelParamModel DisplayModel = new LabelParamModel();
|
||||
DisplayModel.Address = model.Address;
|
||||
DisplayModel.ControlIP = model.ControlIP;
|
||||
DisplayModel.Content =model.Content;
|
||||
DisplayModel.Title =model.Title;
|
||||
DisplayModel.Content = model.Content;
|
||||
DisplayModel.Title = model.Title;
|
||||
DisplayModel.Loc = model.Loc;
|
||||
DisplayModel.Quantity = model.Quantity;
|
||||
DisplayModel.Uid = model.Uid;
|
||||
@ -247,7 +284,7 @@ namespace Epost.BLL
|
||||
LabelParamModel lockModel = new LabelParamModel();
|
||||
lockModel.Address = model.Address;
|
||||
lockModel.ControlIP = model.ControlIP;
|
||||
lockModel.Parameter = "11111000";
|
||||
lockModel.Parameter = "11101000";
|
||||
lockModel.Command = "LOCK";
|
||||
lockModel.Timeout = "0.5";
|
||||
lockModel.Type = model.Type;
|
||||
@ -259,7 +296,7 @@ namespace Epost.BLL
|
||||
LabelParamModel lockModel = new LabelParamModel();
|
||||
lockModel.Address = model.Address;
|
||||
lockModel.ControlIP = model.ControlIP;
|
||||
lockModel.Parameter = "11111000";
|
||||
lockModel.Parameter = "00011000";
|
||||
lockModel.Command = "UNLOCK";
|
||||
lockModel.Timeout = "0.5";
|
||||
lockModel.Type = model.Type;
|
||||
@ -270,6 +307,7 @@ namespace Epost.BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 任务指令(传参地址)
|
||||
public void LED_ON_M(LabelParamModel model, bool islock = false)
|
||||
{
|
||||
@ -315,7 +353,6 @@ namespace Epost.BLL
|
||||
dal.DISPLAY_JOBALL(list);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region LED_OFF(传参地址)
|
||||
public void LED_OFF_M(List<JobModel> list)
|
||||
{
|
||||
@ -325,15 +362,17 @@ namespace Epost.BLL
|
||||
LabelParamModel clearModel = new LabelParamModel();
|
||||
clearModel.Address = model.Address;
|
||||
clearModel.ControlIP = model.ControlIP;
|
||||
|
||||
|
||||
clearModel.Command = "LED_OFF";
|
||||
clearModel.Timeout = "0.5";
|
||||
clearModel.Timeout = "0.5";
|
||||
sendlist.Add(clearModel);
|
||||
}
|
||||
dal.DISPLAY_JOBALL(sendlist);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region LED_OFF(传参地址)
|
||||
public void LED_OFF_CLEAR(string ip)
|
||||
{
|
||||
@ -346,7 +385,6 @@ namespace Epost.BLL
|
||||
dal.Send(clearModel);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region LED_OFF(传参地址)
|
||||
public void LED_OFF_CLEAR(List<JobModel> offList)
|
||||
{
|
||||
@ -361,17 +399,16 @@ namespace Epost.BLL
|
||||
clearModel.Parameter = "1";
|
||||
clearModel.Command = "LED_OFF";
|
||||
clearModel.Timeout = "0.5";
|
||||
clearModel.Uid = "C"+item.Address;
|
||||
clearModel.Type = "N";
|
||||
list.Add(clearModel);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
dal.SendALL(list);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 任务指令(传参地址)
|
||||
public bool DISPLAY_JOB(LabelParamModel model)
|
||||
{
|
||||
@ -387,7 +424,6 @@ namespace Epost.BLL
|
||||
dal.DISPLAY_JOBALL(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 初始化
|
||||
public ResultModel SendALL_Init(List<LabelParamModel> model)
|
||||
{
|
||||
@ -395,7 +431,7 @@ namespace Epost.BLL
|
||||
return dal.SendALL_Init(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 移除任务指令(传参地址)
|
||||
public bool REMOVE_JOB(LabelParamModel model)
|
||||
{
|
||||
@ -403,7 +439,6 @@ namespace Epost.BLL
|
||||
return dal.REMOVE_JOB(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 通道灯命令
|
||||
public bool DISPLAY_LIGHT(LabelParamModel model)
|
||||
{
|
||||
@ -420,6 +455,8 @@ namespace Epost.BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 终端解锁指令
|
||||
public bool UNLOCK(LabelParamModel model)
|
||||
{
|
||||
@ -428,6 +465,30 @@ namespace Epost.BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 扫描枪使能
|
||||
public bool SET_SCANDEVICE_ON(LabelParamModel model)
|
||||
{
|
||||
|
||||
return dal.SET_SCANDEVICE_ON(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 扫描枪不使能
|
||||
public bool SET_SCANDEVICE_OFF(LabelParamModel model)
|
||||
{
|
||||
|
||||
return dal.SET_SCANDEVICE_OFF(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 清除扫描枪
|
||||
public bool SET_SCANDEVICE_CLEAR(LabelParamModel model)
|
||||
{
|
||||
|
||||
return dal.SET_SCANDEVICE_CLEAR(model);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 休眠
|
||||
public bool SLEEP(LabelParamModel model)
|
||||
{
|
||||
@ -448,8 +509,7 @@ namespace Epost.BLL
|
||||
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
model.ControlIP = item["ControlIP"].ToString();
|
||||
FORMATE_JOB_DATA(model);
|
||||
LED_OFF_CLEAR(item["ControlIP"].ToString());
|
||||
FORMATE_JOB_DATA(model);
|
||||
|
||||
}
|
||||
|
||||
@ -493,7 +553,7 @@ namespace Epost.BLL
|
||||
{
|
||||
// DataTable dt = addrBLL.getAddresslist(block,area,type);
|
||||
|
||||
if(offList.Any())
|
||||
if (offList.Any())
|
||||
{
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
foreach (JobModel item in offList)
|
||||
@ -503,14 +563,14 @@ namespace Epost.BLL
|
||||
model.ControlIP = item.ControlIP;
|
||||
model.Address = item.Address;
|
||||
model.Command = "REMOVE_JOB";
|
||||
model.Uid = "U" + item.ID;
|
||||
model.Uid = item.ID;
|
||||
model.Type = "N";
|
||||
list.Add(model);
|
||||
LabelParamModel Unlockmodel = new LabelParamModel();
|
||||
Unlockmodel.ControlIP = item.ControlIP;
|
||||
Unlockmodel.Address = item.Address;
|
||||
Unlockmodel.Command = "UNLOCK";
|
||||
|
||||
|
||||
Unlockmodel.Type = "N";
|
||||
Unlockmodel.Parameter = "11111000";
|
||||
list.Add(Unlockmodel);
|
||||
@ -552,29 +612,28 @@ namespace Epost.BLL
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 点亮显示标签
|
||||
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)
|
||||
{
|
||||
foreach (DataRow addritem in showaddrDT.Rows)
|
||||
{
|
||||
|
||||
|
||||
LabelParamModel lablemodel = new LabelParamModel();
|
||||
lablemodel.Address = addritem["address"].ToString();
|
||||
lablemodel.ControlIP = addritem["controlip"].ToString();
|
||||
lablemodel.Command = "DISPLAY_JOB";
|
||||
lablemodel.Uid =show.Uid;
|
||||
lablemodel.Uid = show.Uid;
|
||||
if (string.IsNullOrEmpty(show.Uid))
|
||||
{ lablemodel.Uid = addritem["address"].ToString(); }
|
||||
|
||||
{ lablemodel.Uid = show.No + addritem["address"].ToString(); }
|
||||
|
||||
lablemodel.Mode = show.Color + "0";
|
||||
if (addritem["addresstype"].ToString() == "2")
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
lablemodel.Type = "C";
|
||||
lablemodel.Loc = show.Location;
|
||||
lablemodel.Title = show.Title;
|
||||
@ -587,13 +646,13 @@ namespace Epost.BLL
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
lablemodel.Type = "N";
|
||||
lablemodel.Quantity = show.Qty;
|
||||
lablemodel.Quantity = show.Qty;
|
||||
lablemodel.Loc = show.Location;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
DISPLAY_JOB_M(lablemodel, true, show.Islock);
|
||||
LogHelper.WriteLogInfo("点亮显示标签" + addritem["address"].ToString());
|
||||
|
||||
@ -632,7 +691,7 @@ namespace Epost.BLL
|
||||
model.Type = "T";
|
||||
model.Address = item["address"].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);
|
||||
}
|
||||
|
||||
@ -652,24 +711,16 @@ namespace Epost.BLL
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
foreach (DataRow addritem in showaddrDT.Rows)
|
||||
{
|
||||
|
||||
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
model.Address = addritem["address"].ToString();
|
||||
model.ControlIP = addritem["controlip"].ToString();
|
||||
model.Parameter =show.No;
|
||||
model.Uid = show.Uid;
|
||||
if (string.IsNullOrEmpty(show.Uid))
|
||||
{ model.Uid = addritem["address"].ToString(); }
|
||||
model.Type = "N";
|
||||
if (addritem["addresstype"].ToString() == "2")
|
||||
{
|
||||
model.Type = "C";
|
||||
}
|
||||
model.Parameter = show.No;
|
||||
model.Command = "REMOVE_JOB";
|
||||
model.Timeout = "0.5";
|
||||
list.Add(model);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (list != null && list.Count > 0)
|
||||
{
|
||||
LogHelper.WriteLogInfo("熄灭点亮的list———————:" + list.Count);
|
||||
@ -677,16 +728,16 @@ namespace Epost.BLL
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -115,9 +115,6 @@
|
||||
<Compile Include="UserBLL.cs" />
|
||||
<Compile Include="WmsBLL.cs" />
|
||||
<Compile Include="WmsTaskBLL.cs" />
|
||||
<Compile Include="Work_DisplayJobThread.cs" />
|
||||
<Compile Include="Work_JobDownThread.cs" />
|
||||
<Compile Include="Work_ScanThread.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Common\Epost.Common.csproj">
|
||||
|
@ -30,7 +30,44 @@ namespace Epost.BLL
|
||||
UserModelCacheDAL UserCacheDAL = new UserModelCacheDAL();
|
||||
private static object lockbox = new object();
|
||||
|
||||
|
||||
#region 绑定箱号
|
||||
public void BindBoxCode()
|
||||
{
|
||||
lock (lockbox)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
//查询待绑定的订单/设备
|
||||
DataTable qudt = queueboxBLL.getQueuesbyState();
|
||||
if (qudt != null && qudt.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow item in qudt.Rows)
|
||||
{
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
string address = item["address"].ToString();
|
||||
model.Address = address;
|
||||
model.ControlIP = item["controlip"].ToString();
|
||||
// model.Parameter = "0100000100030CQ请扫描箱号/托盘号\n\n\n\n\n\n门店编号:" + item["shopid"].ToString() + "\n\n\n\n";
|
||||
model.Parameter = comBLL.GETDISPLAYJOBPAR_CN("01", "001000", "0", "请扫描箱号/托盘号", "", "", "", "", "门店编号:" + item["shopid"].ToString(), "");
|
||||
comBLL.DISPLAY_JOB_M(model, true, true);
|
||||
queueboxBLL.UpdateQueueState(item["id"].ToString(), "1");
|
||||
}
|
||||
|
||||
}
|
||||
//点亮设备
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("绑定箱号异常:" + ex.Message);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询控制器列表
|
||||
public DataTable getControlList(int type = 0)
|
||||
@ -462,14 +499,27 @@ namespace Epost.BLL
|
||||
//点亮当前货位对应设备提示扫箱号
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
model.Address = address;
|
||||
model.ControlIP = controlip;
|
||||
// model.Parameter = comBLL.GETDISPLAYJOBPAR_CN("07", "000100", "3", "请扫描箱号!", "", "", "", "", "门店号:" + shopid + "\r箱 号:" + boxcode + "\r托盘号:" + traycode, "");
|
||||
model.ControlIP = controlip;
|
||||
// model.Parameter = "0700000100330CQ请扫描箱号!\n\n\n\n\n\n\n\n\n\n";
|
||||
model.Parameter = comBLL.GETDISPLAYJOBPAR_CN("07", "000100", "3", "请扫描箱号!", "", "", "", "", "门店号:" + shopid + "\r箱 号:" + boxcode + "\r托盘号:" + traycode, "");
|
||||
comBLL.DISPLAY_JOB_M(model, true, true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 修改数量异常提示
|
||||
public void changeNumErr(string address, string controlip)
|
||||
{
|
||||
//点亮当前货位对应设备提示扫箱号
|
||||
LabelParamModel model = new LabelParamModel();
|
||||
model.Address = address;
|
||||
model.ControlIP = controlip;
|
||||
model.Parameter = comBLL.GETDISPLAYJOBPAR_CN("05", "000100", "3", "修改数量超出需求数量!", "", "", "", "", "", "");
|
||||
comBLL.DISPLAY_JOB_M(model, true, false);
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 恢复当前标签拣货
|
||||
public void displayJob_err(string address, string controlip, JobModel job)
|
||||
@ -480,9 +530,15 @@ namespace Epost.BLL
|
||||
lamodel.ControlIP = controlip;
|
||||
lamodel.Command = "DISPLAY_JOB";
|
||||
string qty = ConvertHexHelper.ConvertString(job.Quantity.ToString(), 10, 16); //拣货数量
|
||||
string CheckQuantity = ConvertHexHelper.ConvertString(job.CheckQuantity.ToString(), 10, 16); //拣货数量
|
||||
// lamodel.Parameter = comBLL.GETDISPLAYJOBPAR_CN("01", job.ColorCode, "0", job.GoodsName, CheckQuantity, job.WholeUnit, qty, job.Unit, job.Sku, job.UserCode);//item.UserCode
|
||||
string CheckQuantity = ConvertHexHelper.ConvertString(job.CheckQuantity.ToString(), 10, 16); //拣货数量
|
||||
// lamodel.Parameter = "01" + EnumHelper.EMToDescriptionString(LightColor.Color.Green) + "030NQ" +item.Zone +"\n" + qty;
|
||||
//lamodel.Parameter = "0100" + queueDT.Rows[0]["lightcolor"].ToString() + "030CQ" + item.GoodsName + "\n\n" + CheckQuantity + "\n" + item.WholeUnit + "\n" + qty + "\n" + item.Unit + "\n" + item.Sku + "\n\n\n\n";
|
||||
lamodel.Parameter = comBLL.GETDISPLAYJOBPAR_CN("01", job.ColorCode, "0", job.GoodsName, CheckQuantity, job.WholeUnit, qty, job.Unit, job.Sku, job.UserCode);//item.UserCode
|
||||
|
||||
|
||||
comBLL.DISPLAY_JOB_M(lamodel, true, false);
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
public void BindJobListBySku(string sku)
|
||||
@ -500,11 +556,13 @@ namespace Epost.BLL
|
||||
LocCacheDAL.UpdateLocModelList(new List<OrderListModel> { data }, ELCommend.Update);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("绑定任务异常:" + ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
public bool bindOrder(string sku, string block, string matchid = "", string usercode = "", string area = "", int sort = 0, string lightColor = "010000")
|
||||
{
|
||||
@ -523,6 +581,8 @@ namespace Epost.BLL
|
||||
bool qubo = queueBLL.insertQueueOrders(unmodel);
|
||||
return qubo;
|
||||
}
|
||||
|
||||
|
||||
public void bindShop(string shopcode, string usercode, List<ResultMessageModel> list, ResultMessageModel data)
|
||||
{
|
||||
|
||||
@ -679,22 +739,22 @@ namespace Epost.BLL
|
||||
List<JobModel> list = new List<JobModel>();
|
||||
DataTable OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
||||
bool isecho = false;
|
||||
if (OrderDt == null || OrderDt.Rows.Count == 0)//回显
|
||||
{
|
||||
OrderDt = dal.GetOrderList_echo(matchid, sku, area, block);
|
||||
isecho = true;
|
||||
//if (OrderDt == null || OrderDt.Rows.Count == 0)//回显
|
||||
//{
|
||||
// OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
||||
// isecho = true;
|
||||
|
||||
}
|
||||
//}
|
||||
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
||||
{
|
||||
string usercode = string.Empty;
|
||||
string lightcolor = string.Empty;
|
||||
//DataTable udt = dal.GetOrderUseerXCode(matchid, sku, area, block);
|
||||
//if (udt != null && udt.Rows.Count > 0)
|
||||
//{
|
||||
// usercode = udt.Rows[0]["usercode"].ToString();
|
||||
// lightcolor = udt.Rows[0]["lightcolor"].ToString();
|
||||
//}
|
||||
DataTable udt = dal.GetOrderUseerXCode(matchid, sku, area, block);
|
||||
if (udt != null && udt.Rows.Count > 0)
|
||||
{
|
||||
usercode = udt.Rows[0]["usercode"].ToString();
|
||||
lightcolor = udt.Rows[0]["lightcolor"].ToString();
|
||||
}
|
||||
if (string.IsNullOrEmpty(lightcolor))
|
||||
{
|
||||
lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
@ -707,19 +767,14 @@ namespace Epost.BLL
|
||||
demodel.BatchId = item["BatchId"].ToString();
|
||||
demodel.ID = item["ID"].ToString();
|
||||
demodel.GoodsName = item["GoodsName"].ToString();
|
||||
|
||||
demodel.Quantity = Convert.ToInt32(item["Quantity"].ToString());
|
||||
demodel.CheckQuantity = Convert.ToInt32(item["CheckQuantity"].ToString());
|
||||
demodel.Sku = item["Sku"].ToString();
|
||||
demodel.Tolocation = item["Tolocation"].ToString();
|
||||
demodel.Matchid = item["Matchid"].ToString();
|
||||
demodel.ShopID = item["shopid"].ToString();
|
||||
demodel.BoxCode = item["boxcode"].ToString();
|
||||
|
||||
demodel.Discount = item["Discount"].ToString();
|
||||
demodel.WholeUnit = item["WholeUnit"].ToString();
|
||||
demodel.Unit = item["Unit"].ToString();
|
||||
|
||||
//demodel.TrayCode = item["bkbarcode"].ToString();
|
||||
#region 获取库位信息
|
||||
demodel.Block = item["Block"].ToString();
|
||||
demodel.Area = item["Area"].ToString();
|
||||
@ -740,11 +795,11 @@ namespace Epost.BLL
|
||||
demodel.TaskArea = Convert.ToInt32(item["area"].ToString());
|
||||
demodel.TaskBlock = Convert.ToInt32(item["block"].ToString());
|
||||
demodel.No = "01";
|
||||
if (isecho)
|
||||
{
|
||||
demodel.No = "04";
|
||||
demodel.ColorCode = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
||||
}
|
||||
//if (isecho)
|
||||
//{
|
||||
// demodel.No = "04";
|
||||
// demodel.ColorCode = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
||||
//}
|
||||
list.Add(demodel);
|
||||
if (!isecho) {
|
||||
//修改数据为已读
|
||||
@ -912,25 +967,19 @@ namespace Epost.BLL
|
||||
{
|
||||
return dal.GetSumList(matchid, sku, block, area);
|
||||
}
|
||||
|
||||
|
||||
public DataTable GetSumList_Echo(string matchid, string sku, string block, string area = "")
|
||||
{
|
||||
return dal.GetSumList_Echo(matchid, sku, block, area);
|
||||
}
|
||||
//查询sku对应的所有任务
|
||||
public DataTable getOrderListBysku(string block, string sku,string area, string matchid)
|
||||
public DataTable getOrderListBysku(string block, string sku)
|
||||
{
|
||||
return dal.getOrderListBysku(block, sku,area,matchid);
|
||||
return dal.getOrderListBysku(block, sku);
|
||||
}
|
||||
public DataTable getOrderHisListBysku(string block, string sku, string area,string matchid)
|
||||
|
||||
public bool UpOrderStateBybat(string batchid)
|
||||
{
|
||||
return dal.getOrderHisListBysku(block, sku, area, matchid);
|
||||
}
|
||||
|
||||
public bool UpOrderStateBybat(string id)
|
||||
{
|
||||
return dal.UpOrderStateBybat(id);
|
||||
return dal.UpOrderStateBybat(batchid);
|
||||
}
|
||||
|
||||
|
||||
@ -940,20 +989,17 @@ namespace Epost.BLL
|
||||
return dal.IsFinishWorkByCar(endcount, matchid, block);
|
||||
}
|
||||
|
||||
public bool UpdateStateByCar(string matchid, string sku = "")
|
||||
public bool UpdateStateByCar(string matchid, string block = "", string sku = "")
|
||||
{
|
||||
return dal.UpdateStateByCar(matchid, sku);
|
||||
return dal.UpdateStateByCar(matchid, block, sku);
|
||||
}
|
||||
|
||||
public bool IsFinishWork(int endcount, string block, string usercode = "", string area = "", string sku = "", string shopid = "", string matchid = "")
|
||||
{
|
||||
return dal.IsFinishWork(endcount, block, usercode, area, sku, shopid, matchid);
|
||||
}
|
||||
|
||||
|
||||
public bool IsSkuFinishWork(string sku, string matchid)
|
||||
{
|
||||
return dal.IsSkuFinishWork(sku, matchid);
|
||||
}
|
||||
public DataTable GetMatchOrder()
|
||||
{
|
||||
return dal.GetMatchOrder();
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -204,9 +204,9 @@ namespace Epost.BLL
|
||||
#endregion
|
||||
|
||||
#region 删除que
|
||||
public bool DelQueueOrder(string sku,string block,string area)
|
||||
public bool DelQueueOrder(string sku,string block)
|
||||
{
|
||||
return dal.DelQueueOrder(sku,block,area);
|
||||
return dal.DelQueueOrder(sku,block);
|
||||
|
||||
}
|
||||
#endregion
|
||||
@ -222,7 +222,7 @@ namespace Epost.BLL
|
||||
public bool UpdateQueueState()
|
||||
{
|
||||
BoxPickBLL bll = new BoxPickBLL();
|
||||
dal.deleteBoxpick();
|
||||
//dal.deleteBoxpick();
|
||||
bool bo= dal.UpdateQueueState();
|
||||
//if (bo)
|
||||
//{
|
||||
|
@ -16,16 +16,22 @@ namespace Epost.BLL
|
||||
{
|
||||
if (sku.Substring(0, 1) == "2")
|
||||
{
|
||||
|
||||
if (sku.Length >= 8)
|
||||
if (sku.Substring(1, 1) == "5")
|
||||
{
|
||||
if (sku.Length >= 7)
|
||||
{
|
||||
sku = sku.Substring(0, 8);
|
||||
sku = sku.Substring(2, 6);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
if (sku.Length >= 7)
|
||||
{
|
||||
sku = sku.Substring(1, 6);
|
||||
}
|
||||
}
|
||||
return dal.GetSkuInfo(sku);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
return dal.GetSkuInfoList(sku);
|
||||
}
|
||||
|
||||
|
@ -1,276 +0,0 @@
|
||||
using Epost.Common;
|
||||
using Epost.DAL.Cache;
|
||||
using Epost.DAL.Enum;
|
||||
using Epost.Model;
|
||||
using Epost.Model.resource;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using System.Threading;
|
||||
|
||||
|
||||
namespace Epost.BLL
|
||||
{
|
||||
public class Work_DisplayJobThread
|
||||
{
|
||||
public string tblock, id;
|
||||
public bool OrisShow = false;
|
||||
OrderBLL orderbll = new OrderBLL();
|
||||
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
||||
CommandBLL comBLL = new CommandBLL();
|
||||
JobModelCacheDAL JobCache = new JobModelCacheDAL();
|
||||
|
||||
AddressstorageBLL addrBLL = new AddressstorageBLL();
|
||||
WorkIngCacheDAL workbll = new WorkIngCacheDAL();
|
||||
public void Displayjob()
|
||||
{
|
||||
GetWorkList(tblock);
|
||||
}
|
||||
|
||||
|
||||
#region 获取订单信息
|
||||
private void GetWorkList(object block)
|
||||
{
|
||||
string cm = "";
|
||||
cm = "lockdisJob" + block;
|
||||
object c = (Object)cm;
|
||||
lock (c)
|
||||
{
|
||||
while (OrisShow)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
string workstate = workbll.GetWorkState();
|
||||
if (!string.IsNullOrEmpty(workstate))
|
||||
{
|
||||
OrisShow = true;
|
||||
DisplayJob_M(block.ToString());
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
else
|
||||
{
|
||||
OrisShow = false;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":程序异常!\r\n" + ex.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
#region 标签控制M系列
|
||||
public void DisplayJob_M(string tblock)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
string[] nlist = tblock.Split('|');
|
||||
string nblock = nlist[0];
|
||||
string shelfid = nlist[1];
|
||||
List<AddressstorageModel> Arealist = addrBLL.GetAreaList(nblock, shelfid);
|
||||
foreach (AddressstorageModel item in Arealist)
|
||||
{
|
||||
OrdersQueueModel model = new OrdersQueueModel(); ;
|
||||
model.Taskarea = item.area;
|
||||
model.Taskblock = nblock;
|
||||
#region 开始作业
|
||||
DataTable queueDT = queueBLL.getQueueOrderState(model);
|
||||
if (queueDT != null && queueDT.Rows.Count > 0)
|
||||
{
|
||||
//当前区没有作业
|
||||
if (queueDT.Rows[0]["state"].ToString() == "0")
|
||||
{
|
||||
#region 点亮显示器
|
||||
ShowMessageModel_M showmodel = new ShowMessageModel_M();
|
||||
showmodel.Area = shelfid;
|
||||
showmodel.Block = nblock;
|
||||
showmodel.Color = queueDT.Rows[0]["lightcolor"].ToString();//EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
showmodel.Title = queueDT.Rows[0]["Shopid"].ToString();
|
||||
showmodel.Islock = true;
|
||||
showmodel.IsTwinkle = 0;
|
||||
showmodel.Type = 8;
|
||||
|
||||
DataTable skudt = orderbll.GetSumList(queueDT.Rows[0]["matchid"].ToString(), queueDT.Rows[0]["sku"].ToString(), nblock, shelfid);
|
||||
|
||||
if (queueDT.Rows[0]["lightcolor"].ToString() == "1")
|
||||
{
|
||||
showmodel.Islock = false;
|
||||
}
|
||||
else if (queueDT.Rows[0]["lightcolor"].ToString() == EnumHelper.EMToDescriptionString(LightColor.Color.Blue))
|
||||
{
|
||||
//复核显示
|
||||
skudt = orderbll.GetSumList_Echo(queueDT.Rows[0]["matchid"].ToString(), queueDT.Rows[0]["sku"].ToString(), nblock, shelfid);
|
||||
showmodel.Title = "回显:"+queueDT.Rows[0]["Shopid"].ToString();
|
||||
}
|
||||
|
||||
if (skudt != null && skudt.Rows.Count > 0)
|
||||
{
|
||||
showmodel.Qty = skudt.Rows[0]["SumQuantity"].ToString();
|
||||
int discount = Convert.ToInt32(skudt.Rows[0]["discount"].ToString());
|
||||
//整件总数
|
||||
int SumCkQuantity = 0;//= Convert.ToInt32(skudt.Rows[0]["SumCkQuantity"].ToString());
|
||||
//散件总数
|
||||
int SumQuantity = Convert.ToInt32(skudt.Rows[0]["SumQuantity"].ToString());
|
||||
int zcount = Convert.ToInt32(skudt.Rows[0]["SumQuantity"].ToString());
|
||||
if (discount != 1)
|
||||
{
|
||||
if (SumQuantity >= discount)
|
||||
{
|
||||
|
||||
SumCkQuantity = SumQuantity / discount;
|
||||
SumQuantity = SumQuantity % discount;
|
||||
}
|
||||
}
|
||||
showmodel.Qty = SumQuantity.ToString();
|
||||
showmodel.Wholeqty = SumCkQuantity;
|
||||
showmodel.Unit = "件";
|
||||
showmodel.Wholeunit = "箱";
|
||||
showmodel.Contents = queueDT.Rows[0]["sku"].ToString() + "\r规格: " + discount + " \r总数量:" + zcount; ;
|
||||
}
|
||||
comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签
|
||||
#endregion
|
||||
displayOrder(queueDT, nblock, item.area, model);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("标签控制异常:" + ex.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 点亮设备
|
||||
public void displayOrder(DataTable queueDT, string nblock, string narea, OrdersQueueModel model)
|
||||
{
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
model.Id = Convert.ToInt32(queueDT.Rows[0]["id"].ToString());
|
||||
#region 点亮任务
|
||||
List<JobModel> jobList = JobCache.GetPlanJobList();
|
||||
List<JobModel> isJobList = jobList.FindAll(p => p.Block == nblock && p.Area == narea && p.State != 3);
|
||||
ShowMessageModel showmodel = new ShowMessageModel();
|
||||
//获取当前区任务并加入缓存
|
||||
if (!isJobList.Any())
|
||||
{
|
||||
model.State = 1;
|
||||
orderbll.GetOrderList(queueDT.Rows[0]["matchid"].ToString(), nblock, queueDT.Rows[0]["sku"].ToString(), narea, queueDT.Rows[0]["usercode"].ToString());
|
||||
List<JobModel> nowJoblist = jobList.FindAll(p => p.State == 0 && p.Block == model.Taskblock && p.Area == model.Taskarea);
|
||||
if (nowJoblist.Any())
|
||||
{
|
||||
var nowmodel = nowJoblist.FirstOrDefault();
|
||||
|
||||
LogHelper.WriteLogInfo("进入任务点亮=====matchid=" + nowmodel.Matchid + "===orderid===" + nowmodel.OrderID + "=====sku==" + nowmodel.Sku + "========");
|
||||
#region 点亮任务标签
|
||||
foreach (JobModel item in nowJoblist.ToArray())
|
||||
{
|
||||
|
||||
#region 回显设备锁定
|
||||
if (queueDT.Rows[0]["lightcolor"].ToString() == EnumHelper.EMToDescriptionString(LightColor.Color.Blue))
|
||||
{
|
||||
|
||||
LabelParamModel locklamodel = new LabelParamModel();
|
||||
locklamodel.Address = item.Address.ToString();
|
||||
locklamodel.ControlIP = item.ControlIP.ToString();
|
||||
locklamodel.Command = "LOCK";
|
||||
locklamodel.Parameter = "11111000";
|
||||
locklamodel.Type = "N";
|
||||
list.Add(locklamodel);
|
||||
|
||||
}
|
||||
#endregion
|
||||
// else
|
||||
//{
|
||||
|
||||
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
|
||||
lamodel.Type = "N";
|
||||
lamodel.Quantity = quantity.ToString();
|
||||
lamodel.Uid = "U" + 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)
|
||||
{
|
||||
LogHelper.WriteLogInfo("添加到点亮的list————————:" + list.Count);
|
||||
comBLL.DISPLAY_JOBALL(list);
|
||||
}
|
||||
}
|
||||
else
|
||||
{//无任务
|
||||
LogHelper.WriteLogInfo("点亮====无任务=======================");
|
||||
model.State = 3;
|
||||
}
|
||||
#endregion
|
||||
if (jobList.Any())
|
||||
{
|
||||
|
||||
var finishList = jobList.FindAll(p => p.State == 0);
|
||||
if (!finishList.Any())
|
||||
{
|
||||
queueBLL.UpdateQueueOrderState(model);//缓存队列状态修改
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
LogHelper.WriteLogInfo("还有未完成任务" + isJobList.Count);
|
||||
foreach (JobModel item in isJobList)
|
||||
{
|
||||
LogHelper.WriteLogInfo("还有未完成任务" + item.Address + item.ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,673 +0,0 @@
|
||||
using Epost.Common;
|
||||
using Epost.DAL.Cache;
|
||||
using Epost.DAL.Enum;
|
||||
using Epost.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Epost.BLL
|
||||
{
|
||||
public class Work_JobDownThread
|
||||
{
|
||||
public string tblock, id;
|
||||
public bool OrisShow = false;
|
||||
OrderBLL orderbll = new OrderBLL();
|
||||
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
||||
CommandBLL comBLL = new CommandBLL();
|
||||
JobModelCacheDAL JobCache = new JobModelCacheDAL();
|
||||
JobDownCacheDAL downCacheDAL = new JobDownCacheDAL();
|
||||
AddressstorageBLL addrBLL = new AddressstorageBLL();
|
||||
UserModelCacheDAL UserCacheDAL = new UserModelCacheDAL();
|
||||
SkuInfoBLL skuBLL = new SkuInfoBLL();
|
||||
ShowMesCacheDAL msgCache = new ShowMesCacheDAL();
|
||||
private static object lockJobDown = new object();
|
||||
private static object showmes = new object();
|
||||
|
||||
WorkIngCacheDAL workbll = new WorkIngCacheDAL();
|
||||
public void Work()
|
||||
{
|
||||
BackWorkList(tblock);
|
||||
}
|
||||
|
||||
#region 获取订单信息
|
||||
private void BackWorkList(object block)
|
||||
{
|
||||
|
||||
string cm = "";
|
||||
cm = "lockJobDown" + block;
|
||||
object c = (Object)cm;
|
||||
lock (c)
|
||||
{
|
||||
while (OrisShow)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
string workstate = workbll.GetWorkState();
|
||||
if (!string.IsNullOrEmpty(workstate))
|
||||
{
|
||||
OrisShow = true;
|
||||
Job_Down(block.ToString());
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
else
|
||||
{
|
||||
OrisShow = false;
|
||||
}
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":程序异常!\r\n" + ex.Message);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region 标签拍下
|
||||
public void Job_Down(string tblock)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] nlist = tblock.Split('|');
|
||||
string nblock = nlist[0];
|
||||
string shelfid = nlist[1];
|
||||
List<AddressstorageModel> Arealist = addrBLL.GetAreaList(nblock, shelfid);
|
||||
foreach (AddressstorageModel item in Arealist)
|
||||
{
|
||||
List<ResultMessageModel> downList = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Status == "0" && m.Block == nblock && m.Area == item.area&&m.Command== "JOB_DONE");
|
||||
List<JobModel> jobList = JobCache.GetPlanJobList().FindAll(p => p.Block == nblock && p.Area == item.area);
|
||||
|
||||
if (downList != null && downList.Count > 0)
|
||||
{
|
||||
foreach (ResultMessageModel data in downList.ToArray())
|
||||
{
|
||||
LogHelper.WriteLogInfo("完成绑定箱号开始作业==============");
|
||||
Work_JobDown(data, jobList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("标签拍下异常:" + ex.Message);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//作业中
|
||||
public void Work_JobDown(ResultMessageModel data, List<JobModel> jobList)
|
||||
{
|
||||
lock (lockJobDown)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
switch (data.Command)
|
||||
{
|
||||
|
||||
case "JOB_DONE":
|
||||
JobDown_M(data, jobList);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("Work_JobDown标签拍下异常:" + ex.Message);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
//绑箱中
|
||||
|
||||
#endregion
|
||||
|
||||
#region 设备拍下处理
|
||||
public void JobDown_M(ResultMessageModel data, List<JobModel> jobList)
|
||||
{
|
||||
|
||||
//获取标签所在区
|
||||
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||
string area = data.Area;
|
||||
string block = data.Block;
|
||||
string way = data.Way;
|
||||
string type = data.Type;
|
||||
string orderid = string.Empty;
|
||||
string skulist = string.Empty;
|
||||
qmodel.Taskarea = area;
|
||||
qmodel.Taskblock = block;
|
||||
List<JobModel> endjoblist = jobList.FindAll(m => m.Block == block && m.Area == area && (m.State == 1 || m.State == 0));
|
||||
List<JobModel> job = jobList.FindAll(m => m.Block == block && m.Area == area && (m.State == 1 || m.State == 0) && m.Address == data.Address && m.ControlIP == data.IP);
|
||||
List<JobModel> finjob = jobList.FindAll(m => m.Block == block && m.Area == area && (m.State == 3) && m.Address == data.Address && m.ControlIP == data.IP);
|
||||
|
||||
if (finjob.Any())
|
||||
{
|
||||
JobModel finmodel = finjob.FirstOrDefault();
|
||||
qmodel.UserCode = finmodel.UserCode;
|
||||
qmodel.Sku = finmodel.Sku;
|
||||
qmodel.Matchid = finmodel.Matchid;
|
||||
|
||||
}
|
||||
DataTable queueDT = queueBLL.getQueueOrderState(qmodel);
|
||||
if (queueDT != null && queueDT.Rows.Count > 0)
|
||||
{
|
||||
skulist = queueDT.Rows[0]["sku"].ToString();
|
||||
LogHelper.WriteLogInfo("=======" + qmodel.UserCode + "=====" + area + "区===sku=" + skulist);
|
||||
}
|
||||
|
||||
if (type == "8")// 订单显示器熄灭回显设备
|
||||
{
|
||||
LogHelper.WriteLogInfo("显示器拍下");
|
||||
List<JobModel> rejob = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 1 && m.Sku == queueDT.Rows[0]["sku"].ToString()&&m.ColorCode=="1");
|
||||
|
||||
if (rejob.Any())
|
||||
{
|
||||
LogHelper.WriteLogInfo("显示器拍下=="+rejob.Count);
|
||||
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);
|
||||
|
||||
#endregion
|
||||
}
|
||||
#region 清除当前区已做完的sku
|
||||
JobCache.UpdateJobModelList(rejob, EcommendType.Execute);
|
||||
#endregion
|
||||
}
|
||||
else if (data.Result == "4")//■按键拍下
|
||||
{
|
||||
data.Parameter = "0";
|
||||
jobdown_start(data, job, block, area, jobList);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo("JOB_DOWN开始~~~~~~~~~~~~~~~~");
|
||||
if (type != "2" && type != "8")//非显示器拍下
|
||||
{
|
||||
jobdown_start(data, job, block, area, jobList);
|
||||
}
|
||||
}
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 标签拍下
|
||||
|
||||
public void jobdown_start(ResultMessageModel data, List<JobModel> job, string block, string area, List<JobModel> jobList)
|
||||
{
|
||||
int truequantity = 0;
|
||||
int checkquantity = 0;
|
||||
string scanstr = data.Parameter;
|
||||
if (!string.IsNullOrEmpty(scanstr))
|
||||
{
|
||||
truequantity = Convert.ToInt32(scanstr);
|
||||
}
|
||||
if (job.Any())
|
||||
{
|
||||
List<JobModel> downlist = new List<JobModel>();
|
||||
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);
|
||||
// }
|
||||
//修改订单状态
|
||||
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
||||
LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
||||
bool skuInish = orderbll.IsFinishWork(1, block, "", area, model.Sku,"", model.Matchid);
|
||||
model.State = 3;
|
||||
if (skuInish)
|
||||
{
|
||||
LogHelper.WriteLogInfo("区SKU拣选完成--------------");
|
||||
//删除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);
|
||||
}
|
||||
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "分播完成";
|
||||
show.Contents = "请扫描继续作业";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||
show.Type = 8;
|
||||
show.Block = block;
|
||||
show.Area = area;
|
||||
show.Islock = false;
|
||||
show.IsTwinkle = 1;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
#endregion
|
||||
|
||||
#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
|
||||
|
||||
|
||||
|
||||
Thread.Sleep(30);
|
||||
#region 整条通道当前用户所有任务分播结束
|
||||
//bool blockfinish = orderbll.IsFinishWorkByCar(1, model.Matchid, block);
|
||||
//if (blockfinish)
|
||||
//{
|
||||
// #region 点亮显示器
|
||||
|
||||
// show.Title = "当前波次分播完成";
|
||||
// show.Contents = "拍下熄灭所有设备\r请扫描继续作业";
|
||||
// show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||
// show.Qty = "0";
|
||||
// show.Type = 8;
|
||||
// show.Block = block;
|
||||
// show.Islock = false;
|
||||
// show.IsTwinkle = 1;
|
||||
|
||||
// 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);
|
||||
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region sku播完回传
|
||||
bool skubo = orderbll.IsSkuFinishWork(model.Sku, model.Matchid);
|
||||
if (skubo)
|
||||
{
|
||||
LogHelper.WriteLogInfo(model.Sku + "Sku播种完成" + model.Matchid);
|
||||
orderbll.UpdateStateByCar(model.Matchid, model.Sku);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 清除当前区已做完的sku
|
||||
JobCache.UpdateJobModelList(offList, EcommendType.Execute);
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
#region 中分
|
||||
|
||||
public void zhongfenBind(List<UserCodeModel> ulist, string scanStr, ResultMessageModel data)
|
||||
{
|
||||
|
||||
//if (ulist.Any())
|
||||
//{
|
||||
// UserCodeModel usermodel = ulist.FirstOrDefault();
|
||||
//if (string.IsNullOrEmpty(usermodel.ZfCode) && scanStr.Substring(0, 1) != "U")//
|
||||
//{
|
||||
// #region 提示先扫描工号
|
||||
// ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
// show.Title = "请先扫描工号!";
|
||||
// show.Contents = "";
|
||||
// show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
// show.Block = sblock;
|
||||
// show.Type =2;
|
||||
// show.Area = sarea;
|
||||
// show.Islock = true;
|
||||
// comBLL.ShowBoxMessage_M(show);
|
||||
// downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
// #endregion
|
||||
//}
|
||||
//else {
|
||||
|
||||
if (scanStr.Substring(0, 1) == "U")
|
||||
{
|
||||
#region 扫描工号
|
||||
if (ulist.Any())
|
||||
{
|
||||
UserCodeModel umodel = ulist.FirstOrDefault();
|
||||
umodel.ZfCode = scanStr;
|
||||
#region 扫描工号
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "请扫描sku开始作业!";
|
||||
show.Contents = "";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = data.Block;
|
||||
show.Area = data.Area;
|
||||
show.Type = 2;
|
||||
show.Islock = true;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
#endregion
|
||||
}
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
#endregion
|
||||
}
|
||||
else
|
||||
{
|
||||
#region 中分扫描sku
|
||||
|
||||
DataTable sinfodt = skuBLL.GetSkuInfoList(data.Parameter);
|
||||
//string location = string.Empty;
|
||||
if (sinfodt != null && sinfodt.Rows.Count > 0)
|
||||
{
|
||||
scanStr = sinfodt.Rows[0]["sku"].ToString();
|
||||
// location = data.Parameter;// sinfodt.Rows[0]["tolocation"].ToString();
|
||||
}
|
||||
LogHelper.WriteLogInfo("中分" + data.Parameter + "===SKU" + scanStr);
|
||||
List<AddressstorageModel> Arealist = addrBLL.GetAreaList();
|
||||
if (Arealist.Any())
|
||||
{
|
||||
foreach (AddressstorageModel item in Arealist)
|
||||
{
|
||||
DataTable skudt = orderbll.GetSumList("", scanStr, item.block, item.area);
|
||||
if (skudt != null && skudt.Rows.Count > 0)
|
||||
{
|
||||
//规格
|
||||
int discount = Convert.ToInt32(skudt.Rows[0]["discount"].ToString());
|
||||
//整件总数
|
||||
int SumCkQuantity = 0;//= Convert.ToInt32(skudt.Rows[0]["SumCkQuantity"].ToString());
|
||||
//散件总数
|
||||
int SumQuantity = Convert.ToInt32(skudt.Rows[0]["SumQuantity"].ToString());
|
||||
//if (discount != 1)
|
||||
//{
|
||||
// if (SumQuantity >= discount)
|
||||
// {
|
||||
|
||||
// SumCkQuantity = SumQuantity / discount;
|
||||
// SumQuantity = SumQuantity % discount;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = skudt.Rows[0]["goodsname"].ToString();
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = item.block;
|
||||
show.Islock = true;
|
||||
show.Contents = data.Parameter + "(" + scanStr + ")\r";// + "规格:" + discount;
|
||||
show.Qty = SumQuantity.ToString();
|
||||
show.Wholeqty = SumCkQuantity;
|
||||
show.Unit = "件";
|
||||
show.Wholeunit = "箱";
|
||||
show.Type = 2;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "SKU" + scanStr + "未完纳!";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = item.block;
|
||||
show.Islock = true;
|
||||
show.Contents = "请扫描其他商品!";
|
||||
show.Type = 2;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
#region 订单显示器中分提示
|
||||
/// <summary>
|
||||
/// 订单显示器中分提示
|
||||
/// </summary>
|
||||
/// <param name="scanStr"></param>
|
||||
/// <param name="sblock"></param>
|
||||
/// <param name="sarea"></param>
|
||||
/// <param name="type">type=1查询整个通道block的汇总数量,type=2查询当前通道下某 一区area的汇总数量</param>
|
||||
/// <param name="data"></param>
|
||||
public void showSummaryMes(string scanStr, string sblock, string sarea, int type, ResultMessageModel data = null, string location = "", string matchid = "", bool islock = true)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
lock (showmes)
|
||||
{
|
||||
bool bo = orderbll.isTask(sblock, sarea);
|
||||
string msg = string.Empty;
|
||||
if (!bo)
|
||||
{
|
||||
msg = "当前商品无任务\r请送至下一区";
|
||||
}
|
||||
DataTable sudt = orderbll.GetSumList("", scanStr, sblock);
|
||||
if (type == 2)
|
||||
{
|
||||
sudt = orderbll.GetSumList("", scanStr, sblock, sarea);
|
||||
}
|
||||
//查询当前区任务队列
|
||||
DataTable qdt = queueBLL.getQueuesOrderbyState(sblock, sarea, "1");
|
||||
|
||||
|
||||
if (sudt != null && sudt.Rows.Count > 0)
|
||||
{
|
||||
matchid = sudt.Rows[0]["matchid"].ToString();
|
||||
string showqty = string.Empty;
|
||||
string showsku = string.Empty;
|
||||
List<ShowMesModel> msglist = msgCache.GetMsgList().FindAll(p => p.Block == sblock && p.Area == sarea && p.Matchid == matchid && p.Sku == scanStr);
|
||||
if (msglist.Any())
|
||||
{
|
||||
ShowMesModel showmodel = msglist.FirstOrDefault();
|
||||
showqty = showmodel.Qty;
|
||||
showsku = showmodel.Sku;
|
||||
}
|
||||
//////qdt.Rows[0]["sku"].ToString() 为null data.ScanCode
|
||||
|
||||
string sku = string.Empty;
|
||||
string qty = string.Empty;
|
||||
string color = string.Empty;
|
||||
if (qdt != null && qdt.Rows.Count > 0)
|
||||
{
|
||||
sku = qdt.Rows[0]["sku"].ToString();
|
||||
qty = sudt.Rows[0]["SumQuantity"].ToString();
|
||||
color = qdt.Rows[0]["LightColor"].ToString();
|
||||
|
||||
}
|
||||
//规格
|
||||
int discount = Convert.ToInt32(sudt.Rows[0]["discount"].ToString());
|
||||
//整件总数
|
||||
int SumCkQuantity = 0; //Convert.ToInt32(sudt.Rows[0]["SumCkQuantity"].ToString());
|
||||
//散件总数
|
||||
int SumQuantity = Convert.ToInt32(sudt.Rows[0]["SumQuantity"].ToString());
|
||||
//if (discount != 1)
|
||||
//{
|
||||
// if (SumQuantity >= discount)
|
||||
// {
|
||||
// SumCkQuantity = SumQuantity / discount;
|
||||
// SumQuantity = SumQuantity % discount;
|
||||
// }
|
||||
//}
|
||||
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = sudt.Rows[0]["goodsname"].ToString();
|
||||
string mes = "拣货任务";
|
||||
|
||||
if (qdt != null && qdt.Rows.Count > 0)
|
||||
{
|
||||
show.Contents = qdt.Rows[0]["location"].ToString() + "(" + scanStr + ")" + "\r" + mes;//sudt.Rows[0]["goodscode"].ToString().Replace(';','\r');
|
||||
}
|
||||
if (data != null)
|
||||
{
|
||||
show.Contents = data.ScanCode + "(" + scanStr + ")" + "\r" + mes;// sudt.Rows[0]["goodscode"].ToString().Replace(';', '\r');
|
||||
sku = data.Parameter;
|
||||
}
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||
show.Qty = SumQuantity.ToString();
|
||||
|
||||
show.Wholeqty = SumCkQuantity;
|
||||
show.Unit = "件";
|
||||
show.Type = 8;
|
||||
show.Wholeunit = "箱";
|
||||
show.Block = sblock;
|
||||
show.Area = sarea;
|
||||
show.Islock = islock;
|
||||
ShowMesModel megmodel = new ShowMesModel();
|
||||
megmodel.Qty = sudt.Rows[0]["SumQuantity"].ToString();
|
||||
megmodel.Sku = sku;
|
||||
megmodel.Area = sarea;
|
||||
megmodel.Block = sblock;
|
||||
megmodel.Matchid = matchid;
|
||||
|
||||
msgCache.UpdateMsgModelList(new List<ShowMesModel> { megmodel }, EmsgCommend.Create);
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
|
||||
if (data != null)
|
||||
{
|
||||
|
||||
data.Status = "1";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//查询当前区任务队列
|
||||
DataTable finshqdt = queueBLL.getQueuesOrderbyState(sblock, sarea, "3");
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
//根据sku获取商品名称
|
||||
string goodsname = orderbll.GetGoodsname(location);
|
||||
show.Title = goodsname + "分播完成";
|
||||
show.Contents = scanStr + "\r请扫描继续作业";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||
show.Qty = "0";
|
||||
show.Type = 8;
|
||||
show.Block = sblock;
|
||||
show.Area = sarea;
|
||||
show.Islock = true;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("刷新显示器异常:" + ex.Message);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 查询波次通道列表
|
||||
public void GetMatchOrder()
|
||||
{
|
||||
DataTable dt = orderbll.GetMatchOrder();
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
ShowMatchMessage(item["matchid"].ToString(), item["workblock"].ToString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 显示波次信息
|
||||
public void ShowMatchMessage(string scanStr, string sblock)
|
||||
{
|
||||
DataTable areadt = orderbll.GetAreaByMatch(scanStr, sblock);
|
||||
if (areadt != null && areadt.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow item in areadt.Rows)
|
||||
{
|
||||
UserCodeModel umodel = new UserCodeModel();
|
||||
umodel.Matchid = scanStr;
|
||||
umodel.Block = item["block"].ToString();
|
||||
umodel.Area = item["area"].ToString();
|
||||
UserCacheDAL.UpdateUserCodeList(new List<UserCodeModel> { umodel }, EUserCommend.Create);
|
||||
|
||||
//提示扫工号
|
||||
ShowMessageModel_M xshow = new ShowMessageModel_M();
|
||||
xshow.Title = "请扫描工号/SKU开始作业";
|
||||
xshow.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
xshow.Block = item["block"].ToString();
|
||||
xshow.Area = item["area"].ToString();
|
||||
// xshow.Area = sarea;
|
||||
xshow.Type = 8;
|
||||
xshow.Islock = true;
|
||||
comBLL.ShowBoxMessage_M(xshow);
|
||||
}
|
||||
}
|
||||
DataTable sumlist = orderbll.GetMatchSumList(scanStr, sblock);
|
||||
if (sumlist != null && sumlist.Rows.Count > 0)
|
||||
{
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "波次号:" + scanStr;
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = sblock;
|
||||
show.Type = 2;
|
||||
show.Islock = true;
|
||||
// string qty = ConvertHexHelper.ConvertString(sumlist.Rows[0]["incompleteCount"].ToString(), 10, 16); //拣货数量
|
||||
show.Qty = sumlist.Rows[0]["incompleteCount"].ToString();
|
||||
show.Location = sumlist.Rows[0]["completeCount"].ToString();
|
||||
show.Contents = "SKU总数:" + sumlist.Rows[0]["completeCount"].ToString() + "\rSKU待播数:" + sumlist.Rows[0]["incompleteCount"].ToString();
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
|
||||
// downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,581 +0,0 @@
|
||||
using Epost.Common;
|
||||
using Epost.DAL.Cache;
|
||||
using Epost.DAL.Enum;
|
||||
using Epost.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Epost.BLL
|
||||
{
|
||||
public class Work_ScanThread
|
||||
{
|
||||
public string tblock, id;
|
||||
public bool OrisShow = false;
|
||||
OrderBLL orderbll = new OrderBLL();
|
||||
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
||||
CommandBLL comBLL = new CommandBLL();
|
||||
JobDownCacheDAL downCacheDAL = new JobDownCacheDAL();
|
||||
JobModelCacheDAL JobCache = new JobModelCacheDAL();
|
||||
AddressstorageBLL addrBLL = new AddressstorageBLL();
|
||||
private static object lockscanList = new object();
|
||||
public static bool OrcheckisShow = false;
|
||||
WorkIngCacheDAL workbll = new WorkIngCacheDAL();
|
||||
SkuInfoBLL skuBLL = new SkuInfoBLL();
|
||||
UserModelCacheDAL UserCacheDAL = new UserModelCacheDAL();
|
||||
public void ScanList()
|
||||
{
|
||||
GetScanList(tblock);
|
||||
}
|
||||
|
||||
#region 获取扫描信息
|
||||
private void GetScanList(object block)
|
||||
{
|
||||
string job = "";
|
||||
job = "lockScan" + block;
|
||||
object cJob = (object)job;
|
||||
lock (cJob)
|
||||
{
|
||||
while (OrisShow)
|
||||
{
|
||||
try
|
||||
{
|
||||
string workstate = workbll.GetWorkState();
|
||||
if (!string.IsNullOrEmpty(workstate))
|
||||
{
|
||||
OrisShow = true;
|
||||
JobScanList(block.ToString());
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
else
|
||||
{
|
||||
OrisShow = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":ScanList异常!\r\n" + ex.Message);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 扫描处理
|
||||
public ResultModel JobScanList(string tblock)
|
||||
{
|
||||
lock (lockscanList)
|
||||
{
|
||||
string[] nlist = tblock.Split('|');
|
||||
string nblock = nlist[0];
|
||||
string shelfid = nlist[1];
|
||||
|
||||
ResultModel resmodel = new ResultModel();
|
||||
resmodel.result = "0";
|
||||
try
|
||||
{
|
||||
List<AddressstorageModel> Arealist = addrBLL.GetAreaList(nblock, shelfid);
|
||||
foreach (AddressstorageModel item in Arealist)
|
||||
{
|
||||
List<ResultMessageModel> sacnList = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Status == "0" && m.Block == item.block && m.Area == item.area && m.Command == "QUERY_SPECIAL_STATUS");
|
||||
if (sacnList != null && sacnList.Count > 0)
|
||||
{
|
||||
foreach (ResultMessageModel data in sacnList.ToArray())
|
||||
{
|
||||
|
||||
switch (data.Command)
|
||||
{
|
||||
case "QUERY_SPECIAL_STATUS":
|
||||
BindJobList(data);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return resmodel;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
resmodel.result = "-1";
|
||||
resmodel.msg = "扫描异常";
|
||||
LogHelper.WriteLogInfo("扫描异常:" + ex.Message);
|
||||
return resmodel;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 扫描处理
|
||||
|
||||
public ResultModel BindJobList(ResultMessageModel data)
|
||||
{
|
||||
ResultModel res = new ResultModel();
|
||||
res.result = "0";
|
||||
try
|
||||
{
|
||||
string sblock = data.Block;
|
||||
string scanStr = data.Parameter.Trim();
|
||||
string sarea = data.Area;
|
||||
string name = string.Empty;
|
||||
string matchid = string.Empty;
|
||||
#region 提示请扫描波次号
|
||||
List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == sblock && m.Area == sarea);//
|
||||
bool isnum = ConvertHexHelper.IsNum(scanStr.Substring(0, 1));//判断扫描首字母是否是数字
|
||||
|
||||
if (!ulist.Any())
|
||||
{
|
||||
//手动加波次信息
|
||||
DataTable matdt = orderbll.GetMatchOrderList();
|
||||
if (matdt != null && matdt.Rows.Count > 0)
|
||||
{
|
||||
UserCodeModel umodel = new UserCodeModel();
|
||||
umodel.Matchid = matdt.Rows[0]["matchid"].ToString();
|
||||
umodel.Block = sblock;
|
||||
umodel.Area = sarea;
|
||||
UserCacheDAL.UpdateUserCodeList(new List<UserCodeModel> { umodel }, EUserCommend.Create);
|
||||
}
|
||||
}
|
||||
ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == sblock && m.Area == sarea);
|
||||
if (ulist.Any())
|
||||
{ matchid = ulist.FirstOrDefault().Matchid; }
|
||||
|
||||
#endregion
|
||||
if (data.Type == "5")//中分扫描枪
|
||||
{
|
||||
|
||||
zhongfenBind(ulist, scanStr, data);
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
}
|
||||
else if (data.Type == "6")//播种扫描枪
|
||||
{
|
||||
|
||||
xifenBind(ulist, scanStr, data, matchid, isnum);
|
||||
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
res.result = "-1";
|
||||
res.msg = "绑定任务异常";
|
||||
LogHelper.WriteLogInfo("绑定任务异常:" + ex.Message);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 中分
|
||||
|
||||
public void zhongfenBind(List<UserCodeModel> ulist, string scanStr, ResultMessageModel data)
|
||||
{
|
||||
|
||||
//if (ulist.Any())
|
||||
//{
|
||||
// UserCodeModel usermodel = ulist.FirstOrDefault();
|
||||
//if (string.IsNullOrEmpty(usermodel.ZfCode) && scanStr.Substring(0, 1) != "U")//
|
||||
//{
|
||||
// #region 提示先扫描工号
|
||||
// ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
// show.Title = "请先扫描工号!";
|
||||
// show.Contents = "";
|
||||
// show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
// show.Block = sblock;
|
||||
// show.Type =2;
|
||||
// show.Area = sarea;
|
||||
// show.Islock = true;
|
||||
// comBLL.ShowBoxMessage_M(show);
|
||||
// downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
// #endregion
|
||||
//}
|
||||
//else {
|
||||
|
||||
if (scanStr.Substring(0, 1) == "Y")
|
||||
{
|
||||
#region 扫描工号
|
||||
if (ulist.Any())
|
||||
{
|
||||
UserCodeModel umodel = ulist.FirstOrDefault();
|
||||
umodel.ZfCode = scanStr;
|
||||
#region 扫描工号
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "请扫描sku开始作业!";
|
||||
show.Contents = "";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = data.Block;
|
||||
show.Area = data.Area;
|
||||
show.Type = 2;
|
||||
show.Islock = true;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
#endregion
|
||||
}
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
#endregion
|
||||
}
|
||||
else
|
||||
{
|
||||
#region 中分扫描sku
|
||||
|
||||
DataTable sinfodt = skuBLL.GetSkuInfoList(data.Parameter);
|
||||
//string location = string.Empty;
|
||||
if (sinfodt != null && sinfodt.Rows.Count > 0)
|
||||
{
|
||||
scanStr = sinfodt.Rows[0]["sku"].ToString();
|
||||
// location = data.Parameter;// sinfodt.Rows[0]["tolocation"].ToString();
|
||||
}
|
||||
string matchid = string.Empty;
|
||||
if (ulist.Any())
|
||||
{ matchid = ulist.FirstOrDefault().Matchid; }
|
||||
LogHelper.WriteLogInfo("中分" + data.Parameter + "===SKU" + scanStr);
|
||||
DataTable skudt = orderbll.GetSumList(matchid, scanStr, data.Block);
|
||||
if (skudt != null && skudt.Rows.Count > 0)
|
||||
{
|
||||
//规格
|
||||
int discount = Convert.ToInt32(skudt.Rows[0]["discount"].ToString());
|
||||
//整件总数
|
||||
int SumCkQuantity = 0;//= Convert.ToInt32(skudt.Rows[0]["SumCkQuantity"].ToString());
|
||||
//散件总数
|
||||
int SumQuantity = Convert.ToInt32(skudt.Rows[0]["SumQuantity"].ToString());
|
||||
int zcount = Convert.ToInt32(skudt.Rows[0]["SumQuantity"].ToString());
|
||||
if (discount != 1)
|
||||
{
|
||||
if (SumQuantity >= discount)
|
||||
{
|
||||
|
||||
SumCkQuantity = SumQuantity / discount;
|
||||
SumQuantity = SumQuantity % discount;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = skudt.Rows[0]["goodsname"].ToString();
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = data.Block;
|
||||
show.Islock = true;
|
||||
show.Contents = data.Parameter + "(" + scanStr + ")\r" + "规格:" + discount + "\r总数量:" + zcount;
|
||||
show.Qty = SumQuantity.ToString();
|
||||
show.Wholeqty = SumCkQuantity;
|
||||
show.Unit = "件";
|
||||
show.Wholeunit = "箱";
|
||||
show.Type = 2;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "SKU" + scanStr + "未完纳!";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = data.Block;
|
||||
show.Islock = true;
|
||||
show.Contents = "请扫描其他商品!";
|
||||
show.Type = 2;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 细分播种
|
||||
public void xifenBind(List<UserCodeModel> ulist, string scanStr, ResultMessageModel data, string matchid, bool isnum)
|
||||
{
|
||||
//if (ulist.Any())
|
||||
//{
|
||||
// UserCodeModel usermodel = ulist.FirstOrDefault();
|
||||
//if (string.IsNullOrEmpty(usermodel.UserCode) && scanStr.Substring(0, 1) != "U")//
|
||||
//{
|
||||
// #region 提示先扫描工号
|
||||
// ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
// show.Title = "请先扫描工号!";
|
||||
// show.Contents = "";
|
||||
// show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
// show.Block = sblock;
|
||||
// show.Area = sarea;
|
||||
// show.Type = 8;
|
||||
// show.Islock = true;
|
||||
// comBLL.ShowBoxMessage_M(show);
|
||||
// downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
// #endregion
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
||||
if (scanStr.Substring(0, 1) == "Y")
|
||||
{
|
||||
#region 扫描工号
|
||||
if (ulist.Any())
|
||||
{
|
||||
UserCodeModel umodel = ulist.FirstOrDefault();
|
||||
umodel.UserCode = scanStr;
|
||||
#region 扫描工号
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "请扫描sku开始作业!";
|
||||
show.Contents = "";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = data.Block;
|
||||
show.Area = data.Area;
|
||||
show.Type = 8;
|
||||
show.Islock = true;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
#endregion
|
||||
}
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
#endregion
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
#region 扫描商品
|
||||
|
||||
List<ResultMessageModel> hangList = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Parameter == "888888");
|
||||
|
||||
if (hangList.Any())
|
||||
{
|
||||
|
||||
#region 挂起
|
||||
LogHelper.WriteLogInfo("挂起" + data.Parameter + "-------通道" + data.Block);
|
||||
// LabelParamModel FORMATEModel = new LabelParamModel();
|
||||
// FORMATEModel.ControlIP = data.IP;
|
||||
// comBLL.FORMATE_JOB_DATA(FORMATEModel);
|
||||
|
||||
|
||||
DataTable qdt = queueBLL.getQueuesOrderbyState(data.Block, data.Area, "1");
|
||||
if (qdt != null && qdt.Rows.Count > 0)
|
||||
{
|
||||
scanStr = qdt.Rows[0]["sku"].ToString();
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Block = data.Block;
|
||||
show.Area = data.Area;
|
||||
show.Type = 8;
|
||||
|
||||
comBLL.RemoveBoxMessage_M(show);
|
||||
// data.Parameter = scanStr;
|
||||
Hangup_SKU(scanStr, data.Block, data.Area,matchid);
|
||||
//删除sku对应缓存
|
||||
List<ResultMessageModel> sdown = downCacheDAL.GetPlanJobDownList().FindAll(p => p.Parameter == scanStr && p.Parameter == qdt.Rows[0]["sku"].ToString()&&p.Block == data.Block&&p.Area ==data.Area);
|
||||
downCacheDAL.UpdateJobDownModelList(sdown, EdownCommend.Execute);
|
||||
}
|
||||
downCacheDAL.UpdateJobDownModelList(hangList, EdownCommend.Execute);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
else if (isnum)//sku
|
||||
{
|
||||
#region 扫描SKU
|
||||
//根据扫描商品内码获取商品码
|
||||
data.ScanCode = data.Parameter;
|
||||
DataTable sinfodt = skuBLL.GetSkuInfoList(data.Parameter);
|
||||
string location = string.Empty;
|
||||
if (sinfodt != null && sinfodt.Rows.Count > 0)
|
||||
{
|
||||
scanStr = sinfodt.Rows[0]["sku"].ToString();
|
||||
location = data.Parameter;// sinfodt.Rows[0]["tolocation"].ToString();
|
||||
}
|
||||
data.Parameter = scanStr;
|
||||
DataTable skudt = queueBLL.GetOrderQueue(data.Block, data.Area, "3");
|
||||
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))
|
||||
{ //重复扫描
|
||||
//ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
//show.Title = scanStr + "重复扫描/已拣配!";
|
||||
//show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
//show.Block = sblock;
|
||||
//show.Area = sarea;
|
||||
//show.Type = 8;
|
||||
//comBLL.ShowBoxMessage_M(show);
|
||||
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)
|
||||
{
|
||||
|
||||
if (ulist.Any())
|
||||
{
|
||||
UserCodeModel umodel = ulist.FirstOrDefault();
|
||||
data.Port = OrderDt.Rows[0]["matchid"].ToString();
|
||||
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||
qmodel.Sku = scanStr;
|
||||
qmodel.Taskblock = data.Block;
|
||||
qmodel.Taskarea = data.Area;
|
||||
qmodel.UserCode = umodel.UserCode;
|
||||
qmodel.Matchid = umodel.Matchid;
|
||||
qmodel.Shopid = OrderDt.Rows[0]["GoodsName"].ToString();
|
||||
qmodel.Location = location;
|
||||
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
queueBLL.insertQueueOrders(qmodel);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo("未扫描波次信息", LogHelper.Log_Type.ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
#region 回显
|
||||
DataTable echoDt = orderbll.GetOrderList_echo(matchid, scanStr, data.Area, data.Block);
|
||||
if (echoDt != null && echoDt.Rows.Count > 0)
|
||||
{
|
||||
|
||||
if (ulist.Any())
|
||||
{
|
||||
UserCodeModel umodel = ulist.FirstOrDefault();
|
||||
data.Port = echoDt.Rows[0]["matchid"].ToString();
|
||||
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||
qmodel.Sku = scanStr;
|
||||
qmodel.Taskblock = data.Block;
|
||||
qmodel.Taskarea = data.Area;
|
||||
qmodel.UserCode = umodel.UserCode;
|
||||
qmodel.Matchid = umodel.Matchid;
|
||||
// qmodel.Location = location;
|
||||
qmodel.Shopid = echoDt.Rows[0]["GoodsName"].ToString();
|
||||
|
||||
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
||||
queueBLL.insertQueueOrders(qmodel);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo("未扫描波次信息", LogHelper.Log_Type.ERROR);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//提示无任务
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "商品:" + scanStr + "无任务!";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = data.Block;
|
||||
show.Area = data.Area;
|
||||
show.Type = 8;
|
||||
show.Islock = false;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SKU挂起/缺货
|
||||
public void Hangup_SKU(string sku, string block, string area,string matchid, ResultMessageModel data = null)
|
||||
{
|
||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||
//查询当前通道sku是否有任务
|
||||
DataTable dt = orderbll.getOrderListBysku(block, sku,area, matchid);
|
||||
//if (dt == null || dt.Rows.Count == 0)
|
||||
//{
|
||||
// dt = orderbll.getOrderHisListBysku(block, sku, area, matchid);
|
||||
// //回显挂起
|
||||
//}
|
||||
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
// 将当前通道所有sku正在亮的设备熄灭
|
||||
foreach (DataRow item in dt.Rows)
|
||||
{
|
||||
|
||||
LabelParamModel lamodel = new LabelParamModel();
|
||||
lamodel.Address = item["address"].ToString(); ;
|
||||
lamodel.ControlIP = item["ControlIP"].ToString();
|
||||
lamodel.Command = "REMOVE_JOB";
|
||||
lamodel.Parameter = "";
|
||||
lamodel.Uid = "U" + item["id"].ToString();
|
||||
lamodel.Type = "N";
|
||||
list.Add(lamodel);
|
||||
LabelParamModel Unlockmodel = new LabelParamModel();
|
||||
Unlockmodel.ControlIP = item["ControlIP"].ToString();
|
||||
Unlockmodel.Address = item["address"].ToString();
|
||||
Unlockmodel.Command = "UNLOCK";
|
||||
Unlockmodel.Type = "N";
|
||||
Unlockmodel.Parameter = "11111000";
|
||||
list.Add(Unlockmodel);
|
||||
if (item["oprationstate"].ToString() == "1")
|
||||
{
|
||||
orderbll.UpOrderStateBybat(item["id"].ToString());
|
||||
}
|
||||
}
|
||||
if (list != null && list.Count > 0)
|
||||
{
|
||||
LogHelper.WriteLogInfo("挂起list——" + sku + "——————————————————:" + list.Count);
|
||||
comBLL.DISPLAY_JOBALL(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//删除缓存中sku记录
|
||||
List<JobModel> jobList = JobCache.GetPlanJobList();
|
||||
List<JobModel> relist = jobList.FindAll(m => m.Sku == sku && m.Block == block&&m.Area==area);
|
||||
JobModel model = new JobModel();
|
||||
if (relist.Any())
|
||||
{
|
||||
model = relist.FirstOrDefault();
|
||||
JobCache.UpdateJobModelList(relist, EcommendType.Complete);
|
||||
//删除Orderqueue中sku的记录
|
||||
bool bo = queueBLL.DelQueueOrder(sku, block, area);
|
||||
LogHelper.WriteLogInfo("删除queue返回" + bo);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
||||
show.Title = "挂起商品:" + sku + "错误!";
|
||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
||||
show.Block = block;
|
||||
show.Area = area;
|
||||
show.Type = 8;
|
||||
show.Islock = true;
|
||||
comBLL.ShowBoxMessage_M(show);
|
||||
}
|
||||
//downCacheDAL.GetPlanJobDownList().FindAll(p => p.Parameter == sku && p.Block == block);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -133,16 +133,6 @@ namespace Epost.DAL
|
||||
return dt;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询控制器下所有标签地址
|
||||
public DataTable getLabelList(string controlid,string batchno)
|
||||
{
|
||||
string sql = string.Format(" select distinct address, state, type, ControlID,addresstype,isnull(shopid,'') as shopid,name,batchno from v_storeaddress where type in (1, 2, 8) and Controlid = '{0}' and batchno='{1}' ",
|
||||
controlid,batchno);
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
return dt;
|
||||
}
|
||||
#endregion
|
||||
#region 根据区域 查询显示箱号地址
|
||||
public DataTable getAddressByBlock(string block)
|
||||
{
|
||||
@ -175,7 +165,7 @@ namespace Epost.DAL
|
||||
{
|
||||
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,
|
||||
|
||||
type);
|
||||
@ -267,19 +257,13 @@ namespace Epost.DAL
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取所有小区
|
||||
public List<AddressstorageModel> GetAreaList(string block, string shelfid)
|
||||
public List<AddressstorageModel> GetAreaList(string block = "")
|
||||
{
|
||||
string strwhere = string.Empty;
|
||||
if (!string.IsNullOrEmpty(block))
|
||||
{
|
||||
strwhere += "and block ='" + block + "'";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(shelfid))
|
||||
{
|
||||
strwhere += "and shelfid ='" + shelfid + "'";
|
||||
strwhere = "and block ='" + block + "'";
|
||||
}
|
||||
string sql = string.Format("select area,block from Addressstorage where type=1 " + strwhere + " group by area,block");
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
@ -287,22 +271,6 @@ namespace Epost.DAL
|
||||
return ModelConvertHelper<AddressstorageModel>.ConvertToList(dt);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取所有小区
|
||||
public List<AddressstorageModel> GetshelfidList(string block)
|
||||
{
|
||||
string strwhere = string.Empty;
|
||||
if (!string.IsNullOrEmpty(block))
|
||||
{
|
||||
strwhere += "and block ='" + block + "'";
|
||||
}
|
||||
|
||||
string sql = string.Format("select shelfid,block from Addressstorage where type=1 " + strwhere + " group by shelfid,block");
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
|
||||
return ModelConvertHelper<AddressstorageModel>.ConvertToList(dt);
|
||||
}
|
||||
#endregion
|
||||
#region 获取所有通道
|
||||
public DataTable GetWayList()
|
||||
{
|
||||
|
@ -131,12 +131,12 @@ namespace Epost.DAL.Cache
|
||||
//{
|
||||
// PlanJobList.Remove(planitem);
|
||||
//}
|
||||
//List<JobModel> list = PlanJobList.FindAll(p => p.Block == JobParam.FirstOrDefault().Block);
|
||||
//foreach (JobModel item in list)
|
||||
//{
|
||||
// PlanJobList.Remove(item);
|
||||
//}
|
||||
JobParam.ForEach(m => PlanJobList.Remove(m));//删除计划任务
|
||||
List<JobModel> list = PlanJobList.FindAll(p => p.Block == JobParam.FirstOrDefault().Block);
|
||||
foreach (JobModel item in list)
|
||||
{
|
||||
PlanJobList.Remove(item);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,94 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Epost.DAL.Cache
|
||||
{
|
||||
public class WorkIngCacheDAL
|
||||
{
|
||||
private static object lockobj = new object();
|
||||
public static string workingstate = string.Empty;
|
||||
|
||||
|
||||
#region 获取计划任务列表
|
||||
public string GetWorkState()
|
||||
{
|
||||
|
||||
|
||||
|
||||
//读取数据库 处理异常断电等情况------待开发
|
||||
return workingstate;
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 初始化任务列表
|
||||
public void ClearWork()
|
||||
{
|
||||
|
||||
|
||||
workingstate = "";
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Job缓存处理方法
|
||||
/// <summary>
|
||||
/// Job缓存处理方法
|
||||
/// </summary>
|
||||
/// <param name="JobParam"></param>
|
||||
/// <param name="CommendType"></param>
|
||||
/// <returns></returns>
|
||||
public bool UpdateWorkModel(WorkEcommendType CommendType)
|
||||
{
|
||||
|
||||
lock (lockobj)
|
||||
{
|
||||
|
||||
if (CommendType.Equals(WorkEcommendType.Create))
|
||||
{
|
||||
workingstate = "Start";
|
||||
}
|
||||
|
||||
else if (CommendType.Equals(WorkEcommendType.Complete))
|
||||
{
|
||||
|
||||
workingstate = "";
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
public enum WorkEcommendType
|
||||
{
|
||||
/// <summary>
|
||||
/// 开始作业
|
||||
/// </summary>
|
||||
[Description("开始作业")]
|
||||
Create,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 结束作业
|
||||
/// </summary>
|
||||
[Description("结束作业")]
|
||||
Complete
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -111,7 +111,6 @@
|
||||
<Compile Include="Cache\ShowMesCacheDAL.cs" />
|
||||
<Compile Include="Cache\UserLoginCacheDAL.cs" />
|
||||
<Compile Include="Cache\UserModelCacheDAL.cs" />
|
||||
<Compile Include="Cache\WorkIngCacheDAL.cs" />
|
||||
<Compile Include="Cache\XgateCacheDAL.cs" />
|
||||
<Compile Include="CommandDAL.cs" />
|
||||
<Compile Include="DB.cs" />
|
||||
|
@ -48,7 +48,7 @@ namespace Epost.DAL
|
||||
string sql = string.Empty;
|
||||
if (!string.IsNullOrEmpty(area))
|
||||
{
|
||||
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, corlorcode, address, ControlIP,area, block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode,shopname from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + " order by layer,slist ",
|
||||
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,
|
||||
block, area);
|
||||
@ -56,7 +56,7 @@ namespace Epost.DAL
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, corlorcode, address, ControlIP, area , block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode ,shopname from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' " + strwhere + " order by layer,slist ",
|
||||
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,
|
||||
block);
|
||||
@ -90,7 +90,7 @@ namespace Epost.DAL
|
||||
string sql = string.Empty;
|
||||
if (!string.IsNullOrEmpty(area))
|
||||
{
|
||||
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, corlorcode, address, ControlIP,area, block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + " order by layer,slist ",
|
||||
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,
|
||||
block, area);
|
||||
@ -98,7 +98,7 @@ namespace Epost.DAL
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, corlorcode, address, ControlIP, area , block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where sku = '{0}' and block = '{1}' " + strwhere + " order by layer,slist ",
|
||||
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,
|
||||
block);
|
||||
@ -106,7 +106,7 @@ namespace Epost.DAL
|
||||
}
|
||||
|
||||
|
||||
LogHelper.WriteLogInfo("获取回显订单信息location-" + sql);
|
||||
LogHelper.WriteLogInfo("获取订单信息location-" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -158,7 +158,7 @@ namespace Epost.DAL
|
||||
strwhere += " and matchid = '" + matchid + "'";
|
||||
}
|
||||
|
||||
string sql = string.Format("select sum(Quantity) as SumQuantity, Sum(checkquantity) as SumCkQuantity, Discount,unit,wholeunit,matchid ,goodscode,goodsname from v_orders where sku='{0}' and oprationstate<>3 and block='{1}' " + strwhere + " group by sku, Discount,goodsname,unit,wholeunit,matchid ,goodscode",
|
||||
string sql = string.Format("select sum(Quantity) as SumQuantity, Sum(checkquantity) as SumCkQuantity,boxweight, Discount,unit,wholeunit,matchid ,goodscode,goodsname from v_orders where readtime= (select top 1 readtime from orders where state=0) and (oprationstate = 0 or oprationstate=1) and sku='{0}' and block='{1}' " + strwhere + " group by sku,boxweight, Discount,goodsname,unit,wholeunit,matchid ,goodscode",
|
||||
sku,
|
||||
block);
|
||||
LogHelper.WriteLogInfo("获取订单信息-中分" + sql);
|
||||
@ -189,17 +189,17 @@ namespace Epost.DAL
|
||||
strwhere += " and matchid = '" + matchid + "'";
|
||||
}
|
||||
|
||||
string sql = string.Format("select sum(Quantity) as SumQuantity, Sum(checkquantity) as SumCkQuantity, Discount,unit,wholeunit,matchid ,goodscode,goodsname from v_orders where sku='{0}' and oprationstate<>3 and block='{1}' " + strwhere +" group by sku, Discount,goodsname,unit,wholeunit,matchid ,goodscode",
|
||||
string sql = string.Format("select sum(Quantity) as SumQuantity, Sum(checkquantity) as SumCkQuantity,boxweight, Discount,goodsname,unit,wholeunit,matchid ,goodscode,goodsname from v_orders where state = 0 and oprationstate =3 and sku='{0}' and block='{1}' " + strwhere + " group by sku ,boxweight, Discount,goodsname,unit,wholeunit,matchid ,goodscode,goodsname",
|
||||
|
||||
sku,
|
||||
block);
|
||||
|
||||
LogHelper.WriteLogInfo("获取回显订单信息-中分" + sql);
|
||||
LogHelper.WriteLogInfo("获取订单信息-中分" + sql);
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("获取回显订单信息-中分异常:" + ex.Message, LogHelper.Log_Type.ERROR);
|
||||
LogHelper.WriteLogInfo("获取订单信息-中分异常:" + ex.Message, LogHelper.Log_Type.ERROR);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -485,7 +485,7 @@ namespace Epost.DAL
|
||||
sql = string.Format(" update orders set oprationstate=1,oprationtime='{0}' where matchid='{1}' and id='{2}'",
|
||||
DateTime.Now.ToString(),
|
||||
orderid,
|
||||
|
||||
|
||||
id);
|
||||
}
|
||||
else
|
||||
@ -529,12 +529,12 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#region 修改订单为未拣货订单--挂起使用
|
||||
public bool UpOrderStateBybat(string id)
|
||||
public bool UpOrderStateBybat(string batchid)
|
||||
{
|
||||
try
|
||||
{
|
||||
string sql = string.Format(" update orders set oprationstate=0,oprationtime='' where id='{0}' and state<>3",
|
||||
id);
|
||||
string sql = string.Format(" update orders set oprationstate=0,oprationtime='' where batchid='{0}' and state<>3",
|
||||
batchid);
|
||||
long x = db.UpdateSql(sql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
@ -646,7 +646,7 @@ 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 matchid='{2}' and id='{4}' ",
|
||||
DateTime.Now.ToString(),
|
||||
truequantity,
|
||||
matchid,
|
||||
@ -656,6 +656,7 @@ namespace Epost.DAL
|
||||
usercode
|
||||
);
|
||||
long x = db.UpdateSql(upsql);
|
||||
LogHelper.WriteLogInfo("修改当前标签拣货状态:" + upsql + ",成功条数:" + x + "");
|
||||
if (x > 0)
|
||||
return true;
|
||||
return false;
|
||||
@ -717,32 +718,30 @@ namespace Epost.DAL
|
||||
#endregion
|
||||
|
||||
#region 修改当前小车拣货状态
|
||||
public bool UpdateStateByCar(string matchid, string sku = "")
|
||||
public bool UpdateStateByCar(string matchid, string block = "", string sku = "")
|
||||
{
|
||||
try
|
||||
{
|
||||
string strwhere = string.Empty;
|
||||
|
||||
if (!string.IsNullOrEmpty(block))
|
||||
{
|
||||
strwhere = " and workblock='" + block + "'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(sku))
|
||||
{
|
||||
strwhere += " and sku='" + sku + "'";
|
||||
}
|
||||
string upsql = string.Format("insert into ordershis([id] ,[orderid] ,[sku],[matchid],[quantity],[tolocation],[batchid],[orderstate] ,[truequantity] ,[checkquantity] ,[downdate] ,[lighttime] ,[oprationtime] ,[oprationstate] ,[shopid] ,[classes] ,[oprationcode]\r\n ,[boxcode] ,[goodscode] ,[corlorcode] ,[discount] ,[barcode] ,[goodsname] ,[tasktype] ,[prino] ,[wmsboxcode] ,[orderway] ,[wmsorderid] ,[shopname] ,[state] ,[warehouseid] ,[workblock] ,[unit] ,[wholeunit] ) select [id],[orderid],[sku],[matchid],[quantity],[tolocation],[batchid],[orderstate],[truequantity],[checkquantity],[downdate],[lighttime],[oprationtime] ,[oprationstate],[shopid],[classes],[oprationcode],[boxcode],[goodscode],[corlorcode],[discount],[barcode],[goodsname],[tasktype] ,[prino],[wmsboxcode],[orderway],[wmsorderid],[shopname],[state],[warehouseid],[workblock],[unit],[wholeunit] from v_orders where matchid = '{0}'" + strwhere,
|
||||
string upsql = string.Format("update orders set state=3 where matchid = '{0}'" + strwhere,
|
||||
matchid);
|
||||
LogHelper.WriteLogInfo("加入历史:" + upsql);
|
||||
long x = db.InsertSql(upsql);
|
||||
LogHelper.WriteLogInfo("修改波次拣货状态:" + upsql);
|
||||
long x = db.UpdateSql(upsql);
|
||||
if (x > 0)
|
||||
{
|
||||
string sql = "update ordershis set state=3 where state=0";
|
||||
db.UpdateSql(sql);
|
||||
return true;
|
||||
}
|
||||
else { return false; }
|
||||
|
||||
return false;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("加入历史异常:" + ex.Message);
|
||||
LogHelper.WriteLogInfo("修改当前小车拣货状态:" + ex.Message);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1084,38 +1083,6 @@ namespace Epost.DAL
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 判断当前sku是否为已完成
|
||||
public bool IsSkuFinishWork( string sku , string matchid )
|
||||
{
|
||||
string strwheres = "";
|
||||
|
||||
if (!string.IsNullOrEmpty(matchid))
|
||||
{
|
||||
strwheres += " and matchid ='" + matchid + "'";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(sku))
|
||||
{
|
||||
strwheres += " and sku ='" + sku + "'";
|
||||
}
|
||||
string sql = "select matchid, sku from V_orders where oprationstate <> 3 and state<>99 " + strwheres;
|
||||
|
||||
LogHelper.WriteLogInfo("判断sku是否为已完成" + sql);
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
if (dt == null || dt.Rows.Count == 0)
|
||||
{
|
||||
LogHelper.WriteLogInfo("判断sku是否为已完成true");
|
||||
return true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.WriteLogInfo("判断sku是否为已完成false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询下一区段区号
|
||||
public int getOrderarea(string usercode, string block, string area)
|
||||
{
|
||||
@ -1279,28 +1246,15 @@ namespace Epost.DAL
|
||||
|
||||
|
||||
#region 查询sku对应的所有任务
|
||||
public DataTable getOrderListBysku(string block, string sku,string area, string matchid)
|
||||
public DataTable getOrderListBysku(string block, string sku)
|
||||
{
|
||||
string sql = string.Format("select * from v_orders where block = '{0}' and area='{1}' and sku ='{2}'and matchid ='{3}' order by layer,slist ",
|
||||
block,area,
|
||||
sku,matchid);
|
||||
string sql = string.Format("select * from v_orders where block = '{0}' and sku ='{1}' ",
|
||||
block,
|
||||
sku);
|
||||
LogHelper.WriteLogInfo("查询sku对应的所有任务:" + sql);
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
return dt;
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询sku对应的所有任务
|
||||
public DataTable getOrderHisListBysku(string block, string sku, string area,string matchid)
|
||||
{
|
||||
string sql = string.Format("select * from v_ordershis where block = '{0}' and area='{1}' and sku ='{2}' and matchid ='{3}' order by layer,slist ",
|
||||
block, area,
|
||||
sku,matchid);
|
||||
LogHelper.WriteLogInfo("查询sku对应的所有回显任务:" + sql);
|
||||
DataTable dt = db.GetsqlForDT(sql);
|
||||
return dt;
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region 查询退货单号查询所在区
|
||||
@ -2539,6 +2493,373 @@ namespace Epost.DAL
|
||||
}
|
||||
#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
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -290,10 +290,10 @@ 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}' "+ strwhere,
|
||||
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.Matchid,model.UserCode
|
||||
|
||||
);
|
||||
LogHelper.WriteLogInfo("修改作业区段"+sql);
|
||||
@ -354,10 +354,10 @@ namespace Epost.DAL
|
||||
|
||||
|
||||
#region 删除queue
|
||||
public bool DelQueueOrder(string sku,string block,string area)
|
||||
public bool DelQueueOrder(string sku,string block)
|
||||
{
|
||||
string sql = string.Format("delete from OrdersQueue where sku='{0}' and taskblock='{1}' and taskarea='{2}' and state<>3",
|
||||
sku,block,area);
|
||||
string sql = string.Format("delete from OrdersQueue where sku='{0}' and taskblock='{1}' and state<>3",
|
||||
sku,block);
|
||||
LogHelper.WriteLogInfo("删除queue"+sql);
|
||||
long x = db.DeleteSql(sql);
|
||||
if (x > 0)
|
||||
|
@ -29,8 +29,8 @@ namespace Epost.DAL
|
||||
// sku);
|
||||
//string sql = string.Format(" SELECT * FROM skuinfo WHERE (CHARINDEX('{0}',location)>0) or sku='{1}'",
|
||||
// sku, sku);
|
||||
string sql = string.Format(" SELECT * FROM skuinfo WHERE (CHARINDEX('{0}',location)>0) or sku='{1}'",
|
||||
sku, sku);
|
||||
string sql = string.Format(" SELECT * FROM skuinfo WHERE sku='{0}'",
|
||||
sku);
|
||||
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
|
@ -37,10 +37,4 @@ namespace Epost.Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BatchModel {
|
||||
string _batchno = string.Empty;
|
||||
|
||||
public string batchno { get => _batchno; set => _batchno = value; }
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ using Epost.Common;
|
||||
using System.Web.Helpers;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Epost.TestToolsWeb.Tests.Controllers
|
||||
{
|
||||
@ -20,16 +19,13 @@ namespace Epost.TestToolsWeb.Tests.Controllers
|
||||
[TestMethod]
|
||||
public void d()
|
||||
{
|
||||
string sku = "2509267236248";
|
||||
if (sku.Substring(0, 1) == "2")
|
||||
string sku = "211100";
|
||||
if (sku.Substring(0, 1) == "2" && sku.Substring(1, 1) != "5")
|
||||
{
|
||||
|
||||
if (sku.Length >= 8)
|
||||
if (sku.Length >= 7)
|
||||
{
|
||||
sku = sku.Substring(0, 8);
|
||||
sku = sku.Substring(1, 6);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,92 @@ namespace Epost.TestToolsWeb.Controllers
|
||||
ViewBag.isWork = isWork;
|
||||
return View();
|
||||
}
|
||||
|
||||
|
||||
#region 初始化
|
||||
public ActionResult ClearALL()
|
||||
{
|
||||
|
||||
bool result = false;
|
||||
isShow = true;
|
||||
try
|
||||
{
|
||||
|
||||
ResultModel resultModel = contrbll.ClearALL();
|
||||
return Json(new { Success = resultModel.result, Message = resultModel.msg });
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return Json(new { Success = result, Message = "失败" });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 开始作业
|
||||
|
||||
public ActionResult StartWork()
|
||||
{
|
||||
isShow = true;
|
||||
|
||||
contrbll.StartWork();
|
||||
isWork = 1;
|
||||
return Json(new { Success = true, Message = "成功" });
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 设备检测
|
||||
public ActionResult TestStart()
|
||||
{
|
||||
|
||||
ResultModel result = contrbll.TestStart();
|
||||
if (result.result == "1")
|
||||
{
|
||||
return Json(new { Success = result, Message = result.msg });
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(new { Success = result, Message = result.msg });
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 停止检测
|
||||
public ActionResult TestEnd()
|
||||
{
|
||||
contrbll.TestEnd();
|
||||
return Json(new { Success = true, Message = "成功" });
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 结束作业
|
||||
public ActionResult EndWork()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
isShow = false;
|
||||
isWork = 0;
|
||||
isClear = 0;
|
||||
contrbll.EndWork();
|
||||
return Json(new { Success = true, Message = "成功" });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("结束作业异常" + ex.Message);
|
||||
return Json(new { Success = false, Message = "失败" });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -104,21 +104,21 @@ namespace Epost.DPS.Controllers
|
||||
#region 设备检测
|
||||
[Route("TestStart")]
|
||||
[HttpPost]
|
||||
public ResultModel TestStart(BatchModel model)
|
||||
public ResultModel TestStart()
|
||||
{
|
||||
lock (lockinit)
|
||||
{
|
||||
ResultModel res = new ResultModel();
|
||||
try
|
||||
{
|
||||
ResultModel result = contrbll.TestStart(model.batchno);
|
||||
ResultModel result = contrbll.TestStart();
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.WriteLogInfo("TestStart异常:" + ex.Message);
|
||||
LogHelper.WriteLogInfo("GetDataList异常:" + ex.Message);
|
||||
res.msg = "请求异常!";
|
||||
res.result = "-1";
|
||||
return res;
|
||||
|
@ -10,8 +10,8 @@
|
||||
<WebStackScaffolding_LayoutPageFile>~/Views/Shared/_EpostLayoutPage.cshtml</WebStackScaffolding_LayoutPageFile>
|
||||
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
||||
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
||||
<NameOfLastUsedPublishProfile>E:\WORK\代码管理\T系列\播种\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||
<NameOfLastUsedPublishProfile>D:\驿传\Epost\T_DAS_PTL\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
<Use64BitIISExpress />
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
@ -19,7 +19,7 @@
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<publishUrl>D:\驿传\Wuxidingshi_DAS</publishUrl>
|
||||
<publishUrl>D:\驿传\SanYing_DAS-T后台</publishUrl>
|
||||
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||
<PrecompileBeforePublish>true</PrecompileBeforePublish>
|
||||
<EnableUpdateable>true</EnableUpdateable>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@
|
||||
</configSections>
|
||||
<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="SqlLocDPSConnection" connectionString="server=139.196.36.200;user id=EpostTest;password=antion;database=WuXi_DingShi_DAS;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="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="LabelXML" value="/App_Data/AddressStorage.xml" />
|
||||
<add key="ResultsXML" value="/App_Data/Results.xml" />
|
||||
<add key="WebAPIUrl" value="http://192.168.0.20:8045/api/WebAPI/ProcessingResult"/>
|
||||
<add key="WebAPIUrl" value="http://localhost:63119/api/WebAPI/ProcessingResult"/>
|
||||
<add key="ShowMode" value="1" />
|
||||
<add key="SetupMode" value="\Epost_P\Epost.TestToolsWeb\App_Data\SetupMode.txt" />
|
||||
<add key="CARID" value="HT01" />
|
||||
<add key="ServerAPIURL" value="http://192.168.0.20:8045/api/WebAPI" />
|
||||
<add key="ServerAPIURL" value="http://localhost:63119/api/WebAPI" />
|
||||
<add key="SleepTime" value="1" />
|
||||
</appSettings>
|
||||
<!--
|
||||
|
Reference in New Issue
Block a user