Browse Source

疾病筛查类别

bjmzak
wxd 2 years ago
parent
commit
7e9aeb7f78
  1. 11
      src/Shentun.Peis.Application.Contracts/Asbitems/AsbitemDto.cs
  2. 10
      src/Shentun.Peis.Application.Contracts/Asbitems/CreateAsbitemDto.cs
  3. 11
      src/Shentun.Peis.Application.Contracts/Asbitems/UpdateAsbitemDto.cs
  4. 14
      src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/CreateDiseaseScreeningTypeDto.cs
  5. 24
      src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/DiseaseScreeningTypeDto.cs
  6. 11
      src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/DiseaseScreeningTypeIdInputDto.cs
  7. 19
      src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/UpdateDiseaseScreeningTypeDto.cs
  8. 19
      src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/UpdateManySortInputDto.cs
  9. 13
      src/Shentun.Peis.Application/Asbitems/AsbitemAppService.cs
  10. 157
      src/Shentun.Peis.Application/DiseaseScreeningTypes/DiseaseScreeningTypeAppService.cs
  11. 6
      src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
  12. 8
      src/Shentun.Peis.Domain/Asbitems/Asbitem.cs
  13. 6
      src/Shentun.Peis.Domain/Asbitems/AsbitemManager.cs
  14. 8
      src/Shentun.Peis.Domain/DiseaseScreeningTypes/DiseaseScreeningType.cs
  15. 124
      src/Shentun.Peis.Domain/DiseaseScreeningTypes/DiseaseScreeningTypeManager.cs
  16. 5
      src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
  17. 14380
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520125835_init20240520001.Designer.cs
  18. 60
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520125835_init20240520001.cs
  19. 70
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

11
src/Shentun.Peis.Application.Contracts/Asbitems/AsbitemDto.cs

@ -130,5 +130,16 @@ namespace Shentun.Peis.Asbitems
public char IsWebAppoint { get; set; }
/// <summary>
/// 疾病筛查类别
/// </summary>
public Guid? DiseaseScreeningTypeId { get; set; }
/// <summary>
/// 警告事项
/// </summary>
public string Warn { get; set; }
}
}

10
src/Shentun.Peis.Application.Contracts/Asbitems/CreateAsbitemDto.cs

@ -121,6 +121,16 @@ namespace Shentun.Peis.Asbitems
/// </summary>
public char IsWebAppoint { get; set; }
/// <summary>
/// 疾病筛查类别
/// </summary>
public Guid? DiseaseScreeningTypeId { get; set; }
/// <summary>
/// 警告事项
/// </summary>
public string Warn { get; set; }
}
}

11
src/Shentun.Peis.Application.Contracts/Asbitems/UpdateAsbitemDto.cs

@ -121,5 +121,16 @@ namespace Shentun.Peis.Asbitems
public char IsWebAppoint { get; set; }
/// <summary>
/// 疾病筛查类别
/// </summary>
public Guid? DiseaseScreeningTypeId { get; set; }
/// <summary>
/// 警告事项
/// </summary>
public string Warn { get; set; }
}
}

14
src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/CreateDiseaseScreeningTypeDto.cs

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.DiseaseScreeningTypes
{
public class CreateDiseaseScreeningTypeDto
{
/// <summary>
/// 疾病筛查类别名称
/// </summary>
public string DisplayName { get; set; }
}
}

24
src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/DiseaseScreeningTypeDto.cs

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Shentun.Peis.DiseaseScreeningTypes
{
public class DiseaseScreeningTypeDto:AuditedEntityDtoName
{
/// <summary>
/// 疾病筛查类别名称
/// </summary>
public string DisplayName { get; set; }
/// <summary>
/// 自定义简码
/// </summary>
public string SimpleCode { get; set; }
/// <summary>
/// 显示顺序
/// </summary>
public int DisplayOrder { get; set; }
}
}

11
src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/DiseaseScreeningTypeIdInputDto.cs

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.DiseaseScreeningTypes
{
public class DiseaseScreeningTypeIdInputDto
{
public Guid DiseaseScreeningTypeId { get; set; }
}
}

19
src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/UpdateDiseaseScreeningTypeDto.cs

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.DiseaseScreeningTypes
{
public class UpdateDiseaseScreeningTypeDto
{
/// <summary>
/// 主键ID
/// </summary>
public Guid DiseaseScreeningTypeId { get; set; }
/// <summary>
/// 疾病筛查类别名称
/// </summary>
public string DisplayName { get; set; }
}
}

19
src/Shentun.Peis.Application.Contracts/DiseaseScreeningTypes/UpdateManySortInputDto.cs

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.DiseaseScreeningTypes
{
public class UpdateManySortInputDto
{
/// <summary>
/// 需要修改的ID
/// </summary>
public Guid DiseaseScreeningTypeId { get; set; }
/// <summary>
/// 修改方式:1 置顶 2 置底
/// </summary>
public int SortType { get; set; }
}
}

13
src/Shentun.Peis.Application/Asbitems/AsbitemAppService.cs

@ -34,13 +34,15 @@ namespace Shentun.Peis.Asbitems
private readonly AsbitemManager _manager;
private readonly IRepository<Item, Guid> _itemRepository;
private readonly IRepository<AsbitemDetail> _asbitemDetailRepository;
private readonly CacheService _cacheService;
public AsbitemAppService(
IRepository<Asbitem, Guid> repository,
IRepository<IdentityUser, Guid> userRepository,
AsbitemManager manager,
IDistributedCache<Asbitem, Guid> asbitemCache,
IRepository<Item, Guid> itemRepository,
IRepository<AsbitemDetail> asbitemDetailRepository)
IRepository<AsbitemDetail> asbitemDetailRepository,
CacheService cacheService)
: base(repository)
{
_userRepository = userRepository;
@ -48,6 +50,7 @@ namespace Shentun.Peis.Asbitems
_asbitemCache = asbitemCache;
_itemRepository = itemRepository;
_asbitemDetailRepository = asbitemDetailRepository;
_cacheService = cacheService;
}
/// <summary>
/// 获取通过主键
@ -56,10 +59,10 @@ namespace Shentun.Peis.Asbitems
/// <returns></returns>
public override async Task<AsbitemDto> GetAsync(Guid id)
{
var userList = await _userRepository.GetListAsync();
var entityDto = await base.GetAsync(id);
entityDto.CreatorName = EntityHelper.GetSurnameNoSql(userList, entityDto.CreatorId);
entityDto.LastModifierName = EntityHelper.GetSurnameNoSql(userList, entityDto.LastModifierId);
entityDto.CreatorName = await _cacheService.GetSurnameAsync(entityDto.CreatorId);
entityDto.LastModifierName = await _cacheService.GetSurnameAsync(entityDto.LastModifierId);
return entityDto;
}
@ -139,6 +142,8 @@ namespace Shentun.Peis.Asbitems
SimpleCode = s.a.SimpleCode,
BarcodeMode = s.a.BarcodeMode,
IsWebAppoint = s.a.IsWebAppoint,
DiseaseScreeningTypeId = s.a.DiseaseScreeningTypeId,
Warn = s.a.Warn,
CreatorName = s.ab != null ? s.ab.Surname : "",
LastModifierName = s.ac != null ? s.ac.Surname : ""
}).OrderBy(o => o.DisplayOrder).ToList();

157
src/Shentun.Peis.Application/DiseaseScreeningTypes/DiseaseScreeningTypeAppService.cs

@ -0,0 +1,157 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Shentun.Peis.HelperDto;
using Shentun.Peis.MedicalReportTypes;
using Shentun.Peis.Models;
using Shentun.Peis.ThirdInterfaces;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Users;
namespace Shentun.Peis.DiseaseScreeningTypes
{
/// <summary>
/// 疾病筛查类别
/// </summary>
[ApiExplorerSettings(GroupName = "Work")]
[Authorize]
public class DiseaseScreeningTypeAppService : ApplicationService
{
private readonly IRepository<DiseaseScreeningType, Guid> _diseaseScreeningTypeRepository;
private readonly DiseaseScreeningTypeManager _diseaseScreeningTypeManager;
private readonly CacheService _cacheService;
public DiseaseScreeningTypeAppService(
IRepository<DiseaseScreeningType, Guid> diseaseScreeningTypeRepository,
DiseaseScreeningTypeManager diseaseScreeningTypeManager,
CacheService cacheService)
{
_diseaseScreeningTypeRepository = diseaseScreeningTypeRepository;
_diseaseScreeningTypeManager = diseaseScreeningTypeManager;
_cacheService = cacheService;
}
/// <summary>
/// 获取通过主键
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/DiseaseScreeningType/Get")]
public async Task<DiseaseScreeningTypeDto> GetAsync(DiseaseScreeningTypeIdInputDto input)
{
var diseaseScreeningTypeEnt = await _diseaseScreeningTypeRepository.GetAsync(input.DiseaseScreeningTypeId);
var entityDto = ObjectMapper.Map<DiseaseScreeningType, DiseaseScreeningTypeDto>(diseaseScreeningTypeEnt);
entityDto.CreatorName = await _cacheService.GetSurnameAsync(entityDto.CreatorId);
entityDto.LastModifierName = await _cacheService.GetSurnameAsync(entityDto.LastModifierId);
return entityDto;
}
/// <summary>
/// 获取列表
/// </summary>
/// <returns></returns>
[HttpPost("api/app/DiseaseScreeningType/GetList")]
public async Task<List<DiseaseScreeningTypeDto>> GetListAsync()
{
var entlist = await _diseaseScreeningTypeRepository.GetQueryableAsync();
var entdto = entlist.Select(s => new DiseaseScreeningTypeDto
{
CreationTime = s.CreationTime,
CreatorId = s.CreatorId,
DisplayName = s.DisplayName,
DisplayOrder = s.DisplayOrder,
Id = s.Id,
LastModificationTime = s.LastModificationTime,
LastModifierId = s.LastModifierId,
SimpleCode = s.SimpleCode,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
}).OrderBy(o => o.DisplayOrder).ToList();
return entdto;
}
/// <summary>
/// 创建
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/DiseaseScreeningType/Create")]
public async Task<DiseaseScreeningTypeDto> CreateAsync(CreateDiseaseScreeningTypeDto input)
{
var createEntity = ObjectMapper.Map<CreateDiseaseScreeningTypeDto, DiseaseScreeningType>(input);
var entity = await _diseaseScreeningTypeManager.CreateAsync(createEntity);
entity = await _diseaseScreeningTypeRepository.InsertAsync(entity);
var dto = ObjectMapper.Map<DiseaseScreeningType, DiseaseScreeningTypeDto>(entity);
dto.CreatorName = await _cacheService.GetSurnameAsync(dto.CreatorId);
dto.LastModifierName = await _cacheService.GetSurnameAsync(dto.LastModifierId);
return dto;
}
/// <summary>
/// 更新
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/DiseaseScreeningType/Update")]
public async Task<DiseaseScreeningTypeDto> UpdateAsync(UpdateDiseaseScreeningTypeDto input)
{
var entity = await _diseaseScreeningTypeRepository.GetAsync(input.DiseaseScreeningTypeId);
var sourceEntity = ObjectMapper.Map<UpdateDiseaseScreeningTypeDto, DiseaseScreeningType>(input);
await _diseaseScreeningTypeManager.UpdateAsync(sourceEntity, entity);
entity = await _diseaseScreeningTypeRepository.UpdateAsync(entity);
var dto = ObjectMapper.Map<DiseaseScreeningType, DiseaseScreeningTypeDto>(entity);
dto.CreatorName = await _cacheService.GetSurnameAsync(dto.CreatorId);
dto.LastModifierName = await _cacheService.GetSurnameAsync(dto.LastModifierId);
return dto;
}
/// <summary>
/// 删除
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/DiseaseScreeningType/Delete")]
public async Task DeleteAsync(DiseaseScreeningTypeIdInputDto input)
{
await _diseaseScreeningTypeManager.CheckAndDeleteAsync(input.DiseaseScreeningTypeId);
}
/// <summary>
/// 修改排序 置顶,置底
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/DiseaseScreeningType/UpdateManySort")]
public async Task UpdateManySortAsync(UpdateManySortInputDto input)
{
await _diseaseScreeningTypeManager.UpdateManySortAsync(input.DiseaseScreeningTypeId, input.SortType);
}
/// <summary>
/// 修改排序 拖拽
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/DiseaseScreeningType/UpdateSortMany")]
public async Task UpdateSortManyAsync(UpdateSortManyDto input)
{
await _diseaseScreeningTypeManager.UpdateSortManyAsync(input);
}
}
}

6
src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs

@ -23,6 +23,7 @@ using Shentun.Peis.DiagnosisLevels;
using Shentun.Peis.DiagnosisPostfixs;
using Shentun.Peis.DiagnosisTemplateDetails;
using Shentun.Peis.DiagnosisTemplates;
using Shentun.Peis.DiseaseScreeningTypes;
using Shentun.Peis.ForSexs;
using Shentun.Peis.GuideTypes;
using Shentun.Peis.InvoiceItemTypes;
@ -469,5 +470,10 @@ public class PeisApplicationAutoMapperProfile : Profile
CreateMap<IdentityUser, IdentityUserWithExtensionDto>();
CreateMap<DiseaseScreeningType, DiseaseScreeningTypeDto>();
CreateMap<CreateDiseaseScreeningTypeDto, DiseaseScreeningType>();
CreateMap<UpdateDiseaseScreeningTypeDto, DiseaseScreeningType>();
}
}

8
src/Shentun.Peis.Domain/Asbitems/Asbitem.cs

@ -160,9 +160,15 @@ namespace Shentun.Peis.Models
[MaxLength(1)]
public char IsWebAppoint { get; set; }
/// <summary>
/// 疾病筛查类别
/// </summary>
[Column("disease_screening_type_id")]
public Guid DiseaseScreeningTypeId { get; set; }
public Guid? DiseaseScreeningTypeId { get; set; }
/// <summary>
/// 警告事项
/// </summary>
[MaxLength(100)]
[Column("warn")]
public string Warn { get; set; }

6
src/Shentun.Peis.Domain/Asbitems/AsbitemManager.cs

@ -101,7 +101,9 @@ namespace Shentun.Peis.Asbitems
QueueTime = entity.QueueTime,
ShortName = entity.ShortName,
BarcodeMode = entity.BarcodeMode,
IsWebAppoint = entity.IsWebAppoint
IsWebAppoint = entity.IsWebAppoint,
Warn = entity.Warn,
DiseaseScreeningTypeId = entity.DiseaseScreeningTypeId
};
}
/// <summary>
@ -144,6 +146,8 @@ namespace Shentun.Peis.Asbitems
targetEntity.ShortName = sourceEntity.ShortName;
targetEntity.BarcodeMode = sourceEntity.BarcodeMode;
targetEntity.IsWebAppoint = sourceEntity.IsWebAppoint;
targetEntity.DiseaseScreeningTypeId = sourceEntity.DiseaseScreeningTypeId;
targetEntity.Warn = sourceEntity.Warn;
}

8
src/Shentun.Peis.Domain/DiseaseScreeningTypes/DiseaseScreeningType.cs

@ -10,6 +10,10 @@ using System.ComponentModel.DataAnnotations;
namespace Shentun.Peis.Models
{
/// <summary>
/// 疾病筛查类别
/// </summary>
[Table("disease_screening_type")]
public class DiseaseScreeningType : AuditedEntity<Guid>, IDisplayName, IDisplayOrder, IHasConcurrencyStamp
{
public DiseaseScreeningType(Guid id) : base(id) { }
@ -19,11 +23,11 @@ namespace Shentun.Peis.Models
}
/// <summary>
/// 体检类别名称
/// 疾病筛查类别名称
/// </summary>
[Column("display_name")]
[StringLength(50)]
public string DisplayName { get; set; } = null!;
public string DisplayName { get; set; }
/// <summary>
/// 自定义简码
/// </summary>

124
src/Shentun.Peis.Domain/DiseaseScreeningTypes/DiseaseScreeningTypeManager.cs

@ -0,0 +1,124 @@
using Shentun.Peis.HelperDto;
using Shentun.Peis.Models;
using Shentun.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services;
namespace Shentun.Peis.DiseaseScreeningTypes
{
/// <summary>
/// 疾病筛查类别
/// </summary>
public class DiseaseScreeningTypeManager : DomainService
{
private readonly IRepository<DiseaseScreeningType, Guid> _diseaseScreeningTypeRepository;
private readonly IRepository<Asbitem, Guid> _asbitemRepository;
public DiseaseScreeningTypeManager(
IRepository<DiseaseScreeningType, Guid> diseaseScreeningTypeRepository,
IRepository<Asbitem, Guid> asbitemRepository)
{
_diseaseScreeningTypeRepository = diseaseScreeningTypeRepository;
_asbitemRepository = asbitemRepository;
}
/// <summary>
/// 创建
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public async Task<DiseaseScreeningType> CreateAsync(
DiseaseScreeningType entity
)
{
DataHelper.CheckEntityIsNull(entity);
DataHelper.CheckStringIsNull(entity.DisplayName, "名称");
await EntityHelper.CheckSameName<DiseaseScreeningType, Guid>(_diseaseScreeningTypeRepository, entity.DisplayName);
return new DiseaseScreeningType
{
DisplayName = entity.DisplayName,
SimpleCode = LanguageConverter.GetPYSimpleCode(entity.DisplayName),
DisplayOrder = await EntityHelper.CreateMaxDisplayOrder<DiseaseScreeningType>(_diseaseScreeningTypeRepository)
};
}
/// <summary>
/// 更新
/// </summary>
/// <param name="sourceEntity"></param>
/// <param name="targetEntity"></param>
/// <returns></returns>
public async Task UpdateAsync(
DiseaseScreeningType sourceEntity,
DiseaseScreeningType targetEntity
)
{
DataHelper.CheckEntityIsNull(sourceEntity);
DataHelper.CheckEntityIsNull(targetEntity);
DataHelper.CheckStringIsNull(sourceEntity.DisplayName, "名称");
if (sourceEntity.DisplayName != targetEntity.DisplayName)
{
await EntityHelper.CheckSameName<DiseaseScreeningType, Guid>(_diseaseScreeningTypeRepository, sourceEntity.DisplayName, targetEntity);
targetEntity.DisplayName = sourceEntity.DisplayName;
targetEntity.SimpleCode = LanguageConverter.GetPYSimpleCode(targetEntity.DisplayName);
}
}
/// <summary>
/// 验证是否有项目类别使用
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
public async Task CheckAndDeleteAsync(Guid id)
{
var asbitemEnt = await _asbitemRepository.FirstOrDefaultAsync(m => m.DiseaseScreeningTypeId == id);
if (asbitemEnt != null)
{
throw new UserFriendlyException($"疾病筛查类别\"{asbitemEnt.DisplayName}\"已在组合项目\"{asbitemEnt.DisplayName}\"中使用,不能删除");
}
await _diseaseScreeningTypeRepository.DeleteAsync(id);
}
/// <summary>
/// 修改排序 置顶,置底
/// </summary>
/// <param name="id">需要修改的ID</param>
/// <param name="SortType">修改方式:1 置顶 2 置底</param>
/// <returns></returns>
public async Task UpdateManySortAsync(Guid id, int SortType)
{
await EntityHelper.UpdateManySortAsync(_diseaseScreeningTypeRepository, id, SortType);
}
/// <summary>
/// 修改排序 拖拽
/// </summary>
/// <typeparam name="TEntity"></typeparam>
/// <param name="repository"></param>
/// <param name="input"></param>
/// <returns></returns>
public async Task UpdateSortManyAsync(UpdateSortManyDto input)
{
await EntityHelper.UpdateSortManyAsync(_diseaseScreeningTypeRepository, input);
}
}
}

5
src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

@ -336,6 +336,8 @@ public class PeisDbContext :
public DbSet<CollectItemType> CollectItemTypes { get; set; } = null!;
public DbSet<PatientRegisterExter> PatientRegisterExters { get; set; } = null!;
public DbSet<DiseaseScreeningType> DiseaseScreeningTypes { get; set; } = null!;
public PeisDbContext(DbContextOptions<PeisDbContext> options)
: base(options)
{
@ -568,7 +570,8 @@ public class PeisDbContext :
.ApplyConfiguration(new ChargeRequestAsbitemDbMapping())
.ApplyConfiguration(new ThirdInterfaceDbMapping())
.ApplyConfiguration(new CollectItemTypeDbMapping())
.ApplyConfiguration(new PatientRegisterExterDbMapping());
.ApplyConfiguration(new PatientRegisterExterDbMapping())
.ApplyConfiguration(new DiseaseScreeningTypeDbMapping());
#endregion

14380
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520125835_init20240520001.Designer.cs
File diff suppressed because it is too large
View File

60
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240520125835_init20240520001.cs

@ -0,0 +1,60 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class init20240520001 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "disease_screening_type_id",
table: "asbitem",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "warn",
table: "asbitem",
type: "character varying(100)",
maxLength: 100,
nullable: true);
migrationBuilder.CreateTable(
name: "disease_screening_type",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "编号"),
display_name = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "体检类别名称"),
simple_code = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "自定义简码"),
display_order = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "999999", comment: "显示顺序"),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
creator_id = table.Column<Guid>(type: "uuid", nullable: false),
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_disease_screening_type", x => x.id);
},
comment: "疾病筛查类别设置");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "disease_screening_type");
migrationBuilder.DropColumn(
name: "disease_screening_type_id",
table: "asbitem");
migrationBuilder.DropColumn(
name: "warn",
table: "asbitem");
}
}
}

70
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -515,6 +515,10 @@ namespace Shentun.Peis.Migrations
.HasColumnName("diagnosis_function")
.HasComment("诊断函数");
b.Property<Guid?>("DiseaseScreeningTypeId")
.HasColumnType("uuid")
.HasColumnName("disease_screening_type_id");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(30)
@ -641,6 +645,11 @@ namespace Shentun.Peis.Migrations
.HasColumnType("character varying(30)")
.HasColumnName("simple_code");
b.Property<string>("Warn")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("warn");
b.HasKey("Id");
b.HasIndex("CollectItemTypeId");
@ -3679,6 +3688,67 @@ namespace Shentun.Peis.Migrations
b.HasComment("诊断类别");
});
modelBuilder.Entity("Shentun.Peis.Models.DiseaseScreeningType", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid")
.HasColumnName("id")
.IsFixedLength()
.HasComment("编号");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("creation_time");
b.Property<Guid?>("CreatorId")
.IsRequired()
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("display_name")
.HasComment("体检类别名称");
b.Property<int>("DisplayOrder")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("display_order")
.HasDefaultValueSql("999999")
.HasComment("显示顺序");
b.Property<DateTime?>("LastModificationTime")
.IsRequired()
.HasColumnType("timestamp without time zone")
.HasColumnName("last_modification_time");
b.Property<Guid?>("LastModifierId")
.IsRequired()
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property<string>("SimpleCode")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasColumnName("simple_code")
.HasComment("自定义简码");
b.HasKey("Id");
b.ToTable("disease_screening_type");
b.HasComment("疾病筛查类别设置");
});
modelBuilder.Entity("Shentun.Peis.Models.FieldComparison", b =>
{
b.Property<Guid>("Id")

Loading…
Cancel
Save