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
Details
continuous-integration/drone/push Build is passing
Details
commit
773c657b67
|
@ -62,7 +62,8 @@ namespace IRaCIS.Api.Controllers
|
||||||
BasicInfoView = await _doctorService.GetBasicInfo(doctorId),
|
BasicInfoView = await _doctorService.GetBasicInfo(doctorId),
|
||||||
EmploymentView = await _doctorService.GetEmploymentInfo(doctorId),
|
EmploymentView = await _doctorService.GetEmploymentInfo(doctorId),
|
||||||
AttachmentList = await attachmentService.GetAttachments(doctorId),
|
AttachmentList = await attachmentService.GetAttachments(doctorId),
|
||||||
|
SummarizeInfo = await _doctorService.GetSummarizeInfo(doctorId),
|
||||||
|
PaymentModeInfo = await _doctorService.GetPaymentMode(doctorId),
|
||||||
EducationList = education.EducationList,
|
EducationList = education.EducationList,
|
||||||
PostgraduateList = education.PostgraduateList,
|
PostgraduateList = education.PostgraduateList,
|
||||||
|
|
||||||
|
|
|
@ -1171,6 +1171,20 @@
|
||||||
<param name="indto"></param>
|
<param name="indto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DoctorService.UpdateGneralSituation(IRaCIS.Application.Contracts.UpdateGneralSituationDto)">
|
||||||
|
<summary>
|
||||||
|
修改概述
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.DoctorService.GetSummarizeInfo(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
获取概述
|
||||||
|
</summary>
|
||||||
|
<param name="Id"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.DoctorService.GetBasicInfo(System.Guid)">
|
<member name="M:IRaCIS.Core.Application.Service.DoctorService.GetBasicInfo(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
详情、编辑-获取 医生基本信息 BasicInfo
|
详情、编辑-获取 医生基本信息 BasicInfo
|
||||||
|
@ -16821,14 +16835,14 @@
|
||||||
工作兼职En
|
工作兼职En
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Application.Contracts.BasicInfoAndEmploymentDto.WorkPartTime">
|
<member name="P:IRaCIS.Application.Contracts.UpdateGneralSituationDto.Summarize">
|
||||||
<summary>
|
<summary>
|
||||||
工作兼职
|
概述
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Application.Contracts.BasicInfoAndEmploymentDto.WorkPartTimeEn">
|
<member name="P:IRaCIS.Application.Contracts.UpdateGneralSituationDto.SummarizeEn">
|
||||||
<summary>
|
<summary>
|
||||||
工作兼职En
|
概述
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.WorkPartTime">
|
<member name="P:IRaCIS.Application.Contracts.EmploymentInfo.WorkPartTime">
|
||||||
|
@ -17089,6 +17103,13 @@
|
||||||
<param name="doctorId"></param>
|
<param name="doctorId"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Interfaces.IDoctorService.GetSummarizeInfo(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
获取概述
|
||||||
|
</summary>
|
||||||
|
<param name="Id"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Interfaces.IDoctorService.UpdateEmploymentInfo(IRaCIS.Application.Contracts.EmploymentCommand)">
|
<member name="M:IRaCIS.Application.Interfaces.IDoctorService.UpdateEmploymentInfo(IRaCIS.Application.Contracts.EmploymentCommand)">
|
||||||
<summary>
|
<summary>
|
||||||
更新医生 工作信息
|
更新医生 工作信息
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using IRaCIS.Core.Application.MassTransit.Command;
|
using IRaCIS.Core.Application.Helper;
|
||||||
|
using IRaCIS.Core.Application.MassTransit.Command;
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
using IRaCIS.Core.Domain;
|
using IRaCIS.Core.Domain;
|
||||||
using IRaCIS.Core.Domain.BaseModel;
|
using IRaCIS.Core.Domain.BaseModel;
|
||||||
|
@ -33,77 +34,75 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
|
||||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||||
public async Task Consume(ConsumeContext<CRCSubmitedAndQCToAuditEvent> context)
|
public async Task Consume(ConsumeContext<CRCSubmitedAndQCToAuditEvent> context)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("发送(005,006) 【加急项目所有IQC待领取质控任务】邮件!!!");
|
Console.WriteLine("发送(005,006) 【加急项目所有IQC待领取质控任务】邮件!!!");
|
||||||
//var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
|
||||||
|
|
||||||
//var subjectVisitId = context.Message.SubjectVisitId;
|
var subjectVisitId = context.Message.SubjectVisitId;
|
||||||
|
|
||||||
//var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x=>x.Subject).FirstOrDefaultAsync();
|
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
|
||||||
|
|
||||||
|
var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.IQC).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
||||||
|
|
||||||
|
var auditStateCode = "AuditStatePE";
|
||||||
|
|
||||||
|
if (trialInfo.QCProcessEnum == TrialQCProcess.DoubleAudit)
|
||||||
|
{
|
||||||
|
auditStateCode = "AuditStateRC";
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var userinfo in userinfoList)
|
||||||
|
{
|
||||||
|
var messageToSend = new MimeMessage();
|
||||||
|
//发件地址
|
||||||
|
messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
||||||
|
messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
||||||
|
|
||||||
|
|
||||||
|
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
||||||
|
|
||||||
|
|
||||||
//var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
|
var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
||||||
|
{
|
||||||
|
|
||||||
//var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.IQC).ToList();
|
DictionaryRepository = _dictionaryRepository,
|
||||||
|
IsEn_US = isEn_US,
|
||||||
|
DictionaryList = new List<DictionaryDto>()
|
||||||
|
{
|
||||||
|
new DictionaryDto (){DictionaryCode= auditStateCode,EnumValue=subjectVisit.AuditState.GetEnumInt(), }, //审核状态
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
|
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
||||||
|
{
|
||||||
|
var subjectCode = subjectVisit.Subject.Code;
|
||||||
|
var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
|
||||||
|
var htmlBodyStr = string.Format(
|
||||||
|
CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
||||||
|
userinfo.FullName, // 用户名 {0}
|
||||||
|
trialInfo.ExperimentName, // 项目 {1}
|
||||||
|
subjectCode, // 受试者 {2}
|
||||||
|
subjectVisit.VisitName, // 访视 {3}
|
||||||
|
dictionValue[0], // 审核状态 {4}
|
||||||
|
_systemEmailConfig.SiteUrl // 链接 {5}
|
||||||
|
);
|
||||||
|
|
||||||
//foreach (var userinfo in userinfoList)
|
return (topicStr, htmlBodyStr);
|
||||||
//{
|
};
|
||||||
// var messageToSend = new MimeMessage();
|
|
||||||
// //发件地址
|
|
||||||
// messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
|
|
||||||
// messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
|
|
||||||
|
|
||||||
|
await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
||||||
|
|
||||||
// var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
|
context.Message.IsPd ? EmailBusinessScenario.PDVerification_PendingImageQCClaim : EmailBusinessScenario.EligibilityVerification_PendingClaim,
|
||||||
|
|
||||||
|
messageToSend, emailConfigFunc);
|
||||||
|
|
||||||
// var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
|
await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
||||||
// {
|
}
|
||||||
|
|
||||||
// DictionaryRepository = _dictionaryRepository,
|
|
||||||
// IsEn_US = isEn_US,
|
|
||||||
// DictionaryList = new List<DictionaryDto>()
|
|
||||||
// {
|
|
||||||
// new DictionaryDto (){DictionaryCode= "ReadingCategory",EnumValue=subjectVisit.AuditState.GetEnumInt(), }, //审核状态
|
|
||||||
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
|
|
||||||
// {
|
|
||||||
// var subjectCode = subjectVisit.Subject.Code;
|
|
||||||
// var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, taskInfo.TaskBlindName);
|
|
||||||
// var htmlBodyStr = string.Format(
|
|
||||||
// CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
|
|
||||||
// userinfo.FullName, // 用户名 {0}
|
|
||||||
// trialInfo.ExperimentName, // 项目 {1}
|
|
||||||
// subjectCode, // 受试者 {2}
|
|
||||||
// subjectVisit.VisitName, // 访视 {3}
|
|
||||||
// dictionValue[0], // 审核状态 {4}
|
|
||||||
// _systemEmailConfig.SiteUrl // 链接 {5}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// );
|
|
||||||
|
|
||||||
// return (topicStr, htmlBodyStr);
|
|
||||||
// };
|
|
||||||
|
|
||||||
// await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
|
|
||||||
|
|
||||||
// context.Message.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed ? EmailBusinessScenario.ReReadFromPMApproval : EmailBusinessScenario.ReReadFromIRApproval,
|
|
||||||
|
|
||||||
// messageToSend, emailConfigFunc);
|
|
||||||
|
|
||||||
// await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -247,6 +247,10 @@ namespace IRaCIS.Application.Contracts
|
||||||
public ResearchPublicationDTO ResearchPublicationView { get; set; }
|
public ResearchPublicationDTO ResearchPublicationView { get; set; }
|
||||||
public TrialExperienceModel TrialExperienceView { get; set; }
|
public TrialExperienceModel TrialExperienceView { get; set; }
|
||||||
public ResumeConfirmDTO AuditView { get; set; }
|
public ResumeConfirmDTO AuditView { get; set; }
|
||||||
|
|
||||||
|
public UpdateGneralSituationDto SummarizeInfo { get; set; }
|
||||||
|
|
||||||
|
public PaymentModeDto PaymentModeInfo { get; set; }
|
||||||
public IEnumerable<AttachmentDTO> AttachmentList { get; set; }
|
public IEnumerable<AttachmentDTO> AttachmentList { get; set; }
|
||||||
|
|
||||||
public List<SowDTO> SowList { get; set; }
|
public List<SowDTO> SowList { get; set; }
|
||||||
|
@ -311,6 +315,53 @@ namespace IRaCIS.Application.Contracts
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class PaymentModeDto
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 银行卡号
|
||||||
|
/// </summary>
|
||||||
|
public string BankNum { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 银行名称
|
||||||
|
/// </summary>
|
||||||
|
public string BankName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开户行
|
||||||
|
/// </summary>
|
||||||
|
public string OpeningBank { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 身份证号
|
||||||
|
/// </summary>
|
||||||
|
public string IdCard { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 银行手机号
|
||||||
|
/// </summary>
|
||||||
|
public string BankPhoneNum { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UpdateGneralSituationDto
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 概述
|
||||||
|
/// </summary>
|
||||||
|
public string Summarize { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 概述
|
||||||
|
/// </summary>
|
||||||
|
public string SummarizeEn { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
public class BasicInfoAndEmploymentDto: DoctorBasicInfoCommand
|
public class BasicInfoAndEmploymentDto: DoctorBasicInfoCommand
|
||||||
{
|
{
|
||||||
//部门
|
//部门
|
||||||
|
@ -331,16 +382,6 @@ namespace IRaCIS.Application.Contracts
|
||||||
public Guid? PhysicianId { get; set; }
|
public Guid? PhysicianId { get; set; }
|
||||||
public string Physician { get; set; } = string.Empty;
|
public string Physician { get; set; } = string.Empty;
|
||||||
public string PhysicianCN { get; set; } = string.Empty;
|
public string PhysicianCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 工作兼职
|
|
||||||
/// </summary>
|
|
||||||
public string WorkPartTime { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 工作兼职En
|
|
||||||
/// </summary>
|
|
||||||
public string WorkPartTimeEn { get; set; } = string.Empty;
|
|
||||||
}
|
}
|
||||||
public class DoctorBasicInfoCommand : DoctorBasicInfo
|
public class DoctorBasicInfoCommand : DoctorBasicInfo
|
||||||
{
|
{
|
||||||
|
|
|
@ -118,12 +118,149 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <param name="indto"></param>
|
/// <param name="indto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput<DoctorBasicInfoCommand>> AddOrUpdateDoctorBasicInfoAndEmployment(BasicInfoAndEmploymentDto indto)
|
public async Task<IResponseOutput<BasicInfoAndEmploymentDto>> AddOrUpdateDoctorBasicInfoAndEmployment(BasicInfoAndEmploymentDto indto)
|
||||||
{
|
{
|
||||||
return await AddOrUpdateDoctorBasicInfo(indto);
|
Expression<Func<Doctor, bool>> verifyExp = t => t.Phone == indto.Phone || t.EMail == indto.EMail;
|
||||||
|
|
||||||
|
//---current phone or email number already existed
|
||||||
|
var verifyPair = new KeyValuePair<Expression<Func<Doctor, bool>>, string>(verifyExp, _localizer["Doctor_DupPhoneOrEmail"]);
|
||||||
|
|
||||||
|
if (indto.Id == Guid.Empty || indto.Id == null)
|
||||||
|
{
|
||||||
|
|
||||||
|
var doctor = _mapper.Map<Doctor>(indto);
|
||||||
|
|
||||||
|
//验证用户手机号
|
||||||
|
if (await _doctorRepository.AnyAsync(t => t.Phone == doctor.Phone))
|
||||||
|
{
|
||||||
|
//---The current phone number already existed!
|
||||||
|
return ResponseOutput.NotOk(_localizer["Doctor_DupPhone"], new BasicInfoAndEmploymentDto());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (await _doctorRepository.AnyAsync(t => t.EMail == doctor.EMail))
|
||||||
|
{
|
||||||
|
//---The current email already existed!
|
||||||
|
return ResponseOutput.NotOk(_localizer["Doctor_DupEmail"], new BasicInfoAndEmploymentDto());
|
||||||
|
}
|
||||||
|
|
||||||
|
doctor.Code = await _doctorRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1;
|
||||||
|
|
||||||
|
doctor.ReviewerCode = AppSettings.GetCodeStr(doctor.Code, nameof(Doctor));
|
||||||
|
|
||||||
|
doctor.Password = MD5Helper.Md5(doctor.Phone);
|
||||||
|
|
||||||
|
//插入中间表
|
||||||
|
indto.TitleIds.ForEach(titleId => doctor.DoctorDicRelationList.Add(new DoctorDictionary() { DoctorId = doctor.Id, KeyName = StaticData.Title, DictionaryId = titleId }));
|
||||||
|
|
||||||
|
|
||||||
|
await _doctorRepository.AddAsync(doctor);
|
||||||
|
//_doctorRepository.Add(doctor);
|
||||||
|
|
||||||
|
//await _repository.AddAsync(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
|
||||||
|
//_userDoctorRepository.Add(new UserDoctor() { DoctorId = doctor.Id, UserId = _userInfo.Id });
|
||||||
|
|
||||||
|
var success = await _doctorDictionaryRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Result(success, _mapper.Map<BasicInfoAndEmploymentDto>(doctor));
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var updateModel = indto;
|
||||||
|
|
||||||
|
var phone = updateModel.Phone.Trim();
|
||||||
|
if ((await _doctorRepository.FirstOrDefaultAsync(t => t.Phone == phone && t.Id != updateModel.Id)) != null)
|
||||||
|
{
|
||||||
|
//---The current phone number already existed!
|
||||||
|
return ResponseOutput.NotOk(_localizer["Doctor_DupPhone"], new BasicInfoAndEmploymentDto());
|
||||||
|
}
|
||||||
|
var email = updateModel.EMail.Trim();
|
||||||
|
if (await _doctorRepository.AnyAsync(t => t.EMail == email && t.Id != updateModel.Id))
|
||||||
|
{
|
||||||
|
//---The current email already existed!
|
||||||
|
return ResponseOutput.NotOk(_localizer["Doctor_DupEmail"], new BasicInfoAndEmploymentDto());
|
||||||
|
}
|
||||||
|
|
||||||
|
var doctor = await _doctorRepository.FirstOrDefaultAsync(t => t.Id == updateModel.Id).IfNullThrowException();
|
||||||
|
|
||||||
|
//删除中间表 Title对应的记录
|
||||||
|
await _doctorDictionaryRepository.BatchDeleteNoTrackingAsync(t => t.DoctorId == updateModel.Id && t.KeyName == StaticData.Title);
|
||||||
|
|
||||||
|
|
||||||
|
var adddata = new List<DoctorDictionary>();
|
||||||
|
//重新插入新的 Title记录
|
||||||
|
updateModel.TitleIds.ForEach(titleId => adddata.Add(new DoctorDictionary() { DoctorId = updateModel.Id.Value, KeyName = StaticData.Title, DictionaryId = titleId }));
|
||||||
|
|
||||||
|
await _doctorDictionaryRepository.AddRangeAsync(adddata);
|
||||||
|
|
||||||
|
_mapper.Map(indto, doctor);
|
||||||
|
|
||||||
|
var success = await _doctorDictionaryRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Result(success, indto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改概述
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task UpdateGneralSituation(UpdateGneralSituationDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
await _doctorRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new Doctor()
|
||||||
|
{
|
||||||
|
Summarize = inDto.Summarize,
|
||||||
|
SummarizeEn = inDto.SummarizeEn,
|
||||||
|
});
|
||||||
|
await _doctorRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取概述
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<UpdateGneralSituationDto?> GetSummarizeInfo(Guid Id)
|
||||||
|
{
|
||||||
|
var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == Id)
|
||||||
|
.ProjectTo<UpdateGneralSituationDto>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||||
|
return doctorBasicInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改支付方式
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task UpdatePaymentMode(PaymentModeDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
var doctor = await _doctorRepository.FirstOrDefaultAsync(t => t.Id == inDto.Id).IfNullThrowException();
|
||||||
|
_mapper.Map(inDto, doctor);
|
||||||
|
var success = await _doctorDictionaryRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取支付方式
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<PaymentModeDto> GetPaymentMode(Guid Id)
|
||||||
|
{
|
||||||
|
var doctorBasicInfo = await _doctorRepository.Where(t => t.Id == Id)
|
||||||
|
.ProjectTo<PaymentModeDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||||
|
return doctorBasicInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -30,6 +30,22 @@ namespace IRaCIS.Application.Interfaces
|
||||||
/// <param name="doctorId"></param>
|
/// <param name="doctorId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<EmploymentDTO> GetEmploymentInfo(Guid doctorId);
|
Task<EmploymentDTO> GetEmploymentInfo(Guid doctorId);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///获取支付信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<PaymentModeDto> GetPaymentMode(Guid Id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取概述
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<UpdateGneralSituationDto?> GetSummarizeInfo(Guid Id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新医生 工作信息
|
/// 更新医生 工作信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -19,7 +19,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
var doctorScientificResearchInfo = await _researchPublicationRepository.Where(o => o.DoctorId == doctorId)
|
var doctorScientificResearchInfo = await _researchPublicationRepository.Where(o => o.DoctorId == doctorId)
|
||||||
.ProjectTo<ResearchPublicationDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
.ProjectTo<ResearchPublicationDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||||
|
|
||||||
return doctorScientificResearchInfo!;
|
return doctorScientificResearchInfo!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<Doctor, ResumeConfirmDTO>();
|
CreateMap<Doctor, ResumeConfirmDTO>();
|
||||||
|
|
||||||
CreateMap<Doctor, DoctorSelectDTO>();
|
CreateMap<Doctor, DoctorSelectDTO>();
|
||||||
|
CreateMap<Doctor, UpdateGneralSituationDto>();
|
||||||
|
|
||||||
|
CreateMap<Doctor, PaymentModeDto>();
|
||||||
|
|
||||||
|
CreateMap<PaymentModeDto, Doctor>();
|
||||||
|
|
||||||
CreateMap<Doctor, TrialExperienceModel>();
|
CreateMap<Doctor, TrialExperienceModel>();
|
||||||
CreateMap<TrialExperience, TrialExperienceCommand>();
|
CreateMap<TrialExperience, TrialExperienceCommand>();
|
||||||
|
|
|
@ -182,6 +182,43 @@ public class Doctor : BaseFullAuditEntity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string WorkPartTimeEn { get; set; } = string.Empty;
|
public string WorkPartTimeEn { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 概述
|
||||||
|
/// </summary>
|
||||||
|
public string Summarize { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 概述
|
||||||
|
/// </summary>
|
||||||
|
public string SummarizeEn { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 银行卡号
|
||||||
|
/// </summary>
|
||||||
|
public string BankNum { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 银行名称
|
||||||
|
/// </summary>
|
||||||
|
public string BankName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开户行
|
||||||
|
/// </summary>
|
||||||
|
public string OpeningBank { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 身份证号
|
||||||
|
/// </summary>
|
||||||
|
public string IdCard { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 银行手机号
|
||||||
|
/// </summary>
|
||||||
|
public string BankPhoneNum { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string FullName => LastName + " / " + FirstName;
|
public string FullName => LastName + " / " + FirstName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue