diff --git a/.vs/HighWayIot/FileContentIndex/89c5918e-e35b-4c22-a87f-33cbb8cb56fb.vsidx b/.vs/HighWayIot/FileContentIndex/89c5918e-e35b-4c22-a87f-33cbb8cb56fb.vsidx new file mode 100644 index 00000000..f14da896 Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/89c5918e-e35b-4c22-a87f-33cbb8cb56fb.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/accf4364-998e-4a71-b234-e60cfd9b3258.vsidx b/.vs/HighWayIot/FileContentIndex/accf4364-998e-4a71-b234-e60cfd9b3258.vsidx new file mode 100644 index 00000000..7f8647ef Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/accf4364-998e-4a71-b234-e60cfd9b3258.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/c2a39328-fc9f-4740-acd6-c142a9ab523c.vsidx b/.vs/HighWayIot/FileContentIndex/c2a39328-fc9f-4740-acd6-c142a9ab523c.vsidx new file mode 100644 index 00000000..045e83fb Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/c2a39328-fc9f-4740-acd6-c142a9ab523c.vsidx differ diff --git a/.vs/HighWayIot/FileContentIndex/fc8340e9-6fa6-4d94-951d-2022635676ce.vsidx b/.vs/HighWayIot/FileContentIndex/fc8340e9-6fa6-4d94-951d-2022635676ce.vsidx new file mode 100644 index 00000000..25f564a1 Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/fc8340e9-6fa6-4d94-951d-2022635676ce.vsidx differ diff --git a/.vs/HighWayIot/v17/.suo b/.vs/HighWayIot/v17/.suo index 0de946ad..1d2aa27c 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 1700497f..8e4e2e9b 100644 --- a/Aucma.Scada.Business/InStoreBusiness.cs +++ b/Aucma.Scada.Business/InStoreBusiness.cs @@ -93,15 +93,15 @@ namespace Aucma.Scada.Business grabImage.RefreshLogMessageEvent += PrintLogInfoMessage; StartPassDown(); - Task.Run(() => - { - Thread.Sleep(6000); - for (int i = 1; i < 7; i++) - { - //InStore(appConfig.shellStoreCode, "B23600000781101902" + i); - InStore(appConfig.linerStoreCode, "L23600000788101902" + i); - } - }); + //Task.Run(() => + //{ + // Thread.Sleep(6000); + // for (int i = 1; i < 7; i++) + // { + // //InStore(appConfig.shellStoreCode, "B23600000781101902" + i); + // InStore(appConfig.linerStoreCode, "L23600000788101902" + i); + // } + //}); } diff --git a/Aucma.Scada.Business/OutStoreBusiness.cs b/Aucma.Scada.Business/OutStoreBusiness.cs index baf6aeaf..20de2263 100644 --- a/Aucma.Scada.Business/OutStoreBusiness.cs +++ b/Aucma.Scada.Business/OutStoreBusiness.cs @@ -121,7 +121,6 @@ namespace Aucma.Scada.Business { if (planInfo != null) { - string taskCode = DateTime.Now.ToString("HH:mm:ss"); var shellBomInfo = _bomInfoService.GetChildenBomInfoByMaterialCode(planInfo.materialCode, appConfig.shellMaterialType); var linerBomInfo = _bomInfoService.GetChildenBomInfoByMaterialCode(planInfo.materialCode, appConfig.linerMaterialType); @@ -129,6 +128,7 @@ namespace Aucma.Scada.Business { for (int i = 0; i < planInfo.planAmount - planInfo.completeAmount; i++) { + string taskCode = System.Guid.NewGuid().ToString("N").Substring(0,10); OutStore(appConfig.shellStoreCode, shellBomInfo, planInfo.executePlanCode, taskCode); Thread.Sleep(500); OutStore(appConfig.linerStoreCode, linerBomInfo, planInfo.executePlanCode, taskCode); @@ -267,14 +267,14 @@ 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; - } + //if (stockFlag) + //{ + // spaceInfo.spaceStock = spaceInfo.spaceStock > 0 ? spaceInfo.spaceStock - 1 : 0; + //} + //else + //{ + // spaceInfo.spaceStock = spaceInfo.spaceStock + 1; + //} _spaceInfoService.UpdateSpaceInfo(spaceInfo); } @@ -510,7 +510,8 @@ namespace Aucma.Scada.Business { //读取PLC获取货道信息:存放数量、在途数量 //spaceInfo.materialType = taskInfo.materialType; - if(spaceInfo.spaceStock == 0) + spaceInfo.spaceStock -= 1; + if (spaceInfo.spaceStock == 0) { spaceInfo.materialType = string.Empty; } @@ -595,7 +596,31 @@ namespace Aucma.Scada.Business /// public bool DeleteTaskInfoByTaskCode(string taskCode) { - return _taskInfoService.DeleteTaskInfo(taskCode); + 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 e43de603..818ce49e 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 68c0694b..d78c49bf 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 8c6a6cad..91c68326 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 2cedf09e..c533335f 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 9791b120..e3bf2daf 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 e43de603..818ce49e 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 68c0694b..d78c49bf 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 af085e1c..252383be 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 e43de603..818ce49e 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 68c0694b..d78c49bf 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/Aucma.Scada.UI.exe b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe index 2204b05c..2c8563a1 100644 Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.exe differ diff --git a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb index cbd10699..3450bfa2 100644 Binary files a/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb and b/Aucma.Scada.UI/bin/Debug/Aucma.Scada.UI.pdb differ diff --git a/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll b/Aucma.Scada.UI/bin/Debug/HighWayIot.Repository.dll index 8c6a6cad..91c68326 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 2cedf09e..c533335f 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 613d8617..bbdb2895 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/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe index 2204b05c..2c8563a1 100644 Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.exe differ diff --git a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb index cbd10699..3450bfa2 100644 Binary files a/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb and b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.pdb differ diff --git a/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs b/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs index 01d7fe49..a4bb2eb5 100644 --- a/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs +++ b/Aucma.Scada.UI/viewModel/InStoreInfo/InStoreInfoViewModel.cs @@ -21,6 +21,7 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo private ObservableCollection taskItems = new ObservableCollection(); private InStoreBusiness inStoreBusiness = InStoreBusiness.Instance; + private OutStoreBusiness outStoreBusiness = OutStoreBusiness.Instance; private AppConfig appConfig = AppConfig.Instance; public InStoreInfoViewModel() @@ -28,6 +29,7 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo inStoreBusiness.RefreshInStoreTaskEvent += RefreshInStoreTask; inStoreBusiness.RefreshScanMateriaCodeEvent += RefreshScanInfo; inStoreBusiness.RefreshLogMessageEvent += PrintMessageToListBox; + outStoreBusiness.RefreshStoreStockEvent += Init; QueryCommand = new RelayCommand(Query); @@ -289,6 +291,7 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo App.Current.Dispatcher.Invoke((Action)(() => { Query(); + Achievement.Clear(); MaterialNameList = new List() { "SC232", diff --git a/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache b/HighWayIot.Common/obj/Debug/HighWayIot.Common.csproj.AssemblyReference.cache index 2dae1733..30aa4592 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 d5515ce5..851c2e65 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 2db37a2e..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.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.AssemblyReference.cache b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.AssemblyReference.cache index fef83bd1..f23d94a8 100644 Binary files a/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.csproj.AssemblyReference.cache and b/HighWayIot.Mqtt/obj/Debug/HighWayIot.Mqtt.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 2d3de4b6..d7e9f1f5 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 8c6a6cad..91c68326 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 2cedf09e..c533335f 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 3f055fb0..515051d5 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 8c6a6cad..91c68326 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 2cedf09e..c533335f 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..11559c86 100644 --- a/HighWayIot.Repository/service/IRealTaskInfoService.cs +++ b/HighWayIot.Repository/service/IRealTaskInfoService.cs @@ -62,6 +62,10 @@ namespace HighWayIot.Repository.service /// List GetTaskInfosByStoreCode(string[] storeCode, int taskType); + 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..ad6c56d0 100644 --- a/HighWayIot.Repository/service/Impl/RealTaskInfoServiceImpl.cs +++ b/HighWayIot.Repository/service/Impl/RealTaskInfoServiceImpl.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; +using System.Threading.Tasks; namespace HighWayIot.Repository.service.Impl { @@ -207,5 +208,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 c70c8ff0..19f355b7 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 ce2f82af..91c68326 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 82671712..c533335f 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 1226add8..0d16a42f 100644 Binary files a/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache and b/HighWayIot/obj/Debug/HighWayIot.csproj.AssemblyReference.cache differ