diff --git a/.vs/HighWayIot/FileContentIndex/0af06a3b-64c0-4cdf-b680-2cc6c2b2a6fe.vsidx b/.vs/HighWayIot/FileContentIndex/0af06a3b-64c0-4cdf-b680-2cc6c2b2a6fe.vsidx
deleted file mode 100644
index 496fb3d3..00000000
Binary files a/.vs/HighWayIot/FileContentIndex/0af06a3b-64c0-4cdf-b680-2cc6c2b2a6fe.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/1bc3f51b-5d8f-47ce-9eb3-2a3ee066c7ad.vsidx b/.vs/HighWayIot/FileContentIndex/1bc3f51b-5d8f-47ce-9eb3-2a3ee066c7ad.vsidx
new file mode 100644
index 00000000..5bab1a92
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/1bc3f51b-5d8f-47ce-9eb3-2a3ee066c7ad.vsidx differ
diff --git a/.vs/HighWayIot/FileContentIndex/2d270758-b86e-4fba-a20c-82cbf6bbd2d9.vsidx b/.vs/HighWayIot/FileContentIndex/2d270758-b86e-4fba-a20c-82cbf6bbd2d9.vsidx
deleted file mode 100644
index 9b08473f..00000000
Binary files a/.vs/HighWayIot/FileContentIndex/2d270758-b86e-4fba-a20c-82cbf6bbd2d9.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/30aa79a7-558b-4e9f-b1ad-538ed06754e8.vsidx b/.vs/HighWayIot/FileContentIndex/30aa79a7-558b-4e9f-b1ad-538ed06754e8.vsidx
deleted file mode 100644
index 7aa4cd38..00000000
Binary files a/.vs/HighWayIot/FileContentIndex/30aa79a7-558b-4e9f-b1ad-538ed06754e8.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/5833bad1-3968-47b1-b70c-c3e5362ec87b.vsidx b/.vs/HighWayIot/FileContentIndex/5833bad1-3968-47b1-b70c-c3e5362ec87b.vsidx
deleted file mode 100644
index bf763f79..00000000
Binary files a/.vs/HighWayIot/FileContentIndex/5833bad1-3968-47b1-b70c-c3e5362ec87b.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/5a565e98-84ca-4fa1-96e0-7dd77e803d93.vsidx b/.vs/HighWayIot/FileContentIndex/5a565e98-84ca-4fa1-96e0-7dd77e803d93.vsidx
deleted file mode 100644
index c9cbe8eb..00000000
Binary files a/.vs/HighWayIot/FileContentIndex/5a565e98-84ca-4fa1-96e0-7dd77e803d93.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/9ffc3db2-8337-4574-8484-70555c82b67d.vsidx b/.vs/HighWayIot/FileContentIndex/9ffc3db2-8337-4574-8484-70555c82b67d.vsidx
new file mode 100644
index 00000000..ccb5f955
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/9ffc3db2-8337-4574-8484-70555c82b67d.vsidx differ
diff --git a/.vs/HighWayIot/FileContentIndex/bbe6be2b-f50c-484b-b01b-afc0e5ff6969.vsidx b/.vs/HighWayIot/FileContentIndex/bbe6be2b-f50c-484b-b01b-afc0e5ff6969.vsidx
deleted file mode 100644
index 81887320..00000000
Binary files a/.vs/HighWayIot/FileContentIndex/bbe6be2b-f50c-484b-b01b-afc0e5ff6969.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/d7fb0995-8339-44dd-be6c-65dbb2c7d6bc.vsidx b/.vs/HighWayIot/FileContentIndex/d7fb0995-8339-44dd-be6c-65dbb2c7d6bc.vsidx
deleted file mode 100644
index 5d463977..00000000
Binary files a/.vs/HighWayIot/FileContentIndex/d7fb0995-8339-44dd-be6c-65dbb2c7d6bc.vsidx and /dev/null differ
diff --git a/.vs/HighWayIot/FileContentIndex/db4a6e07-faf9-4c73-8bbc-70c8f44c031c.vsidx b/.vs/HighWayIot/FileContentIndex/db4a6e07-faf9-4c73-8bbc-70c8f44c031c.vsidx
new file mode 100644
index 00000000..0a741b57
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/db4a6e07-faf9-4c73-8bbc-70c8f44c031c.vsidx differ
diff --git a/.vs/HighWayIot/FileContentIndex/e4977901-dfe7-4723-9887-30e6bc3109f8.vsidx b/.vs/HighWayIot/FileContentIndex/e4977901-dfe7-4723-9887-30e6bc3109f8.vsidx
new file mode 100644
index 00000000..8367e77a
Binary files /dev/null and b/.vs/HighWayIot/FileContentIndex/e4977901-dfe7-4723-9887-30e6bc3109f8.vsidx differ
diff --git a/.vs/HighWayIot/v17/.suo b/.vs/HighWayIot/v17/.suo
index faf1d0ed..9cf570b2 100644
Binary files a/.vs/HighWayIot/v17/.suo and b/.vs/HighWayIot/v17/.suo differ
diff --git a/Aucma.Scada.Business/AssemblyPlanBusiness.cs b/Aucma.Scada.Business/AssemblyPlanBusiness.cs
index c9af9dcf..dc39a120 100644
--- a/Aucma.Scada.Business/AssemblyPlanBusiness.cs
+++ b/Aucma.Scada.Business/AssemblyPlanBusiness.cs
@@ -105,7 +105,7 @@ namespace Aucma.Scada.Business
//}
//_executePlanInfoService.UpdateRangeExecutePlanInfo(planInfos);
- RefreshExecutePlanInfoEvent?.Invoke(planInfos);
+ RefreshExecutePlanInfoEvent?.Invoke(planInfos.Where(x=>x.executeStatus != 3).ToList());
}
}
catch (Exception ex)
diff --git a/Aucma.Scada.Business/InStoreBusiness.cs b/Aucma.Scada.Business/InStoreBusiness.cs
index 155a9400..3026a941 100644
--- a/Aucma.Scada.Business/InStoreBusiness.cs
+++ b/Aucma.Scada.Business/InStoreBusiness.cs
@@ -90,8 +90,15 @@ namespace Aucma.Scada.Business
grabImage.RefreshLogMessageEvent += PrintLogInfoMessage;
StartPassDown();
- //InStore(appConfig.shellStoreCode, "B236000007811019001");
- //InStore(appConfig.linerStoreCode, "L236000007881019001");
+ //Task.Run(() =>
+ //{
+ // Thread.Sleep(6000);
+ // for(int i = 2;i<10;i++)
+ // {
+ // InStore(appConfig.shellStoreCode, "B23600000781101900"+i);
+ // InStore(appConfig.linerStoreCode, "L23600000788101900"+i);
+ // }
+ //});
}
///
@@ -308,12 +315,6 @@ namespace Aucma.Scada.Business
{
taskInfo = _taskInfoService.GetTaskInfoByStoreCode(storeCode, 1);
- if (taskInfo != null)
- {
- taskInfo.taskStatus = 2;
- _taskInfoService.UpdateTaskInfo(taskInfo);
- }
-
}
catch (Exception ex)
{
diff --git a/Aucma.Scada.Business/OutStoreBusiness.cs b/Aucma.Scada.Business/OutStoreBusiness.cs
index 9913ed7b..99a5b179 100644
--- a/Aucma.Scada.Business/OutStoreBusiness.cs
+++ b/Aucma.Scada.Business/OutStoreBusiness.cs
@@ -58,6 +58,10 @@ namespace Aucma.Scada.Business
/// 货道明细
///
private IBaseSpaceDetailService _spaceDetailService;
+
+ private IExecutePlanInfoService _executePlanInfoService;
+
+ private IProductPlanInfoService _productPlanInfoService;
#endregion
#region 委托事件
@@ -84,6 +88,9 @@ namespace Aucma.Scada.Business
///
public delegate void RefreshLogMessage(string message);
public event RefreshLogMessage RefreshLogMessageEvent;
+
+ public delegate void RefreshAssemblyPlanInit();
+ public event RefreshAssemblyPlanInit RefreshAssemblyPlanInitEvent;
#endregion
private OutStoreBusiness()
@@ -92,7 +99,8 @@ namespace Aucma.Scada.Business
_taskInfoService = registerServices.GetService();
_bomInfoService = registerServices.GetService();
_spaceDetailService = registerServices.GetService();
-
+ _executePlanInfoService = registerServices.GetService();
+ _productPlanInfoService = registerServices.GetService();
assemblyPlanBusiness.NextPassExecutePlanInfoEvent += PlanHandle;
taskHandleBusiness.OutStoreFinsihEvent += TaskFeedback;
StartPassDown();
@@ -299,6 +307,7 @@ namespace Aucma.Scada.Business
string shellCode = string.Empty;
string linerCode = string.Empty;
string taskCode = string.Empty;
+ string executePlanCode = string.Empty;
int iFlag = 0;
completedTasks = 0;
@@ -312,6 +321,7 @@ namespace Aucma.Scada.Business
foreach (var item in taskInfoList)
{
taskCode = item.taskCode;
+ executePlanCode = item.planCode;
if (item.storeCode == appConfig.shellStoreCode)
{
if (taskHandleBusiness.SendShellTask_OutStore(item))
@@ -365,6 +375,9 @@ namespace Aucma.Scada.Business
PrintLogInfoMessage($"出库任务:{taskCode};执行完成,绑定箱壳条码:{shellCode};内胆条码:{linerCode}");
+
+ UpdatePlanInfo(executePlanCode);
+
}
}
else
@@ -498,15 +511,16 @@ namespace Aucma.Scada.Business
}
_spaceInfoService.UpdateSpaceInfo(spaceInfo);
- //读取PLC获取物料类型进行绑定
}
//清除任务信息
_taskInfoService.DeleteTaskInfo(taskCode, storeCode);
+ _spaceDetailService.DeleteSpaceDetailByMaterialCode(taskInfo.materialCode);
+
//刷新界面
RefreshScanMateriaCodeEvent?.Invoke(string.Empty, string.Empty, string.Empty, taskInfo.storeCode);
}
-
+
}
catch (Exception ex)
{
@@ -514,6 +528,48 @@ namespace Aucma.Scada.Business
}
}
+ ///
+ /// 更新计划信息
+ ///
+ ///
+ private void UpdatePlanInfo(string planCode)
+ {
+ try
+ {
+ var executeInfo = _executePlanInfoService.GetExecutePlanInfoByPlanCode(planCode);
+ if (executeInfo != null)
+ {
+ executeInfo.completeAmount += 1;
+
+ if (executeInfo.completeAmount == executeInfo.planAmount)
+ {
+ executeInfo.executeStatus = 3;
+ }
+
+ _executePlanInfoService.UpdateExecutePlanInfo(executeInfo);
+
+ var productInfo = _productPlanInfoService.GetProductPlanByPlanCode(executeInfo.productPlanCode);
+ if(productInfo != null)
+ {
+ productInfo.completeAmount += 1;
+ if (productInfo.completeAmount == productInfo.planAmount)
+ {
+ productInfo.endTime = DateTime.Now;
+ }
+
+ _productPlanInfoService.UpdateProductPlanInfo(productInfo);
+ }
+ }
+
+ RefreshAssemblyPlanInitEvent?.Invoke();
+
+ }
+ catch(Exception ex)
+ {
+ PrintLogErrorMessage("计划信息更新异常", ex);
+ }
+ }
+
///
/// 获取出库任务
///
diff --git a/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll b/Aucma.Scada.Business/bin/Debug/Aucma.Scada.Business.dll
index 2adb8fdc..d03cdb13 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 73159a69..e96339a2 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/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache b/Aucma.Scada.Business/obj/Debug/Aucma.Scada.Business.csproj.AssemblyReference.cache
index d8fcae21..352a6a4e 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 2adb8fdc..d03cdb13 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 73159a69..e96339a2 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 af4fdb9e..6ae48cd8 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 63ddfe65..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 2adb8fdc..d03cdb13 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 73159a69..e96339a2 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 83079ff6..75af2188 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 3fddd301..4d10adb5 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/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache b/Aucma.Scada.UI/obj/Debug/Aucma.Scada.UI.csproj.AssemblyReference.cache
index 995be94d..6a4d5f7c 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 83079ff6..75af2188 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 3fddd301..4d10adb5 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/AssemblyPlan/AssemblyPlanViewModel.cs b/Aucma.Scada.UI/viewModel/AssemblyPlan/AssemblyPlanViewModel.cs
index b50d9907..394fdcfc 100644
--- a/Aucma.Scada.UI/viewModel/AssemblyPlan/AssemblyPlanViewModel.cs
+++ b/Aucma.Scada.UI/viewModel/AssemblyPlan/AssemblyPlanViewModel.cs
@@ -21,6 +21,8 @@ namespace Aucma.Scada.UI.viewModel.AssemblyPlan
private AppConfig appConfig = AppConfig.Instance;
+ private OutStoreBusiness outStoreBusiness = OutStoreBusiness.Instance;
+
public AssemblyPlanViewModel()
{
MoveUpCommand = new RelayCommand