Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -237,6 +237,12 @@ namespace IRaCIS.Application.Contracts
|
||||
|
||||
#endregion
|
||||
|
||||
public class GetDoctorDetailInDto
|
||||
{
|
||||
public Guid doctorId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
}
|
||||
public class DoctorDetailDTO
|
||||
{
|
||||
public DoctorBasicInfoDTO BasicInfoView { get; set; }
|
||||
@@ -355,10 +361,19 @@ namespace IRaCIS.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
public class GetSummarizeInfoInDto
|
||||
{
|
||||
public Guid DoctorId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateGneralSituationDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 概述
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
namespace IRaCIS.Application.Contracts
|
||||
{
|
||||
public class GetTrialDoctorInfoInDto
|
||||
{
|
||||
public Guid DoctorId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class ResearchPublicationInDTO
|
||||
{
|
||||
public Guid DoctorId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
}
|
||||
public class ResearchPublicationDTO
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
@@ -49,6 +49,12 @@
|
||||
// public string EvaluationCriteria { get; set; }
|
||||
//}
|
||||
|
||||
public class TrialExperienceModelIndto
|
||||
{
|
||||
public Guid DoctorId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
}
|
||||
|
||||
public class TrialExperienceModel : GcpAndOtherExperienceDTO
|
||||
{
|
||||
@@ -111,6 +117,8 @@
|
||||
{
|
||||
public Guid DoctorId { get; set; }
|
||||
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public string OtherClinicalExperience { get; set; } = String.Empty;
|
||||
public string OtherClinicalExperienceCN { get; set; } = String.Empty;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<Trial> _trialRepository,
|
||||
IRepository<Vacation> _vacationRepository,
|
||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
||||
ITrialExperienceService trialExperienceService,
|
||||
IRepository<TrialPaymentPrice> _trialExtRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IDoctorService
|
||||
{
|
||||
|
||||
@@ -219,12 +220,25 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<bool> UpdateGneralSituation(UpdateGneralSituationDto inDto)
|
||||
{
|
||||
|
||||
await _doctorRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new Doctor()
|
||||
if (inDto.TrialId != null)
|
||||
{
|
||||
Summarize = inDto.Summarize,
|
||||
SummarizeEn = inDto.SummarizeEn,
|
||||
});
|
||||
await _doctorRepository.UpdatePartialFromQueryAsync(x => x.DoctorId == inDto.Id&&x.TrialId==inDto.TrialId.Value, x => new Doctor()
|
||||
{
|
||||
Summarize = inDto.Summarize,
|
||||
SummarizeEn = inDto.SummarizeEn,
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
await _doctorRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new Doctor()
|
||||
{
|
||||
Summarize = inDto.Summarize,
|
||||
SummarizeEn = inDto.SummarizeEn,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var success= await _doctorRepository.SaveChangesAsync();
|
||||
return success;
|
||||
}
|
||||
@@ -235,10 +249,26 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<UpdateGneralSituationDto?> GetSummarizeInfo(Guid Id)
|
||||
public async Task<UpdateGneralSituationDto?> GetSummarizeInfo(GetSummarizeInfoInDto inDto)
|
||||
{
|
||||
var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == Id)
|
||||
.ProjectTo<UpdateGneralSituationDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == inDto.DoctorId)
|
||||
.ProjectTo<UpdateGneralSituationDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
if (inDto.TrialId != null)
|
||||
{
|
||||
var doctorInfo = await trialExperienceService.GetTrialDoctorInfo(new GetTrialDoctorInfoInDto()
|
||||
{
|
||||
TrialId = inDto.TrialId.Value,
|
||||
DoctorId = inDto.DoctorId,
|
||||
});
|
||||
|
||||
doctorBasicInfo = new UpdateGneralSituationDto()
|
||||
{
|
||||
Summarize = doctorInfo.Summarize,
|
||||
SummarizeEn = doctorInfo.SummarizeEn,
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
return doctorBasicInfo;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace IRaCIS.Application.Interfaces
|
||||
/// <summary>
|
||||
/// 获取概述
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<UpdateGneralSituationDto?> GetSummarizeInfo(Guid Id);
|
||||
Task<UpdateGneralSituationDto?> GetSummarizeInfo(GetSummarizeInfoInDto inDto);
|
||||
|
||||
/// <summary>
|
||||
/// 更新医生 工作信息
|
||||
|
||||
@@ -4,7 +4,16 @@ namespace IRaCIS.Application.Interfaces
|
||||
{
|
||||
public interface ITrialExperienceService
|
||||
{
|
||||
Task<TrialExperienceModel> GetTrialExperience(Guid doctorId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目医生编辑的信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<Doctor> GetTrialDoctorInfo(GetTrialDoctorInfoInDto inDto);
|
||||
|
||||
|
||||
Task<TrialExperienceModel> GetTrialExperience(TrialExperienceModelIndto indto);
|
||||
Task<IResponseOutput> AddOrUpdateTrialExperience(TrialExperienceCommand model);
|
||||
Task<IResponseOutput> DeleteTrialExperience(Guid id);
|
||||
Task<IResponseOutput> UpdateGcpExperience(GCPExperienceCommand model);
|
||||
|
||||
@@ -14,26 +14,36 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据医生Id,获取临床试验经历 界面所有数据
|
||||
/// 根据医生Id,获取临床试验经历 界面所有数据 获取其他相关经历
|
||||
/// </summary>
|
||||
[HttpGet("{doctorId:guid}")]
|
||||
public async Task<TrialExperienceModel> GetTrialExperience(Guid doctorId)
|
||||
[HttpPost]
|
||||
public async Task<TrialExperienceModel> GetTrialExperience(TrialExperienceModelIndto indto)
|
||||
{
|
||||
var trialExperience = new TrialExperienceModel();
|
||||
|
||||
var doctor = await _doctorRepository.Where(o => o.Id == doctorId)
|
||||
var doctor = await _doctorRepository.Where(o => o.Id == indto.DoctorId)
|
||||
.ProjectTo<TrialExperienceModel>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
trialExperience.ClinicalTrialExperienceList = await GetTrialExperienceList(doctorId);
|
||||
trialExperience.ClinicalTrialExperienceList = await GetTrialExperienceList(indto.DoctorId);
|
||||
|
||||
if (doctor != null)
|
||||
{
|
||||
var trialDoctor = new Doctor();
|
||||
if (indto.TrialId != null)
|
||||
{
|
||||
trialDoctor = await GetTrialDoctorInfo(new GetTrialDoctorInfoInDto()
|
||||
{
|
||||
DoctorId = indto.DoctorId,
|
||||
TrialId = indto.TrialId.Value,
|
||||
});
|
||||
}
|
||||
|
||||
trialExperience.GCP = doctor.GCP;
|
||||
trialExperience.Id = doctor.Id;
|
||||
trialExperience.GCPTime = doctor.GCPTime;
|
||||
trialExperience.GCPAgencies = doctor.GCPAgencies;
|
||||
trialExperience.OtherClinicalExperience = doctor.OtherClinicalExperience ?? "";
|
||||
trialExperience.OtherClinicalExperienceCN = doctor.OtherClinicalExperienceCN ?? "";
|
||||
trialExperience.OtherClinicalExperience =(indto.TrialId != null? trialDoctor.OtherClinicalExperience: doctor.OtherClinicalExperience) ?? "";
|
||||
trialExperience.OtherClinicalExperienceCN = (indto.TrialId != null ? trialDoctor.OtherClinicalExperienceCN : doctor.OtherClinicalExperienceCN) ?? "";
|
||||
var attachment = await _attachmentRepository.FirstOrDefaultAsync(t => t.Id == doctor.GCPId);
|
||||
if (attachment != null)
|
||||
{
|
||||
@@ -51,6 +61,35 @@ namespace IRaCIS.Core.Application.Service
|
||||
return trialExperience;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目编辑的医生信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Doctor> GetTrialDoctorInfo(GetTrialDoctorInfoInDto inDto)
|
||||
{
|
||||
var doctorInfo = await _doctorRepository.Where(x => x.DoctorId == inDto.DoctorId && x.TrialId == inDto.TrialId).FirstOrDefaultAsync();
|
||||
if (doctorInfo == null)
|
||||
{
|
||||
|
||||
var systemInfoDcotor = await _doctorRepository.Where(x => x.Id == inDto.DoctorId).FirstNotNullAsync();
|
||||
|
||||
Doctor doctor = new Doctor()
|
||||
{
|
||||
DoctorId = inDto.DoctorId,
|
||||
TrialId = inDto.TrialId,
|
||||
OtherClinicalExperience = systemInfoDcotor.OtherClinicalExperience,
|
||||
OtherClinicalExperienceCN = systemInfoDcotor.OtherClinicalExperienceCN,
|
||||
Summarize = systemInfoDcotor.Summarize,
|
||||
SummarizeEn = systemInfoDcotor.SummarizeEn,
|
||||
};
|
||||
|
||||
doctorInfo = await _doctorRepository.AddAsync(doctor, true);
|
||||
}
|
||||
|
||||
return doctorInfo;
|
||||
}
|
||||
|
||||
private async Task<List<TrialExperienceListDTO>> GetTrialExperienceList(Guid doctorId)
|
||||
{
|
||||
var doctorClinicalTrialExperienceList = await _trialExperienceRepository.Where(o => o.DoctorId == doctorId).OrderBy(t => t.CreateTime)
|
||||
@@ -155,15 +194,30 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// </summary>
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> UpdateOtherExperience(ClinicalExperienceCommand updateOtherClinicalExperience)
|
||||
public async Task<IResponseOutput> UpdateOtherExperience(ClinicalExperienceCommand inDto)
|
||||
{
|
||||
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == updateOtherClinicalExperience.DoctorId, u => new Doctor()
|
||||
{
|
||||
OtherClinicalExperience = updateOtherClinicalExperience.OtherClinicalExperience ?? string.Empty,
|
||||
OtherClinicalExperienceCN = updateOtherClinicalExperience.OtherClinicalExperienceCN ?? string.Empty
|
||||
});
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
if (inDto.TrialId != null)
|
||||
{
|
||||
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == inDto.DoctorId&&o.TrialId==inDto.TrialId.Value, u => new Doctor()
|
||||
{
|
||||
OtherClinicalExperience = inDto.OtherClinicalExperience ?? string.Empty,
|
||||
OtherClinicalExperienceCN = inDto.OtherClinicalExperienceCN ?? string.Empty
|
||||
});
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
else
|
||||
{
|
||||
var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == inDto.DoctorId, u => new Doctor()
|
||||
{
|
||||
OtherClinicalExperience = inDto.OtherClinicalExperience ?? string.Empty,
|
||||
OtherClinicalExperienceCN = inDto.OtherClinicalExperienceCN ?? string.Empty
|
||||
});
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user