服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-09-11 41a4105259344fa33706fa4ecc88e54d2d181005
Tiger.Business.MES/BIZ/BAS_PKG_RULE.cs
@@ -29,21 +29,30 @@
            var result = new ApiAction();
            try
            {
                //var _wo = Biz.Db.Queryable<BIZ_MES_WO>().Where(x => x.ORDER_NO == wo.ORDER_NO).First();
                //if (_wo != null && _wo.STATUS != (int)BIZ_MES_WO.STATUSs.Init)
                //{
                //    result.IsSuccessed = false;
                //    result.LocaleMsg = new($"工单已经存在且不是初始化状态,不能保存修改!");
                //    return result;
                //}
                var db = Biz.Db;
                var dbTran = db.UseTran(() =>
                {
                    //var y = db.Storageable(wo)
                    //   .WhereColumns(t => new { t.ORDER_NO, t.GHOST_ROW })
                    //   .ToStorage();
                    //y.AsInsertable.ExecuteCommand();
                    //y.AsUpdateable.IgnoreColumns(x => x.ID).ExecuteCommand();
                    //if (input.PkgRule!=null)
                    //{
                    //    var y = db.Storageable(input.PkgRule)
                    //       .WhereColumns(t => new { t.ID, t.GHOST_ROW })
                    //       .ToStorage();
                    //    y.AsInsertable.ExecuteCommand();
                    //    y.AsUpdateable.ExecuteCommand();
                    //}
                    var z = db.Storageable(input.PkgDtl)
                       .WhereColumns(t => new { t.ID, t.GHOST_ROW })
                       .ToStorage();
                    z.AsInsertable.ExecuteCommand();
                    z.AsUpdateable.ExecuteCommand();
                    var o = db.Storageable(input.PkgProd)
                       .WhereColumns(t => new { t.ID, t.GHOST_ROW })
                       .ToStorage();
                    o.AsInsertable.ExecuteCommand();
                    o.AsUpdateable.ExecuteCommand();
                });
                if (!dbTran.IsSuccess)
                {