| | |
| | | a.Deliveredstatus= Param.Deliveredstatus; |
| | | a.Attachments = Param.Attachments; |
| | | |
| | | return await _client.UpdateNav(a).Include(x=>x.Attachments,new SqlSugar.UpdateNavOptions() |
| | | { |
| | | OneToManyInsertOrUpdate = true,//配置启用 插入、更新或删除模式 |
| | | }).Include(x=>x.DeliverPlans,new UpdateNavOptions() |
| | | { |
| | | OneToManyInsertOrUpdate=true, |
| | | } |
| | | ).ExecuteCommandAsync(); |
| | | return await _client.UpdateNav(a).Include(x=>x.Attachments).ExecuteCommandAsync(); |
| | | |
| | | //await _client.AsTenant().BeginTranAsync(); |
| | | //try |
| | | //{ |
| | | // var id = await _client.Insertable(pram).ExecuteReturnIdentityAsync(); |
| | | // if (pram.WorkPlanAttachments?.Count > 0) |
| | | // { |
| | | // foreach (var item in pram.WorkPlanAttachments) |
| | | // { |
| | | // item.OA_WorkPlanId = id; |
| | | |
| | | // } |
| | | // await _client.Insertable(pram.WorkPlanAttachments).ExecuteCommandAsync(); |
| | | // } |
| | | // await _client.AsTenant().CommitTranAsync(); |
| | | //} |
| | | //catch (Exception) |
| | | //{ |
| | | // await _client.AsTenant().RollbackTranAsync(); |
| | | // throw; |
| | | //} |
| | | |
| | | //await _client.AsTenant().BeginTranAsync(); |
| | | //try |
| | |
| | | //{ |
| | | // OneToManyInsertOrUpdate = true, |
| | | //}) |
| | | .Include(x => x.CarConditionAttachments,new UpdateNavOptions |
| | | { |
| | | OneToManyInsertOrUpdate = true, |
| | | }).ExecuteCommandAsync(); |
| | | .Include(x => x.CarConditionAttachments).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | |