| | |
| | | y.AsInsertable.ExecuteCommand(); |
| | | y.AsUpdateable.IgnoreColumns(x => x.ID).ExecuteCommand(); |
| | | } |
| | | db.Deleteable<MES_PROD_OPER>().Where(x => x.PROD_CODE == routeData.route.PROD_CODE && !SqlFunc.ContainsArray(nodeIds, x.NODE_ID)).ExecuteCommand(); |
| | | db.Deleteable<MES_PROD_ACTION>().Where(x => x.PROD_CODE == routeData.route.PROD_CODE && !SqlFunc.ContainsArray(actIds, x.ACT_ID)).ExecuteCommand(); |
| | | if (!routeData.route.PROD_CODE.IsNullOrEmpty()) |
| | | { |
| | | db.Deleteable<MES_PROD_OPER>().Where(x => x.PROD_CODE == routeData.route.PROD_CODE && !SqlFunc.ContainsArray(nodeIds, x.NODE_ID)).ExecuteCommand(); |
| | | db.Deleteable<MES_PROD_ACTION>().Where(x => x.PROD_CODE == routeData.route.PROD_CODE && !SqlFunc.ContainsArray(actIds, x.ACT_ID)).ExecuteCommand(); |
| | | } |
| | | db.Deleteable<MES_ROUTE_NODE>(false).Where(x => x.ROT_ID == routeData.route.ID).ExecuteCommand(); |
| | | db.Deleteable<MES_ROUTE_EDGE>(false).Where(x => x.ROT_ID == routeData.route.ID).ExecuteCommand(); |
| | | db.Deleteable<MES_ROUTE_NODE_ACT>(false).Where(x => x.ROT_ID == routeData.route.ID).ExecuteCommand(); |
| | |
| | | { |
| | | db.Insertable(routeData.acts).ExecuteCommand(); |
| | | } |
| | | if (operList.Count > 0) |
| | | if (!routeData.route.PROD_CODE.IsNullOrEmpty()) |
| | | { |
| | | db.Insertable(operList).ExecuteCommand(); |
| | | } |
| | | if (actList.Count > 0) |
| | | { |
| | | db.Insertable(actList).ExecuteCommand(); |
| | | if (operList.Count > 0) |
| | | { |
| | | db.Insertable(operList).ExecuteCommand(); |
| | | } |
| | | if (actList.Count > 0) |
| | | { |
| | | db.Insertable(actList).ExecuteCommand(); |
| | | } |
| | | } |
| | | }); |
| | | if (!dbTran.IsSuccess) |