| | |
| | | } |
| | | Logger.Scheduler.Info($"客户条码信息存入实体中,总数:[{items.Count}]"); |
| | | db = Biz.Db; |
| | | var dbTran = db.UseTran(() => |
| | | { |
| | | //var dbTran = db.UseTran(() => |
| | | //{ |
| | | if (items.Any()) |
| | | { |
| | | if (items.Count > 100) |
| | |
| | | .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(); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | if (!dbTran.IsSuccess) |
| | | { |
| | | action.CatchExceptionWithLog(dbTran.ErrorException, $"数据处理失败"); |
| | | Logger.Scheduler.Error(action.Message); |
| | | } |
| | | //}); |
| | | //if (!dbTran.IsSuccess) |
| | | //{ |
| | | // action.CatchExceptionWithLog(dbTran.ErrorException, $"数据处理失败"); |
| | | // Logger.Scheduler.Error(action.Message); |
| | | //} |
| | | Logger.Scheduler.Info($"客户条码信息存入数据库,总数:[{items.Count}]"); |
| | | action.Message = $"客户条码信息存入数据库,总数:[{items.Count}]"; |
| | | return action; |
| | |
| | | } |
| | | Logger.Scheduler.Info($"工单信息存入实体中,总数:[{items.Count}]"); |
| | | db = Biz.Db; |
| | | var dbTran = db.UseTran(() => |
| | | { |
| | | //var dbTran = db.UseTran(() => |
| | | //{ |
| | | if (items.Any()) |
| | | { |
| | | if (items.Count > 100) |
| | |
| | | } |
| | | } |
| | | |
| | | }); |
| | | if (!dbTran.IsSuccess) |
| | | { |
| | | action.CatchExceptionWithLog(dbTran.ErrorException, $"数据处理失败"); |
| | | Logger.Scheduler.Error(action.Message); |
| | | } |
| | | //}); |
| | | //if (!dbTran.IsSuccess) |
| | | //{ |
| | | // action.CatchExceptionWithLog(dbTran.ErrorException, $"数据处理失败"); |
| | | // Logger.Scheduler.Error(action.Message); |
| | | //} |
| | | action.Message = $"工单信息存入数据库,总数:[{items.Count}]"; |
| | | Logger.Scheduler.Info($"{action.Message}"); |
| | | if (action.IsSuccessed && items.Count > 0) |