From 1f1daf8fd3b6fd0759d17facc0ad97562e516a3a Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 10 九月 2024 17:38:13 +0800 Subject: [PATCH] 包装规则保存 --- Tiger.Business/MES/Biz.Route.cs | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Tiger.Business/MES/Biz.Route.cs b/Tiger.Business/MES/Biz.Route.cs index 38f5200..771a429 100644 --- a/Tiger.Business/MES/Biz.Route.cs +++ b/Tiger.Business/MES/Biz.Route.cs @@ -273,20 +273,26 @@ try { var _route = Db.Queryable<MES_ROUTE>().Where(x => x.ROT_CODE == route.ROT_CODE).First(); - if (_route != null && Db.Queryable<MES_ROUTE_NODE>().Where(x => x.ROT_ID == _route.ID).Any()) + //if (_route != null && Db.Queryable<MES_ROUTE_NODE>().Where(x => x.ROT_ID == _route.ID).Any()) + //{ + // result.IsSuccessed = false; + // result.LocaleMsg = new($"宸ヨ壓璺嚎宸茬粡鏈夎璁¤褰曪紝涓嶈兘淇濆瓨锛�"); + // return result; + //} + if (_route != null && Db.Queryable<MES_PROD_OPER>().Where(x => x.ROT_ID == _route.ID).Any()) { result.IsSuccessed = false; - result.LocaleMsg = new($"宸ヨ壓璺嚎宸茬粡鏈夎璁¤褰曪紝涓嶈兘淇濆瓨锛�"); + result.LocaleMsg = new($"宸ヨ壓璺嚎宸茬粡鏈夌粦瀹氳褰曪紝涓嶈兘淇濆瓨锛�"); return result; } var db = Db; var dbTran = db.UseTran(() => { var y = db.Storageable(route) - .WhereColumns(t => new { t.ROT_CODE, t.GHOST_ROW }) + //.WhereColumns(t => new { t.ROT_CODE, t.GHOST_ROW }) .ToStorage(); y.AsInsertable.ExecuteCommand(); - y.AsUpdateable.IgnoreColumns(x => x.ID).ExecuteCommand(); + y.AsUpdateable.ExecuteCommand(); }); if (!dbTran.IsSuccess) { -- Gitblit v1.9.3