From 6d97c9dfd51e148ba2f97114f18889871c278fa6 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期五, 03 一月 2025 16:38:55 +0800
Subject: [PATCH] 化成空托回流请求MoM接口改动
---
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
index 2c879f9..305be2d 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -63,9 +63,10 @@
private readonly IDt_StationManagerRepository _stationManagerRepository;
private readonly ICacheService _cacheService;
private readonly INoticeService _noticeService;
+ private readonly IDt_needBarcodeRepository _needBarcodeRepository;
private readonly IDeviceInfoRepository _deviceInfoRepository;
- public CommonConveyorLine_GWJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDeviceInfoRepository deviceInfoRepository)
+ public CommonConveyorLine_GWJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDt_needBarcodeRepository needBarcodeRepository, IDeviceInfoRepository deviceInfoRepository)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -77,6 +78,7 @@
_stationManagerRepository = stationManagerRepository;
_cacheService = cacheService;
_noticeService = noticeService;
+ _needBarcodeRepository = needBarcodeRepository;
_deviceInfoRepository = deviceInfoRepository;
}
@@ -369,17 +371,30 @@
WebResponseContent content = new WebResponseContent();
ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task);
taskCommand.InteractiveSignal = command.InteractiveSignal;
+ Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationPLC == conveyorLine.DeviceCode && x.stationChildCode == childDeviceCode);
if (task.PalletCode != command.ConveyorLineBarcode)
{
- var NGAddress = _platFormRepository.QueryFirst(x => x.PlatCode == task.TargetAddress).Capacity;
- taskCommand.ConveyorLineTargetAddress = (short)NGAddress;
+ //var NGAddress = _platFormRepository.QueryFirst(x => x.PlatCode == task.TargetAddress).Capacity;
+ //taskCommand.ConveyorLineTargetAddress = (short)NGAddress;
+ taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationNGChildCode);
}
else
{
- Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationPLC == conveyorLine.DeviceCode && x.stationChildCode == childDeviceCode);
+ //Dt_StationManager stationManager = _stationManagerRepository.QueryFirst(x => x.stationPLC == conveyorLine.DeviceCode && x.stationChildCode == childDeviceCode);
taskCommand.ConveyorLineTargetAddress = Convert.ToInt16(stationManager.stationLocation);
}
+ if (stationManager.stationPLC == "1018" && stationManager.stationArea == "Cache") //鏇存柊鍦ㄩ�旀暟鎹�
+ {
+ dt_needBarcode needBarcode = _needBarcodeRepository.QueryFirst(x => x.productLine == stationManager.productLine && x.toArea == stationManager.stationChildCode);
+
+ if (needBarcode != null)
+ {
+ needBarcode.inLineNum--;
+ _needBarcodeRepository.UpdateData(needBarcode);
+ }
+ }
+
conveyorLine.SendCommand(taskCommand, childDeviceCode);
conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode);
//ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
--
Gitblit v1.9.3