Add supply contract export results

This commit is contained in:
2025-11-24 14:56:09 +09:00
parent 46ff771dd6
commit 3ccccd2467
5 changed files with 93 additions and 3 deletions

View File

@ -196,6 +196,17 @@ namespace Hcs.WebApp.Services
}
}
public async Task SetOperationExportGuidAsync(HcsDbContext context, int operationId, string exportGuid)
{
var operation = await context.Operations.FirstOrDefaultAsync(x => x.Id == operationId);
if (operation != null)
{
operation.ExportGuid = exportGuid;
await context.SaveChangesAsync();
}
}
public async Task UpdateCampaignStepAndProgressAsync(Campaign campaign)
{
using var context = GetNewContext();

View File

@ -12,9 +12,8 @@ namespace Hcs.WebApp.Services
return await context.SupplyContracts.ToListAsync();
}
public async Task UpsertSupplyContracts(IEnumerable<SupplyContract> supplyContracts)
public async Task UpsertSupplyContracts(HcsDbContext context, IEnumerable<SupplyContract> supplyContracts)
{
using var context = GetNewContext();
await context.BulkInsertOrUpdateAsync(supplyContracts, new BulkConfig()
{
PropertiesToExcludeOnUpdate =