From 2b0d3b1a9f62e5ec48e4b559f95b3d4bdc3bee09 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周二, 01 4月 2025 10:45:22 +0800 Subject: [PATCH] 打印支持 10张 --- CC/iWareCC_ASRS/ThreadService/00_269工位/DataProcess_269.cs | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-) diff --git "a/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs" "b/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs" index 76b5f98..9f6c1b7 100644 --- "a/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/00_269\345\267\245\344\275\215/DataProcess_269.cs" @@ -1,9 +1,11 @@ 锘縰sing Admin.NET.Application; using iWareCC.Common.Helper; +using iWareCC.Forms; using iWareCC.StationService; using iWareCommon.Common.Globle; using iWareCommon.Utils; using iWareModel; +using iWareSql.DataAccess; using iWareSql.DBModel; using iWareSql.WmsDBModel; using System; @@ -12,6 +14,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; +using System.Windows.Forms; using XiGang.Core.Model; namespace iWareCC.ThreadService @@ -32,11 +35,30 @@ { Thread.Sleep(1000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆� SystemWarningMsg._lbl_alert_DataProcess_269 = string.Empty; + try { //if (SystemValue.isAllowRuning_DataProcess_269 && SystemValue.isStartedModel) if (SystemValue.isStartedModel) { + //澧炲姞楠岃瘉瀵嗙爜 銆怑ditby shaocx,2024-12-19銆� + using (WmsDBModel edm = new WmsDBModel()) + { + var isTrigger = WmsConfigEncryptionHandler.IsTrigger(edm); + if (isTrigger) + { + //瑕佹眰蹇呴』杈撳叆绠$悊鍛樺瘑鐮佹墠鍙互!!! + FormManagerPassword fr = new FormManagerPassword(); + fr.StartPosition = FormStartPosition.CenterScreen; + fr.ShowDialog(); + if (!fr.isValidateOk) + { + return; + } + } + } + + var rgvLocation = StationLocationEnum.棣栨鎵爜宸ヤ綅.ToString(); /* * 1銆佷粠鏁版嵁搴撲腑鍒ゆ柇鏄惁榻愬 @@ -76,6 +98,10 @@ Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�乸lc 浜哄伐鏀捐 鎴愬姛,WriteStation_PersonAllowAsync锛屽弬鏁�: 绔欑偣{rgvLocation}"); } } + + //鍐欏叆鎶ヨ淇℃伅 + await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_269_1); + SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 "; continue; //*/ @@ -117,10 +143,24 @@ WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, "269", "棣栨鎵爜"); + ////鏇存柊閰嶇疆 269_LastPackageUpi + //var bz30Config = wmsDB.SysConfig.Where(x => x.Code == "269_LastPackageUpi").FirstOrDefault(); + //if (bz30Config == null) + //{ + // SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = $"娌℃湁閰嶇疆 269_LastPackageUpi 鍊�"; + // continue; + //} + //bz30Config.Value = upiObj.PackageCode + "|" + upiObj.UPI; + FormCC.Globle_269_LastPackageUpi = upiObj.PackageCode + "|" + upiObj.UPI + "|" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + wmsDB.SaveChanges(); //*/ } } + else + { + SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()}-娌℃湁瑕佸鐞嗙殑鏁版嵁"; + } } } catch (Exception ex) -- Gitblit v1.9.3