修改阅片bug
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2024-09-14 13:13:52 +08:00
parent 564ac4d931
commit c3daa75e0e
4 changed files with 25 additions and 6 deletions

View File

@ -68,7 +68,10 @@ namespace IRaCIS.Core.Application.Service
#endregion #endregion
CreateMap<VisitTask, VisitTaskDto>(); CreateMap<VisitTask, VisitTaskDto>();
CreateMap<SubmitTableQuestionInDto, ReadingTableAnswerRowInfo>().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); CreateMap<SubmitTableQuestionInDto, ReadingTableAnswerRowInfo>()
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
.ForAllMembers(opts => opts.Condition((src, dest, srcMember) => srcMember != null));
CreateMap<ShortcutKey, DefaultShortcutKeyView>(); CreateMap<ShortcutKey, DefaultShortcutKeyView>();
CreateMap<TrialDataFromSystem, ReadingMedicineTrialQuestion>().ForMember(dest => dest.CreateUser, opt => opt.Ignore()); CreateMap<TrialDataFromSystem, ReadingMedicineTrialQuestion>().ForMember(dest => dest.CreateUser, opt => opt.Ignore());

View File

@ -2,6 +2,7 @@
using IRaCIS.Application.Contracts; using IRaCIS.Application.Contracts;
using IRaCIS.Core.Application.Service.WorkLoad.DTO; using IRaCIS.Core.Application.Service.WorkLoad.DTO;
using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Models;
using static IRaCIS.Application.Services.TestService;
namespace IRaCIS.Core.Application.Service namespace IRaCIS.Core.Application.Service
{ {
@ -17,6 +18,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<SetCriterionJoinJoinAnalysisCommand, EnrollReadingCriterion>().ReverseMap(); CreateMap<SetCriterionJoinJoinAnalysisCommand, EnrollReadingCriterion>().ReverseMap();
CreateMap<TestModel, TestModel2>();
} }

View File

@ -105,14 +105,28 @@ namespace IRaCIS.Application.Services
{ {
public Guid TestId { get; set; } public Guid TestId { get; set; }
public string TestName { get; set; } public string? TestName { get; set; }
} }
public class TestModel2
{
public Guid TestId { get; set; }
public string TestName { get; set; }
}
public async Task<IResponseOutput> TestJson() public async Task<IResponseOutput> TestJson()
{ {
var model1 = new TestModel() { TestId = NewId.NextSequentialGuid(), TestName = null };
var model2 = new TestModel2() { TestId = NewId.NextSequentialGuid(), TestName = "test2" };
//_mapper.Map(from, dbEntity);
var model4= _mapper.Map(model1, model2);
await _trialBodyPartRepository.FirstOrDefaultAsync(); await _trialBodyPartRepository.FirstOrDefaultAsync();

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <!--<PropertyGroup>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>-->
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
</PropertyGroup> </PropertyGroup>