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

IRC_NewDev
hang 2024-11-18 17:30:46 +08:00
commit 99c594acac
7 changed files with 18399 additions and 34 deletions

View File

@ -1,5 +1,6 @@
using IRaCIS.Application.Contracts; using IRaCIS.Application.Contracts;
using IRaCIS.Application.Interfaces; using IRaCIS.Application.Interfaces;
using MassTransit;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace IRaCIS.Core.Application.Service namespace IRaCIS.Core.Application.Service
@ -108,7 +109,7 @@ namespace IRaCIS.Core.Application.Service
else else
{ {
// 当前项目没有则复制 // 当前项目没有则复制
if (!(await _trialExperienceRepository.AnyAsync(x => x.TrialId == inDto.TrialId))) if (!(await _trialExperienceRepository.AnyAsync(x => x.TrialId == inDto.TrialId &&x.ExperienceDataType== ExperienceDataType.Trial)))
{ {
var trialExperienceList = await _trialExperienceRepository.Where(o => o.DoctorId == inDto.DoctorId) var trialExperienceList = await _trialExperienceRepository.Where(o => o.DoctorId == inDto.DoctorId)
.Where(x => x.ExperienceDataType == ExperienceDataType.System || x.ExperienceDataType == ExperienceDataType.SystemAuto).ToListAsync(); .Where(x => x.ExperienceDataType == ExperienceDataType.System || x.ExperienceDataType == ExperienceDataType.SystemAuto).ToListAsync();
@ -117,7 +118,11 @@ namespace IRaCIS.Core.Application.Service
item.Trial = null; item.Trial = null;
item.TrialId = inDto.TrialId; item.TrialId = inDto.TrialId;
item.ExperienceDataType = ExperienceDataType.Trial; item.ExperienceDataType = ExperienceDataType.Trial;
item.Id = NewId.NextGuid();
} }
await _trialExperienceRepository.AddRangeAsync(trialExperienceList);
await _trialExperienceRepository.SaveChangesAsync();
} }
var doctorClinicalTrialExperienceList = await _trialExperienceRepository var doctorClinicalTrialExperienceList = await _trialExperienceRepository
@ -126,6 +131,8 @@ namespace IRaCIS.Core.Application.Service
.Where(x => x.TrialId == inDto.TrialId.Value) .Where(x => x.TrialId == inDto.TrialId.Value)
.OrderBy(t => t.CreateTime) .OrderBy(t => t.CreateTime)
.ProjectTo<TrialExperienceListDTO>(_mapper.ConfigurationProvider).ToListAsync(); .ProjectTo<TrialExperienceListDTO>(_mapper.ConfigurationProvider).ToListAsync();
return doctorClinicalTrialExperienceList; return doctorClinicalTrialExperienceList;
} }

View File

@ -228,6 +228,8 @@ namespace IRaCIS.Core.Application.Contracts
public string VerificationCode { get; set; } public string VerificationCode { get; set; }
public string EmailOrPhone { get; set; } public string EmailOrPhone { get; set; }
public Guid? TrialId { get; set; }
} }
/// <summary> /// <summary>

View File

@ -155,9 +155,21 @@ namespace IRaCIS.Core.Application.Contracts
} }
else else
{ {
var isVirtual = true;
if (inDto.TrialId != null)
{
isVirtual = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.TrialType != TrialType.OfficialTrial).FirstNotNullAsync();
}
Doctor doctor = new Doctor() Doctor doctor = new Doctor()
{ {
EMail = inDto.EmailOrPhone EMail = inDto.EmailOrPhone,
IsVirtual = isVirtual,
AcceptingNewTrial=false,
ActivelyReading=false,
CooperateStatus= ContractorStatusEnum.Noncooperation,
ReviewStatus= ReviewerInformationConfirmStatus.ConfirmRefuse
}; };
var info=await _doctorRepository.AddAsync(doctor,true); var info=await _doctorRepository.AddAsync(doctor,true);

View File

@ -167,19 +167,19 @@ public class Doctor : BaseFullAuditEntity
public Guid? SpecialityId { get; set; } public Guid? SpecialityId { get; set; }
[MaxLength]
public string SpecialityOther { get; set; } = string.Empty; public string SpecialityOther { get; set; } = string.Empty;
[MaxLength]
public string SpecialityOtherCN { get; set; } = string.Empty; public string SpecialityOtherCN { get; set; } = string.Empty;
[MaxLength]
public string SubspecialityOther { get; set; } = string.Empty; public string SubspecialityOther { get; set; } = string.Empty;
[MaxLength]
public string SubspecialityOtherCN { get; set; } = string.Empty; public string SubspecialityOtherCN { get; set; } = string.Empty;
public string WeChat { get; set; } = string.Empty; public string WeChat { get; set; } = string.Empty;
/// <summary> /// <summary>
@ -195,11 +195,13 @@ public class Doctor : BaseFullAuditEntity
/// <summary> /// <summary>
/// ¸ÅÊö /// ¸ÅÊö
/// </summary> /// </summary>
[MaxLength]
public string Summarize { get; set; } = string.Empty; public string Summarize { get; set; } = string.Empty;
/// <summary> /// <summary>
/// ¸ÅÊö /// ¸ÅÊö
/// </summary> /// </summary>
[MaxLength]
public string SummarizeEn { get; set; } = string.Empty; public string SummarizeEn { get; set; } = string.Empty;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,210 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class doctor : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DeleteUserId",
table: "User");
migrationBuilder.DropColumn(
name: "DeletedTime",
table: "User");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "User");
migrationBuilder.AlterColumn<string>(
name: "TrialObjectNameList",
table: "Trial",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(2000)",
oldMaxLength: 2000,
oldComment: "项目术语配置Json字符串");
migrationBuilder.AddColumn<DateOnly>(
name: "TestDate",
table: "TestLength",
type: "date",
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "SummarizeEn",
table: "Doctor",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AlterColumn<string>(
name: "Summarize",
table: "Doctor",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AlterColumn<string>(
name: "SubspecialityOtherCN",
table: "Doctor",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AlterColumn<string>(
name: "SubspecialityOther",
table: "Doctor",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AlterColumn<string>(
name: "SpecialityOtherCN",
table: "Doctor",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.AlterColumn<string>(
name: "SpecialityOther",
table: "Doctor",
type: "nvarchar(max)",
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(400)",
oldMaxLength: 400);
migrationBuilder.CreateIndex(
name: "IX_Postgraduate_HospitalId",
table: "Postgraduate",
column: "HospitalId");
migrationBuilder.AddForeignKey(
name: "FK_Postgraduate_Hospital_HospitalId",
table: "Postgraduate",
column: "HospitalId",
principalTable: "Hospital",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Postgraduate_Hospital_HospitalId",
table: "Postgraduate");
migrationBuilder.DropIndex(
name: "IX_Postgraduate_HospitalId",
table: "Postgraduate");
migrationBuilder.DropColumn(
name: "TestDate",
table: "TestLength");
migrationBuilder.AddColumn<Guid>(
name: "DeleteUserId",
table: "User",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletedTime",
table: "User",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "User",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AlterColumn<string>(
name: "TrialObjectNameList",
table: "Trial",
type: "nvarchar(2000)",
maxLength: 2000,
nullable: false,
defaultValue: "",
comment: "项目术语配置Json字符串",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "SummarizeEn",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "Summarize",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "SubspecialityOtherCN",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "SubspecialityOther",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "SpecialityOtherCN",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
migrationBuilder.AlterColumn<string>(
name: "SpecialityOther",
table: "Doctor",
type: "nvarchar(400)",
maxLength: 400,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)");
}
}
}

View File

@ -1546,33 +1546,27 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<string>("SpecialityOther") b.Property<string>("SpecialityOther")
.IsRequired() .IsRequired()
.HasMaxLength(400) .HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(400)");
b.Property<string>("SpecialityOtherCN") b.Property<string>("SpecialityOtherCN")
.IsRequired() .IsRequired()
.HasMaxLength(400) .HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(400)");
b.Property<string>("SubspecialityOther") b.Property<string>("SubspecialityOther")
.IsRequired() .IsRequired()
.HasMaxLength(400) .HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(400)");
b.Property<string>("SubspecialityOtherCN") b.Property<string>("SubspecialityOtherCN")
.IsRequired() .IsRequired()
.HasMaxLength(400) .HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(400)");
b.Property<string>("Summarize") b.Property<string>("Summarize")
.IsRequired() .IsRequired()
.HasMaxLength(400) .HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(400)");
b.Property<string>("SummarizeEn") b.Property<string>("SummarizeEn")
.IsRequired() .IsRequired()
.HasMaxLength(400) .HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(400)");
b.Property<Guid?>("TrialId") b.Property<Guid?>("TrialId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
@ -3531,6 +3525,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.HasIndex("CreateUserId"); b.HasIndex("CreateUserId");
b.HasIndex("HospitalId");
b.ToTable("Postgraduate", t => b.ToTable("Postgraduate", t =>
{ {
t.HasComment("医生 - 继续教育经历"); t.HasComment("医生 - 继续教育经历");
@ -10407,12 +10403,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<DateTime?>("TrialFinishedTime") b.Property<DateTime?>("TrialFinishedTime")
.HasColumnType("datetime2"); .HasColumnType("datetime2");
b.Property<string>("TrialObjectNameList")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)")
.HasComment("项目术语配置Json字符串");
b.Property<string>("TrialStatusStr") b.Property<string>("TrialStatusStr")
.IsRequired() .IsRequired()
.HasMaxLength(400) .HasMaxLength(400)
@ -12605,12 +12595,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Property<Guid>("CreateUserId") b.Property<Guid>("CreateUserId")
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<Guid?>("DeleteUserId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("DeletedTime")
.HasColumnType("datetime2");
b.Property<string>("DepartmentName") b.Property<string>("DepartmentName")
.IsRequired() .IsRequired()
.HasMaxLength(400) .HasMaxLength(400)
@ -12635,9 +12619,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasMaxLength(400) .HasMaxLength(400)
.HasColumnType("nvarchar(400)"); .HasColumnType("nvarchar(400)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<bool>("IsFirstAdd") b.Property<bool>("IsFirstAdd")
.HasColumnType("bit") .HasColumnType("bit")
.HasComment("首次登录需要修改密码"); .HasComment("首次登录需要修改密码");
@ -13758,6 +13739,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.HasMaxLength(1000) .HasMaxLength(1000)
.HasColumnType("nvarchar(1000)"); .HasColumnType("nvarchar(1000)");
b.Property<DateOnly?>("TestDate")
.HasColumnType("date");
b.Property<string>("TestEnumList") b.Property<string>("TestEnumList")
.IsRequired() .IsRequired()
.HasMaxLength(1000) .HasMaxLength(1000)
@ -14540,7 +14524,13 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.OnDelete(DeleteBehavior.Cascade) .OnDelete(DeleteBehavior.Cascade)
.IsRequired(); .IsRequired();
b.HasOne("IRaCIS.Core.Domain.Models.Hospital", "HospitalEnt")
.WithMany()
.HasForeignKey("HospitalId");
b.Navigation("CreateUser"); b.Navigation("CreateUser");
b.Navigation("HospitalEnt");
}); });
modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b => modelBuilder.Entity("IRaCIS.Core.Domain.Models.PreviousHistory", b =>
@ -16565,6 +16555,38 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
.WithMany() .WithMany()
.HasForeignKey("SponsorId"); .HasForeignKey("SponsorId");
b.OwnsMany("IRaCIS.Core.Domain.Models.TrialObjectNameConfig", "TrialObjectNameList", b1 =>
{
b1.Property<Guid>("TrialId")
.HasColumnType("uniqueidentifier");
b1.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
b1.Property<bool>("IsDefault")
.HasColumnType("bit");
b1.Property<string>("Name")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b1.Property<string>("TrialName")
.IsRequired()
.HasMaxLength(400)
.HasColumnType("nvarchar(400)");
b1.HasKey("TrialId", "Id");
b1.ToTable("Trial");
b1.ToJson("TrialObjectNameList");
b1.WithOwner()
.HasForeignKey("TrialId");
});
b.Navigation("CRO"); b.Navigation("CRO");
b.Navigation("CreateUser"); b.Navigation("CreateUser");
@ -16578,6 +16600,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
b.Navigation("ReviewMode"); b.Navigation("ReviewMode");
b.Navigation("Sponsor"); b.Navigation("Sponsor");
b.Navigation("TrialObjectNameList");
}); });
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b => modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialBodyPart", b =>