change - 入库完成逻辑

collectionStore
wenjy 1 year ago
parent 8679b2f818
commit e0ae21631b

Binary file not shown.

@ -4,8 +4,10 @@ using HighWayIot.Config;
using HighWayIot.Log4net; using HighWayIot.Log4net;
using HighWayIot.Repository.service; using HighWayIot.Repository.service;
using System; using System;
using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using static Aucma.Scada.Business.InStoreTaskHandle;
namespace Aucma.Scada.Business namespace Aucma.Scada.Business
{ {
@ -79,6 +81,7 @@ namespace Aucma.Scada.Business
{ {
_spaceInfoService = registerServices.GetService<IBaseSpaceInfoService>(); _spaceInfoService = registerServices.GetService<IBaseSpaceInfoService>();
_taskInfoService = registerServices.GetService<IRealTaskInfoService>(); _taskInfoService = registerServices.GetService<IRealTaskInfoService>();
taskHandle.InStoreFinsihEvent += TaskFeedback;
grabImage.RefreshMaterialCodeStrEvent += InStore; grabImage.RefreshMaterialCodeStrEvent += InStore;
grabImage.RefreshLogMessageEvent += PrintLogInfoMessage; grabImage.RefreshLogMessageEvent += PrintLogInfoMessage;
StartPassDown(); StartPassDown();
@ -299,28 +302,38 @@ namespace Aucma.Scada.Business
return taskInfo; return taskInfo;
} }
private void TaskFeedback(string storeCode,string taskCode)
{
if(storeCode == appConfig.shellStoreCode)
{
ShellTaskFeedback(taskCode);
}
else
{
LinerTaskFeedback(taskCode);
}
}
/// <summary> /// <summary>
/// 箱壳执行反馈 /// 箱壳执行反馈
/// </summary> /// </summary>
private void ShellTaskFeedback() private void ShellTaskFeedback(string taskCode)
{ {
Thread.Sleep(4000);
PrintLogInfoMessage("箱壳执行完成,自动释放信号量"); PrintLogInfoMessage("箱壳执行完成,自动释放信号量");
InStoreFinish(appConfig.shellStoreCode, taskCode);
shellSemaphore.Release(); shellSemaphore.Release();
} }
/// <summary> /// <summary>
/// 内胆执行反馈 /// 内胆执行反馈
/// </summary> /// </summary>
private void LinerTaskFeedback() private void LinerTaskFeedback(string LinerTaskFeedback)
{ {
Thread.Sleep(8000);
PrintLogInfoMessage("内胆执行完成,自动释放信号量"); PrintLogInfoMessage("内胆执行完成,自动释放信号量");
InStoreFinish(appConfig.linerStoreCode, LinerTaskFeedback);
linerSemaphore.Release(); linerSemaphore.Release();
} }
#endregion #endregion
@ -380,7 +393,7 @@ namespace Aucma.Scada.Business
} }
/// <summary> /// <summary>
/// 截条码 /// 截条码
/// </summary> /// </summary>
/// <param name="materialCode"></param> /// <param name="materialCode"></param>
/// <returns></returns> /// <returns></returns>
@ -394,5 +407,10 @@ namespace Aucma.Scada.Business
return result; return result;
} }
public List<RealTaskInfo> GetInStoreTask()
{
return _taskInfoService.GetTaskInfosByStoreCode(new string[] { appConfig.shellStoreCode,appConfig.linerStoreCode }, 1);
}
} }
} }

@ -222,6 +222,11 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
/// </summary> /// </summary>
public void Query() public void Query()
{ {
var info = inStoreBusiness.GetInStoreTask();
if (info != null)
{
info.ForEach(x => RefreshInStoreTask(x));
}
if (materialTypeCombox == "箱壳") if (materialTypeCombox == "箱壳")
{ {
materialTypeCombox = "X-001"; materialTypeCombox = "X-001";
@ -254,6 +259,7 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
/// </summary> /// </summary>
public void Init() public void Init()
{ {
Query();
MaterialNameList = new List<string>() MaterialNameList = new List<string>()
{ {
"SC232", "SC232",

Loading…
Cancel
Save