11 Commits

Author SHA1 Message Date
jl
6877cd31ea 2025-06-27 10:19:12 +08:00
jl
60517d6f9b 2025-06-26 16:33:20 +08:00
jl
7a359923d9 2025-06-26 10:21:15 +08:00
jl
7ef2bbeb19 2025-06-24 15:46:02 +08:00
jl
618028296e 2025-06-24 10:22:38 +08:00
jl
ede9a6bedc 2025-06-23 17:00:09 +08:00
jl
7d4c441da4 2025-06-20 11:06:30 +08:00
jl
0d861d7161 2025-06-19 16:50:57 +08:00
jl
67ec46d1da 2025-06-16 10:32:02 +08:00
jl
efe75a69d2 2025-06-10 14:07:58 +08:00
jl
e923301596 2025-06-09 14:59:19 +08:00
14 changed files with 253 additions and 191 deletions

View File

@ -150,9 +150,12 @@ namespace Epost.BLL
{ {
return dal.getLabelList(controlid, batchno); return dal.getLabelList(controlid, batchno);
} }
public DataTable getLabelList(string controlid)
{
return dal.getLabelList(controlid);
}
#endregion #endregion
#region #region
public DataTable getAddressList() public DataTable getAddressList()
{ {

View File

@ -102,7 +102,8 @@ namespace Epost.BLL
{ {
foreach (DataRow item in dt.Rows) foreach (DataRow item in dt.Rows)
{ {
DataTable lableDt = addrBLL.getLabelList(item["id"].ToString(), batchno); DataTable lableDt = addrBLL.getLabelList(item["id"].ToString(), batchno);
// DataTable lableDt = addrBLL.getLabelList(item["id"].ToString());
if (lableDt != null && lableDt.Rows.Count > 0) if (lableDt != null && lableDt.Rows.Count > 0)
{ {
foreach (DataRow labelItem in lableDt.Rows) foreach (DataRow labelItem in lableDt.Rows)
@ -122,22 +123,27 @@ namespace Epost.BLL
} }
else else
{ {
LabelParamModel lablemodel = new LabelParamModel();
if (!string.IsNullOrEmpty(labelItem["shopid"].ToString())) if (!string.IsNullOrEmpty(labelItem["shopid"].ToString()))
{ {
shopid = labelItem["shopid"].ToString(); shopid = labelItem["shopid"].ToString();
if (shopid.Length > 4) if (shopid.Length > 3)
{ {
shopid = shopid.Substring(shopid.Length-4,4); shopid = shopid.Substring(shopid.Length - 3, 3);
lablemodel.Quantity = shopid;
lablemodel.Mode = "50";
} }
} }
LabelParamModel lablemodel = new LabelParamModel(); else {
lablemodel.Quantity = shopid;
lablemodel.Mode = "10";
}
lablemodel.Address = labelItem["address"].ToString(); lablemodel.Address = labelItem["address"].ToString();
lablemodel.ControlIP = item["ControlIP"].ToString(); lablemodel.ControlIP = item["ControlIP"].ToString();
lablemodel.Command = "DISPLAY_JOB"; lablemodel.Command = "DISPLAY_JOB";
lablemodel.Type = "N"; lablemodel.Type = "N";
lablemodel.Quantity = shopid; lablemodel.Uid = labelItem["address"].ToString();
lablemodel.Uid = labelItem["address"].ToString();
lablemodel.Mode = "10";
list.Add(lablemodel); list.Add(lablemodel);
} }
@ -194,6 +200,12 @@ namespace Epost.BLL
} }
#endregion #endregion
#region
public bool FORMAT_DEVICE(LabelParamModel model)
{
return dal.FORMAT_DEVICE(model);
}
#endregion
#region #region
public bool CONNECT(LabelParamModel model) public bool CONNECT(LabelParamModel model)
{ {

View File

@ -719,7 +719,7 @@ namespace Epost.BLL
demodel.Discount = item["Discount"].ToString(); demodel.Discount = item["Discount"].ToString();
demodel.WholeUnit = item["WholeUnit"].ToString(); demodel.WholeUnit = item["WholeUnit"].ToString();
demodel.Unit = item["Unit"].ToString(); demodel.Unit = item["Unit"].ToString();
demodel.Readtime = item["readtime"].ToString();
#region #region
demodel.Block = item["Block"].ToString(); demodel.Block = item["Block"].ToString();
demodel.Area = item["Area"].ToString(); demodel.Area = item["Area"].ToString();
@ -932,8 +932,11 @@ namespace Epost.BLL
{ {
return dal.UpOrderStateBybat(id); return dal.UpOrderStateBybat(id);
} }
public bool UpdateStateBymatchid(string matchid)
{
return dal.UpdateStateBymatchid(matchid);
}
public bool IsFinishWorkByCar(int endcount, string matchid, string block="") public bool IsFinishWorkByCar(int endcount, string matchid, string block="")
{ {

View File

@ -122,7 +122,7 @@ namespace Epost.BLL
public ResultModel TestStart(string batchno) public ResultModel TestStart(string batchno)
{ {
ResultModel result = comBLL.GetAllLabelList_M(batchno); ResultModel result = comBLL.GetAllLabelList_M(batchno);
return result; return result;
} }

View File

@ -136,11 +136,12 @@ namespace Epost.BLL
SumQuantity = SumQuantity % discount; SumQuantity = SumQuantity % discount;
} }
} }
showmodel.Qty = SumQuantity.ToString(); //showmodel.Qty = SumQuantity.ToString();
showmodel.Wholeqty = SumCkQuantity; //showmodel.Wholeqty = SumCkQuantity;
showmodel.Unit = "件"; //showmodel.Unit = "件";
showmodel.Wholeunit = "箱"; //showmodel.Wholeunit = "箱";
showmodel.Contents = queueDT.Rows[0]["sku"].ToString() + "\r规格 " + discount + " \r总数量" + zcount; ; showmodel.Qty = "0";
showmodel.Contents = queueDT.Rows[0]["sku"].ToString() + "\r规格 " + discount + " \r总数量:" + zcount+"("+ SumCkQuantity + "箱"+ SumQuantity+"件)";
} }
comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签 comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签
#endregion #endregion

View File

@ -327,7 +327,12 @@ namespace Epost.BLL
if (skubo) if (skubo)
{ {
LogHelper.WriteLogInfo(model.Sku + "Sku播种完成" + model.Matchid); LogHelper.WriteLogInfo(model.Sku + "Sku播种完成" + model.Matchid);
orderbll.UpdateStateByCar(model.Matchid, model.Sku); // orderbll.UpdateStateByCar(model.Matchid, model.Sku);
bool matchbo= orderbll.IsSkuFinishWork("", model.Matchid);
if (matchbo) {
LogHelper.WriteLogInfo("波次播种完成" + model.Matchid);
orderbll.UpdateStateBymatchid(model.Matchid);
}
} }
#endregion #endregion

View File

@ -5,6 +5,7 @@ using Epost.Model;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Data.Entity.Core.Metadata.Edm;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
@ -99,7 +100,7 @@ namespace Epost.BLL
{ {
case "QUERY_SPECIAL_STATUS": case "QUERY_SPECIAL_STATUS":
BindJobList(data); BindJobList(data);
break; break;
default: default:
break; break;
} }
@ -128,53 +129,53 @@ namespace Epost.BLL
ResultModel res = new ResultModel(); ResultModel res = new ResultModel();
res.result = "0"; res.result = "0";
try try
{ {
string sblock = data.Block; string sblock = data.Block;
string scanStr = data.Parameter.Trim(); string scanStr = data.Parameter.Trim();
string sarea = data.Area; string sarea = data.Area;
string name = string.Empty; string name = string.Empty;
string matchid = string.Empty; string matchid = string.Empty;
#region #region
List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == sblock && m.Area == sarea);// List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == sblock && m.Area == sarea);//
bool isnum = ConvertHexHelper.IsNum(scanStr.Substring(0, 1));//判断扫描首字母是否是数字 bool isnum = ConvertHexHelper.IsNum(scanStr.Substring(0, 1));//判断扫描首字母是否是数字
if (!ulist.Any()) if (!ulist.Any())
{
//手动加波次信息
DataTable matdt = orderbll.GetMatchOrderList();
if (matdt != null && matdt.Rows.Count > 0)
{ {
//手动加波次信息 UserCodeModel umodel = new UserCodeModel();
DataTable matdt = orderbll.GetMatchOrderList(); umodel.Matchid = matdt.Rows[0]["matchid"].ToString();
if (matdt != null && matdt.Rows.Count > 0) umodel.Block = sblock;
{ umodel.Area = sarea;
UserCodeModel umodel = new UserCodeModel(); UserCacheDAL.UpdateUserCodeList(new List<UserCodeModel> { umodel }, EUserCommend.Create);
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()) ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == sblock && m.Area == sarea);
{ matchid = ulist.FirstOrDefault().Matchid; } if (ulist.Any())
{ matchid = ulist.FirstOrDefault().Matchid; }
#endregion #endregion
if (data.Type == "5")//中分扫描枪 if (data.Type == "5")//中分扫描枪
{ {
zhongfenBind(ulist, scanStr, data); zhongfenBind(ulist, scanStr, data);
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute); downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
} }
else if (data.Type == "6")//播种扫描枪 else if (data.Type == "6")//播种扫描枪
{ {
xifenBind(ulist, scanStr, data, matchid, isnum); xifenBind(ulist, scanStr, data, matchid, isnum);
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute); downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
} }
return res; return res;
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -211,7 +212,7 @@ namespace Epost.BLL
//} //}
//else { //else {
if (scanStr.Substring(0, 1) == "U") if (scanStr.Substring(0, 1) == "Y")
{ {
#region #region
if (ulist.Any()) if (ulist.Any())
@ -226,7 +227,7 @@ namespace Epost.BLL
show.Block = data.Block; show.Block = data.Block;
show.Area = data.Area; show.Area = data.Area;
show.Type = 2; show.Type = 2;
show.Islock = true; show.Islock = false;
comBLL.ShowBoxMessage_M(show); comBLL.ShowBoxMessage_M(show);
#endregion #endregion
} }
@ -245,7 +246,7 @@ namespace Epost.BLL
// location = data.Parameter;// sinfodt.Rows[0]["tolocation"].ToString(); // location = data.Parameter;// sinfodt.Rows[0]["tolocation"].ToString();
} }
LogHelper.WriteLogInfo("中分" + data.Parameter + "===SKU" + scanStr); LogHelper.WriteLogInfo("中分" + data.Parameter + "===SKU" + scanStr);
List<AddressstorageModel> Arealist = addrBLL.GetAreaList(); List<AddressstorageModel> Arealist = addrBLL.GetAreaList(data.Block);
if (Arealist.Any()) if (Arealist.Any())
{ {
foreach (AddressstorageModel item in Arealist) foreach (AddressstorageModel item in Arealist)
@ -259,28 +260,27 @@ namespace Epost.BLL
int SumCkQuantity = 0;//= Convert.ToInt32(skudt.Rows[0]["SumCkQuantity"].ToString()); int SumCkQuantity = 0;//= Convert.ToInt32(skudt.Rows[0]["SumCkQuantity"].ToString());
//散件总数 //散件总数
int SumQuantity = Convert.ToInt32(skudt.Rows[0]["SumQuantity"].ToString()); int SumQuantity = Convert.ToInt32(skudt.Rows[0]["SumQuantity"].ToString());
//if (discount != 1) int zcount = Convert.ToInt32(skudt.Rows[0]["SumQuantity"].ToString());
//{ if (discount != 1)
// if (SumQuantity >= discount) {
// { if (SumQuantity >= discount)
{
// SumCkQuantity = SumQuantity / discount;
// SumQuantity = SumQuantity % discount;
// }
//}
SumCkQuantity = SumQuantity / discount;
SumQuantity = SumQuantity % discount;
}
}
ShowMessageModel_M show = new ShowMessageModel_M(); ShowMessageModel_M show = new ShowMessageModel_M();
show.Title = skudt.Rows[0]["sku_goodsname"].ToString(); show.Title = skudt.Rows[0]["goodsname"].ToString();
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red); show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
show.Block = item.block; show.Block = item.block;
show.Islock = true; show.Islock = true;
show.Contents = data.Parameter + "(" + scanStr + ")\r";// + "规格:" + discount; show.Contents = data.Parameter + "(" + scanStr + ")\r规格:" + discount + " \r总数量:" + zcount + "(" + SumCkQuantity + "箱" + SumQuantity + "件)";
show.Qty = SumQuantity.ToString(); // show.Qty = SumQuantity.ToString();
show.Wholeqty = SumCkQuantity; //show.Wholeqty = SumCkQuantity;
show.Unit = "件"; // show.Unit = "件";
show.Wholeunit = "箱"; // show.Wholeunit = "箱";
show.Type = 2; show.Type = 2;
comBLL.ShowBoxMessage_M(show); comBLL.ShowBoxMessage_M(show);
} }
@ -329,97 +329,94 @@ namespace Epost.BLL
//else //else
//{ //{
if (scanStr.Substring(0, 1) == "Y")
#region
List<ResultMessageModel> hangList = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Parameter == "888888");
if (hangList.Any())
{ {
#region
if (ulist.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)
{ {
UserCodeModel umodel = ulist.FirstOrDefault(); scanStr = qdt.Rows[0]["sku"].ToString();
umodel.UserCode = scanStr;
#region
ShowMessageModel_M show = new ShowMessageModel_M(); ShowMessageModel_M show = new ShowMessageModel_M();
show.Title = "请扫描sku开始作业";
show.Contents = "";
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
show.Block = data.Block; show.Block = data.Block;
show.Area = data.Area; show.Area = data.Area;
show.Type = 8; show.Type = 8;
show.Islock = true; comBLL.RemoveBoxMessage_M(show);
comBLL.ShowBoxMessage_M(show); // data.Parameter = scanStr;
#endregion 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(new List<ResultMessageModel> { data }, EdownCommend.Execute); downCacheDAL.UpdateJobDownModelList(hangList, EdownCommend.Execute);
#endregion #endregion
} }
else else
{ {
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);
#region if (scanlist.Count > 1 || (skudt != null && skudt.Rows.Count > 0))
{ //重复扫描
List<ResultMessageModel> hangList = downCacheDAL.GetPlanJobDownList().FindAll(m => m.Parameter == "888888"); //ShowMessageModel_M show = new ShowMessageModel_M();
//show.Title = scanStr + "重复扫描/已拣配!";
if (hangList.Any()) //show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
{ //show.Block = sblock;
//show.Area = sarea;
#region //show.Type = 8;
LogHelper.WriteLogInfo("挂起" + data.Parameter + "-------通道" + data.Block); //comBLL.ShowBoxMessage_M(show);
// LabelParamModel FORMATEModel = new LabelParamModel(); downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
// 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 else
{ {
#region SKU if (scanStr.Substring(0, 1) == "Y")
//根据扫描商品内码获取商品码
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(); #region
location = data.Parameter;// sinfodt.Rows[0]["tolocation"].ToString(); if (ulist.Any())
} {
data.Parameter = scanStr; UserCodeModel umodel = ulist.FirstOrDefault();
DataTable skudt = queueBLL.GetOrderQueue(data.Block, data.Area, "3"); umodel.UserCode = scanStr;
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); #region
ShowMessageModel_M show = new ShowMessageModel_M();
if (scanlist.Count > 1 || (skudt != null && skudt.Rows.Count > 0)) show.Title = "请扫描sku开始作业";
{ //重复扫描 show.Contents = "";
//ShowMessageModel_M show = new ShowMessageModel_M(); show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
//show.Title = scanStr + "重复扫描/已拣配!"; show.Block = data.Block;
//show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red); show.Area = data.Area;
//show.Block = sblock; show.Type = 8;
//show.Area = sarea; show.Islock = true;
//show.Type = 8; comBLL.ShowBoxMessage_M(show);
//comBLL.ShowBoxMessage_M(show); #endregion
}
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute); downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
#endregion
} }
else
{
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 OrderDt = orderbll.GetOrderList_Car(matchid, scanStr, data.Area, data.Block); DataTable OrderDt = orderbll.GetOrderList_Car(matchid, scanStr, data.Area, data.Block);
if (OrderDt != null && OrderDt.Rows.Count > 0) if (OrderDt != null && OrderDt.Rows.Count > 0)
{ {
@ -438,8 +435,6 @@ namespace Epost.BLL
qmodel.Location = location; qmodel.Location = location;
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red); qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
queueBLL.insertQueueOrders(qmodel); queueBLL.insertQueueOrders(qmodel);
} }
else else
{ {
@ -466,7 +461,7 @@ namespace Epost.BLL
qmodel.Matchid = umodel.Matchid; qmodel.Matchid = umodel.Matchid;
// qmodel.Location = location; // qmodel.Location = location;
qmodel.Shopid = echoDt.Rows[0]["GoodsName"].ToString(); qmodel.Shopid = echoDt.Rows[0]["GoodsName"].ToString();
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Blue); qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
queueBLL.insertQueueOrders(qmodel); queueBLL.insertQueueOrders(qmodel);
@ -491,35 +486,31 @@ namespace Epost.BLL
show.Islock = false; show.Islock = false;
comBLL.ShowBoxMessage_M(show); comBLL.ShowBoxMessage_M(show);
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute); downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
} }
#endregion #endregion
} }
#endregion
} }
#endregion
} }
#endregion
} }
#endregion
} }
#endregion #endregion
#region SKU挂起/ #region SKU挂起/
public void Hangup_SKU(string sku, string block, string area,string matchid, ResultMessageModel data = null) public void Hangup_SKU(string sku, string block, string area, string matchid, ResultMessageModel data = null)
{ {
List<LabelParamModel> list = new List<LabelParamModel>(); List<LabelParamModel> list = new List<LabelParamModel>();
//查询当前通道sku是否有任务 //查询当前通道sku是否有任务
DataTable dt = orderbll.getOrderListBysku(block, sku,area, matchid); DataTable dt = orderbll.getOrderListBysku(block, sku, area, matchid);
//if (dt == null || dt.Rows.Count == 0) //if (dt == null || dt.Rows.Count == 0)
//{ //{
// dt = orderbll.getOrderHisListBysku(block, sku, area, matchid); // dt = orderbll.getOrderHisListBysku(block, sku, area, matchid);
// //回显挂起 // //回显挂起
//} //}
if (dt != null && dt.Rows.Count > 0) if (dt != null && dt.Rows.Count > 0)
{ {
// 将当前通道所有sku正在亮的设备熄灭 // 将当前通道所有sku正在亮的设备熄灭
@ -556,7 +547,7 @@ namespace Epost.BLL
//删除缓存中sku记录 //删除缓存中sku记录
List<JobModel> jobList = JobCache.GetPlanJobList(); List<JobModel> jobList = JobCache.GetPlanJobList();
List<JobModel> relist = jobList.FindAll(m => m.Sku == sku && m.Block == block&&m.Area==area); List<JobModel> relist = jobList.FindAll(m => m.Sku == sku && m.Block == block && m.Area == area);
JobModel model = new JobModel(); JobModel model = new JobModel();
if (relist.Any()) if (relist.Any())
{ {

View File

@ -142,7 +142,7 @@ namespace Epost.DAL
DataTable dt = db.GetsqlForDT(sql); DataTable dt = db.GetsqlForDT(sql);
return dt; return dt;
} }
#endregion #endregion
#region #region
public DataTable getAddressByBlock(string block) public DataTable getAddressByBlock(string block)
{ {

View File

@ -91,6 +91,18 @@ namespace Epost.DAL
} }
#endregion #endregion
#region
public bool FORMAT_DEVICE(LabelParamModel model)
{
model.Address = model.Address;
model.Command = "FORMAT_DEVICE";
model.Parameter = "";
model.Timeout = "0.5";
return Send(model);
}
#endregion
#region #region
public bool INPUT_ADDRESS_DATA() public bool INPUT_ADDRESS_DATA()
{ {
@ -578,7 +590,17 @@ namespace Epost.DAL
sendModel.Address = model.Address; sendModel.Address = model.Address;
sendModel.Command = model.Command; sendModel.Command = model.Command;
sendModel.Parameter = model.Parameter; sendModel.Parameter = model.Parameter;
sendModel.Timeout = model.Timeout; sendModel.Uid = model.Uid;
sendModel.Quantity = model.Quantity;
sendModel.Title = model.Title;
sendModel.Content = model.Content;
sendModel.Type = model.Type;
sendModel.Mode = model.Mode;
sendModel.Order = model.Order;
sendModel.Unit = model.Unit;
sendModel.W_unit = model.W_unit;
sendModel.W_quantity = model.W_quantity;
sendModel.Loc = model.Loc;
try try
{ {
string postStr = JsonHelper.SerializeObject(sendModel); string postStr = JsonHelper.SerializeObject(sendModel);

View File

@ -48,7 +48,7 @@ namespace Epost.DAL
string sql = string.Empty; string sql = string.Empty;
if (!string.IsNullOrEmpty(area)) if (!string.IsNullOrEmpty(area))
{ {
sql = string.Format("select id, 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, corlorcode, address, ControlIP,area, block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode,shopname,readtime from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + " order by layer,slist ",
sku, sku,
block, area); block, area);
@ -56,7 +56,7 @@ namespace Epost.DAL
} }
else 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, corlorcode, address, ControlIP, area , block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode ,shopname,readtime from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' " + strwhere + " order by layer,slist ",
sku, sku,
block); block);
@ -90,7 +90,7 @@ namespace Epost.DAL
string sql = string.Empty; string sql = string.Empty;
if (!string.IsNullOrEmpty(area)) if (!string.IsNullOrEmpty(area))
{ {
sql = string.Format("select id, 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, corlorcode, address, ControlIP,area, block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode,shopname,readtime from v_orders where state = 0 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + " order by layer,slist ",
sku, sku,
block, area); block, area);
@ -98,7 +98,7 @@ namespace Epost.DAL
} }
else 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, corlorcode, address, ControlIP, area , block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode,shopname,readtime from v_orders where state = 0 and sku = '{0}' and block = '{1}' " + strwhere + " order by layer,slist ",
sku, sku,
block); block);
@ -695,13 +695,14 @@ namespace Epost.DAL
#region #region
public bool UpdateStateByOrderID(string orderid) public bool UpdateStateBymatchid(string matchid)
{ {
try try
{ {
string upsql = string.Format("update orders set oprationstate=3,truequantity=quantity, state=3 where orderid='{0}'", string upsql = string.Format("update orders set state=3 where matchid='{0}' and state=0",
orderid); matchid);
long x = db.UpdateSql(upsql); long x = db.UpdateSql(upsql);
LogHelper.WriteLogInfo(x+"修改波次拣选完成"+upsql);
if (x > 0) if (x > 0)
return true; return true;
return false; return false;

View File

@ -48,6 +48,7 @@ namespace Epost.Model
private string _Unit = string.Empty;//小单位 private string _Unit = string.Empty;//小单位
private string _UserCode = string.Empty;//工号 private string _UserCode = string.Empty;//工号
private string _no = string.Empty;//任务序号 private string _no = string.Empty;//任务序号
private string _readtime = string.Empty;
public string BatchId public string BatchId
{ {
get get
@ -389,6 +390,7 @@ namespace Epost.Model
public string UserCode { get => _UserCode; set => _UserCode = value; } public string UserCode { get => _UserCode; set => _UserCode = value; }
public string No { get => _no; set => _no = value; } public string No { get => _no; set => _no = value; }
public string ID { get => _ID; set => _ID = value; } public string ID { get => _ID; set => _ID = value; }
public string Readtime { get => _readtime; set => _readtime = value; }
} }
} }

View File

@ -1,6 +1,7 @@
using ComposerSDK; using ComposerSDK;
using Epost.BLL; using Epost.BLL;
using Epost.Common; using Epost.Common;
using Epost.DAL;
using Epost.DAL.Cache; using Epost.DAL.Cache;
using Epost.DAL.Enum; using Epost.DAL.Enum;
using Epost.DPS.Controllers; using Epost.DPS.Controllers;
@ -9,6 +10,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration; using System.Configuration;
using System.Data; using System.Data;
using System.Data.Entity.Core.Metadata.Edm;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Net.Http; using System.Net.Http;
@ -34,6 +36,8 @@ namespace Epost.TestToolsWeb.Controllers
BoxQueueBLL quboxbll = new BoxQueueBLL(); BoxQueueBLL quboxbll = new BoxQueueBLL();
JobDownCacheDAL JobCache = new JobDownCacheDAL(); JobDownCacheDAL JobCache = new JobDownCacheDAL();
HttpHelper http = new HttpHelper(); HttpHelper http = new HttpHelper();
AddressstorageDAL addal = new AddressstorageDAL();
ErrorLogDAL errdal = new ErrorLogDAL();
[Route("ProcessingResult")] [Route("ProcessingResult")]
[HttpPost] [HttpPost]
public string ProcessingResult([FromBody]ResultMessageModel data) public string ProcessingResult([FromBody]ResultMessageModel data)
@ -79,7 +83,25 @@ namespace Epost.TestToolsWeb.Controllers
JobCache.UpdateJobDownModelList(new List<ResultMessageModel>() { data }, EdownCommend.Create); JobCache.UpdateJobDownModelList(new List<ResultMessageModel>() { data }, EdownCommend.Create);
} }
if (data.Command == "JOB_Fail")
{
LabelParamModel lbmodel = new LabelParamModel();
lbmodel.Address = data.Address;
lbmodel.Uid = data.Address;
string stype = "N";
if (data.Type == "2")
{ stype = "C"; }
lbmodel.Type = stype;
lbmodel.ControlIP = data.IP;
combll.FORMAT_DEVICE(lbmodel);
LogHelper.WriteLogInfo("设备报错:"+JsonHelper.SerializeObject(data), Log_Type.ERROR);
ErrorLogModel errmodel = new ErrorLogModel();
errmodel.Address = data.Address;
errmodel.ControlIP = data.IP;
addal.UpdateErrorState(data.Address, data.IP);
}
} }
catch (Exception ex) catch (Exception ex)

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
@ -11,7 +11,7 @@
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected> <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth> <WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
<NameOfLastUsedPublishProfile>E:\WORK\代码管理\T系列\播种\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>E:\WORK\代码管理\T系列\播种\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress /> <Use64BitIISExpress />
<IISExpressSSLPort /> <IISExpressSSLPort />
<IISExpressAnonymousAuthentication /> <IISExpressAnonymousAuthentication />

View File

@ -7,7 +7,7 @@
<PropertyGroup> <PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile /> <TimeStampOfAssociatedLegacyPublishXmlFile />
<_PublishTargetUrl>D:\驿传\Wuxidingshi_DAS</_PublishTargetUrl> <_PublishTargetUrl>D:\驿传\Wuxidingshi_DAS</_PublishTargetUrl>
<History>True|2025-01-16T07:37:40.8814043Z;True|2024-12-19T15:11:44.2536385+08:00;True|2024-12-10T19:10:26.6514077+08:00;True|2024-12-10T18:30:34.7211512+08:00;True|2024-12-09T14:06:46.4112259+08:00;True|2024-12-03T14:23:26.2134334+08:00;True|2024-11-27T18:53:48.7373661+08:00;True|2024-11-27T14:27:33.0840789+08:00;True|2024-11-27T14:08:15.6442660+08:00;True|2024-11-27T12:10:03.9412549+08:00;True|2024-11-27T11:45:31.3775097+08:00;True|2024-11-27T11:32:00.8297320+08:00;True|2024-11-23T20:50:04.5476409+08:00;False|2024-11-04T17:48:25.2781696+08:00;True|2024-11-01T16:04:56.3535724+08:00;True|2024-09-01T10:13:37.1598955+08:00;True|2024-08-31T17:27:57.5375469+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;</History> <History>True|2025-06-26T13:19:18.0735602Z||;True|2025-06-26T21:12:51.6536773+08:00||;True|2025-06-26T21:06:38.5762552+08:00||;True|2025-06-26T20:56:58.9703670+08:00||;True|2025-06-26T20:51:55.6003060+08:00||;True|2025-06-26T16:32:01.0915594+08:00||;True|2025-06-24T21:33:51.6120305+08:00||;True|2025-06-24T15:40:47.6769336+08:00||;True|2025-06-24T10:20:08.6997539+08:00||;True|2025-06-23T16:45:32.2447039+08:00||;True|2025-06-19T17:51:13.7383312+08:00||;True|2025-06-19T16:33:25.6789576+08:00||;True|2025-06-19T16:31:35.8668377+08:00||;True|2025-06-17T17:16:38.1010406+08:00||;True|2025-06-15T11:14:12.6170562+08:00||;True|2025-06-15T10:42:25.1172247+08:00||;True|2025-06-14T13:26:43.2442778+08:00||;True|2025-06-10T13:21:34.1684919+08:00||;True|2025-06-09T11:40:40.2739751+08:00||;True|2025-06-08T16:20:45.8519262+08:00||;True|2025-01-16T15:37:40.8814043+08:00||;True|2024-12-19T15:11:44.2536385+08:00||;True|2024-12-10T19:10:26.6514077+08:00||;True|2024-12-10T18:30:34.7211512+08:00||;True|2024-12-09T14:06:46.4112259+08:00||;True|2024-12-03T14:23:26.2134334+08:00||;True|2024-11-27T18:53:48.7373661+08:00||;True|2024-11-27T14:27:33.0840789+08:00||;True|2024-11-27T14:08:15.6442660+08:00||;True|2024-11-27T12:10:03.9412549+08:00||;True|2024-11-27T11:45:31.3775097+08:00||;True|2024-11-27T11:32:00.8297320+08:00||;True|2024-11-23T20:50:04.5476409+08:00||;False|2024-11-04T17:48:25.2781696+08:00||;True|2024-11-01T16:04:56.3535724+08:00||;True|2024-09-01T10:13:37.1598955+08:00||;True|2024-08-31T17:27:57.5375469+08:00||;True|2022-07-15T16:41:13.9750291+08:00||;True|2022-07-14T14:02:20.7983427+08:00||;True|2022-07-13T17:40:22.7531000+08:00||;True|2022-07-13T17:34:22.9908701+08:00||;True|2022-07-13T17:30:06.3588502+08:00||;True|2022-07-11T10:32:06.9053981+08:00||;True|2021-04-26T10:07:37.4889549+08:00||;True|2021-04-09T10:32:51.9130162+08:00||;True|2021-04-09T10:31:50.4974012+08:00||;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -33,19 +33,19 @@
<publishTime>04/04/2018 15:45:12</publishTime> <publishTime>04/04/2018 15:45:12</publishTime>
</File> </File>
<File Include="bin/App_global.asax.compiled"> <File Include="bin/App_global.asax.compiled">
<publishTime>01/16/2025 15:49:24</publishTime> <publishTime>06/26/2025 21:19:16</publishTime>
</File> </File>
<File Include="bin/App_global.asax.dll"> <File Include="bin/App_global.asax.dll">
<publishTime>01/16/2025 15:49:24</publishTime> <publishTime>06/26/2025 21:19:16</publishTime>
</File> </File>
<File Include="bin/BouncyCastle.Crypto.dll"> <File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>02/24/2020 15:29:24</publishTime> <publishTime>02/24/2020 15:29:24</publishTime>
</File> </File>
<File Include="bin/Common.dll"> <File Include="bin/Common.dll">
<publishTime>01/16/2025 15:37:17</publishTime> <publishTime>06/26/2025 20:51:31</publishTime>
</File> </File>
<File Include="bin/Common.pdb"> <File Include="bin/Common.pdb">
<publishTime>01/16/2025 15:37:17</publishTime> <publishTime>06/26/2025 20:51:31</publishTime>
</File> </File>
<File Include="bin/ComposerSDK.dll"> <File Include="bin/ComposerSDK.dll">
<publishTime>04/29/2020 16:50:14</publishTime> <publishTime>04/29/2020 16:50:14</publishTime>
@ -63,31 +63,31 @@
<publishTime>10/23/2017 13:15:20</publishTime> <publishTime>10/23/2017 13:15:20</publishTime>
</File> </File>
<File Include="bin/Epost.BLL.dll"> <File Include="bin/Epost.BLL.dll">
<publishTime>01/16/2025 15:37:18</publishTime> <publishTime>06/26/2025 21:19:04</publishTime>
</File> </File>
<File Include="bin/Epost.BLL.pdb"> <File Include="bin/Epost.BLL.pdb">
<publishTime>01/16/2025 15:37:18</publishTime> <publishTime>06/26/2025 21:19:04</publishTime>
</File> </File>
<File Include="bin/Epost.BLL.XmlSerializers.dll"> <File Include="bin/Epost.BLL.XmlSerializers.dll">
<publishTime>08/26/2020 18:09:48</publishTime> <publishTime>08/26/2020 18:09:48</publishTime>
</File> </File>
<File Include="bin/Epost.DAL.dll"> <File Include="bin/Epost.DAL.dll">
<publishTime>01/16/2025 15:37:17</publishTime> <publishTime>06/26/2025 20:51:32</publishTime>
</File> </File>
<File Include="bin/Epost.DAL.pdb"> <File Include="bin/Epost.DAL.pdb">
<publishTime>01/16/2025 15:37:17</publishTime> <publishTime>06/26/2025 20:51:32</publishTime>
</File> </File>
<File Include="bin/Epost.DPS.dll"> <File Include="bin/Epost.DPS.dll">
<publishTime>01/16/2025 15:37:21</publishTime> <publishTime>06/26/2025 21:19:08</publishTime>
</File> </File>
<File Include="bin/Epost.DPS.pdb"> <File Include="bin/Epost.DPS.pdb">
<publishTime>01/16/2025 15:37:21</publishTime> <publishTime>06/26/2025 21:19:08</publishTime>
</File> </File>
<File Include="bin/Epost.Model.dll"> <File Include="bin/Epost.Model.dll">
<publishTime>01/16/2025 15:37:16</publishTime> <publishTime>06/26/2025 20:51:29</publishTime>
</File> </File>
<File Include="bin/Epost.Model.pdb"> <File Include="bin/Epost.Model.pdb">
<publishTime>01/16/2025 15:37:16</publishTime> <publishTime>06/26/2025 20:51:29</publishTime>
</File> </File>
<File Include="bin/Epost.TestToolsWeb.dll"> <File Include="bin/Epost.TestToolsWeb.dll">
<publishTime>09/06/2018 11:57:11</publishTime> <publishTime>09/06/2018 11:57:11</publishTime>
@ -5652,7 +5652,7 @@
<publishTime>05/30/2022 16:58:47</publishTime> <publishTime>05/30/2022 16:58:47</publishTime>
</File> </File>
<File Include="PrecompiledApp.config"> <File Include="PrecompiledApp.config">
<publishTime>01/16/2025 15:49:18</publishTime> <publishTime>06/26/2025 21:19:09</publishTime>
</File> </File>
<File Include="Scripts/ai.0.22.9-build00167.js"> <File Include="Scripts/ai.0.22.9-build00167.js">
<publishTime>04/04/2018 15:45:12</publishTime> <publishTime>04/04/2018 15:45:12</publishTime>
@ -7572,7 +7572,7 @@
<publishTime>07/04/2022 14:22:38</publishTime> <publishTime>07/04/2022 14:22:38</publishTime>
</File> </File>
<File Include="Web.config"> <File Include="Web.config">
<publishTime>01/16/2025 15:37:22</publishTime> <publishTime>06/26/2025 20:51:38</publishTime>
</File> </File>
</ItemGroup> </ItemGroup>
</Project> </Project>