修改警告

This commit is contained in:
2022-04-08 14:22:07 +08:00
parent 6318c09946
commit 2e1cb7a3b3
20 changed files with 44 additions and 276 deletions
@@ -14,6 +14,7 @@ using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace IRaCIS.Core.API.Controllers
{
@@ -62,7 +63,7 @@ namespace IRaCIS.Core.API.Controllers
[HttpGet("CommonDocument/DownloadCommonDoc")]
public async Task<IActionResult> DownloadCommonFile(string code, [FromServices] IRepository<CommonDocument> _commonDocumentRepository)
{
var doc = _commonDocumentRepository.AsQueryable(true).FirstOrDefault(t => t.Code == code);
var doc = await _commonDocumentRepository.AsQueryable(true).FirstOrDefaultAsync(t => t.Code == code);
if (doc == null)
{
@@ -146,7 +146,7 @@ namespace IRaCIS.Core.API.Controllers.Special
}, User.FindFirst("id").Value);
}
}
_costAdjustmentService.CalculateCNY(addOrUpdateModel.YearMonth, addOrUpdateModel.Rate);
await _costAdjustmentService.CalculateCNY(addOrUpdateModel.YearMonth, addOrUpdateModel.Rate);
return result;
}