diff --git a/Epost.BLL/Print_BoxBLL.cs b/Epost.BLL/Print_BoxBLL.cs index e52efe3..fd93e29 100644 --- a/Epost.BLL/Print_BoxBLL.cs +++ b/Epost.BLL/Print_BoxBLL.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; namespace Epost.BLL { public class Print_BoxBLL - { + { Print_BoxDAL dal = new Print_BoxDAL(); #region 获取打印列表 public DataTable GetPrintList(string block) diff --git a/Epost.BLL/Work_JobDownThread.cs b/Epost.BLL/Work_JobDownThread.cs index 34ccdc2..14b3c5b 100644 --- a/Epost.BLL/Work_JobDownThread.cs +++ b/Epost.BLL/Work_JobDownThread.cs @@ -185,6 +185,7 @@ namespace Epost.BLL LogHelper.WriteLogInfo(data.Address+"end拍下"); List offList = jobList.FindAll(m => m.Block == block && m.Area == area && m.Address == data.Address && m.ControlIP == data.IP && m.State == 3 ); + if (offList.Any()) { JobModel model = offList.FirstOrDefault(); @@ -199,7 +200,7 @@ namespace Epost.BLL qumodel.UserCode = model.UserCode; queueBLL.UpdateQueueTaskArea_Car(qumodel); #endregion - + List AllList = jobList.FindAll(m => m.Block == block && m.Area == area && m.ControlIP == data.IP && m.State == 3&&m.UserCode== model.UserCode); bool bo = orderbll.IsSkuFinishWork("", model.Matchid); if (bo) { @@ -209,7 +210,7 @@ namespace Epost.BLL } Thread.Sleep(30); #region 清除当前区已做完的sku - JobCache.UpdateJobModelList(offList, EcommendType.Execute); + JobCache.UpdateJobModelList(AllList, EcommendType.Execute); #endregion diff --git a/Epost.DAL/AddressstorageDAL.cs b/Epost.DAL/AddressstorageDAL.cs index e1ca2a4..1222cc2 100644 --- a/Epost.DAL/AddressstorageDAL.cs +++ b/Epost.DAL/AddressstorageDAL.cs @@ -301,7 +301,7 @@ namespace Epost.DAL { strwhere += "and shelfid ='" + shelfid + "'"; } - string sql = string.Format("select area,block,way from Addressstorage where type=1 " + strwhere + " group by area,block,way"); + string sql = string.Format("select distinct area,block,way from Addressstorage where type=1 " + strwhere + " group by area,block,way"); DataTable dt = db.GetsqlForDT(sql); return ModelConvertHelper.ConvertToList(dt); diff --git a/Epost.TestToolsWeb/Controllers/WebAPIController.cs b/Epost.TestToolsWeb/Controllers/WebAPIController.cs index d2ee70a..b183b42 100644 --- a/Epost.TestToolsWeb/Controllers/WebAPIController.cs +++ b/Epost.TestToolsWeb/Controllers/WebAPIController.cs @@ -76,10 +76,21 @@ namespace Epost.TestToolsWeb.Controllers data.Parameter =data.Quantity; - JobCache.UpdateJobDownModelList(new List() { data }, EdownCommend.Create); - + JobCache.UpdateJobDownModelList(new List() { data }, EdownCommend.Create); + } - + if (data.Command == "JOB_Fail") + { + + LogHelper.WriteLogInfo("设备报错:" + JsonHelper.SerializeObject(data), Log_Type.ERROR); + + ErrorLogModel errmodel = new ErrorLogModel(); + errmodel.Address = data.Address; + errmodel.ControlIP = data.IP; + addrbll.UpdateErrorState(data.Address, data.IP); + + } + } catch (Exception ex) diff --git a/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user b/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user index 5abbe67..1e9d669 100644 --- a/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user +++ b/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user @@ -7,7 +7,7 @@ <_PublishTargetUrl>D:\驿传\GuangzhouHuiFeng_DAS - True|2025-06-26T09:43:01.0379434Z||;True|2025-06-26T17:35:14.4249922+08:00||;True|2025-06-26T16:52:50.3133122+08:00||;True|2025-06-26T14:43:53.4124674+08:00||;True|2025-06-26T14:36:49.8290629+08:00||;True|2025-06-26T14:32:48.0261661+08:00||;True|2025-06-26T14:25:41.0829044+08:00||;True|2025-06-26T11:51:25.0046611+08:00||;True|2025-06-26T10:39:18.2677815+08:00||;True|2025-06-24T19:52:28.3640036+08:00||;True|2025-06-24T19:41:27.8431415+08:00||;True|2025-06-24T19:02:20.3384315+08:00||;True|2025-06-24T14:58:06.2128620+08:00||;False|2025-06-24T14:57:07.8710970+08:00||;True|2025-06-24T14:54:53.0047658+08:00||;True|2025-06-24T14:21:21.1147627+08:00||;False|2025-06-24T14:20:37.2040902+08:00||;True|2025-06-24T13:14:08.5696828+08:00||;True|2025-06-24T11:28:41.9414169+08:00||;False|2025-06-24T11:28:18.5427055+08:00||;True|2025-06-23T18:49:19.8150434+08:00||;False|2025-06-23T18:47:53.8200239+08:00||;True|2025-06-23T18:13:17.9954519+08:00||;True|2025-06-16T16:39:46.1896351+08:00||;True|2025-06-04T15:01:49.8008687+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||; + True|2025-06-27T09:35:33.5131523Z||;True|2025-06-26T17:43:01.0379434+08:00||;True|2025-06-26T17:35:14.4249922+08:00||;True|2025-06-26T16:52:50.3133122+08:00||;True|2025-06-26T14:43:53.4124674+08:00||;True|2025-06-26T14:36:49.8290629+08:00||;True|2025-06-26T14:32:48.0261661+08:00||;True|2025-06-26T14:25:41.0829044+08:00||;True|2025-06-26T11:51:25.0046611+08:00||;True|2025-06-26T10:39:18.2677815+08:00||;True|2025-06-24T19:52:28.3640036+08:00||;True|2025-06-24T19:41:27.8431415+08:00||;True|2025-06-24T19:02:20.3384315+08:00||;True|2025-06-24T14:58:06.2128620+08:00||;False|2025-06-24T14:57:07.8710970+08:00||;True|2025-06-24T14:54:53.0047658+08:00||;True|2025-06-24T14:21:21.1147627+08:00||;False|2025-06-24T14:20:37.2040902+08:00||;True|2025-06-24T13:14:08.5696828+08:00||;True|2025-06-24T11:28:41.9414169+08:00||;False|2025-06-24T11:28:18.5427055+08:00||;True|2025-06-23T18:49:19.8150434+08:00||;False|2025-06-23T18:47:53.8200239+08:00||;True|2025-06-23T18:13:17.9954519+08:00||;True|2025-06-16T16:39:46.1896351+08:00||;True|2025-06-04T15:01:49.8008687+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||; @@ -33,19 +33,19 @@ 04/04/2018 15:45:12 - 06/26/2025 17:42:57 + 06/27/2025 17:35:27 - 06/26/2025 17:42:57 + 06/27/2025 17:35:27 02/24/2020 15:29:24 - 06/26/2025 16:52:33 + 06/27/2025 11:53:36 - 06/26/2025 16:52:33 + 06/27/2025 11:53:36 04/29/2020 16:50:14 @@ -63,31 +63,31 @@ 10/23/2017 13:15:20 - 06/26/2025 17:42:44 + 06/27/2025 17:35:04 - 06/26/2025 17:42:44 + 06/27/2025 17:35:04 08/26/2020 18:09:48 - 06/26/2025 17:34:59 + 06/27/2025 11:53:37 - 06/26/2025 17:34:59 + 06/27/2025 11:53:37 - 06/26/2025 17:42:48 + 06/27/2025 17:35:09 - 06/26/2025 17:42:48 + 06/27/2025 17:35:09 - 06/26/2025 16:52:33 + 06/27/2025 11:53:36 - 06/26/2025 16:52:33 + 06/27/2025 11:53:36 09/06/2018 11:57:11 @@ -105,13 +105,13 @@ 04/29/2020 16:50:14 - 06/26/2025 16:33:42 + 06/27/2025 10:21:23 - 06/26/2025 16:33:43 + 06/27/2025 10:21:23 - 06/26/2025 16:33:42 + 06/27/2025 10:21:23 08/10/2018 18:51:54 @@ -5661,7 +5661,7 @@ 05/30/2022 16:58:47 - 06/26/2025 17:42:49 + 06/27/2025 17:35:12 04/04/2018 15:45:12 @@ -7581,7 +7581,7 @@ 07/04/2022 14:22:38 - 06/26/2025 16:52:38 + 06/27/2025 17:35:11 \ No newline at end of file diff --git a/PrintBoxFormsApp/PrintList.cs b/PrintBoxFormsApp/PrintList.cs index ec0da23..9029a69 100644 --- a/PrintBoxFormsApp/PrintList.cs +++ b/PrintBoxFormsApp/PrintList.cs @@ -18,9 +18,10 @@ namespace PrintBoxFormsApp { public partial class PrintList : Form { - - Print_BoxBLL boxbll = new Print_BoxBLL(); + + AddressstorageBLL addrBLL = new AddressstorageBLL(); + Print_BoxBLL boxbll = new Print_BoxBLL(); private Thread timerThreadDown;//创建线程11111111111111111111111111111 private Thread timerThreadUp;//创建线程 int SleepTime = 1; @@ -117,7 +118,7 @@ namespace PrintBoxFormsApp DataTable dt = boxbll.GetPrintList(areaitem.way); if (dt != null && dt.Rows.Count > 0) { - string filePath = ConfigurationManager.AppSettings["Print_Box" + areaitem.area]; + string filePath = ConfigurationManager.AppSettings["Print_Box" + areaitem.way]; LogHelper.WriteLogInfo("文件路径" + filePath + "\r\n"); foreach (DataRow item in dt.Rows) {