diff --git a/src/Shentun.Peis.Application.Contracts/Devices/CreateDeviceDto.cs b/src/Shentun.Peis.Application.Contracts/Devices/CreateDeviceDto.cs
new file mode 100644
index 0000000..92308d2
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/Devices/CreateDeviceDto.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shentun.Peis.Devices
+{
+ public class CreateDeviceDto
+ {
+ ///
+ /// 名称
+ ///
+ public string DisplayName { get; set; }
+
+ ///
+ /// 仪器类别
+ ///
+ public Guid DeviceTypeId { get; set; }
+
+ ///
+ /// 设备协议 0-视频采集图片和导入图片,1-dicom
+ ///
+ public char DeviceProtocolFlag { get; set; }
+
+ ///
+ /// DICOM设备AETitle 该一般字段存储英文字符,仅DICOM设备需要设置
+ ///
+ public string AeTitle { get; set; }
+
+
+ }
+}
diff --git a/src/Shentun.Peis.Application.Contracts/Devices/DeviceDto.cs b/src/Shentun.Peis.Application.Contracts/Devices/DeviceDto.cs
new file mode 100644
index 0000000..ea27c6e
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/Devices/DeviceDto.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.ComponentModel.DataAnnotations;
+using System.Text;
+
+namespace Shentun.Peis.Devices
+{
+ public class DeviceDto : AuditedEntityDtoName
+ {
+ ///
+ /// 名称
+ ///
+ public string DisplayName { get; set; }
+
+ ///
+ /// 仪器类别
+ ///
+ public Guid DeviceTypeId { get; set; }
+
+ ///
+ /// 设备协议 0-视频采集图片和导入图片,1-dicom
+ ///
+ public char DeviceProtocolFlag { get; set; }
+
+ ///
+ /// DICOM设备AETitle 该一般字段存储英文字符,仅DICOM设备需要设置
+ ///
+ public string AeTitle { get; set; }
+
+ ///
+ /// 简码
+ ///
+
+ public string SimpleCode { get; set; }
+
+ ///
+ /// 排序
+ ///
+ public int DisplayOrder { get; set; }
+ }
+}
diff --git a/src/Shentun.Peis.Application.Contracts/Devices/DeviceIdInputDto.cs b/src/Shentun.Peis.Application.Contracts/Devices/DeviceIdInputDto.cs
new file mode 100644
index 0000000..6c0b83d
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/Devices/DeviceIdInputDto.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shentun.Peis.Devices
+{
+ public class DeviceIdInputDto
+ {
+ public Guid DeviceId { get; set; }
+ }
+}
diff --git a/src/Shentun.Peis.Application.Contracts/Devices/DeviceListInputDto.cs b/src/Shentun.Peis.Application.Contracts/Devices/DeviceListInputDto.cs
new file mode 100644
index 0000000..2cc08c3
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/Devices/DeviceListInputDto.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shentun.Peis.Devices
+{
+ public class DeviceListInputDto
+ {
+ ///
+ /// 仪器类别
+ ///
+ public Guid? DeviceTypeId { get; set; }
+
+ ///
+ /// 检索名字 简码
+ ///
+ public string KeyWord { get; set; }
+ }
+}
diff --git a/src/Shentun.Peis.Application.Contracts/Devices/UpdateDeviceDto.cs b/src/Shentun.Peis.Application.Contracts/Devices/UpdateDeviceDto.cs
new file mode 100644
index 0000000..e137e0b
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/Devices/UpdateDeviceDto.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shentun.Peis.Devices
+{
+ public class UpdateDeviceDto
+ {
+ ///
+ /// 设备ID
+ ///
+ public Guid DeviceId { get; set; }
+
+ ///
+ /// 名称
+ ///
+ public string DisplayName { get; set; }
+
+ ///
+ /// 仪器类别
+ ///
+ public Guid DeviceTypeId { get; set; }
+
+ ///
+ /// 设备协议 0-视频采集图片和导入图片,1-dicom
+ ///
+ public char DeviceProtocolFlag { get; set; }
+
+ ///
+ /// DICOM设备AETitle 该一般字段存储英文字符,仅DICOM设备需要设置
+ ///
+ public string AeTitle { get; set; }
+ }
+}
diff --git a/src/Shentun.Peis.Application.Contracts/Devices/UpdateManySortDeviceInputDto.cs b/src/Shentun.Peis.Application.Contracts/Devices/UpdateManySortDeviceInputDto.cs
new file mode 100644
index 0000000..8b0de2d
--- /dev/null
+++ b/src/Shentun.Peis.Application.Contracts/Devices/UpdateManySortDeviceInputDto.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shentun.Peis.Devices
+{
+ public class UpdateManySortDeviceInputDto
+ {
+ ///
+ /// 需要修改的ID
+ ///
+ public Guid DeviceId { get; set; }
+
+ ///
+ /// 修改方式:1 置顶 2 置底
+ ///
+ public int SortType { get; set; }
+ }
+}
diff --git a/src/Shentun.Peis.Application/Devices/DeviceAppService.cs b/src/Shentun.Peis.Application/Devices/DeviceAppService.cs
new file mode 100644
index 0000000..82e6bd9
--- /dev/null
+++ b/src/Shentun.Peis.Application/Devices/DeviceAppService.cs
@@ -0,0 +1,169 @@
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Shentun.Peis.Devices;
+using Shentun.Peis.HelperDto;
+using Shentun.Peis.Models;
+using Shentun.Peis.PatientRegisters;
+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.Repositories;
+
+namespace Shentun.Peis.Devices
+{
+ ///
+ /// 危急值
+ ///
+ [ApiExplorerSettings(GroupName = "Work")]
+ [Authorize]
+ public class DeviceAppService : ApplicationService
+ {
+ private readonly IRepository _deviceRepository;
+ private readonly CacheService _cacheService;
+ private readonly DeviceManager _deviceManager;
+
+ public DeviceAppService(
+ IRepository deviceRepository,
+ CacheService cacheService,
+ DeviceManager deviceManager
+ )
+ {
+ _deviceRepository = deviceRepository;
+ _cacheService = cacheService;
+ _deviceManager = deviceManager;
+ }
+
+ ///
+ /// 获取通过主键
+ ///
+ ///
+ ///
+ [HttpPost("api/app/Device/Get")]
+ public async Task GetAsync(DeviceIdInputDto input)
+ {
+ var deviceEnt = await _deviceRepository.GetAsync(input.DeviceId);
+ var entityDto = ObjectMapper.Map(deviceEnt);
+ entityDto.CreatorName = await _cacheService.GetSurnameAsync(entityDto.CreatorId);
+ entityDto.LastModifierName = await _cacheService.GetSurnameAsync(entityDto.LastModifierId);
+ return entityDto;
+ }
+
+ ///
+ /// 获取列表 可根据条件检索
+ ///
+ ///
+ [HttpPost("api/app/Device/GetList")]
+ public async Task> GetListAsync(DeviceListInputDto input)
+ {
+
+ var query = await _deviceRepository.GetQueryableAsync();
+
+ if (input.DeviceTypeId != null)
+ query = query.Where(m => m.DeviceTypeId == input.DeviceTypeId);
+
+
+ if (!string.IsNullOrWhiteSpace(input.KeyWord))
+ query = query.Where(m => m.DisplayName.Contains(input.KeyWord) || m.SimpleCode.Contains(input.KeyWord));
+
+
+ var entdto = query.Select(s => new DeviceDto
+ {
+ CreationTime = s.CreationTime,
+ CreatorId = s.CreatorId,
+ DisplayName = s.DisplayName,
+ DisplayOrder = s.DisplayOrder,
+ Id = s.Id,
+ DeviceTypeId = s.DeviceTypeId,
+ AeTitle = s.AeTitle,
+ SimpleCode = s.SimpleCode,
+ DeviceProtocolFlag = s.DeviceProtocolFlag,
+ LastModificationTime = s.LastModificationTime,
+ LastModifierId = s.LastModifierId,
+ CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
+ LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
+ }).OrderBy(o => o.DisplayOrder).ToList();
+
+ return entdto;
+
+
+ }
+
+ ///
+ /// 创建
+ ///
+ ///
+ ///
+ [HttpPost("api/app/Device/Create")]
+ public async Task CreateAsync(CreateDeviceDto input)
+ {
+ var createEntity = ObjectMapper.Map(input);
+ var entity = await _deviceManager.CreateAsync(createEntity);
+ entity = await _deviceRepository.InsertAsync(entity);
+ var dto = ObjectMapper.Map(entity);
+ dto.CreatorName = await _cacheService.GetSurnameAsync(dto.CreatorId);
+ dto.LastModifierName = await _cacheService.GetSurnameAsync(dto.LastModifierId);
+ return dto;
+ }
+
+ ///
+ /// 更新
+ ///
+ ///
+ ///
+ [HttpPost("api/app/Device/Update")]
+ public async Task UpdateAsync(UpdateDeviceDto input)
+ {
+ var entity = await _deviceRepository.GetAsync(input.DeviceId);
+ var sourceEntity = ObjectMapper.Map(input);
+ await _deviceManager.UpdateAsync(sourceEntity, entity);
+ entity = await _deviceRepository.UpdateAsync(entity);
+ var dto = ObjectMapper.Map(entity);
+ dto.CreatorName = await _cacheService.GetSurnameAsync(dto.CreatorId);
+ dto.LastModifierName = await _cacheService.GetSurnameAsync(dto.LastModifierId);
+ return dto;
+ }
+
+
+ ///
+ /// 删除
+ ///
+ ///
+ ///
+ [HttpPost("api/app/Device/Delete")]
+ public async Task DeleteAsync(DeviceIdInputDto input)
+ {
+ await _deviceManager.CheckAndDeleteAsync(input.DeviceId);
+ }
+
+
+
+ ///
+ /// 修改排序 置顶,置底
+ ///
+ ///
+ ///
+ [HttpPost("api/app/Device/UpdateManySort")]
+ public async Task UpdateManySortAsync(UpdateManySortDeviceInputDto input)
+ {
+ await _deviceManager.UpdateManySortAsync(input.DeviceId, input.SortType);
+ }
+
+ ///
+ /// 修改排序 拖拽
+ ///
+ ///
+ ///
+ [HttpPost("api/app/Device/UpdateSortMany")]
+ public async Task UpdateSortManyAsync(UpdateSortManyCommonDto input)
+ {
+ await _deviceManager.UpdateSortManyAsync(input);
+ }
+
+
+
+
+ }
+}
diff --git a/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs b/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
index b6b4f13..290f983 100644
--- a/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
+++ b/src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
@@ -26,6 +26,7 @@ using Shentun.Peis.CustomerOrgGroups;
using Shentun.Peis.CustomerOrgRegisters;
using Shentun.Peis.CustomerOrgs;
using Shentun.Peis.CustomerOrgTypes;
+using Shentun.Peis.Devices;
using Shentun.Peis.DeviceTypes;
using Shentun.Peis.Diagnosises;
using Shentun.Peis.DiagnosisLevels;
@@ -599,6 +600,12 @@ public class PeisApplicationAutoMapperProfile : Profile
CreateMap();
+ //豸
+ CreateMap();
+ CreateMap();
+ CreateMap();
+
+
}
}
diff --git a/src/Shentun.Peis.Domain/Devices/Device.cs b/src/Shentun.Peis.Domain/Devices/Device.cs
new file mode 100644
index 0000000..0869ffb
--- /dev/null
+++ b/src/Shentun.Peis.Domain/Devices/Device.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities.Auditing;
+using Volo.Abp.Domain.Entities;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.ComponentModel.DataAnnotations;
+
+namespace Shentun.Peis.Models
+{
+ ///
+ /// 仪器表
+ ///
+ public class Device : AuditedEntity, IHasConcurrencyStamp, IDisplayName, IDisplayOrder
+ {
+ public Device(Guid id) : base(id)
+ {
+
+ }
+
+ ///
+ /// 名称
+ ///
+ [Column("Display_Name")]
+ [StringLength(100)]
+ public string DisplayName { get; set; }
+
+ ///
+ /// 仪器类别
+ ///
+ [Column("device_type_id")]
+ public Guid DeviceTypeId { get; set; }
+
+ ///
+ /// 设备协议 0-视频采集图片和导入图片,1-dicom
+ ///
+ [Column("device_protocol_flag")]
+ public char DeviceProtocolFlag { get; set; }
+
+ ///
+ /// DICOM设备AETitle 该一般字段存储英文字符,仅DICOM设备需要设置
+ ///
+ [Column("ae_title")]
+ [StringLength(50)]
+ public string AeTitle { get; set; }
+
+ ///
+ /// 简码
+ ///
+ [Column("simple_code")]
+ [StringLength(100)]
+ public string SimpleCode { get; set; }
+
+ ///
+ /// 排序
+ ///
+ [Column("display_order")]
+ public int DisplayOrder { get; set; }
+
+ [Column("concurrency_stamp")]
+ public string ConcurrencyStamp { get; set; }
+
+
+ }
+}
diff --git a/src/Shentun.Peis.Domain/Devices/DeviceManager.cs b/src/Shentun.Peis.Domain/Devices/DeviceManager.cs
new file mode 100644
index 0000000..d406f7c
--- /dev/null
+++ b/src/Shentun.Peis.Domain/Devices/DeviceManager.cs
@@ -0,0 +1,149 @@
+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.Entities;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+
+namespace Shentun.Peis.Devices
+{
+
+
+ public class DeviceManager : DomainService
+ {
+ private readonly IRepository _deviceRepository;
+ private readonly IRepository _registerCheckPictureRepository;
+
+
+ public DeviceManager(
+ IRepository deviceRepository,
+ IRepository registerCheckPictureRepository
+ )
+ {
+ _deviceRepository = deviceRepository;
+ _registerCheckPictureRepository = registerCheckPictureRepository;
+ }
+
+ ///
+ /// 创建
+ ///
+ ///
+ ///
+ public async Task CreateAsync(
+ Device entity
+ )
+ {
+ Verify(entity);
+ await EntityHelper.CheckSameName(_deviceRepository, entity.DisplayName);
+ return new Device(GuidGenerator.Create())
+ {
+ DisplayName = entity.DisplayName,
+ DeviceProtocolFlag = entity.DeviceProtocolFlag,
+ SimpleCode = LanguageConverter.GetPYSimpleCode(entity.DisplayName),
+ AeTitle = entity.AeTitle,
+ DeviceTypeId = entity.DeviceTypeId,
+ DisplayOrder = await EntityHelper.CreateMaxDisplayOrder(_deviceRepository)
+ };
+ }
+
+ ///
+ /// 更新
+ ///
+ ///
+ ///
+ ///
+ public async Task UpdateAsync(
+ Device sourceEntity,
+ Device targetEntity
+ )
+ {
+ DataHelper.CheckEntityIsNull(sourceEntity);
+ Verify(targetEntity);
+ if (sourceEntity.DisplayName != targetEntity.DisplayName)
+ {
+
+ await EntityHelper.CheckSameName(_deviceRepository, sourceEntity.DisplayName, targetEntity);
+ targetEntity.DisplayName = sourceEntity.DisplayName;
+ targetEntity.SimpleCode = LanguageConverter.GetPYSimpleCode(sourceEntity.DisplayName);
+ }
+
+ targetEntity.DeviceTypeId = sourceEntity.DeviceTypeId;
+ targetEntity.DeviceProtocolFlag = sourceEntity.DeviceProtocolFlag;
+ targetEntity.AeTitle = sourceEntity.AeTitle;
+ }
+
+
+ ///
+ /// 删除
+ ///
+ ///
+ ///
+ ///
+ public async Task CheckAndDeleteAsync(Guid id)
+ {
+
+ var deviceCount = await _registerCheckPictureRepository.CountAsync(f => f.DeviceId == id);
+ if (deviceCount > 0)
+ {
+ throw new UserFriendlyException("设备已被使用,不能删除");
+ }
+
+ await _deviceRepository.DeleteAsync(id);
+ }
+
+
+
+
+ ///
+ /// 修改排序 置顶,置底
+ ///
+ /// 需要修改的ID
+ /// 修改方式:1 置顶 2 置底
+ ///
+ public async Task UpdateManySortAsync(Guid id, int SortType)
+ {
+ await EntityHelper.UpdateManySortCommonAsync(_deviceRepository, id, SortType);
+ }
+
+
+
+ ///
+ /// 修改排序 拖拽
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task UpdateSortManyAsync(UpdateSortManyCommonDto input)
+ {
+ await EntityHelper.UpdateSortManyCommonAsync(_deviceRepository, input);
+ }
+
+
+
+ ///
+ /// 检查空值
+ ///
+ ///
+ private void Verify(Device entity)
+ {
+
+ DataHelper.CheckEntityIsNull(entity);
+ DataHelper.CheckStringIsNull(entity.DisplayName, "名称");
+ DataHelper.CheckGuidIsDefaultValue(entity.DeviceTypeId, "仪器类别");
+ if (entity.DeviceProtocolFlag != '0' && entity.DeviceProtocolFlag != '1')
+ {
+ throw new ArgumentException($"设备协议只能为0,1");
+ }
+
+ }
+
+
+ }
+}
diff --git a/src/Shentun.Peis.Domain/RegisterCheckPictures/RegisterCheckPicture.cs b/src/Shentun.Peis.Domain/RegisterCheckPictures/RegisterCheckPicture.cs
index c21db96..6cad0e5 100644
--- a/src/Shentun.Peis.Domain/RegisterCheckPictures/RegisterCheckPicture.cs
+++ b/src/Shentun.Peis.Domain/RegisterCheckPictures/RegisterCheckPicture.cs
@@ -46,6 +46,13 @@ namespace Shentun.Peis.Models
///
[Column("local_path_name")]
public string LocalPathName { get; set; }
+
+ ///
+ /// 设备id
+ ///
+ [Column("device_id")]
+ public Guid? DeviceId { get; set; }
+
///
/// 显示顺序
///
diff --git a/src/Shentun.Peis.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs b/src/Shentun.Peis.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs
new file mode 100644
index 0000000..061751a
--- /dev/null
+++ b/src/Shentun.Peis.EntityFrameworkCore/DbMapping/Devices/DeviceDbMapping.cs
@@ -0,0 +1,28 @@
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Microsoft.EntityFrameworkCore;
+using Shentun.Peis.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Shentun.Peis.Devices;
+using Shentun.Peis.EntityFrameworkCore;
+
+namespace Shentun.Peis.DbMapping
+{
+ internal class DeviceDbMapping : IEntityTypeConfiguration
+ {
+ public void Configure(EntityTypeBuilder entity)
+ {
+ entity.HasComment("设备表");
+ entity.Property(t => t.DisplayName).HasComment("设备名称");
+ entity.Property(t => t.DeviceTypeId).HasComment("仪器类别ID");
+ entity.Property(t => t.DeviceProtocolFlag).HasComment("设备协议");
+ entity.Property(t => t.AeTitle).HasComment("DICOM设备AETitle");
+
+
+ entity.ConfigureByConvention();
+ }
+ }
+}
diff --git a/src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterCheckPictures/RegisterCheckPictureDbMapping.cs b/src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterCheckPictures/RegisterCheckPictureDbMapping.cs
index ec36100..b2b600c 100644
--- a/src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterCheckPictures/RegisterCheckPictureDbMapping.cs
+++ b/src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterCheckPictures/RegisterCheckPictureDbMapping.cs
@@ -36,6 +36,8 @@ namespace Shentun.Peis.DbMapping
entity.Property(e => e.LocalPathName).HasComment("本地资源路径");
+ entity.Property(e => e.DeviceId).HasComment("设备ID");
+
entity.HasOne(d => d.RegisterCheck)
.WithMany(p => p.RegisterCheckPictures)
.HasForeignKey(d => d.RegisterCheckId)
diff --git a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
index 8edd674..03cd9f7 100644
--- a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
+++ b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
@@ -11,6 +11,7 @@ using Shentun.Peis.DbMapping.ChargeRequestAsbitems;
using Shentun.Peis.DbMapping.ChargeRequests;
using Shentun.Peis.DbMapping.PatientRegisterExters;
using Shentun.Peis.DbMapping.ThirdInterfaces;
+using Shentun.Peis.Devices;
using Shentun.Peis.Models;
using Shentun.Peis.OcCheckTypeDetails;
using Shentun.Peis.ProtectiveMeasuress;
@@ -367,6 +368,8 @@ public class PeisDbContext :
public DbSet RegisterCheckPacsPictures { get; set; } = null!;
+ public DbSet Devices { get; set; } = null!;
+
public PeisDbContext(DbContextOptions options)
: base(options)
{
@@ -612,7 +615,8 @@ public class PeisDbContext :
.ApplyConfiguration(new CommonTableDbMapping())
.ApplyConfiguration(new CommonTableTypeDbMapping())
.ApplyConfiguration(new RegisterCheckPacsDbMapping())
- .ApplyConfiguration(new RegisterCheckPacsPictureDbMapping());
+ .ApplyConfiguration(new RegisterCheckPacsPictureDbMapping())
+ .ApplyConfiguration(new DeviceDbMapping());
#endregion
diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240920090638_insert_device.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240920090638_insert_device.Designer.cs
new file mode 100644
index 0000000..ab91551
--- /dev/null
+++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20240920090638_insert_device.Designer.cs
@@ -0,0 +1,15711 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using Shentun.Peis.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+
+#nullable disable
+
+namespace Shentun.Peis.Migrations
+{
+ [DbContext(typeof(PeisDbContext))]
+ [Migration("20240920090638_insert_device")]
+ partial class insert_device
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
+ .HasAnnotation("ProductVersion", "6.0.5")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("Shentun.Peis.Books.HelloA", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("ADesc")
+ .HasColumnType("text")
+ .HasColumnName("a_desc");
+
+ b.Property("AName")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("text")
+ .HasDefaultValue("默认值")
+ .HasColumnName("a_name");
+
+ b.Property("AddTime")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("add_time")
+ .HasDefaultValueSql("now()");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("HelloTypeId")
+ .HasColumnType("text")
+ .HasColumnName("hello_type_id");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("S2")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("character(1)")
+ .HasDefaultValueSql("'A'::bpchar");
+
+ b.HasKey("Id");
+
+ b.HasIndex(new[] { "AName" }, "ix_helloa")
+ .IsUnique();
+
+ b.ToTable("hello_a");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.HelloType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("TypeName")
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)")
+ .HasColumnName("type_name")
+ .HasComment("类型名称");
+
+ b.Property("s1")
+ .HasColumnType("uuid")
+ .HasColumnName("s1");
+
+ b.Property("s2")
+ .HasColumnType("uuid")
+ .HasColumnName("s2");
+
+ b.Property("s3")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("s3");
+
+ b.HasKey("Id");
+
+ b.ToTable("hello_type");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.Ma", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasColumnName("id");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("Name")
+ .HasColumnType("text")
+ .HasColumnName("name");
+
+ b.HasKey("Id");
+
+ b.ToTable("ma");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.Mb", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasColumnName("id");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("MaId")
+ .HasColumnType("text")
+ .HasColumnName("ma_id");
+
+ b.Property("Name")
+ .HasColumnType("text")
+ .HasColumnName("name");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MaId");
+
+ b.ToTable("mb");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.Mc", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasColumnName("id");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("MbId")
+ .HasColumnType("text")
+ .HasColumnName("mb_id");
+
+ b.Property("Name")
+ .HasColumnType("text")
+ .HasColumnName("name");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MbId");
+
+ b.ToTable("mc");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.Student", b =>
+ {
+ b.Property("Sid")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("sid");
+
+ b.Property("Cid")
+ .HasColumnType("text");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uuid")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("DeletionTime");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("boolean")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .HasColumnType("text");
+
+ b.Property("Uid")
+ .HasColumnType("uuid");
+
+ b.HasKey("Sid");
+
+ b.ToTable("student");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.TestA", b =>
+ {
+ b.Property("AId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .IsFixedLength()
+ .HasComment("编号");
+
+ b.Property("AName")
+ .HasColumnType("text");
+
+ b.HasKey("AId");
+
+ b.ToTable("testa");
+
+ b.HasComment("组合项目");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.TestB", b =>
+ {
+ b.Property("BId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("AId")
+ .HasColumnType("uuid")
+ .IsFixedLength()
+ .HasComment("编号");
+
+ b.Property("AName")
+ .HasColumnType("text");
+
+ b.Property("TestAsAId")
+ .HasColumnType("uuid");
+
+ b.HasKey("BId");
+
+ b.HasIndex("TestAsAId");
+
+ b.ToTable("testb");
+
+ b.HasComment("组合项目");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.TestCT", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("TName")
+ .HasColumnType("text")
+ .HasColumnName("t_name");
+
+ b.HasKey("Id");
+
+ b.ToTable("test_ct");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Devices.Device", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property("AeTitle")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("ae_title")
+ .HasComment("DICOM设备AETitle");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("DeviceProtocolFlag")
+ .HasColumnType("character(1)")
+ .HasColumnName("device_protocol_flag")
+ .HasComment("设备协议");
+
+ b.Property("DeviceTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("device_type_id")
+ .HasComment("仪器类别ID");
+
+ b.Property("DisplayName")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("Display_Name")
+ .HasComment("设备名称");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("integer")
+ .HasColumnName("display_order");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("SimpleCode")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("simple_code");
+
+ b.HasKey("Id");
+
+ b.ToTable("Devices");
+
+ b.HasComment("设备表");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.AbpUserDepartment", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("uuid")
+ .HasColumnName("user_id");
+
+ b.Property("OrganizationUnitId")
+ .HasColumnType("uuid")
+ .HasColumnName("organization_unit_id");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.HasKey("UserId", "OrganizationUnitId")
+ .HasName("pk_user_organizationunitid");
+
+ b.ToTable("abp_user_department");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.Asbitem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .IsFixedLength()
+ .HasComment("编号");
+
+ b.Property("BarcodeMode")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("barcode_mode")
+ .HasDefaultValueSql("'0'")
+ .HasComment("条码模式");
+
+ b.Property("ClinicalMeaning")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("clinical_meaning")
+ .HasComment("临床意义");
+
+ b.Property("CollectItemTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("collect_item_type_id")
+ .IsFixedLength()
+ .HasComment("汇总项目类别");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("CriticalValueFunction")
+ .HasColumnType("text")
+ .HasColumnName("critical_value_function")
+ .HasComment("危急值函数");
+
+ b.Property("DefaultResult")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("default_result")
+ .HasComment("默认结果");
+
+ b.Property("DeviceTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("device_type_id")
+ .HasComment("仪器类别");
+
+ b.Property("DiagnosisFunction")
+ .HasMaxLength(4000)
+ .HasColumnType("character varying(4000)")
+ .HasColumnName("diagnosis_function")
+ .HasComment("诊断函数");
+
+ b.Property("DiseaseScreeningTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("disease_screening_type_id");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(30)
+ .HasColumnType("character varying(30)")
+ .HasColumnName("display_name")
+ .HasComment("名称");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("integer")
+ .HasColumnName("display_order");
+
+ b.Property("FollowUpFunction")
+ .HasColumnType("text")
+ .HasColumnName("follow_up_function")
+ .HasComment("随访函数");
+
+ b.Property("ForPregnantFlag")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("for_pregnant_flag")
+ .HasDefaultValueSql("'A'")
+ .HasComment("备怀孕期间禁止检查");
+
+ b.Property("ForSexId")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("for_sex_id")
+ .HasDefaultValueSql("'A'")
+ .HasComment("适用性别,M-男,F-女,A-全部");
+
+ b.Property("IsActive")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_active")
+ .HasDefaultValueSql("'Y'")
+ .HasComment("是启用");
+
+ b.Property("IsBeforeEat")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_before_eat")
+ .HasDefaultValueSql("'N'")
+ .HasComment("餐前项目");
+
+ b.Property("IsCheck")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_check")
+ .HasDefaultValueSql("'Y'")
+ .HasComment("是检查项目");
+
+ b.Property("IsContinueProcess")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_continue_process")
+ .HasDefaultValueSql("'N'")
+ .HasComment("诊断函数处理完毕后继续处理");
+
+ b.Property("IsCriticalValueFunction")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_critical_value_function")
+ .HasDefaultValueSql("'N'")
+ .HasComment("是否启用危急值函数");
+
+ b.Property("IsDiagnosisFunction")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_diagnosis_function")
+ .HasDefaultValueSql("'N'")
+ .HasComment("启用诊断函数");
+
+ b.Property("IsFollowUpFunction")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_follow_up_function")
+ .HasDefaultValueSql("'N'")
+ .HasComment("是否启用随访函数");
+
+ b.Property("IsItemResultMerger")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_item_result_merger")
+ .HasDefaultValueSql("'N'")
+ .HasComment("项目结果合并");
+
+ b.Property("IsPictureRotate")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_picture_rotate")
+ .HasDefaultValueSql("'N'")
+ .HasComment("体检报告图片旋转90°");
+
+ b.Property("IsPrivacy")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("character(1)")
+ .HasColumnName("is_privacy")
+ .HasDefaultValueSql("'N'")
+ .HasComment("是否隐私项目");
+
+ b.Property("IsWebAppoint")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_web_appoint")
+ .HasDefaultValueSql("'Y'")
+ .HasComment("是否支持网上预约");
+
+ b.Property("ItemTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("item_type_id")
+ .IsFixedLength()
+ .HasComment("项目类别");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("MaritalStatusId")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("marital_status_id")
+ .HasDefaultValueSql("'A'")
+ .HasComment("适用婚姻状况,0-未婚,1-已婚,A-全部");
+
+ b.Property("Price")
+ .ValueGeneratedOnAdd()
+ .HasPrecision(8, 2)
+ .HasColumnType("numeric(8,2)")
+ .HasColumnName("price")
+ .HasDefaultValueSql("0")
+ .HasComment("价格");
+
+ b.Property("QueueTime")
+ .ValueGeneratedOnAdd()
+ .HasPrecision(3, 1)
+ .HasColumnType("numeric(3,1)")
+ .HasColumnName("queue_time")
+ .HasDefaultValueSql("0")
+ .HasComment("候诊时间");
+
+ b.Property("ShortName")
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasColumnName("short_name")
+ .HasComment("简称");
+
+ b.Property("SimpleCode")
+ .HasMaxLength(30)
+ .HasColumnType("character varying(30)")
+ .HasColumnName("simple_code");
+
+ b.Property("Warn")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("warn");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CollectItemTypeId");
+
+ b.HasIndex("ItemTypeId");
+
+ b.HasIndex(new[] { "DisplayName" }, "ix_asbitem")
+ .IsUnique();
+
+ b.ToTable("asbitem");
+
+ b.HasComment("组合项目");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.AsbitemDetail", b =>
+ {
+ b.Property("AsbitemId")
+ .HasColumnType("uuid")
+ .HasColumnName("asbitem_id")
+ .IsFixedLength();
+
+ b.Property("ItemId")
+ .HasColumnType("uuid")
+ .HasColumnName("item_id")
+ .IsFixedLength()
+ .HasComment("项目编码");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.HasKey("AsbitemId", "ItemId")
+ .HasName("pk_department_asbitem_detail");
+
+ b.HasIndex("ItemId");
+
+ b.ToTable("asbitem_detail");
+
+ b.HasComment("组合项目包含项目");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.AsbitemGuide", b =>
+ {
+ b.Property("MedicalCenterId")
+ .HasColumnType("uuid")
+ .HasColumnName("medical_center_id")
+ .IsFixedLength()
+ .HasComment("单位科室ID");
+
+ b.Property("AsbitemId")
+ .HasColumnType("uuid")
+ .HasColumnName("asbitem_id")
+ .IsFixedLength()
+ .HasComment("组合项目ID");
+
+ b.Property("ForSexId")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("for_sex_id")
+ .HasDefaultValueSql("'A'")
+ .HasComment("适用性别ID");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("Guide")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("guide")
+ .HasComment("指引单内容");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.HasKey("MedicalCenterId", "AsbitemId", "ForSexId")
+ .HasName("pk_department_asbitem_guide");
+
+ b.ToTable("asbitem_guide");
+
+ b.HasComment("体检中心组和项目指引内容");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.AsbitemPriceItem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .IsFixedLength();
+
+ b.Property("Amount")
+ .IsRequired()
+ .ValueGeneratedOnAdd()
+ .HasColumnType("smallint")
+ .HasColumnName("amount")
+ .HasDefaultValueSql("0")
+ .HasComment("数量");
+
+ b.Property("AsbitemId")
+ .HasColumnType("uuid")
+ .HasColumnName("asbitem_id")
+ .IsFixedLength()
+ .HasComment("组合项目编号");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("PriceItemId")
+ .HasColumnType("uuid")
+ .HasColumnName("price_item_id")
+ .IsFixedLength()
+ .HasComment("价表项目编码");
+
+ b.HasKey("Id");
+
+ b.ToTable("asbitem_price_item");
+
+ b.HasComment("组和项目包含价表项目");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.BigtextResultConclusion", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .IsFixedLength();
+
+ b.Property("BigtextResultTemplateId")
+ .HasColumnType("uuid")
+ .HasColumnName("bigtext_result_template_id")
+ .IsFixedLength();
+
+ b.Property("Conclusion")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("conclusion")
+ .HasComment("结论");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("DisplayOrder")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("display_order")
+ .HasDefaultValueSql("999999");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BigtextResultTemplateId");
+
+ b.ToTable("bigtext_result_conclusion");
+
+ b.HasComment("大文本结果结论");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.BigtextResultDescription", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .IsFixedLength();
+
+ b.Property("BigtextResultTemplateId")
+ .HasColumnType("uuid")
+ .HasColumnName("bigtext_result_template_id")
+ .IsFixedLength();
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("Description")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("description")
+ .HasComment("描述");
+
+ b.Property("DisplayOrder")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("display_order")
+ .HasDefaultValueSql("999999");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BigtextResultTemplateId");
+
+ b.ToTable("bigtext_result_description");
+
+ b.HasComment("大文本结果描述");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.BigtextResultTemplate", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .IsFixedLength();
+
+ b.Property("BigtextResultTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("bigtext_result_type_id")
+ .IsFixedLength()
+ .HasComment("结果类别编号");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("display_name")
+ .HasComment("名称");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("integer")
+ .HasColumnName("display_order");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("SimpleCode")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("simple_code");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BigtextResultTypeId");
+
+ b.ToTable("bigtext_result_template");
+
+ b.HasComment("大文本结果模板");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.BigtextResultType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .IsFixedLength();
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasColumnName("display_name")
+ .HasComment("名称");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("integer")
+ .HasColumnName("display_order");
+
+ b.Property("ItemTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("item_type_id")
+ .IsFixedLength()
+ .HasComment("项目类别");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("ParentId")
+ .HasColumnType("uuid")
+ .HasColumnName("parent_id")
+ .IsFixedLength()
+ .HasComment("父编号");
+
+ b.Property("PathCode")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("path_code")
+ .HasComment("路径编码");
+
+ b.Property("SimpleCode")
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasColumnName("simple_code");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ItemTypeId");
+
+ b.ToTable("bigtext_result_type");
+
+ b.HasComment("大文本结果类别");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.BirthPlace", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .IsFixedLength();
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CountryCode")
+ .IsRequired()
+ .HasMaxLength(6)
+ .HasColumnType("character varying(6)")
+ .HasColumnName("country_code")
+ .HasComment("国家标准码");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("DisplayName")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("display_name");
+
+ b.Property("DisplayOrder")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("display_order")
+ .HasDefaultValueSql("999999");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("SimpleCode")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("simple_code");
+
+ b.HasKey("Id");
+
+ b.HasIndex(new[] { "DisplayName" }, "ix_birth_place")
+ .IsUnique();
+
+ b.ToTable("birth_place");
+
+ b.HasComment("出生地");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.CardBill", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .HasComment("编号");
+
+ b.Property("BillFlag")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("bill_flag")
+ .HasDefaultValueSql("'0'::bpchar")
+ .HasComment("记账标志");
+
+ b.Property("BillMoney")
+ .HasPrecision(10, 2)
+ .HasColumnType("numeric(10,2)")
+ .HasColumnName("bill_money")
+ .HasComment("记账金额");
+
+ b.Property("CardRegisterId")
+ .HasColumnType("uuid")
+ .HasColumnName("card_register_id")
+ .HasComment("卡登记编号");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("PayModeId")
+ .IsRequired()
+ .HasMaxLength(4)
+ .HasColumnType("character varying(4)")
+ .HasColumnName("pay_mode_id")
+ .HasComment("支付方式");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CardRegisterId");
+
+ b.HasIndex("PayModeId");
+
+ b.ToTable("card_bill");
+
+ b.HasComment("卡记账记录");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.CardRegister", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .HasComment("编号");
+
+ b.Property("CardBalance")
+ .HasPrecision(10, 2)
+ .HasColumnType("numeric(10,2)")
+ .HasColumnName("card_balance");
+
+ b.Property("CardNo")
+ .IsRequired()
+ .HasMaxLength(30)
+ .HasColumnType("character varying(30)")
+ .HasColumnName("card_no")
+ .HasComment("卡号");
+
+ b.Property("CardPassword")
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)")
+ .HasColumnName("card_password");
+
+ b.Property("CardTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("card_type_id")
+ .IsFixedLength()
+ .HasComment("卡类型");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("CustomerName")
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasColumnName("customer_name")
+ .HasComment("领用者");
+
+ b.Property("Discount")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("discount")
+ .HasDefaultValueSql("100")
+ .HasComment("折扣");
+
+ b.Property("ExpiryDate")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("expiry_date")
+ .HasComment("有效期");
+
+ b.Property("IdNo")
+ .IsRequired()
+ .HasMaxLength(18)
+ .HasColumnType("character varying(18)")
+ .HasColumnName("id_no")
+ .HasComment("身份证号");
+
+ b.Property("IsActive")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_active")
+ .HasDefaultValueSql("0")
+ .HasComment("使用标志");
+
+ b.Property("LastModificationTime")
+ .IsRequired()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_modification_time");
+
+ b.Property("LastModifierId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("last_modifier_id");
+
+ b.Property("MedicalCenterId")
+ .HasColumnType("uuid")
+ .HasColumnName("medical_center_id");
+
+ b.Property("MobileTelephone")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasColumnName("mobile_telephone")
+ .HasComment("手机");
+
+ b.Property("Remark")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("remark")
+ .HasComment("备注");
+
+ b.Property("Telephone")
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasColumnName("telephone")
+ .HasComment("电话");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CardTypeId");
+
+ b.HasIndex(new[] { "CardNo", "IsActive" }, "ix_card_register")
+ .IsUnique();
+
+ b.ToTable("card_register");
+
+ b.HasComment("会员卡登记");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.CardType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasColumnName("id")
+ .IsFixedLength()
+ .HasComment("编号");
+
+ b.Property("CardModeId")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("card_mode_id")
+ .HasDefaultValueSql("0")
+ .HasComment("卡模式");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(40)
+ .HasColumnType("character varying(40)")
+ .HasColumnName("concurrency_stamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("creation_time");
+
+ b.Property("CreatorId")
+ .IsRequired()
+ .HasColumnType("uuid")
+ .HasColumnName("creator_id");
+
+ b.Property("Discount")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("discount")
+ .HasDefaultValueSql("100")
+ .HasComment("折扣");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasColumnName("display_name")
+ .HasComment("名称");
+
+ b.Property("DisplayOrder")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("display_order")
+ .HasDefaultValueSql("999999")
+ .HasComment("显示顺序");
+
+ b.Property("ExpiryDay")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("expiry_day")
+ .HasDefaultValueSql("3650")
+ .HasComment("有效期");
+
+ b.Property