diff --git a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
index 80b16e04..47787097 100644
--- a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
+++ b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
@@ -741,6 +741,18 @@ namespace Shentun.Peis.PatientRegisters
}
+ ///
+ /// 批量修改指引单打印次数 原有基础上加1
+ ///
+ ///
+ ///
+ [HttpPost("api/app/patientregister/updatepatientregisterguideprinttimesmany")]
+ public async Task UpdatePatientRegisterGuidePrintTimesManyAsync(List Ids)
+ {
+ var entlist = await _repository.GetListAsync(m => Ids.Contains(m.Id));
+ entlist.ForEach(f => f.GuidePrintTimes = (f.GuidePrintTimes == null ? (short?)1 : (short?)(f.GuidePrintTimes + 1)));
+ }
+
///
/// 导入体检名单操作
///
@@ -756,7 +768,7 @@ namespace Shentun.Peis.PatientRegisters
{
//自动创建部门
-
+
#region 转换性别、出生地、婚姻状况、民族数据、单位分组、人员类别、体检类别、性激素期限
//转换性别ID
@@ -902,7 +914,7 @@ namespace Shentun.Peis.PatientRegisters
#region 判断重名逻辑 先不判断 直接生成新的
-
+
#endregion
#region 生成档案信息
@@ -925,7 +937,7 @@ namespace Shentun.Peis.PatientRegisters
};
-
+
if (input.IsAutoCreatePatientNo == 'Y')
{
diff --git a/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs b/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
index 6eee89a8..bb1291ee 100644
--- a/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
+++ b/src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
@@ -18,7 +18,7 @@ namespace Shentun.Peis.PrintReports
/// 打印报告服务
///
[ApiExplorerSettings(GroupName = "Work")]
- //[Authorize]
+ [Authorize]
public class PrintReportAppService : ApplicationService
{
private readonly IPatientRegisterGuideReportRepository _patientRegisterGuideReportRepository;
diff --git a/src/Shentun.Peis.Application/SysParmValues/SysParmValueAppService.cs b/src/Shentun.Peis.Application/SysParmValues/SysParmValueAppService.cs
index 241cadbc..74ed4c88 100644
--- a/src/Shentun.Peis.Application/SysParmValues/SysParmValueAppService.cs
+++ b/src/Shentun.Peis.Application/SysParmValues/SysParmValueAppService.cs
@@ -171,8 +171,6 @@ namespace Shentun.Peis.SysParmValues
else
{
//修改
-
-
entity.ParmValue = item.ParmValue;
entity.Remark = item.Remark;
diff --git a/src/Shentun.Peis.Domain/Models/Report.cs b/src/Shentun.Peis.Domain/Models/Report.cs
index 0e830a88..8ddb9673 100644
--- a/src/Shentun.Peis.Domain/Models/Report.cs
+++ b/src/Shentun.Peis.Domain/Models/Report.cs
@@ -1,5 +1,6 @@
using Microsoft.EntityFrameworkCore;
using NPOI.SS.Formula.Functions;
+using Shentun.Peis.Books;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -13,9 +14,10 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Shentun.Peis.Models
{
[Table("report")]
- public class Report:AuditedEntity, IDisplayName
+ public class Report : AuditedEntity, IDisplayName
{
- public Report() {
+ public Report()
+ {
}
@@ -36,6 +38,13 @@ namespace Shentun.Peis.Models
[DefaultValue('N')]
public char IsActive { get; set; }
+
+ [InverseProperty(nameof(ReportFormat.Report))]
+ public virtual ICollection ReportFormats { get; set; }
+
+ [InverseProperty(nameof(ReportPrinter.Report))]
+ public virtual ICollection ReportPrinters { get; set; }
+
public void SetId(string id)
{
Id = id;
diff --git a/src/Shentun.Peis.Domain/Models/ReportFormat.cs b/src/Shentun.Peis.Domain/Models/ReportFormat.cs
index 14930355..20db6dfb 100644
--- a/src/Shentun.Peis.Domain/Models/ReportFormat.cs
+++ b/src/Shentun.Peis.Domain/Models/ReportFormat.cs
@@ -12,10 +12,11 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Shentun.Peis.Models
{
[Table("report_format")]
- public class ReportFormat:AuditedEntity, IDisplayName
+ public class ReportFormat : AuditedEntity, IDisplayName
{
- public ReportFormat() {
+ public ReportFormat()
+ {
}
@@ -36,13 +37,20 @@ namespace Shentun.Peis.Models
[DefaultValue('N')]
public char IsDefault { get; set; }
- [ForeignKey("ReportId")]
- public Report Report { get; set; }
+ [ForeignKey(nameof(ReportId))]
+ [InverseProperty("ReportFormats")]
+ public virtual Report Report { get; set; }
+
+
[Column("report_id")]
[Comment("报表ID")]
public string ReportId { get; set; }
+
+
+ [InverseProperty(nameof(ReportFormatTemplate.ReportFormat))]
+ public virtual ICollection ReportFormatTemplates { get; set; }
public void SetId(string id)
{
diff --git a/src/Shentun.Peis.Domain/Models/ReportFormatTemplate.cs b/src/Shentun.Peis.Domain/Models/ReportFormatTemplate.cs
index 60d14a91..2c426f8a 100644
--- a/src/Shentun.Peis.Domain/Models/ReportFormatTemplate.cs
+++ b/src/Shentun.Peis.Domain/Models/ReportFormatTemplate.cs
@@ -20,8 +20,9 @@ namespace Shentun.Peis.Models
[StringLength(16)]
public override string Id { get => base.Id; protected set => base.Id = value; }
- [ForeignKey("ReportFormatId")]
- public ReportFormat ReportFormat { get; set; }
+ [ForeignKey(nameof(ReportFormatId))]
+ [InverseProperty("ReportFormatTemplates")]
+ public virtual ReportFormat ReportFormat { get; set; }
[Column("report_format_id")]
[Comment("报表格式ID")]
diff --git a/src/Shentun.Peis.Domain/Models/ReportPrinter.cs b/src/Shentun.Peis.Domain/Models/ReportPrinter.cs
index 2dc8604b..f7352d3b 100644
--- a/src/Shentun.Peis.Domain/Models/ReportPrinter.cs
+++ b/src/Shentun.Peis.Domain/Models/ReportPrinter.cs
@@ -28,8 +28,9 @@ namespace Shentun.Peis.Models
[StringLength(64)]
public string PrinterName { get; set; } = null!;
- [ForeignKey("ReportId")]
- public Report Report { get; set; }
+ [ForeignKey(nameof(ReportId))]
+ [InverseProperty("ReportPrinters")]
+ public virtual Report Report { get; set; }
[Column("report_id")]
[Comment("报表ID")]
diff --git a/src/Shentun.Peis.Domain/PrintReports/PatientRegisterGuideReportDto.cs b/src/Shentun.Peis.Domain/PrintReports/PatientRegisterGuideReportDto.cs
index 50062c98..86353573 100644
--- a/src/Shentun.Peis.Domain/PrintReports/PatientRegisterGuideReportDto.cs
+++ b/src/Shentun.Peis.Domain/PrintReports/PatientRegisterGuideReportDto.cs
@@ -125,6 +125,8 @@ namespace Shentun.Peis.PrintReports
///
public string GuideName { get; set; }
+ public int DisplayOrder { get; set; }
+
public List Detail_Name { get; set; }
}
diff --git a/src/Shentun.Peis.Domain/SysParmValues/SysParmValueManager.cs b/src/Shentun.Peis.Domain/SysParmValues/SysParmValueManager.cs
index eb68d6b3..d3c2abae 100644
--- a/src/Shentun.Peis.Domain/SysParmValues/SysParmValueManager.cs
+++ b/src/Shentun.Peis.Domain/SysParmValues/SysParmValueManager.cs
@@ -15,11 +15,11 @@ namespace Shentun.Peis.SysParmValues
{
public class SysParmValueManager : DomainService
{
- private readonly IRepository repository;
+ private readonly IRepository _sysParmValueRepository;
- public SysParmValueManager(IRepository repository)
+ public SysParmValueManager(IRepository sysParmValueRepository)
{
- this.repository = repository;
+ this._sysParmValueRepository = sysParmValueRepository;
}
///
@@ -55,8 +55,33 @@ namespace Shentun.Peis.SysParmValues
}
+ ///
+ /// 根据体检中心获取系统参数值(优先找体检中心的参数,未找到获取全局参数)
+ ///
+ ///
+ ///
+ ///
+ public async Task GetSysParmValueInOrOrganizationUnitId(Guid OrganizationUnitId, string SysParmId)
+ {
+ string msg = "";
+ var sysParmValueList = await _sysParmValueRepository.GetListAsync(m => m.SysParmId == SysParmId);
+ if (sysParmValueList.Any())
+ {
+ if (sysParmValueList.Where(m => m.OrganizationUnitId == OrganizationUnitId).Count() > 0)
+ {
+ msg = sysParmValueList.Where(m => m.OrganizationUnitId == OrganizationUnitId).FirstOrDefault().ParmValue;
+ }
+ else
+ {
+ msg = sysParmValueList.Where(m => m.OrganizationUnitId == Guid.Empty).FirstOrDefault().ParmValue;
+ }
+ }
+ return msg;
+ }
+
+
+
-
}
}
diff --git a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
index b0d9a91a..ed3af967 100644
--- a/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
+++ b/src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
@@ -2649,7 +2649,7 @@ public class PeisDbContext :
entity.HasComment("自定义报表主表");
- entity.Property(e => e.IsActive).HasDefaultValueSql("N");
+ entity.Property(e => e.IsActive).HasDefaultValue('N');
entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");
@@ -2660,12 +2660,18 @@ public class PeisDbContext :
{
entity.HasComment("自定义报表格式表");
- entity.Property(e => e.IsDefault).HasDefaultValueSql("N");
+ entity.Property(e => e.IsDefault).HasDefaultValue('N');
entity.Property(e => e.ReportId).IsFixedLength();
entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");
+ //指定关系
+ entity.HasOne(d => d.Report)
+ .WithMany(p => p.ReportFormats)
+ .HasForeignKey(d => d.ReportId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_reportformat_report_1");
entity.ConfigureByConvention();
});
@@ -2674,12 +2680,18 @@ public class PeisDbContext :
{
entity.HasComment("自定义报表格式模板表");
- entity.Property(e => e.IsDefault).HasDefaultValueSql("N");
- entity.Property(e => e.IsSystem).HasDefaultValueSql("N");
+ entity.Property(e => e.IsDefault).HasDefaultValue('N');
+ entity.Property(e => e.IsSystem).HasDefaultValue('N');
entity.Property(e => e.TemplateFileType).HasDefaultValueSql("1");
entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");
+ //指定关系
+ entity.HasOne(d => d.ReportFormat)
+ .WithMany(p => p.ReportFormatTemplates)
+ .HasForeignKey(d => d.ReportFormatId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_reportformattemplate_reportprinter_1");
entity.ConfigureByConvention();
});
@@ -2690,6 +2702,12 @@ public class PeisDbContext :
entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");
+ //指定关系
+ entity.HasOne(d => d.Report)
+ .WithMany(p => p.ReportPrinters)
+ .HasForeignKey(d => d.ReportId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_reportprinter_report_1");
entity.ConfigureByConvention();
});
diff --git a/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230817102124_i0817002.Designer.cs b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230817102124_i0817002.Designer.cs
new file mode 100644
index 00000000..87c5b4cb
--- /dev/null
+++ b/src/Shentun.Peis.EntityFrameworkCore/Migrations/20230817102124_i0817002.Designer.cs
@@ -0,0 +1,11572 @@
+//
+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("20230817102124_i0817002")]
+ partial class i0817002
+ {
+ 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("AsbitemRoom", b =>
+ {
+ b.Property("AsbitemId")
+ .HasColumnType("uuid");
+
+ b.Property("RoomId")
+ .HasColumnType("uuid");
+
+ b.HasKey("AsbitemId", "RoomId");
+
+ b.ToTable("AsbitemRoom");
+ });
+
+ modelBuilder.Entity("ChildDiagnosis", b =>
+ {
+ b.Property("ParentDiagnosisId")
+ .HasMaxLength(8)
+ .HasColumnType("uuid")
+ .HasColumnName("parent_diagnosis_id")
+ .IsFixedLength();
+
+ b.Property("DiagnosisId")
+ .HasMaxLength(8)
+ .HasColumnType("uuid")
+ .HasColumnName("diagnosis_id")
+ .IsFixedLength();
+
+ b.HasKey("ParentDiagnosisId", "DiagnosisId")
+ .HasName("pk_child_diagnosis");
+
+ b.HasIndex("DiagnosisId");
+
+ b.ToTable("child_diagnosis", (string)null);
+
+ b.HasComment("子诊断");
+ });
+
+ modelBuilder.Entity("DiagnosisDiagnosis", b =>
+ {
+ b.Property("DiagnosisId")
+ .HasColumnType("uuid");
+
+ b.Property("ParentDiagnosisId")
+ .HasColumnType("uuid");
+
+ b.HasKey("DiagnosisId", "ParentDiagnosisId");
+
+ b.ToTable("DiagnosisDiagnosis");
+ });
+
+ modelBuilder.Entity("RoomAsbitem", b =>
+ {
+ b.Property("RoomId")
+ .HasMaxLength(5)
+ .HasColumnType("uuid")
+ .HasColumnName("room_id")
+ .IsFixedLength();
+
+ b.Property("AsbitemId")
+ .HasMaxLength(6)
+ .HasColumnType("uuid")
+ .HasColumnName("asbitem_id")
+ .IsFixedLength();
+
+ b.HasKey("RoomId", "AsbitemId")
+ .HasName("pk_room_asbitem");
+
+ b.HasIndex("AsbitemId");
+
+ b.ToTable("room_asbitem", (string)null);
+
+ b.HasComment("房间包含组合项目设置");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.HelloA", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid");
+
+ 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("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("HelloTypeId")
+ .HasColumnType("text")
+ .HasColumnName("hello_type_id");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.HasKey("Id");
+
+ b.ToTable("hello_a");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Books.HelloType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ 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("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ 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("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ 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("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ 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.Models.Asbitem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .IsFixedLength()
+ .HasComment("编号");
+
+ b.Property("ClinicalMeaning")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("clinical_meaning")
+ .HasComment("临床意义");
+
+ b.Property("CreationTime")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime")
+ .HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("DefaultResult")
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("default_result")
+ .HasComment("默认结果");
+
+ b.Property("DeviceTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("device_type_id")
+ .IsFixedLength()
+ .HasComment("仪器类别");
+
+ b.Property("DiagnosisFunction")
+ .HasMaxLength(1000)
+ .HasColumnType("character varying(1000)")
+ .HasColumnName("diagnosis_function")
+ .HasComment("诊断函数");
+
+ b.Property("DisplayName")
+ .HasMaxLength(30)
+ .HasColumnType("character varying(30)")
+ .HasColumnName("display_name")
+ .HasComment("名称");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("integer")
+ .HasColumnName("display_order");
+
+ b.Property("ForSexId")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("for_sex_id")
+ .HasDefaultValueSql("'A'::bpchar")
+ .HasComment("适用性别,M-男,F-女,A-全部");
+
+ b.Property("InvoiceItemTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("invoice_item_type_id")
+ .IsFixedLength()
+ .HasComment("发票类别");
+
+ b.Property("IsActive")
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_active")
+ .HasComment("是启用");
+
+ b.Property("IsBeforeEat")
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_before_eat")
+ .HasComment("餐前项目");
+
+ b.Property("IsCheck")
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_check")
+ .HasComment("是检查项目");
+
+ b.Property("IsContinueProcess")
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_continue_process")
+ .HasComment("诊断函数处理完毕后继续处理");
+
+ b.Property("IsDiagnosisFunction")
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_diagnosis_function")
+ .HasComment("启用诊断函数");
+
+ b.Property("IsItemResultMerger")
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_item_result_merger")
+ .HasComment("项目结果合并");
+
+ b.Property("IsPictureRotate")
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("is_picture_rotate")
+ .HasComment("体检报告图片旋转90°");
+
+ b.Property("ItemTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("item_type_id")
+ .IsFixedLength()
+ .HasComment("项目类别");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Price")
+ .HasPrecision(8, 2)
+ .HasColumnType("numeric(8,2)")
+ .HasColumnName("price")
+ .HasComment("价格");
+
+ b.Property("QueueTime")
+ .HasPrecision(3, 1)
+ .HasColumnType("numeric(3,1)")
+ .HasColumnName("queue_time")
+ .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.HasKey("Id");
+
+ b.HasIndex("InvoiceItemTypeId");
+
+ 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.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("OrganizationUnitId")
+ .HasColumnType("uuid")
+ .HasColumnName("organization_unit_id")
+ .IsFixedLength()
+ .HasComment("单位科室ID");
+
+ b.Property("AsbitemId")
+ .HasColumnType("uuid")
+ .HasColumnName("asbitem_id")
+ .IsFixedLength()
+ .HasComment("组合项目ID");
+
+ b.Property("ForSexId")
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("for_sex_id")
+ .HasComment("适用性别ID");
+
+ b.Property("Guide")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("guide")
+ .HasComment("指引单内容");
+
+ b.HasKey("OrganizationUnitId", "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")
+ .IsFixedLength();
+
+ b.Property("Amount")
+ .HasColumnType("smallint")
+ .HasColumnName("amount")
+ .HasComment("数量");
+
+ b.Property("AsbitemId")
+ .HasColumnType("uuid")
+ .HasColumnName("asbitem_id")
+ .IsFixedLength()
+ .HasComment("组合项目编号");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ 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")
+ .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("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("DisplayOrder")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("display_order")
+ .HasDefaultValueSql("1");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ 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")
+ .IsFixedLength();
+
+ b.Property("BigtextResultTemplateId")
+ .HasColumnType("uuid")
+ .HasColumnName("bigtext_result_template_id")
+ .IsFixedLength();
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("Description")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("description")
+ .HasComment("描述");
+
+ b.Property("DisplayOrder")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("display_order")
+ .HasDefaultValueSql("1");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ 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")
+ .IsFixedLength();
+
+ b.Property("BigtextResultTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("bigtext_result_type_id")
+ .IsFixedLength()
+ .HasComment("结果类别编号");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("DisplayName")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("display_name")
+ .HasComment("名称");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("integer")
+ .HasColumnName("display_order");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ 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")
+ .IsFixedLength();
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("DisplayName")
+ .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")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("ParentId")
+ .HasColumnType("uuid")
+ .HasColumnName("parent_id")
+ .IsFixedLength()
+ .HasComment("父编号");
+
+ b.Property("PathCode")
+ .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")
+ .IsFixedLength();
+
+ b.Property("CountryCode")
+ .HasMaxLength(6)
+ .HasColumnType("character varying(6)")
+ .HasColumnName("country_code")
+ .HasComment("国家标准码");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("DisplayName")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("display_name");
+
+ b.Property("DisplayOrder")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("display_order")
+ .HasDefaultValueSql("1");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ 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")
+ .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("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PayModeId")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(4)
+ .HasColumnType("character(4)")
+ .HasColumnName("pay_mode_id")
+ .HasDefaultValueSql("'1'::bpchar")
+ .IsFixedLength()
+ .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")
+ .HasComment("编号");
+
+ b.Property("CardFlag")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("card_flag")
+ .HasDefaultValueSql("0")
+ .HasComment("使用标志");
+
+ b.Property("CardNo")
+ .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("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ 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("date")
+ .HasColumnName("expiry_date")
+ .HasComment("有效期");
+
+ b.Property("IdNo")
+ .HasMaxLength(18)
+ .HasColumnType("character varying(18)")
+ .HasColumnName("id_no")
+ .HasComment("身份证号");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MobileTelephone")
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasColumnName("mobile_telephone")
+ .HasComment("手机");
+
+ b.Property("OrganizationUnitId")
+ .HasColumnType("uuid")
+ .HasColumnName("organization_unit_id")
+ .IsFixedLength();
+
+ 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("OrganizationUnitId");
+
+ b.HasIndex(new[] { "CardNo", "CardFlag" }, "ix_card_register")
+ .IsUnique();
+
+ b.ToTable("card_register");
+
+ b.HasComment("会员卡登记");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.CardType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .IsFixedLength()
+ .HasComment("编号");
+
+ b.Property("CardModeId")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("card_mode_id")
+ .HasDefaultValueSql("0")
+ .HasComment("卡模式");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("Discount")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("discount")
+ .HasDefaultValueSql("100")
+ .HasComment("折扣");
+
+ b.Property("DisplayName")
+ .HasMaxLength(20)
+ .HasColumnType("character varying(20)")
+ .HasColumnName("display_name")
+ .HasComment("名称");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("integer")
+ .HasColumnName("display_order")
+ .HasComment("显示顺序");
+
+ b.Property("ExpiryDay")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("expiry_day")
+ .HasDefaultValueSql("3650")
+ .HasComment("有效期");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Remark")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("remark")
+ .HasComment("备注");
+
+ b.HasKey("Id");
+
+ b.ToTable("card_type");
+
+ b.HasComment("会员卡类别");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.Charge", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasComment("收据号");
+
+ b.Property("ChargeFlag")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(1)
+ .HasColumnType("character(1)")
+ .HasColumnName("charge_flag")
+ .HasDefaultValueSql("0");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("InvoiceNo")
+ .HasMaxLength(30)
+ .HasColumnType("character varying(30)")
+ .HasColumnName("invoice_no");
+
+ b.Property("InvoiceOrgName")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("invoice_org_name");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PatientRegisterId")
+ .HasColumnType("uuid")
+ .HasColumnName("patient_register_id")
+ .HasComment("登记流水号");
+
+ b.Property("SettleAccountId")
+ .HasColumnType("uuid")
+ .HasColumnName("settle_account_id");
+
+ b.HasKey("Id");
+
+ b.HasIndex(new[] { "PatientRegisterId" }, "fki_fk_patient_register_charge");
+
+ b.HasIndex(new[] { "PatientRegisterId" }, "ix_charge");
+
+ b.ToTable("charge");
+
+ b.HasComment("收费主档");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.ChargeAsbitem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid");
+
+ b.Property("Amount")
+ .HasColumnType("smallint")
+ .HasColumnName("amount");
+
+ b.Property("AsbitemId")
+ .HasColumnType("uuid")
+ .HasColumnName("asbitem_id")
+ .IsFixedLength()
+ .HasComment("组合项目");
+
+ b.Property("ChargeId")
+ .HasColumnType("uuid")
+ .HasColumnName("charge_id")
+ .HasComment("收据号");
+
+ b.Property("ChargePrice")
+ .HasPrecision(10, 2)
+ .HasColumnType("numeric(10,2)")
+ .HasColumnName("charge_price")
+ .HasComment("价格");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("RegisterAsbitemId")
+ .HasColumnType("uuid")
+ .HasColumnName("register_asbitem_id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AsbitemId");
+
+ b.HasIndex("ChargeId");
+
+ b.ToTable("charge_asbitem");
+
+ b.HasComment("收费包含组合项目");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.ChargeBack", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .HasComment("退费编号");
+
+ b.Property("ChargeId")
+ .HasColumnType("uuid")
+ .HasColumnName("charge_id")
+ .HasComment("收据号");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("SettleAccountId")
+ .HasColumnType("uuid")
+ .HasColumnName("settle_account_id")
+ .HasComment("结账ID");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ChargeId");
+
+ b.ToTable("charge_back");
+
+ b.HasComment("退费主档");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.ChargeBackPay", b =>
+ {
+ b.Property("ChargeBackId")
+ .HasColumnType("uuid")
+ .HasColumnName("charge_back_id");
+
+ b.Property("PayModeId")
+ .HasMaxLength(4)
+ .HasColumnType("character(4)")
+ .HasColumnName("pay_mode_id")
+ .IsFixedLength()
+ .HasComment("支付方式ID");
+
+ b.Property("BackMoeny")
+ .HasPrecision(10, 2)
+ .HasColumnType("numeric(10,2)")
+ .HasColumnName("back_moeny")
+ .HasComment("退费金额");
+
+ b.HasKey("ChargeBackId", "PayModeId")
+ .HasName("pk_department_charge_back_pay");
+
+ b.HasIndex("PayModeId");
+
+ b.ToTable("charge_back_pay");
+
+ b.HasComment("退费支付方式");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.ChargePay", b =>
+ {
+ b.Property("ChargeId")
+ .HasColumnType("uuid")
+ .HasColumnName("charge_id")
+ .HasComment("收据号");
+
+ b.Property("PayModeId")
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(4)
+ .HasColumnType("character(4)")
+ .HasColumnName("pay_mode_id")
+ .HasDefaultValueSql("'1'::bpchar")
+ .IsFixedLength()
+ .HasComment("支付方式");
+
+ b.Property("CardBillId")
+ .HasColumnType("uuid")
+ .HasColumnName("card_bill_id");
+
+ b.Property("ChargeMoney")
+ .HasPrecision(10, 2)
+ .HasColumnType("numeric(10,2)")
+ .HasColumnName("charge_money")
+ .HasComment("金额");
+
+ b.HasKey("ChargeId", "PayModeId")
+ .HasName("pk_department_charge_pay");
+
+ b.HasIndex("PayModeId");
+
+ b.ToTable("charge_pay");
+
+ b.HasComment("收费支付方式");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.ChargePriceItem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid");
+
+ b.Property("Amount")
+ .HasColumnType("smallint")
+ .HasColumnName("amount");
+
+ b.Property("ChargeAsbitemId")
+ .HasColumnType("uuid")
+ .HasColumnName("charge_asbitem_id");
+
+ b.Property("ChargePrice")
+ .HasPrecision(10, 2)
+ .HasColumnType("numeric(10,2)")
+ .HasColumnName("charge_price");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PriceItemId")
+ .HasColumnType("uuid")
+ .HasColumnName("price_item_id");
+
+ b.HasKey("Id");
+
+ b.HasIndex(new[] { "ChargeAsbitemId" }, "fki_fk_charge_asbitem");
+
+ b.HasIndex(new[] { "ChargeAsbitemId", "PriceItemId" }, "ix_charge_price_item");
+
+ b.ToTable("charge_price_item");
+
+ b.HasComment("收费价表项目");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.CommonChar", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .IsFixedLength();
+
+ b.Property("CommonCharTypeId")
+ .HasColumnType("uuid")
+ .HasColumnName("common_char_type_id")
+ .IsFixedLength()
+ .HasComment("常用字符类别编号");
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property("DisplayName")
+ .HasMaxLength(1)
+ .HasColumnType("character varying(1)")
+ .HasColumnName("display_name")
+ .HasComment("名称");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("integer")
+ .HasColumnName("display_order");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uuid")
+ .HasColumnName("LastModifierId");
+
+ b.Property("SimpleCode")
+ .HasMaxLength(1)
+ .HasColumnType("character varying(1)")
+ .HasColumnName("simple_code");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CommonCharTypeId");
+
+ b.HasIndex(new[] { "DisplayName" }, "ix_common_char")
+ .IsUnique();
+
+ b.ToTable("common_char");
+
+ b.HasComment("常用字符");
+ });
+
+ modelBuilder.Entity("Shentun.Peis.Models.CommonCharType", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uuid")
+ .IsFixedLength();
+
+ b.Property("CreationTime")
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uuid")
+ .HasColumnName("CreatorId");
+
+ b.Property