From e8d43cd5052b7a626c13475f80cdcf0fdb99fc55 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期二, 29 十月 2024 19:57:35 +0800 Subject: [PATCH] 增加字段 优化打印入库标签逻辑 --- Tiger.Model.Net/Entitys/MES/MES_WO_OPER.cs | 7 ++++++- Tiger.Model.Net/Entitys/MES/MES_WO_NODE.cs | 15 ++++++++++----- Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs | 11 ++++++----- Tiger.Model.Net/Entitys/MES/MES_PROD_OPER.cs | 15 ++++++++++----- Tiger.Model.Net/Entitys/MES/MES_ROUTE_NODE.cs | 7 ++++++- 5 files changed, 38 insertions(+), 17 deletions(-) diff --git a/Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs b/Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs index e066dbd..681a240 100644 --- a/Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs +++ b/Tiger.Business.MES/WorkAction/PrintInStoreLabel.cs @@ -25,6 +25,7 @@ #endregion public BAS_LABEL_TEMP Label { get; set; } public List<BAS_LABEL_PV> LabelPV { get; set; } + public WipPkg CurPkg { get; set; } public bool NoNeedInStorePrint { get; set; } #endregion Propertys & Variables @@ -44,6 +45,7 @@ Label = Biz.Db.Queryable<BAS_LABEL_TEMP>().Where(q => q.LABEL_CODE == setting.LABEL_CODE).IncludesAllFirstLayer().First(); LabelPV = Biz.Db.Queryable<BAS_LABEL_PV>().ToList(); + CurPkg = CurPosition.Context.ContainsKey("CurPackage") ? CurPosition.Context["CurPackage"] as WipPkg : null; CurStep.Message = Biz.L("绛夊緟鏍囩鎵撳嵃"); CurStep.Status = StepStatus.Normal; @@ -76,14 +78,14 @@ { //璁剧疆鎵撳嵃鍙橀噺鍊� Label = CurPosition.SetLabelVariables(LabelPV, Label, this); - if (CurPosition.Context.ContainsKey("CurPackage")) + if (!CurPkg.IsNullOrEmpty()) { - (CurPosition.Context["CurPackage"] as WipPkg).InStoreActID = NodeAct.ID; - (CurPosition.Context["CurPackage"] as WipPkg).InStoreLabel = Label; + CurPkg.InStoreActID = NodeAct.ID; + CurPkg.InStoreLabel = Label; } //鍒ゆ柇鏄惁闇�瑕佹墦鍗板叆搴撴爣绛� - NoNeedInStorePrint = (!CurPosition.Context.ContainsKey("CurPackage") || !(CurPosition.Context["CurPackage"] as WipPkg).IsFinished) + NoNeedInStorePrint = (!CurPkg.IsNullOrEmpty() || !CurPkg.IsFinished) || (CurPosition is YadaPacking && (CurPosition as YadaPacking).IsPrintCustomerLabel); if (NoNeedInStorePrint) { @@ -140,7 +142,6 @@ { var action = new ApiAction<SubmitOutput>(new SubmitOutput()); - var CurPkg = CurPosition.Context.ContainsKey("CurPackage") ? CurPosition.Context["CurPackage"] as WipPkg : null; //璁板綍琛屼负鎿嶄綔璁板綍 var wipActs = new List<MES_WIP_ACT>(); foreach (var wipSn in CurPosition.CurWipSNs) diff --git a/Tiger.Model.Net/Entitys/MES/MES_PROD_OPER.cs b/Tiger.Model.Net/Entitys/MES/MES_PROD_OPER.cs index 32c33ed..7b87732 100644 --- a/Tiger.Model.Net/Entitys/MES/MES_PROD_OPER.cs +++ b/Tiger.Model.Net/Entitys/MES/MES_PROD_OPER.cs @@ -72,7 +72,7 @@ /// 鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N) /// </summary> [DisplayName("鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N)")] - public string ALLOW_DFT_IN { get; set; } + public string ALLOW_DFT_IN { get; set; } = "N"; /// <summary> /// 鏄惁鎶曞叆绔�(Y/N) /// </summary> @@ -83,10 +83,15 @@ /// </summary> [DisplayName("鏄惁浜у嚭绔�(Y/N)")] public string IS_OUTPUT { get; set; } - /// <summary> - /// 璁剧疆鍊�1 - /// </summary> - [DisplayName("璁剧疆鍊�1")] + /// <summary> + /// 浜у搧琚垽鏂笉鑹悗鏄惁涓嬬嚎(Y/N) + /// </summary> + [DisplayName("浜у搧琚垽鏂笉鑹悗鏄惁涓嬬嚎(Y/N)")] + public string IF_DFT_OFFLINE { get; set; } = "N"; + /// <summary> + /// 璁剧疆鍊�1 + /// </summary> + [DisplayName("璁剧疆鍊�1")] public string OPTION_1 { get; set; } /// <summary> /// 璁剧疆鍊�2 diff --git a/Tiger.Model.Net/Entitys/MES/MES_ROUTE_NODE.cs b/Tiger.Model.Net/Entitys/MES/MES_ROUTE_NODE.cs index e63c87b..416c3f1 100644 --- a/Tiger.Model.Net/Entitys/MES/MES_ROUTE_NODE.cs +++ b/Tiger.Model.Net/Entitys/MES/MES_ROUTE_NODE.cs @@ -92,7 +92,7 @@ /// 鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N) /// </summary> [DisplayName("鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N)")] - public string ALLOW_DFT_IN { get; set; } + public string ALLOW_DFT_IN { get; set; } = "N"; /// <summary> /// 鏄惁鎶曞叆绔�(Y/N) /// </summary> @@ -104,6 +104,11 @@ [DisplayName("鏄惁浜у嚭绔�(Y/N)")] public string IS_OUTPUT { get; set; } /// <summary> + /// 浜у搧琚垽鏂笉鑹悗鏄惁涓嬬嚎(Y/N) + /// </summary> + [DisplayName("浜у搧琚垽鏂笉鑹悗鏄惁涓嬬嚎(Y/N)")] + public string IF_DFT_OFFLINE { get; set; } = "N"; + /// <summary> /// 璁剧疆鍊�1 /// </summary> [DisplayName("璁剧疆鍊�1")] diff --git a/Tiger.Model.Net/Entitys/MES/MES_WO_NODE.cs b/Tiger.Model.Net/Entitys/MES/MES_WO_NODE.cs index 647f568..342d3e7 100644 --- a/Tiger.Model.Net/Entitys/MES/MES_WO_NODE.cs +++ b/Tiger.Model.Net/Entitys/MES/MES_WO_NODE.cs @@ -107,7 +107,7 @@ /// 鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N) /// </summary> [DisplayName("鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N)")] - public string ALLOW_DFT_IN { get; set; } + public string ALLOW_DFT_IN { get; set; } = "N"; /// <summary> /// 鏄惁鎶曞叆绔�(Y/N) /// </summary> @@ -118,10 +118,15 @@ /// </summary> [DisplayName("鏄惁浜у嚭绔�(Y/N)")] public string IS_OUTPUT { get; set; } - /// <summary> - /// 璁剧疆鍊�1 - /// </summary> - [DisplayName("璁剧疆鍊�1")] + /// <summary> + /// 浜у搧琚垽鏂笉鑹悗鏄惁涓嬬嚎(Y/N) + /// </summary> + [DisplayName("浜у搧琚垽鏂笉鑹悗鏄惁涓嬬嚎(Y/N)")] + public string IF_DFT_OFFLINE { get; set; } = "N"; + /// <summary> + /// 璁剧疆鍊�1 + /// </summary> + [DisplayName("璁剧疆鍊�1")] public string OPTION_1 { get; set; } /// <summary> /// 璁剧疆鍊�2 diff --git a/Tiger.Model.Net/Entitys/MES/MES_WO_OPER.cs b/Tiger.Model.Net/Entitys/MES/MES_WO_OPER.cs index e4aa40c..14a99f0 100644 --- a/Tiger.Model.Net/Entitys/MES/MES_WO_OPER.cs +++ b/Tiger.Model.Net/Entitys/MES/MES_WO_OPER.cs @@ -77,7 +77,7 @@ /// 鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N) /// </summary> [DisplayName("鏄惁鍏佽涓嶈壇鍝佽繘绔�(Y/N)")] - public string ALLOW_DFT_IN { get; set; } + public string ALLOW_DFT_IN { get; set; } = "N"; /// <summary> /// 鏄惁鎶曞叆绔�(Y/N) /// </summary> @@ -89,6 +89,11 @@ [DisplayName("鏄惁浜у嚭绔�(Y/N)")] public string IS_OUTPUT { get; set; } /// <summary> + /// 浜у搧琚垽鏂笉鑹悗鏄惁涓嬬嚎(Y/N) + /// </summary> + [DisplayName("浜у搧琚垽鏂笉鑹悗鏄惁涓嬬嚎(Y/N)")] + public string IF_DFT_OFFLINE { get; set; } = "N"; + /// <summary> /// 璁剧疆鍊�1 /// </summary> [DisplayName("璁剧疆鍊�1")] -- Gitblit v1.9.3