You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
3.8 KiB
98 lines
3.8 KiB
using Shentun.Peis.DiagnosisFunctions;
|
|
using Shentun.Peis.Models;
|
|
using Shentun.Peis.RegisterAsbitems;
|
|
using Shentun.Peis.RegisterChecks;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Volo.Abp.Domain.Repositories;
|
|
using Volo.Abp.Uow;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Shentun.Peis
|
|
{
|
|
public class RegisterCheckAppServiceTest : PeisApplicationTestBase
|
|
{
|
|
private readonly IRepository<RegisterCheck> _repository;
|
|
private readonly RegisterCheckAppService _appService;
|
|
private readonly ITestOutputHelper _output;
|
|
private readonly IUnitOfWorkManager _unitOfWorkManager;
|
|
public RegisterCheckAppServiceTest(ITestOutputHelper testOutputHelper)
|
|
{
|
|
_output = testOutputHelper;
|
|
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
|
|
_repository = GetRequiredService<IRepository<RegisterCheck>>();
|
|
_appService = GetRequiredService<RegisterCheckAppService>();
|
|
}
|
|
|
|
[Fact]
|
|
public async Task UpdateCheckResult()
|
|
{
|
|
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
|
|
{
|
|
var updateCheckResultDto = new UpdateCheckResultDto()
|
|
{
|
|
RegisterCheckId = new Guid("3a11ee70-0351-8970-5bc5-dc0f72e62339"),
|
|
CheckDoctorId = "王医生",
|
|
CheckDate = new DateTime(2022,1,1),
|
|
RegisterCheckItems = new List<UpdateRegisterCheckItemDetail>
|
|
{
|
|
new UpdateRegisterCheckItemDetail()
|
|
{
|
|
ItemId = new Guid("3a0c6555-0dad-55b4-b59f-b11e8074cfdd"),
|
|
Result = "阳性"
|
|
},
|
|
|
|
new UpdateRegisterCheckItemDetail()
|
|
{
|
|
ItemId = new Guid("3a0c6558-e2a6-4aab-e6e9-d34957a7c3ed"),
|
|
Result = "阴性"
|
|
},
|
|
new UpdateRegisterCheckItemDetail()
|
|
{
|
|
ItemId = new Guid("3a0c655a-1fdc-2447-6dc9-d8ec8e110d2e"),
|
|
Result = "阳性"
|
|
},
|
|
new UpdateRegisterCheckItemDetail()
|
|
{
|
|
ItemId = new Guid("3a0c655c-1c9f-c8c5-150a-59b3cc351472"),
|
|
Result = "阴性"
|
|
},
|
|
new UpdateRegisterCheckItemDetail()
|
|
{
|
|
ItemId = new Guid("3a0c655d-6ab7-ca7e-3920-3b493ec83192"),
|
|
Result = "阳性"
|
|
},
|
|
},
|
|
Summarys = new List<UpdateRegisterCheckSummaryDetail>()
|
|
{
|
|
new UpdateRegisterCheckSummaryDetail()
|
|
{
|
|
Summary = "dsfdsfdsfdsfdsf"
|
|
},
|
|
new UpdateRegisterCheckSummaryDetail()
|
|
{
|
|
Summary = "ddddddd"
|
|
}
|
|
},
|
|
Suggestions = new List<UpdateRegisterCheckSuggestionDetail>() { new UpdateRegisterCheckSuggestionDetail()
|
|
{
|
|
Suggestion = "dddd"
|
|
},
|
|
new UpdateRegisterCheckSuggestionDetail()
|
|
{
|
|
Suggestion = "sssss"
|
|
}
|
|
}
|
|
};
|
|
await _appService.UpdateCheckResult(updateCheckResultDto);
|
|
await unitOfWork.CompleteAsync();
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|