From 9fe67118a220448d5d9647733d6c8308f069e4da Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期日, 13 十月 2024 16:05:23 +0800 Subject: [PATCH] 增加工艺路线必须要有结束节点,及其流程相应优化 增加工单批次自动关单 增加判断条码是未投入生产还是已经完工产出 --- Tiger.Business.MES/BIZ/BIZ_MES_WO.cs | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tiger.Business.MES/BIZ/BIZ_MES_WO.cs b/Tiger.Business.MES/BIZ/BIZ_MES_WO.cs index a09f5cd..ec3383a 100644 --- a/Tiger.Business.MES/BIZ/BIZ_MES_WO.cs +++ b/Tiger.Business.MES/BIZ/BIZ_MES_WO.cs @@ -140,7 +140,7 @@ result.LocaleMsg = new($"宸ュ崟[{input.Wo.ORDER_NO}]宸茬粡瀛樺湪宸ュ崟鎵规[{_batch.BATCH_NO}]鍦ㄧ嚎浣揫{input.WoBatch.ACT_LINE}]涓姸鎬佷负[{_batch.STATUS.GetEnumDesc<BIZ_MES_WO.STATUSs>()}]锛屼笉鑳戒笅鍙戯紒"); return result; } - WoContext.RemoveBatch(input.WoBatch.BATCH_NO); + //WoContext.RemoveBatch(input.WoBatch.BATCH_NO); input.Wo.ACT_LINE = input.WoBatch.ACT_LINE; input.Wo.RELEASE_TIME = DateTime.Now; input.Wo.RELEASE_USER = input.WoBatch.UPDATE_USER; @@ -207,7 +207,7 @@ var db = Biz.Db; var dbTran = db.UseTran(() => { - db.Updateable(_wo, input.UserId).UpdateColumns(x => new { x.STATUS, x.ROUTE_STATUS }).ExecuteCommand(); + db.Updateable(_wo, input.UserId).UpdateColumns(x => new { x.STATUS, x.ROUTE_STATUS, x.UPDATE_USER, x.UPDATE_TIME }).ExecuteCommand(); }); if (!dbTran.IsSuccess) { @@ -241,7 +241,7 @@ _woBatch.STATUS = input.Status < 0 ? _woBatch.STATUS : input.Status; if (input.Status == BIZ_MES_WO_BATCH.STATUSs.Paused.GetValue()) { - WoContext.RemoveBatch(input.WoBatch); + //WoContext.RemoveBatch(input.WoBatch); } //濡傛灉鏄笅鍙� if (input.Status == BIZ_MES_WO_BATCH.STATUSs.Release.GetValue()) @@ -270,11 +270,11 @@ //濡傛灉鏄笅鍙� if (input.Status == BIZ_MES_WO_BATCH.STATUSs.Release.GetValue()) { - db.Updateable(_woBatch, input.UserId).UpdateColumns(x => new { x.STATUS, x.RELEASE_USER, x.RELEASE_TIME, x.ACT_LINE }).ExecuteCommand(); + db.Updateable(_woBatch, input.UserId).UpdateColumns(x => new { x.STATUS, x.RELEASE_USER, x.RELEASE_TIME, x.ACT_LINE, x.UPDATE_USER, x.UPDATE_TIME }).ExecuteCommand(); } else { - db.Updateable(_woBatch, input.UserId).UpdateColumns(x => new { x.STATUS }).ExecuteCommand(); + db.Updateable(_woBatch, input.UserId).UpdateColumns(x => new { x.STATUS, x.UPDATE_USER, x.UPDATE_TIME }).ExecuteCommand(); } }); if (!dbTran.IsSuccess) -- Gitblit v1.9.3