Browse Source

111902

master
wxd 5 months ago
parent
commit
bebc6808a9
  1. 5
      src/Shentun.Peis.Application.Contracts/CustomerOrgs/CreateCustomerOrgDto.cs
  2. 11
      src/Shentun.Peis.Application.Contracts/CustomerOrgs/CustomerOrgDto.cs
  3. 11
      src/Shentun.Peis.Application.Contracts/CustomerOrgs/GetMedicalTypeIdByCustomerOrgIdDto.cs
  4. 6
      src/Shentun.Peis.Application.Contracts/CustomerOrgs/UpdateCustomerOrgDto.cs
  5. 81
      src/Shentun.Peis.Application/CCTJExportDatas/CCTJExportDataAppService.cs
  6. 55
      src/Shentun.Peis.Application/CCTJExportDatas/CCTJLMPAppService.cs
  7. 31
      src/Shentun.Peis.Application/CustomerOrgs/CustomerOrgAppService.cs
  8. 4
      src/Shentun.Peis.DbMigrator/appsettings.json
  9. 8
      src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrg.cs
  10. 4
      src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs
  11. 87
      src/Shentun.Peis.Domain/StringConvertGuidHelper.cs
  12. 2
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/CustomerOrgs/CustomerOrgDbMapping.cs
  13. 16391
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20251119074708_update_customer_org_add_medical_type_id.Designer.cs
  14. 27
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20251119074708_update_customer_org_add_medical_type_id.cs
  15. 9
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

5
src/Shentun.Peis.Application.Contracts/CustomerOrgs/CreateCustomerOrgDto.cs

@ -119,5 +119,10 @@ namespace Shentun.Peis.CustomerOrgs
/// 销售员电话
/// </summary>
public string SalesPersonPhone { get; set; }
/// <summary>
/// 体检类别id
/// </summary>
public Guid? MedicalTypeId { get; set; }
}
}

11
src/Shentun.Peis.Application.Contracts/CustomerOrgs/CustomerOrgDto.cs

@ -130,5 +130,16 @@ namespace Shentun.Peis.CustomerOrgs
/// 销售员电话
/// </summary>
public string SalesPersonPhone { get; set; }
/// <summary>
/// 体检类别id
/// </summary>
public Guid? MedicalTypeId { get; set; }
/// <summary>
/// 体检类别名称
/// </summary>
public string MedicalTypeName { get; set; }
}
}

11
src/Shentun.Peis.Application.Contracts/CustomerOrgs/GetMedicalTypeIdByCustomerOrgIdDto.cs

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.CustomerOrgs
{
public class GetMedicalTypeIdByCustomerOrgIdDto
{
public Guid? MedicalTypeId { get; set; }
}
}

6
src/Shentun.Peis.Application.Contracts/CustomerOrgs/UpdateCustomerOrgDto.cs

@ -119,5 +119,11 @@ namespace Shentun.Peis.CustomerOrgs
/// 销售员电话
/// </summary>
public string SalesPersonPhone { get; set; }
/// <summary>
/// 体检类别id
/// </summary>
public Guid? MedicalTypeId { get; set; }
}
}

81
src/Shentun.Peis.Application/CCTJExportDatas/CCTJExportDataAppService.cs

@ -2233,6 +2233,10 @@ namespace Shentun.Peis.CCTJExportDatas
var count = await _customerOrgRepository.GetCountAsync();
if (count == 0)
{
var medicalTypeIdFieldComparisonList = (await _fieldComparisonRepository.GetQueryableAsync())
.Where(m => m.TableName == "medical_Type").ToList();
var oldCustomerOrgList = await oldDb.Ado.GetDataTableAsync("select * from org where len(org_id)=5 order by display_order asc");
if (oldCustomerOrgList.Rows.Count > 0)
{
@ -2265,6 +2269,20 @@ namespace Shentun.Peis.CCTJExportDatas
}
}
#endregion
#region 转换体检类别ID
Guid? medicalTypeId = null;
var oldMedicalTypeId = row["medical_type_id"].ToString();
if (!string.IsNullOrWhiteSpace(oldMedicalTypeId))
{
var medicalTypeIdFieldComparison = medicalTypeIdFieldComparisonList.FirstOrDefault(f => f.OldKeyValue == oldMedicalTypeId);
if (medicalTypeIdFieldComparison != null)
medicalTypeId = Guid.Parse(medicalTypeIdFieldComparison.NewKeyValue);
}
#endregion
var data = new CustomerOrg(customerOrgId)
{
@ -2288,7 +2306,8 @@ namespace Shentun.Peis.CCTJExportDatas
Telephone = row["telephone"].ToString(),
CountryOrgCode = row["org_id"].ToString(),
SalesPerson = "",
SalesPersonPhone = ""
SalesPersonPhone = "",
MedicalTypeId = medicalTypeId
};
await _customerOrgRepository.InsertAsync(data);
@ -2328,6 +2347,9 @@ namespace Shentun.Peis.CCTJExportDatas
var count = (await _customerOrgRepository.GetQueryableAsync()).Where(m => m.PathCode.Length > 5).Count();
if (count == 0)
{
var medicalTypeIdFieldComparisonList = (await _fieldComparisonRepository.GetQueryableAsync())
.Where(m => m.TableName == "medical_Type").ToList();
var oldCustomerOrgList = await oldDb.Ado.GetDataTableAsync("select * from [dbo].[org] where len(org_id)=8 order by org_id asc");
if (oldCustomerOrgList.Rows.Count > 0)
@ -2348,6 +2370,20 @@ namespace Shentun.Peis.CCTJExportDatas
Guid customerOrgId = GuidGenerator.Create();
#region 转换体检类别ID
Guid? medicalTypeId = null;
var oldMedicalTypeId = row["medical_type_id"].ToString();
if (!string.IsNullOrWhiteSpace(oldMedicalTypeId))
{
var medicalTypeIdFieldComparison = medicalTypeIdFieldComparisonList.FirstOrDefault(f => f.OldKeyValue == oldMedicalTypeId);
if (medicalTypeIdFieldComparison != null)
medicalTypeId = Guid.Parse(medicalTypeIdFieldComparison.NewKeyValue);
}
#endregion
#region 备注 导入联系人姓名、电话
string remark = "";
if (!string.IsNullOrWhiteSpace(row["linkman"].ToString()))
@ -2389,7 +2425,8 @@ namespace Shentun.Peis.CCTJExportDatas
Telephone = row["telephone"].ToString(),
CountryOrgCode = row["org_id"].ToString(),
SalesPerson = "",
SalesPersonPhone = ""
SalesPersonPhone = "",
MedicalTypeId = medicalTypeId
};
await _customerOrgRepository.InsertAsync(data);
@ -2428,6 +2465,9 @@ namespace Shentun.Peis.CCTJExportDatas
var count = (await _customerOrgRepository.GetQueryableAsync()).Where(m => m.PathCode.Length > 11).Count();
if (count == 0)
{
var medicalTypeIdFieldComparisonList = (await _fieldComparisonRepository.GetQueryableAsync())
.Where(m => m.TableName == "medical_Type").ToList();
var oldCustomerOrgList = await oldDb.Ado.GetDataTableAsync("select * from [dbo].[org] where len(org_id)=11 order by org_id asc");
if (oldCustomerOrgList.Rows.Count > 0)
{
@ -2467,6 +2507,20 @@ namespace Shentun.Peis.CCTJExportDatas
}
#endregion
#region 转换体检类别ID
Guid? medicalTypeId = null;
var oldMedicalTypeId = row["medical_type_id"].ToString();
if (!string.IsNullOrWhiteSpace(oldMedicalTypeId))
{
var medicalTypeIdFieldComparison = medicalTypeIdFieldComparisonList.FirstOrDefault(f => f.OldKeyValue == oldMedicalTypeId);
if (medicalTypeIdFieldComparison != null)
medicalTypeId = Guid.Parse(medicalTypeIdFieldComparison.NewKeyValue);
}
#endregion
var data = new CustomerOrg(customerOrgId)
{
Accounts = row["accounts"].ToString(),
@ -2489,7 +2543,8 @@ namespace Shentun.Peis.CCTJExportDatas
Telephone = row["telephone"].ToString(),
CountryOrgCode = row["org_id"].ToString(),
SalesPerson = "",
SalesPersonPhone = ""
SalesPersonPhone = "",
MedicalTypeId = medicalTypeId
};
await _customerOrgRepository.InsertAsync(data);
@ -2528,6 +2583,9 @@ namespace Shentun.Peis.CCTJExportDatas
var count = (await _customerOrgRepository.GetQueryableAsync()).Where(m => m.PathCode.Length > 17).Count();
if (count == 0)
{
var medicalTypeIdFieldComparisonList = (await _fieldComparisonRepository.GetQueryableAsync())
.Where(m => m.TableName == "medical_Type").ToList();
var oldCustomerOrgList = await oldDb.Ado.GetDataTableAsync("select * from [dbo].[org] where len(org_id)=14 order by org_id asc");
if (oldCustomerOrgList.Rows.Count > 0)
{
@ -2567,6 +2625,20 @@ namespace Shentun.Peis.CCTJExportDatas
}
#endregion
#region 转换体检类别ID
Guid? medicalTypeId = null;
var oldMedicalTypeId = row["medical_type_id"].ToString();
if (!string.IsNullOrWhiteSpace(oldMedicalTypeId))
{
var medicalTypeIdFieldComparison = medicalTypeIdFieldComparisonList.FirstOrDefault(f => f.OldKeyValue == oldMedicalTypeId);
if (medicalTypeIdFieldComparison != null)
medicalTypeId = Guid.Parse(medicalTypeIdFieldComparison.NewKeyValue);
}
#endregion
var data = new CustomerOrg(customerOrgId)
{
Accounts = row["accounts"].ToString(),
@ -2589,7 +2661,8 @@ namespace Shentun.Peis.CCTJExportDatas
Telephone = row["telephone"].ToString(),
CountryOrgCode = row["org_id"].ToString(),
SalesPerson = "",
SalesPersonPhone = ""
SalesPersonPhone = "",
MedicalTypeId = medicalTypeId
};
await _customerOrgRepository.InsertAsync(data);

55
src/Shentun.Peis.Application/CCTJExportDatas/CCTJLMPAppService.cs

@ -432,6 +432,9 @@ namespace Shentun.Peis.CCTJExportDatas
var oldCustomerOrgList = await oldDb.Ado.GetDataTableAsync("select * from org where len(org_id)=5 order by display_order asc");
if (oldCustomerOrgList.Rows.Count > 0)
{
var medicalTypeIdFieldComparisonList = (await _fieldComparisonRepository.GetQueryableAsync())
.Where(m => m.TableName == "medical_Type").ToList();
int ordHandCount = 0;
foreach (DataRow row in oldCustomerOrgList.Rows)
@ -466,7 +469,19 @@ namespace Shentun.Peis.CCTJExportDatas
}
}
#endregion
#region 转换体检类别ID
Guid? medicalTypeId = null;
var oldMedicalTypeId = row["medical_type_id"].ToString();
if (!string.IsNullOrWhiteSpace(oldMedicalTypeId))
{
var medicalTypeIdFieldComparison = medicalTypeIdFieldComparisonList.FirstOrDefault(f => f.OldKeyValue == oldMedicalTypeId);
if (medicalTypeIdFieldComparison != null)
medicalTypeId = Guid.Parse(medicalTypeIdFieldComparison.NewKeyValue);
}
#endregion
var data = new CustomerOrg(customerOrgId)
{
Accounts = row["accounts"].ToString(),
@ -489,7 +504,8 @@ namespace Shentun.Peis.CCTJExportDatas
Telephone = row["telephone"].ToString(),
CountryOrgCode = row["org_id"].ToString(),
SalesPerson = "",
SalesPersonPhone = ""
SalesPersonPhone = "",
MedicalTypeId = medicalTypeId
};
await _customerOrgRepository.InsertAsync(data);
@ -530,6 +546,8 @@ namespace Shentun.Peis.CCTJExportDatas
var oldCustomerOrgList = await oldDb.Ado.GetDataTableAsync("select * from [dbo].[org] where len(org_id)=8 order by org_id asc");
if (oldCustomerOrgList.Rows.Count > 0)
{
var medicalTypeIdFieldComparisonList = (await _fieldComparisonRepository.GetQueryableAsync())
.Where(m => m.TableName == "medical_Type").ToList();
List<FieldComparison> fieldComparisonList = await _fieldComparisonRepository.GetListAsync(m => m.TableName == "customer_org");
@ -568,7 +586,19 @@ namespace Shentun.Peis.CCTJExportDatas
}
}
#endregion
#region 转换体检类别ID
Guid? medicalTypeId = null;
var oldMedicalTypeId = row["medical_type_id"].ToString();
if (!string.IsNullOrWhiteSpace(oldMedicalTypeId))
{
var medicalTypeIdFieldComparison = medicalTypeIdFieldComparisonList.FirstOrDefault(f => f.OldKeyValue == oldMedicalTypeId);
if (medicalTypeIdFieldComparison != null)
medicalTypeId = Guid.Parse(medicalTypeIdFieldComparison.NewKeyValue);
}
#endregion
var data = new CustomerOrg(customerOrgId)
{
Accounts = row["accounts"].ToString(),
@ -591,7 +621,8 @@ namespace Shentun.Peis.CCTJExportDatas
Telephone = row["telephone"].ToString(),
CountryOrgCode = row["org_id"].ToString(),
SalesPerson = "",
SalesPersonPhone = ""
SalesPersonPhone = "",
MedicalTypeId = medicalTypeId
};
await _customerOrgRepository.InsertAsync(data);
@ -632,6 +663,9 @@ namespace Shentun.Peis.CCTJExportDatas
var oldCustomerOrgList = await oldDb.Ado.GetDataTableAsync("select * from [dbo].[org] where len(org_id)=11 order by org_id asc");
if (oldCustomerOrgList.Rows.Count > 0)
{
var medicalTypeIdFieldComparisonList = (await _fieldComparisonRepository.GetQueryableAsync())
.Where(m => m.TableName == "medical_Type").ToList();
List<FieldComparison> fieldComparisonList = await _fieldComparisonRepository.GetListAsync(m => m.TableName == "customer_org");
int ordHandCount = 0;
@ -671,6 +705,20 @@ namespace Shentun.Peis.CCTJExportDatas
}
#endregion
#region 转换体检类别ID
Guid? medicalTypeId = null;
var oldMedicalTypeId = row["medical_type_id"].ToString();
if (!string.IsNullOrWhiteSpace(oldMedicalTypeId))
{
var medicalTypeIdFieldComparison = medicalTypeIdFieldComparisonList.FirstOrDefault(f => f.OldKeyValue == oldMedicalTypeId);
if (medicalTypeIdFieldComparison != null)
medicalTypeId = Guid.Parse(medicalTypeIdFieldComparison.NewKeyValue);
}
#endregion
var data = new CustomerOrg(customerOrgId)
{
Accounts = row["accounts"].ToString(),
@ -693,7 +741,8 @@ namespace Shentun.Peis.CCTJExportDatas
Telephone = row["telephone"].ToString(),
CountryOrgCode = row["org_id"].ToString(),
SalesPerson = "",
SalesPersonPhone = ""
SalesPersonPhone = "",
MedicalTypeId = medicalTypeId
};
await _customerOrgRepository.InsertAsync(data);

31
src/Shentun.Peis.Application/CustomerOrgs/CustomerOrgAppService.cs

@ -77,6 +77,7 @@ namespace Shentun.Peis.CustomerOrgs
var entityDto = await base.GetAsync(id);
entityDto.CreatorName = await _cacheService.GetSurnameAsync(entityDto.CreatorId);
entityDto.LastModifierName = await _cacheService.GetSurnameAsync(entityDto.LastModifierId);
entityDto.MedicalTypeName = await _cacheService.GetMedicalTypeNameAsync(entityDto.MedicalTypeId);
return entityDto;
}
//[AllowAnonymous]
@ -165,7 +166,9 @@ namespace Shentun.Peis.CustomerOrgs
MedicalCenterId = s.MedicalCenterId,
CountryOrgCode = s.CountryOrgCode,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).GetAwaiter().GetResult(),
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).GetAwaiter().GetResult()
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).GetAwaiter().GetResult(),
MedicalTypeId = s.MedicalTypeId,
MedicalTypeName = _cacheService.GetMedicalTypeNameAsync(s.MedicalTypeId).GetAwaiter().GetResult()
}).OrderBy(m => m.DisplayOrder).ToList();
@ -661,6 +664,32 @@ namespace Shentun.Peis.CustomerOrgs
return topCustomerOrgId;
}
/// <summary>
/// 根据单位id获取体检类别id
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/Customerorg/GetMedicalTypeIdByCustomerOrgId")]
public async Task<GetMedicalTypeIdByCustomerOrgIdDto> GetMedicalTypeIdByCustomerOrgIdAsync(CustomerOrgIdInputDto input)
{
var result = new GetMedicalTypeIdByCustomerOrgIdDto();
var customerOrgEntity = await Repository.FirstOrDefaultAsync(f => f.Id == input.CustomerOrgId);
if (customerOrgEntity != null) {
if (customerOrgEntity.MedicalTypeId == null)
{
customerOrgEntity = await Repository.FirstOrDefaultAsync(f => f.PathCode == customerOrgEntity.PathCode.Substring(0, 5));
}
if (customerOrgEntity.MedicalTypeId != null)
result.MedicalTypeId = customerOrgEntity.MedicalTypeId;
}
return result;
}
//private async Task<PeisDbContext> GetDbContextAsync()

4
src/Shentun.Peis.DbMigrator/appsettings.json

@ -3,8 +3,8 @@
//"Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis240701;User ID=postgres;Password=shentun123;"
//"Default": "Host=192.168.2.67;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;"
//"Default": "Host=localhost;Port=5432;Database=ShentunPeis1218;User ID=postgres;Password=wxd123;"
"Default": "Host=10.1.12.140;Port=5432;Database=ShentunPeis0508;User ID=postgres;Password=st123;"
//"Default": "Host=192.168.0.188;Port=5432;Database=ShentunPeis;User ID=postgres;Password=St123456;"
//"Default": "Host=10.1.12.140;Port=5432;Database=ShentunPeis0508;User ID=postgres;Password=st123;"
"Default": "Host=192.168.0.188;Port=5432;Database=ShentunPeis;User ID=postgres;Password=St123456;"
},
"OpenIddict": {
"Applications": {

8
src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrg.cs

@ -179,7 +179,13 @@ namespace Shentun.Peis.Models
//[Column("last_modification_time", TypeName = "timestamp without time zone")]
//public DateTime LastModificationTime { get; set; }
[Column("medical_center_id")]
public Guid MedicalCenterId { get; set; }
public Guid MedicalCenterId { get; set; }
/// <summary>
/// 体检类别id
/// </summary>
[Column("medical_type_id")]
public Guid? MedicalTypeId { get; set; }
//[Column("concurrency_stamp")]
//[StringLength(40)]
//public string ConcurrencyStamp { get; set; } = null!;

4
src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs

@ -114,7 +114,8 @@ namespace Shentun.Peis.CustomerOrgs
Telephone = entity.Telephone,
CountryOrgCode = entity.CountryOrgCode,
SalesPerson = entity.SalesPerson,
SalesPersonPhone = entity.SalesPersonPhone
SalesPersonPhone = entity.SalesPersonPhone,
MedicalTypeId = entity.MedicalTypeId
};
}
/// <summary>
@ -174,6 +175,7 @@ namespace Shentun.Peis.CustomerOrgs
targetEntity.CountryOrgCode = sourceEntity.CountryOrgCode;
targetEntity.SalesPerson = sourceEntity.SalesPerson;
targetEntity.SalesPersonPhone = sourceEntity.SalesPersonPhone;
targetEntity.MedicalTypeId = sourceEntity.MedicalTypeId;
}

87
src/Shentun.Peis.Domain/StringConvertGuidHelper.cs

@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Shentun.Peis
{
public class StringConvertGuidHelper
{
/// <summary>
/// 生成RFC 4122版本5 UUID(基于SHA1的命名空间UUID)- 推荐使用
/// </summary>
public static Guid GenerateVersion5UUID(string name, Guid namespaceId)
{
// 将命名空间Guid和名称转换为字节数组
byte[] namespaceBytes = namespaceId.ToByteArray();
SwapByteOrder(namespaceBytes); // RFC标准要求字节序转换
byte[] nameBytes = Encoding.UTF8.GetBytes(name);
byte[] combinedBytes = new byte[namespaceBytes.Length + nameBytes.Length];
Buffer.BlockCopy(namespaceBytes, 0, combinedBytes, 0, namespaceBytes.Length);
Buffer.BlockCopy(nameBytes, 0, combinedBytes, namespaceBytes.Length, nameBytes.Length);
using (SHA1 sha1 = SHA1.Create())
{
byte[] hash = sha1.ComputeHash(combinedBytes);
// 取前16个字节
byte[] guidBytes = new byte[16];
Array.Copy(hash, 0, guidBytes, 0, 16);
// 设置版本号: 0101 (版本5)
guidBytes[6] = (byte)((guidBytes[6] & 0x0F) | 0x50);
// 设置变体: 10xx (RFC变体)
guidBytes[8] = (byte)((guidBytes[8] & 0x3F) | 0x80);
SwapByteOrder(guidBytes); // 转换回Guid的字节序
return new Guid(guidBytes);
}
}
/// <summary>
/// 生成URL的版本5 UUID
/// </summary>
public static Guid GenerateURLUUID(string url)
{
return GenerateVersion5UUID(url, URLNamespace);
}
/// <summary>
/// 生成DNS的版本5 UUID
/// </summary>
public static Guid GenerateDNSUUID(string domain)
{
return GenerateVersion5UUID(domain, DNSNamespace);
}
private static void SwapByteOrder(byte[] guid)
{
// 交换前4字节
SwapBytes(guid, 0, 3);
SwapBytes(guid, 1, 2);
// 交换5-6字节
SwapBytes(guid, 4, 5);
// 交换7-8字节
SwapBytes(guid, 6, 7);
}
private static void SwapBytes(byte[] array, int index1, int index2)
{
byte temp = array[index1];
array[index1] = array[index2];
array[index2] = temp;
}
// 预定义的命名空间UUID (RFC 4122)
public static readonly Guid DNSNamespace = new Guid("6ba7b810-9dad-11d1-80b4-00c04fd430c8");
public static readonly Guid URLNamespace = new Guid("6ba7b811-9dad-11d1-80b4-00c04fd430c8");
public static readonly Guid OIDNamespace = new Guid("6ba7b812-9dad-11d1-80b4-00c04fd430c8");
public static readonly Guid X500Namespace = new Guid("6ba7b814-9dad-11d1-80b4-00c04fd430c8");
}
}

2
src/Shentun.Peis.EntityFrameworkCore/DbMapping/CustomerOrgs/CustomerOrgDbMapping.cs

@ -23,7 +23,7 @@ namespace Shentun.Peis.DbMapping
entity.Property(t => t.PathCode).HasComment("路径编码").IsRequired();
entity.Property(t => t.IsLock).HasComment("锁住").IsRequired().HasDefaultValueSql("'N'");
entity.Property(t => t.IsActive).HasComment("状态").IsRequired().HasDefaultValueSql("'Y'");
entity.Property(t => t.MedicalTypeId).HasComment("体检类别id");
entity.Property(e => e.Id)
.IsFixedLength()

16391
src/Shentun.Peis.EntityFrameworkCore/Migrations/20251119074708_update_customer_org_add_medical_type_id.Designer.cs
File diff suppressed because it is too large
View File

27
src/Shentun.Peis.EntityFrameworkCore/Migrations/20251119074708_update_customer_org_add_medical_type_id.cs

@ -0,0 +1,27 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class update_customer_org_add_medical_type_id : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "medical_type_id",
table: "customer_org",
type: "uuid",
nullable: true,
comment: "体检类别id");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "medical_type_id",
table: "customer_org");
}
}
}

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

@ -19,7 +19,7 @@ namespace Shentun.Peis.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.19")
.HasAnnotation("ProductVersion", "6.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@ -2830,6 +2830,11 @@ namespace Shentun.Peis.Migrations
.HasColumnName("medical_center_id")
.HasComment("体检中心ID");
b.Property<Guid?>("MedicalTypeId")
.HasColumnType("uuid")
.HasColumnName("medical_type_id")
.HasComment("体检类别id");
b.Property<Guid>("OrgTypeId")
.HasColumnType("uuid")
.HasColumnName("org_type_id")
@ -13032,7 +13037,7 @@ namespace Shentun.Peis.Migrations
.HasColumnName("method_name");
b.Property<string>("Parameters")
.HasMaxLength(50000)
.HasMaxLength(2000)
.HasColumnType("text")
.HasColumnName("parameters");

Loading…
Cancel
Save