| | |
| | | Accuracy = (di["Accuracy"] ?? "").ToString(), |
| | | Remark = (di["Remark"] ?? "").ToString(), |
| | | Packaging = (di["Packaging"] ?? "").ToString(), |
| | | SapCode = (di["Code1"] ?? "").ToString(), |
| | | }; |
| | | itemExts.Add(extInfo); |
| | | } |
| | |
| | | .WhereColumns(t => new { t.ITEM_ID, t.GHOST_ROW }) |
| | | .ToStorage(); |
| | | y.AsInsertable.ExecuteCommand(); |
| | | y.AsUpdateable.ExecuteCommand(); |
| | | y.AsUpdateable.IgnoreColumns(x => x.ID).ExecuteCommand(); |
| | | }); |
| | | } |
| | | else |
| | |
| | | db.Storageable(LastRun, "U9C_MES_GetWo").ExecuteCommand(); |
| | | if (items.Any()) |
| | | { |
| | | if (items.Count > 150) |
| | | if (items.Count > 100) |
| | | { |
| | | db.Utilities.PageEach(items, 1000, pageList => |
| | | db.Utilities.PageEach(items, 100, pageList => |
| | | { |
| | | var y = db.Storageable(pageList, "U9C") |
| | | .WhereColumns(t => new { t.ORDER_NO, t.GHOST_ROW }) |
| | | .ToStorage(); |
| | | y.BulkCopy(); |
| | | y.BulkUpdate(); |
| | | y.AsInsertable.ExecuteCommand(); |
| | | y.AsUpdateable.IgnoreColumns(x => x.ID).ExecuteCommand(); |
| | | }); |
| | | } |
| | | else |
| | |
| | | { |
| | | if (woList.Any()) |
| | | { |
| | | var s = _db.Storageable(woList, "U9C") |
| | | .WhereColumns(t => new { t.ORDER_NO, t.GHOST_ROW }) |
| | | .ToStorage(); |
| | | s.AsInsertable.ExecuteCommand(); |
| | | s.AsUpdateable.IgnoreColumns(x => x.ID).UpdateColumns(x => new { x.ROUTE_STATUS}).ExecuteCommand(); |
| | | _db.Updateable(woList, "U9C").UpdateColumns(x => new { x.ROUTE_STATUS }).ExecuteCommand(); |
| | | } |
| | | |
| | | }); |
| | |
| | | .WhereColumns(t => new { t.CUST_SN, t.GHOST_ROW }) |
| | | .ToStorage(); |
| | | y.AsInsertable.ExecuteCommand(); |
| | | y.AsUpdateable.IgnoreColumns(x => x.ID).ExecuteCommand(); |
| | | y.AsUpdateable.IgnoreColumns(x => x.ID).UpdateColumns(q => new { q.CUST_CODE,q.WORK_ORDER,q.CUST_SN,q.FLOW_SN,q.ITEM_CODE,q.CREATE_TIME,q.UPDATE_TIME,q.UPDATE_USER,q.AUTH_ORG}).ExecuteCommand(); |
| | | }); |
| | | } |
| | | else |
| | |
| | | .WhereColumns(t => new { t.CUST_SN, t.GHOST_ROW }) |
| | | .ToStorage(); |
| | | s.AsInsertable.ExecuteCommand(); |
| | | s.AsUpdateable.IgnoreColumns(x => x.ID).ExecuteCommand(); |
| | | s.AsUpdateable.IgnoreColumns(x => x.ID).UpdateColumns(q => new { q.CUST_CODE, q.WORK_ORDER, q.CUST_SN, q.FLOW_SN, q.ITEM_CODE, q.CREATE_TIME, q.UPDATE_TIME, q.UPDATE_USER, q.AUTH_ORG }).ExecuteCommand(); |
| | | } |
| | | } |
| | | |