diff --git a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs index a929fc3..f099c14 100644 --- a/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs +++ b/WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs @@ -158,19 +158,21 @@ namespace Win_in.Sfs.Scp.WebApi private async Task UpsertTbReceiptAndTbReceiptDetailAsync(Receipt entity, Guid tenantId/*,bool flag*/) { - //使用AutoMapper执行类型转换 - var tbReceipt = ObjectMapper.Map(entity); - var tbReceiveDetail = ObjectMapper.Map(entity); - tbReceipt.TenantId = tenantId; - //if (flag) - //{ + + //使用AutoMapper执行类型转换 + var tbReceipt = ObjectMapper.Map(entity); + var tbReceiveDetail = ObjectMapper.Map(entity); + tbReceipt.TenantId = tenantId; + //if (flag) + //{ //根据传入数据新增或修改SCP数据 await _tbReceiptRepository.UpsertAsync(tbReceipt); - //} - tbReceiveDetail.TenantId = tenantId; - //根据传入数据新增或修改SCP数据 - await _tbReceiptDetailRepository.UpsertAsync(tbReceiveDetail); - await CurrentUnitOfWork.SaveChangesAsync(); + //} + tbReceiveDetail.TenantId = tenantId; + //根据传入数据新增或修改SCP数据 + await _tbReceiptDetailRepository.UpsertAsync(tbReceiveDetail); + await CurrentUnitOfWork.SaveChangesAsync(); + } } } \ No newline at end of file