diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs
index 81c8e615e..678507ff6 100644
--- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs
+++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs
@@ -229,6 +229,20 @@ namespace IRaCIS.Core.Application.Contracts
public string EmailOrPhone { get; set; }
}
+ ///
+ ///
+ ///
+ public class UseUserIDGetDoctorIDOutDto
+ {
+ public Guid? DoctorID { get; set; }
+ }
+
+
+ public class UseUserIDGetDoctorIDInDto
+ {
+ public Guid UserID { get; set; }
+ }
+
public class VerifyEmialGetDoctorInfoOutDto
{
public Guid? DoctorId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs
index 71d596416..37fc2923e 100644
--- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs
+++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs
@@ -18,6 +18,8 @@ using Microsoft.VisualBasic;
using MimeKit;
using Newtonsoft.Json;
using System.Text.RegularExpressions;
+using static MassTransit.ValidationResultExtensions;
+using DocumentFormat.OpenXml.Vml.Spreadsheet;
namespace IRaCIS.Core.Application.Contracts
{
@@ -68,6 +70,50 @@ namespace IRaCIS.Core.Application.Contracts
return ResponseOutput.Ok();
}
+ ///
+ /// 通过UserId获取Doctorid
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task UseUserIDGetDoctorID(UseUserIDGetDoctorIDInDto inDto)
+ {
+
+ var userinfo = await _userRepository.Where(x => x.Id == inDto.UserID).FirstOrDefaultAsync();
+
+ if (userinfo != null && userinfo.DoctorId != null)
+ {
+ return new UseUserIDGetDoctorIDOutDto()
+ {
+
+ DoctorID = userinfo.DoctorId
+ };
+ }
+ else
+ {
+ Doctor doctor = new Doctor()
+ {
+
+ };
+
+ var info = await _doctorRepository.AddAsync(doctor, true);
+
+ await _userRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.UserID, x => new User()
+ {
+
+ DoctorId = info.Id
+ });
+
+ return new UseUserIDGetDoctorIDOutDto()
+ {
+
+ DoctorID = info.Id
+ };
+ }
+
+
+ }
+
///
/// 验证邮箱验证码 获取医生信息Id
///
diff --git a/IRaCIS.Core.Domain/Dcotor/Doctor.cs b/IRaCIS.Core.Domain/Dcotor/Doctor.cs
index 97d11708b..a9730a421 100644
--- a/IRaCIS.Core.Domain/Dcotor/Doctor.cs
+++ b/IRaCIS.Core.Domain/Dcotor/Doctor.cs
@@ -52,14 +52,14 @@ public class Doctor : BaseFullAuditEntity
public Guid AuditUserId { get; set; }
- public string BlindName { get; set; } = null!;
+ public string BlindName { get; set; } = string.Empty;
- public string BlindNameCN { get; set; } = null!;
+ public string BlindNameCN { get; set; } = string.Empty;
[MaxLength]
public string? BlindPublications { get; set; }
- public string ChineseName { get; set; } = null!;
+ public string ChineseName { get; set; } = string.Empty;
public int Code { get; set; }
@@ -68,16 +68,16 @@ public class Doctor : BaseFullAuditEntity
public Guid? DepartmentId { get; set; }
- public string DepartmentOther { get; set; } = null!;
+ public string DepartmentOther { get; set; } = string.Empty;
-
- public string DepartmentOtherCN { get; set; } = null!;
-
- public string EMail { get; set; } = null!;
+ public string DepartmentOtherCN { get; set; } = string.Empty;
-
- public string FirstName { get; set; } = null!;
+
+ public string EMail { get; set; } = string.Empty;
+
+
+ public string FirstName { get; set; } = string.Empty;
public int GCP { get; set; }
@@ -95,19 +95,19 @@ public class Doctor : BaseFullAuditEntity
public Guid? HospitalId { get; set; }
- public string HospitalOther { get; set; } = null!;
+ public string HospitalOther { get; set; } = string.Empty;
- public string HospitalOtherCN { get; set; } = null!;
+ public string HospitalOtherCN { get; set; } = string.Empty;
[MaxLength]
- public string Introduction { get; set; } = null!;
+ public string Introduction { get; set; } = string.Empty;
public bool IsVirtual { get; set; }
public DateTime? LastLoginTime { get; set; }
- public string LastName { get; set; } = null!;
+ public string LastName { get; set; } = string.Empty;
public int Nation { get; set; }
@@ -118,48 +118,48 @@ public class Doctor : BaseFullAuditEntity
public string? OtherClinicalExperienceCN { get; set; }
- public string Password { get; set; } = null!;
+ public string Password { get; set; } = string.Empty;
- public string Phone { get; set; } = null!;
+ public string Phone { get; set; } = string.Empty;
- public string PhotoPath { get; set; } = null!;
+ public string PhotoPath { get; set; } = string.Empty;
- public string Physician { get; set; } = null!;
+ public string Physician { get; set; } = string.Empty;
- public string PhysicianCN { get; set; } = null!;
+ public string PhysicianCN { get; set; } = string.Empty;
public Guid? PhysicianId { get; set; }
public Guid? PositionId { get; set; }
- public string PositionOther { get; set; } = null!;
+ public string PositionOther { get; set; } = string.Empty;
- public string PositionOtherCN { get; set; } = null!;
+ public string PositionOtherCN { get; set; } = string.Empty;
public Guid? RankId { get; set; }
- public string RankOther { get; set; } = null!;
+ public string RankOther { get; set; } = string.Empty;
- public string RankOtherCN { get; set; } = null!;
+ public string RankOtherCN { get; set; } = string.Empty;
- public string ReadingTypeOther { get; set; } = null!;
+ public string ReadingTypeOther { get; set; } = string.Empty;
- public string ReadingTypeOtherCN { get; set; } = null!;
+ public string ReadingTypeOtherCN { get; set; } = string.Empty;
[StringLength(1000)]
- public string ResumePath { get; set; } = null!;
+ public string ResumePath { get; set; } = string.Empty;
public ResumeStatusEnum ResumeStatus { get; set; } = ResumeStatusEnum.Failed;
- public string ReviewerCode { get; set; } = null!;
+ public string ReviewerCode { get; set; } = string.Empty;
public ReviewerInformationConfirmStatus ReviewStatus { get; set; } = ReviewerInformationConfirmStatus.ConfirmRefuse;
@@ -168,19 +168,19 @@ public class Doctor : BaseFullAuditEntity
public Guid? SpecialityId { get; set; }
- public string SpecialityOther { get; set; } = null!;
+ public string SpecialityOther { get; set; } = string.Empty;
- public string SpecialityOtherCN { get; set; } = null!;
+ public string SpecialityOtherCN { get; set; } = string.Empty;
- public string SubspecialityOther { get; set; } = null!;
+ public string SubspecialityOther { get; set; } = string.Empty;
- public string SubspecialityOtherCN { get; set; } = null!;
+ public string SubspecialityOtherCN { get; set; } = string.Empty;
- public string WeChat { get; set; } = null!;
+ public string WeChat { get; set; } = string.Empty;
///
/// ְ