From 1fb400ef4e1169146296681e58185097d479e48f Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 10 四月 2026 22:10:50 +0800
Subject: [PATCH] feat(任务服务): 根据库存Remark确定目标地址并移除MES出站调用
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
index fe278a6..e06a6cf 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -19,6 +19,7 @@
using WIDESEA_DTO.Stock;
using WIDESEA_DTO.Task;
using WIDESEA_IBasicService;
+using WIDESEA_IRecordService;
using WIDESEA_IStockService;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
@@ -37,6 +38,7 @@
private readonly ITask_HtyService _task_HtyService;
private readonly IStockInfo_HtyService _stockInfo_HtyService;
private readonly IUnitOfWorkManage _unitOfWorkManage;
+ private readonly IRecordService _recordService;
public IRepository<Dt_Task> Repository => BaseDal;
@@ -60,7 +62,8 @@
IMesService mesService,
ITask_HtyService task_HtyService,
IStockInfo_HtyService stockInfo_HtyService,
- IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+ IUnitOfWorkManage unitOfWorkManage,
+ IRecordService recordService) : base(BaseDal)
{
_mapper = mapper;
_stockInfoService = stockInfoService;
@@ -72,6 +75,7 @@
_task_HtyService = task_HtyService;
_stockInfo_HtyService = stockInfo_HtyService;
_unitOfWorkManage = unitOfWorkManage;
+ _recordService = recordService;
}
/// <summary>
@@ -166,5 +170,25 @@
return _roundRobinService.GetNextAddress(matchedPrefix, addresses);
}
+ /// <summary>
+ /// 鏍规嵁搴撳瓨 Remark 纭畾鐩爣鍦板潃锛圙W_1鈫抂11001,11010]杞锛孏W_2鈫扖WSC1锛孋W_1鈫�22001锛夈��
+ /// </summary>
+ private string DetermineTargetAddressByRemark(string remark, string roadway, Dictionary<string, List<string>> addressMap)
+ {
+ // 鏍规嵁 Remark 纭畾鐩爣鍦板潃
+ if (!string.IsNullOrWhiteSpace(remark))
+ {
+ return remark switch
+ {
+ "GW_1" => _roundRobinService.GetNextAddress("GW_1", new List<string> { "11001", "11010" }),
+ "GW_2" => "CWSC1",
+ "CW_1" => "22001",
+ _ => DetermineTargetAddress(roadway, addressMap)
+ };
+ }
+
+ // Remark 涓虹┖鏃讹紝鍥為��鍒板贩閬撻厤缃�
+ return DetermineTargetAddress(roadway, addressMap);
+ }
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.3