From 7dcd8da0f2467d077551ddd39f33be5836dd80a9 Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期四, 12 三月 2026 10:04:25 +0800
Subject: [PATCH] 取消老厂排程单信息中物料编号的合并
---
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs | 29 +++++++++++++++++++----------
1 files changed, 19 insertions(+), 10 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs"
index 4c9f433..45e4270 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderService.cs"
@@ -72,20 +72,29 @@
{
if (detailsByOrderId.TryGetValue(order.Id, out var details))
{
- // 鎸夌墿鏂欑紪鍙峰拰骞呭鐨勭粍鍚堝垎缁勶細鑻ョ墿鏂欎唬鐮佺浉鍚屼絾骞呭涓嶅悓锛屼細琚垎鎴愪笉鍚岀殑缁�
- var materialGroups = details
- .GroupBy(d => new {
- MaterialNo = d.MaterialNo,
- Width = d.Width
- })
- .Select(g => $"{g.Key.MaterialNo}({g.Key.Width})").ToList();
+ // 鑾峰彇鎵�鏈夌墿鏂欑紪鍙凤紝鍖呮嫭閲嶅鐨�
+ var allMaterialNos = details
+ .Select(d => d.MaterialNo)
+ .ToList();
- // 灏嗗垎缁勭粨鏋滃悎骞朵负涓�涓瓧绗︿覆锛屽涓粍涔嬮棿鐢ㄩ�楀彿鍒嗛殧
- order.MaterialNoWidth = string.Join(",", materialGroups);
+ // 鑾峰彇鎵�鏈夊敮涓�鐨勫箙瀹�
+ var uniqueWidths = details
+ .Select(d => d.Width.ToString())
+ .Distinct()
+ .ToList();
+
+ // 璁剧疆鐗╂枡缂栧彿锛屾墍鏈夌墿鏂欑紪鍙风敤鏂滄潬鍒嗛殧锛屽寘鎷噸澶嶇殑
+ order.MaterialNos = string.Join("/", allMaterialNos);
+
+ // 璁剧疆骞呭锛氬鏋滃箙瀹芥湁澶氫釜涓嶄竴鑷寸殑鏁板�煎氨鏄剧ず澶氫釜锛屽鏋滀竴鏍峰氨鏄剧ず涓�涓�
+ order.MaterialWides = uniqueWidths.Count == 1
+ ? uniqueWidths[0]
+ : string.Join("/", uniqueWidths);
}
else
{
- order.MaterialNoWidth = "";
+ order.MaterialNos = "";
+ order.MaterialWides = "";
}
}
}
--
Gitblit v1.9.3