This commit is contained in:
jl
2025-06-09 14:59:19 +08:00
parent 285bae186b
commit e923301596
7 changed files with 161 additions and 162 deletions

View File

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

View File

@ -90,7 +90,7 @@ namespace Epost.BLL
#endregion
#region
public ResultModel GetAllLabelList_M(string batchno)
public ResultModel GetAllLabelList_M()
{
ResultModel model = new ResultModel();
try
@ -102,7 +102,8 @@ namespace Epost.BLL
{
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)
{
foreach (DataRow labelItem in lableDt.Rows)
@ -122,14 +123,20 @@ namespace Epost.BLL
}
else
{
if (!string.IsNullOrEmpty(labelItem["shopid"].ToString()))
{
shopid = labelItem["shopid"].ToString();
//if (!string.IsNullOrEmpty(labelItem["shopid"].ToString()))
//{
// shopid = labelItem["shopid"].ToString();
// if (shopid.Length > 4)
// {
// shopid = shopid.Substring(shopid.Length - 4, 4);
// }
//}
if (shopid.Length > 4)
{
shopid = shopid.Substring(shopid.Length-4,4);
}
shopid = shopid.Substring(shopid.Length - 4, 4);
}
LabelParamModel lablemodel = new LabelParamModel();
lablemodel.Address = labelItem["address"].ToString();
lablemodel.ControlIP = item["ControlIP"].ToString();

View File

@ -119,10 +119,10 @@ namespace Epost.BLL
#region
public ResultModel TestStart(string batchno)
public ResultModel TestStart()
{
ResultModel result = comBLL.GetAllLabelList_M(batchno);
ResultModel result = comBLL.GetAllLabelList_M();
return result;
}

View File

@ -5,6 +5,7 @@ using Epost.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity.Core.Metadata.Edm;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
@ -211,7 +212,7 @@ namespace Epost.BLL
//}
//else {
if (scanStr.Substring(0, 1) == "U")
if (scanStr.Substring(0, 1) == "Y")
{
#region
if (ulist.Any())
@ -226,7 +227,7 @@ namespace Epost.BLL
show.Block = data.Block;
show.Area = data.Area;
show.Type = 2;
show.Islock = true;
show.Islock = false;
comBLL.ShowBoxMessage_M(show);
#endregion
}
@ -245,7 +246,7 @@ namespace Epost.BLL
// location = data.Parameter;// sinfodt.Rows[0]["tolocation"].ToString();
}
LogHelper.WriteLogInfo("中分" + data.Parameter + "===SKU" + scanStr);
List<AddressstorageModel> Arealist = addrBLL.GetAreaList();
List<AddressstorageModel> Arealist = addrBLL.GetAreaList(data.Block);
if (Arealist.Any())
{
foreach (AddressstorageModel item in Arealist)
@ -268,11 +269,8 @@ namespace Epost.BLL
// SumQuantity = SumQuantity % discount;
// }
//}
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.Block = item.block;
show.Islock = true;
@ -329,6 +327,58 @@ namespace Epost.BLL
//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
{
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
{
if (scanStr.Substring(0, 1) == "Y")
{
#region
@ -351,44 +401,7 @@ namespace Epost.BLL
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
@ -402,24 +415,6 @@ namespace Epost.BLL
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)
{
@ -438,8 +433,6 @@ namespace Epost.BLL
qmodel.Location = location;
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
queueBLL.insertQueueOrders(qmodel);
}
else
{
@ -495,25 +488,21 @@ namespace Epost.BLL
#endregion
}
#endregion
}
}
}
#endregion
}
#endregion
}
}
#endregion
#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>();
//查询当前通道sku是否有任务
DataTable dt = orderbll.getOrderListBysku(block, sku,area, matchid);
DataTable dt = orderbll.getOrderListBysku(block, sku, area, matchid);
//if (dt == null || dt.Rows.Count == 0)
//{
// dt = orderbll.getOrderHisListBysku(block, sku, area, matchid);
@ -556,7 +545,7 @@ namespace Epost.BLL
//删除缓存中sku记录
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();
if (relist.Any())
{

View File

@ -104,14 +104,14 @@ 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;

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">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>
@ -11,7 +11,7 @@
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
<NameOfLastUsedPublishProfile>E:\WORK\代码管理\T系列\播种\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />

View File

@ -7,7 +7,7 @@
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<_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-09T03:40:40.2739751Z||;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 />
</PropertyGroup>
<ItemGroup>
@ -33,19 +33,19 @@
<publishTime>04/04/2018 15:45:12</publishTime>
</File>
<File Include="bin/App_global.asax.compiled">
<publishTime>01/16/2025 15:49:24</publishTime>
<publishTime>06/09/2025 11:53:17</publishTime>
</File>
<File Include="bin/App_global.asax.dll">
<publishTime>01/16/2025 15:49:24</publishTime>
<publishTime>06/09/2025 11:53:17</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>02/24/2020 15:29:24</publishTime>
</File>
<File Include="bin/Common.dll">
<publishTime>01/16/2025 15:37:17</publishTime>
<publishTime>06/09/2025 11:40:16</publishTime>
</File>
<File Include="bin/Common.pdb">
<publishTime>01/16/2025 15:37:17</publishTime>
<publishTime>06/09/2025 11:40:16</publishTime>
</File>
<File Include="bin/ComposerSDK.dll">
<publishTime>04/29/2020 16:50:14</publishTime>
@ -63,31 +63,31 @@
<publishTime>10/23/2017 13:15:20</publishTime>
</File>
<File Include="bin/Epost.BLL.dll">
<publishTime>01/16/2025 15:37:18</publishTime>
<publishTime>06/09/2025 11:53:06</publishTime>
</File>
<File Include="bin/Epost.BLL.pdb">
<publishTime>01/16/2025 15:37:18</publishTime>
<publishTime>06/09/2025 11:53:06</publishTime>
</File>
<File Include="bin/Epost.BLL.XmlSerializers.dll">
<publishTime>08/26/2020 18:09:48</publishTime>
</File>
<File Include="bin/Epost.DAL.dll">
<publishTime>01/16/2025 15:37:17</publishTime>
<publishTime>06/09/2025 11:40:16</publishTime>
</File>
<File Include="bin/Epost.DAL.pdb">
<publishTime>01/16/2025 15:37:17</publishTime>
<publishTime>06/09/2025 11:40:16</publishTime>
</File>
<File Include="bin/Epost.DPS.dll">
<publishTime>01/16/2025 15:37:21</publishTime>
<publishTime>06/09/2025 11:53:08</publishTime>
</File>
<File Include="bin/Epost.DPS.pdb">
<publishTime>01/16/2025 15:37:21</publishTime>
<publishTime>06/09/2025 11:53:08</publishTime>
</File>
<File Include="bin/Epost.Model.dll">
<publishTime>01/16/2025 15:37:16</publishTime>
<publishTime>06/08/2025 16:20:17</publishTime>
</File>
<File Include="bin/Epost.Model.pdb">
<publishTime>01/16/2025 15:37:16</publishTime>
<publishTime>06/08/2025 16:20:17</publishTime>
</File>
<File Include="bin/Epost.TestToolsWeb.dll">
<publishTime>09/06/2018 11:57:11</publishTime>
@ -5652,7 +5652,7 @@
<publishTime>05/30/2022 16:58:47</publishTime>
</File>
<File Include="PrecompiledApp.config">
<publishTime>01/16/2025 15:49:18</publishTime>
<publishTime>06/09/2025 11:53:10</publishTime>
</File>
<File Include="Scripts/ai.0.22.9-build00167.js">
<publishTime>04/04/2018 15:45:12</publishTime>
@ -7572,7 +7572,7 @@
<publishTime>07/04/2022 14:22:38</publishTime>
</File>
<File Include="Web.config">
<publishTime>01/16/2025 15:37:22</publishTime>
<publishTime>06/08/2025 16:20:27</publishTime>
</File>
</ItemGroup>
</Project>