From 4f288baecfa30feb385ab39b63553de943ba965e Mon Sep 17 00:00:00 2001
From: chenyong <chenyong@hnkhzn.com>
Date: 星期五, 16 一月 2026 11:37:15 +0800
Subject: [PATCH] 1
---
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs | 17 +++++++++++++++--
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs | 13 -------------
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs | 7 +++++--
3 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs
index d5cc717..dca1ac8 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_CW/CommonConveyorLine_CWJob.cs
@@ -118,8 +118,11 @@
#region 璺敱鏂瑰紡
List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode);
- childDeviceCodes.Add("4000");
-
+ if (conveyorLine.DeviceCode == "1024")
+ {
+ childDeviceCodes.Add("4000");
+ }
+
foreach (string childDeviceCode in childDeviceCodes)
{
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
index d39fe99..34e555d 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -136,16 +136,29 @@
Dt_AreaInfo areaInfo = _AreaInfoRepository.QueryFirst(x => x.AreaCode == "CWSC1");
DtLocationInfo location = BaseDal.QueryFirst(x => x.Id == locationID);
DtStockInfo stock = _stockInfoRepository.QueryFirst(x => x.LocationId == location.Id && x.LocationCode == location.LocationCode);
+ string targetAddress = location.RoadwayNo switch
+ {
+ var s when s.StartsWith("CWSC") =>
+ int.TryParse(s.Substring(4), out var num)
+ ? num switch
+ {
+ >= 1 and <= 9 => "001-035-001",
+ >= 11 and <= 17 => "001-036-001"
+
+ }
+ : throw new Exception("鏈壘鍒拌宸烽亾淇℃伅"),
+ _ => throw new Exception("鏈壘鍒拌宸烽亾淇℃伅")
+ };
if (location.AreaId == areaInfo.AreaID)
{
Dt_Task task = new Dt_Task
{
Grade = 3,
Roadway = location.RoadwayNo,
- TargetAddress = "001-035-001",
+ TargetAddress = targetAddress,
Dispatchertime = DateTime.Now,
MaterialNo = "",
- NextAddress = "001-035-001",
+ NextAddress = targetAddress,
OrderNo = null,
PalletCode = stock == null ? "M" + DateTime.Now.ToString("MMddHHmmss") + "-" + new Random().Next(100, 1000) : stock.PalletCode,
SourceAddress = location.LocationCode,
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
index 7323b07..64a91b3 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -1233,19 +1233,6 @@
if (emergencyTask == null) throw new Exception("鐏鍙傛暟涓虹┖");
string[] strings = emergencyTask.LocationCode.Split("-");
string Roadway = strings[0];
- //switch (Roadways[0])
- //{
- // case "J":
- // Roadway = "JZSC" + Roadways[1];
- // break;
- // case "G":
- // Roadway = "GWSC" + Roadways[1];
- // break;
- // case "C":
- // Roadway = "CWSC" + Roadways[1];
- // break;
- // default: throw new Exception("鏈瘑鍒簱浣嶇紪鐮�");
- //}
int Row = Convert.ToInt16(strings[1]);
int Column= Convert.ToInt16(strings[2]);
int Layer= Convert.ToInt16(strings[3]);
--
Gitblit v1.9.3