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.Repository.service;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using static Aucma.Scada.Business.InStoreTaskHandle;
namespace Aucma.Scada.Business
{
@ -79,6 +81,7 @@ namespace Aucma.Scada.Business
{
_spaceInfoService = registerServices.GetService<IBaseSpaceInfoService>();
_taskInfoService = registerServices.GetService<IRealTaskInfoService>();
taskHandle.InStoreFinsihEvent += TaskFeedback;
grabImage.RefreshMaterialCodeStrEvent += InStore;
grabImage.RefreshLogMessageEvent += PrintLogInfoMessage;
StartPassDown();
@ -299,28 +302,38 @@ namespace Aucma.Scada.Business
return taskInfo;
}
private void TaskFeedback(string storeCode,string taskCode)
{
if(storeCode == appConfig.shellStoreCode)
{
ShellTaskFeedback(taskCode);
}
else
{
LinerTaskFeedback(taskCode);
}
}
/// <summary>
/// 箱壳执行反馈
/// </summary>
private void ShellTaskFeedback()
private void ShellTaskFeedback(string taskCode)
{
Thread.Sleep(4000);
PrintLogInfoMessage("箱壳执行完成,自动释放信号量");
InStoreFinish(appConfig.shellStoreCode, taskCode);
shellSemaphore.Release();
}
/// <summary>
/// 内胆执行反馈
/// </summary>
private void LinerTaskFeedback()
private void LinerTaskFeedback(string LinerTaskFeedback)
{
Thread.Sleep(8000);
PrintLogInfoMessage("内胆执行完成,自动释放信号量");
InStoreFinish(appConfig.linerStoreCode, LinerTaskFeedback);
linerSemaphore.Release();
}
#endregion
@ -380,7 +393,7 @@ namespace Aucma.Scada.Business
}
/// <summary>
/// 截条码
/// 截条码
/// </summary>
/// <param name="materialCode"></param>
/// <returns></returns>
@ -394,5 +407,10 @@ namespace Aucma.Scada.Business
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>
public void Query()
{
var info = inStoreBusiness.GetInStoreTask();
if (info != null)
{
info.ForEach(x => RefreshInStoreTask(x));
}
if (materialTypeCombox == "箱壳")
{
materialTypeCombox = "X-001";
@ -254,6 +259,7 @@ namespace Aucma.Scada.UI.viewModel.InStoreInfo
/// </summary>
public void Init()
{
Query();
MaterialNameList = new List<string>()
{
"SC232",

Loading…
Cancel
Save