diff --git a/.vs/HighWayIot/FileContentIndex/67e5a400-523f-42c6-a005-f903e81692ae.vsidx b/.vs/HighWayIot/FileContentIndex/67e5a400-523f-42c6-a005-f903e81692ae.vsidx new file mode 100644 index 00000000..d12357b4 Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/67e5a400-523f-42c6-a005-f903e81692ae.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/6d727bf7-847a-4930-be8f-7615b4819e63.vsidx b/.vs/HighWayIot/FileContentIndex/6d727bf7-847a-4930-be8f-7615b4819e63.vsidx new file mode 100644 index 00000000..69b5a8cc Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/6d727bf7-847a-4930-be8f-7615b4819e63.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/8a9ba467-9daf-482e-912a-ba4866fb2657.vsidx b/.vs/HighWayIot/FileContentIndex/8a9ba467-9daf-482e-912a-ba4866fb2657.vsidx new file mode 100644 index 00000000..5c2e4121 Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/8a9ba467-9daf-482e-912a-ba4866fb2657.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/d1acec63-3197-4787-abe4-fd1c85d17649.vsidx b/.vs/HighWayIot/FileContentIndex/d1acec63-3197-4787-abe4-fd1c85d17649.vsidx new file mode 100644 index 00000000..3b03cfa7 Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/d1acec63-3197-4787-abe4-fd1c85d17649.vsidx differ diff --git a/.vs/HighWayIot/v17/.suo b/.vs/HighWayIot/v17/.suo index 6bb36edf..a9d93763 100644 Binary files a/.vs/HighWayIot/v17/.suo and b/.vs/HighWayIot/v17/.suo differ diff --git a/Aucma.Scada.Business/InStoreBusiness.cs b/Aucma.Scada.Business/InStoreBusiness.cs index 80878e75..d3909d4e 100644 --- a/Aucma.Scada.Business/InStoreBusiness.cs +++ b/Aucma.Scada.Business/InStoreBusiness.cs @@ -96,14 +96,14 @@ namespace Aucma.Scada.Business grabImage.RefreshLogMessageEvent += PrintLogInfoMessage; StartPassDown(); - //Task.Run(() => - //{ - // Thread.Sleep(6000); - // for (int i = 1; i < 3; i++) - // { - // InStore("F23406001225101900" + i); - // } - //}); + Task.Run(() => + { + Thread.Sleep(6000); + for (int i = 1; i < 3; i++) + { + InStore("F23406001225101900" + i); + } + }); } /// diff --git a/Aucma.Scada.Business/OutStoreBusiness.cs b/Aucma.Scada.Business/OutStoreBusiness.cs index abf972bd..7f1124dc 100644 --- a/Aucma.Scada.Business/OutStoreBusiness.cs +++ b/Aucma.Scada.Business/OutStoreBusiness.cs @@ -258,16 +258,16 @@ namespace Aucma.Scada.Business spaceDetail.isFlag = detailIsFlag; var result = _spaceDetailService.UpdateSpaceDetail(spaceDetail); - if (stockFlag) - { - spaceInfo.spaceStock = spaceInfo.spaceStock > 0 ? spaceInfo.spaceStock - 1 : 0; - } - else - { - spaceInfo.spaceStock = spaceInfo.spaceStock + 1; - } - - _spaceInfoService.UpdateSpaceInfo(spaceInfo); + //if (stockFlag) + //{ + // spaceInfo.spaceStock = spaceInfo.spaceStock > 0 ? spaceInfo.spaceStock - 1 : 0; + //} + //else + //{ + // spaceInfo.spaceStock = spaceInfo.spaceStock + 1; + //} + + //_spaceInfoService.UpdateSpaceInfo(spaceInfo); } #region 轮询获取出库任务下发至PLC,等待PLC执行反馈,完成后再次下发 @@ -441,6 +441,7 @@ namespace Aucma.Scada.Business { //读取PLC获取货道信息:存放数量、在途数量 //spaceInfo.materialType = taskInfo.materialType; + spaceInfo.spaceStock -= 1; if (spaceInfo.spaceStock == 0) { spaceInfo.materialType = string.Empty; @@ -527,7 +528,31 @@ namespace Aucma.Scada.Business /// public bool DeleteTaskInfoByTaskCode(string taskCode) { - return _taskInfoService.DeleteTaskInfo(taskCode,appConfig.foamStoreCode); + bool result = false; + var info = _taskInfoService.GetTaskInfosByTaskCode(taskCode); + if (info != null) + { + foreach (var taskInfo in info) + { + if (taskInfo.taskStatus == 2) + { + PrintLogInfoMessage("任务正在执行中不运行删除"); + + continue; + } + result = _taskInfoService.DeleteTaskInfoById(taskInfo.objId); + if (result) + { + var spaceDetailInfo = _spaceDetailService.GetSpaceDetailByMaterialCode(taskInfo.materialCode); + if (spaceDetailInfo != null) + { + spaceDetailInfo.isFlag = 0; + _spaceDetailService.UpdateSpaceDetail(spaceDetailInfo); + } + } + } + } + return result; } /// diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll index 43f5690c..ed9557e3 100644 Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll differ diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb index caa8eaf5..01efa396 100644 Binary files a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.pdb differ diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll index 7fe51a59..f90a0807 100644 Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.dll differ diff --git a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb index 5643594b..d76c83a7 100644 Binary files a/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb and b/Aucma.Scada.Business/bin/Debug/HighWayIot.Repository.pdb differ diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache index de0ccd9a..0a1dc69a 100644 Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache differ diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll index 43f5690c..ed9557e3 100644 Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.dll differ diff --git a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb index caa8eaf5..01efa396 100644 Binary files a/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.pdb differ diff --git a/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache b/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache index bec4fb48..b8bb8c30 100644 Binary files a/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache and b/Aucma.Scada.HikRobot/obj/Debug/Aucma.Scada.HikRobot.csproj.AssemblyReference.cache differ diff --git a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.AssemblyReference.cache b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.AssemblyReference.cache index dbcd9fbc..75f86db8 100644 Binary files a/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.AssemblyReference.cache and b/Aucma.Scada.Model/obj/Debug/Aucma.Scada.Model.csproj.AssemblyReference.cache differ diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll index 43f5690c..ed9557e3 100644 Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.dll differ diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb index caa8eaf5..01efa396 100644 Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.Business.pdb differ diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll index 7fe51a59..f90a0807 100644 Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll differ diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb index 5643594b..d76c83a7 100644 Binary files a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb and b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.pdb differ diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache index 9f202ed2..86a1bf41 100644 Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache index 5f53964b..1f813c1f 100644 Binary files a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache and b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache index 959965cf..26b6864e 100644 Binary files a/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache and b/HighWayIot.Config/obj/Debug/HighWayIot.Config.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.AssemblyReference.cache b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.AssemblyReference.cache index ebb1331d..8e73522c 100644 Binary files a/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.AssemblyReference.cache and b/HighWayIot.Log4net/obj/Debug/HighWayIot.Log4net.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache index b1cc50a7..d88a5f60 100644 Binary files a/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache and b/HighWayIot.Plc/obj/Debug/HighWayIot.Plc.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll index 7fe51a59..f90a0807 100644 Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll and b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.dll differ diff --git a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb index 5643594b..d76c83a7 100644 Binary files a/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb and b/HighWayIot.Repository/bin/Debug/HighWayIot.Repository.pdb differ diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache index b25934e8..80d9ed34 100644 Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll index 7fe51a59..f90a0807 100644 Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.dll differ diff --git a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb index 5643594b..d76c83a7 100644 Binary files a/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb and b/HighWayIot.Repository/obj/Debug/HighWayIot.Repository.pdb differ diff --git a/HighWayIot.Repository/service/IRealTaskInfoService.cs b/HighWayIot.Repository/service/IRealTaskInfoService.cs index d0607791..7401e765 100644 --- a/HighWayIot.Repository/service/IRealTaskInfoService.cs +++ b/HighWayIot.Repository/service/IRealTaskInfoService.cs @@ -71,5 +71,9 @@ namespace HighWayIot.Repository.service /// List GetTaskInfosByTaskStatus(string[] storeCode, int taskType, int taskStatus); + List GetTaskInfosByTaskCode(string taskCode); + + bool DeleteTaskInfoById(int id); + } } diff --git a/HighWayIot.Repository/service/Impl/RealTaskInfoServiceImpl.cs b/HighWayIot.Repository/service/Impl/RealTaskInfoServiceImpl.cs index f0b7d1dd..348d5787 100644 --- a/HighWayIot.Repository/service/Impl/RealTaskInfoServiceImpl.cs +++ b/HighWayIot.Repository/service/Impl/RealTaskInfoServiceImpl.cs @@ -207,5 +207,26 @@ namespace HighWayIot.Repository.service.Impl } return taskInfos; } + + public List GetTaskInfosByTaskCode(string taskCode) + { + List taskInfos = null; + try + { + Expression> exp = s1 => true; + exp = exp.And(x => x.taskCode == taskCode); + taskInfos = _mesRepository.GetList(exp); + } + catch (Exception ex) + { + logHelper.Error("获取指定状态的任务信息异常", ex); + } + return taskInfos; + } + + public bool DeleteTaskInfoById(int id) + { + return _mesRepository.DeleteById(id); + } } } diff --git a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache index 97cc76ba..e42a1f16 100644 Binary files a/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache and b/HighWayIot.Rfid/obj/Debug/HighWayIot.Rfid.csproj.AssemblyReference.cache differ diff --git a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache index 36310472..65becccd 100644 Binary files a/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache and b/HighWayIot.TouchSocket/obj/Debug/HighWayIot.TouchSocket.csproj.AssemblyReference.cache differ diff --git a/HighWayIot/bin/Debug/HighWayIot.Repository.dll b/HighWayIot/bin/Debug/HighWayIot.Repository.dll index 7fe51a59..f90a0807 100644 Binary files a/HighWayIot/bin/Debug/HighWayIot.Repository.dll and b/HighWayIot/bin/Debug/HighWayIot.Repository.dll differ diff --git a/HighWayIot/bin/Debug/HighWayIot.Repository.pdb b/HighWayIot/bin/Debug/HighWayIot.Repository.pdb index 5643594b..d76c83a7 100644 Binary files a/HighWayIot/bin/Debug/HighWayIot.Repository.pdb and b/HighWayIot/bin/Debug/HighWayIot.Repository.pdb differ diff --git a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache index 52acd4f2..f016e4d4 100644 Binary files a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache and b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache differ