From e3cfda747bd53f4550904d60cd13aa8f4e525739 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 01 十二月 2025 18:52:17 +0800
Subject: [PATCH] 更新WMS接口等
---
项目代码/WCSServices/WIDESEAWCS_Tasks/二期线体/ConveyorLineJob2.cs | 47 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 39 insertions(+), 8 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs"
index 5a91d08..2cd34b8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs"
@@ -10,6 +10,7 @@
using WIDESEAWCS_Common;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
@@ -45,41 +46,71 @@
CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams");
if (conveyorLine != null)
{
- #region 绔欏彴鏂瑰紡
-
List<Dt_StationManger> stationManagers = _stationMangerRepository.QueryData(x => x.StationDeviceCode == conveyorLine.DeviceCode);
foreach (var station in stationManagers)
{
- if (station.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) //鎷i�夌敵璇�
+ if (station.StationType==StationTypeEnum.StationType_OnlyOutbound.ObjToInt())
{
+ //鎷i�夌敵璇�
bool PickRequest = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.R_PickRequest, station.StationCode);
if (PickRequest)
{
- string PickBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, station.StationCode).Replace("\0", "");
+ string PickBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, station.StationCode).Trim();
//涓婃姤WMS鏂欑鍒拌揪
if (PickBarCode.IsNotEmptyOrNull())
{
- WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, PickBarCode);
+ //WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, PickBarCode);
+ WebResponseContent content = WebResponseContent.Instance.OK();
if (content.Status)
{
//鍐欏叆鎷i�夌‘璁�
+ conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)300, station.StationCode);
+ }
+ else
+ {
+ WriteError(nameof(conveyorLine.DeviceCode), $"{station.PickStationCode}鎷i�夌敵璇蜂笂鎶MS閿欒锛屼俊鎭瘂content.Message}");
}
}
else
{
- WriteError(nameof(conveyorLine.DeviceCode), $"{station.StationCode}鎷i�夌敵璇蜂负{PickRequest}鏉$爜涓虹┖鍊�");
+ WriteError(nameof(conveyorLine.DeviceCode), $"{station.PickStationCode}鎷i�夌敵璇蜂负{PickRequest}鏉$爜涓虹┖鍊�");
}
}
}
else
{
-
+ //鍏ュ簱鐢宠
+ bool InRequest = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.R_InRequest, station.StationCode);
+ bool InResponse = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.W_InResponse, station.StationCode);
+ int InWeight = conveyorLine.GetValue<ConveyorLineDBName, int>(ConveyorLineDBName.R_InWeight, station.StationCode);
+ if (InRequest && !InResponse && InWeight>0)
+ {
+ string InBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_InBarCode, station.StationCode).Trim();
+ //鏂欑鍒拌揪
+ if (InBarCode.IsNotEmptyOrNull())
+ {
+ //鐢宠鍏ュ簱浠诲姟
+ WebResponseContent content =_taskService.RequestInTask(station.StationCode,InBarCode);
+ if (content.Status)
+ {
+ //鍐欏叆鍏ュ簱纭
+ conveyorLine.SetValue(ConveyorLineDBName.W_InResponse, true, station.StationCode);
+ }
+ else
+ {
+ WriteError(nameof(conveyorLine.DeviceCode), $"绔欏彴{station.StationCode}鏂欑{InBarCode}鐢宠鍏ュ簱浠诲姟閿欒锛屼俊鎭瘂content.Message}");
+ }
+ }
+ else
+ {
+ WriteError(nameof(conveyorLine.DeviceCode), $"绔欏彴{station.StationCode}鍏ュ簱鐢宠涓簕InRequest}鏉$爜涓虹┖鍊�");
+ }
+ }
}
}
- #endregion 绔欏彴鏂瑰紡
}
}
catch (Exception ex)
--
Gitblit v1.9.3