From 2e2033964d99196d94b0abd9f3364b9b2387b324 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 02 一月 2025 23:28:23 +0800 Subject: [PATCH] 优化 ImportWoPlan.cs 代码逻辑,减少冗余并增加状态处理 --- Tiger.Business.MES/BIZ/BizPrintInstoreDoc.cs | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Tiger.Business.MES/BIZ/BizPrintInstoreDoc.cs b/Tiger.Business.MES/BIZ/BizPrintInstoreDoc.cs index 3089f56..3dabf0c 100644 --- a/Tiger.Business.MES/BIZ/BizPrintInstoreDoc.cs +++ b/Tiger.Business.MES/BIZ/BizPrintInstoreDoc.cs @@ -32,7 +32,7 @@ var result = new ApiAction<List<BAS_LABEL_TEMP>>(); try { - + List<BAS_LABEL_TEMP> labels = new List<BAS_LABEL_TEMP>(); int i = 1; int j = 1; foreach (var p in input.printJsons) @@ -63,7 +63,7 @@ } if (item.VAR_NAME.StartsWith("BoxQty")) { - item.Value = v.PLAN_QTY.ToString(); + item.Value = v.CartonQty.ToString(); } if (item.VAR_NAME.StartsWith("InQty")) { @@ -75,7 +75,7 @@ } if (item.VAR_NAME.StartsWith("SapCode")) { - item.Value = v.ITEM_CODE; + item.Value = v.SapCode; } if (item.VAR_NAME.StartsWith("Seq")) { @@ -96,8 +96,10 @@ item.Value = DateTime.Now.ToString("yyyyy.MM.dd"); } } + labels.Add(label); j++; - } + } + result.Data = labels; } catch (Exception ex) { -- Gitblit v1.9.3