Browse Source

仪器类别

master
wxd 1 year ago
parent
commit
1199a1c0ce
  1. 6
      src/Shentun.Peis.Application.Contracts/DeviceTypes/CreateDeviceTypeDto.cs
  2. 9
      src/Shentun.Peis.Application.Contracts/DeviceTypes/DeviceTypeDto.cs
  3. 7
      src/Shentun.Peis.Application.Contracts/DeviceTypes/UpdateDeviceTypeDto.cs
  4. 1
      src/Shentun.Peis.Application/DeviceTypes/DeviceTypeAppService.cs
  5. 2
      src/Shentun.Peis.Application/Worklists/WorklistAppService.cs
  6. 4
      src/Shentun.Peis.DbMigrator/appsettings.json
  7. 7
      src/Shentun.Peis.Domain/DeviceTypes/DeviceType.cs
  8. 6
      src/Shentun.Peis.Domain/DeviceTypes/DeviceTypeManager.cs
  9. 16252
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20241128072335_update_device_type_add_alias.Designer.cs
  10. 26
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20241128072335_update_device_type_add_alias.cs
  11. 5
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

6
src/Shentun.Peis.Application.Contracts/DeviceTypes/CreateDeviceTypeDto.cs

@ -15,5 +15,11 @@ namespace Shentun.Peis.DeviceTypes
/// 检查类别 0.检验 1.功能检查
/// </summary>
public char CheckTypeFlag { get; set; }
/// <summary>
/// 别名 多个可以用,隔开
/// </summary>
public string Alias { get; set; }
}
}

9
src/Shentun.Peis.Application.Contracts/DeviceTypes/DeviceTypeDto.cs

@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Volo.Abp.Application.Dtos;
@ -16,6 +18,11 @@ namespace Shentun.Peis.DeviceTypes
public string SimpleCode { get; set; }
public int DisplayOrder { get; set; }
/// <summary>
/// 别名 多个可以用,隔开
/// </summary>
public string Alias { get; set; }
}
}

7
src/Shentun.Peis.Application.Contracts/DeviceTypes/UpdateDeviceTypeDto.cs

@ -7,7 +7,6 @@ namespace Shentun.Peis.DeviceTypes
{
public class UpdateDeviceTypeDto
{
[Required(ErrorMessage = "名称不能为空")]
public string DisplayName { get; set; }
@ -15,5 +14,11 @@ namespace Shentun.Peis.DeviceTypes
/// 检查类别 0.检验 1.功能检查
/// </summary>
public char CheckTypeFlag { get; set; }
/// <summary>
/// 别名 多个可以用,隔开
/// </summary>
public string Alias { get; set; }
}
}

1
src/Shentun.Peis.Application/DeviceTypes/DeviceTypeAppService.cs

@ -101,6 +101,7 @@ namespace Shentun.Peis.DeviceTypes
LastModifierId = s.LastModifierId,
SimpleCode = s.SimpleCode,
CheckTypeFlag = s.CheckTypeFlag,
Alias = s.Alias,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
}).OrderBy(o => o.DisplayOrder).ToList();

2
src/Shentun.Peis.Application/Worklists/WorklistAppService.cs

@ -70,7 +70,7 @@ namespace Shentun.Peis.Worklists
&& registerCheck.WorklistPreCheckDate != null
&& registerCheck.WorklistPreCheckDate >= Convert.ToDateTime(input.StartDate)
&& registerCheck.WorklistPreCheckDate < Convert.ToDateTime(input.EndDate).AddDays(1)
&& deviceType.DisplayName == input.Modality
&& (deviceType.DisplayName == input.Modality || deviceType.Alias.Contains(input.Modality))
select new
{
patientRegister,

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

@ -1,7 +1,7 @@
{
"ConnectionStrings": {
"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=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;"
},

7
src/Shentun.Peis.Domain/DeviceTypes/DeviceType.cs

@ -24,6 +24,13 @@ namespace Shentun.Peis.Models
[StringLength(20)]
public string DisplayName { get; set; } = null!;
/// <summary>
/// 别名 多个可以用,隔开
/// </summary>
[Column("alias")]
[StringLength(100)]
public string Alias { get; set; }
/// <summary>
/// 检查类别 0.检验 1.功能检查
/// </summary>

6
src/Shentun.Peis.Domain/DeviceTypes/DeviceTypeManager.cs

@ -42,7 +42,8 @@ namespace Shentun.Peis.DeviceTypes
DisplayName = entity.DisplayName,
SimpleCode = LanguageConverter.GetPYSimpleCode(entity.DisplayName),
DisplayOrder = await EntityHelper.CreateMaxDisplayOrder<DeviceType>(_repository),
CheckTypeFlag = entity.CheckTypeFlag
CheckTypeFlag = entity.CheckTypeFlag,
Alias = entity.Alias
};
}
/// <summary>
@ -69,6 +70,7 @@ namespace Shentun.Peis.DeviceTypes
if (targetEntity.CheckTypeFlag != sourceEntity.CheckTypeFlag)
targetEntity.CheckTypeFlag = sourceEntity.CheckTypeFlag;
targetEntity.Alias = sourceEntity.Alias;
}
public async Task CheckAndDeleteAsync(DeviceType entity)
@ -84,7 +86,7 @@ namespace Shentun.Peis.DeviceTypes
await _repository.DeleteAsync(entity);
}
/// <summary>
/// 修改排序 置顶,置底
/// </summary>

16252
src/Shentun.Peis.EntityFrameworkCore/Migrations/20241128072335_update_device_type_add_alias.Designer.cs
File diff suppressed because it is too large
View File

26
src/Shentun.Peis.EntityFrameworkCore/Migrations/20241128072335_update_device_type_add_alias.cs

@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class update_device_type_add_alias : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "alias",
table: "device_type",
type: "character varying(100)",
maxLength: 100,
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "alias",
table: "device_type");
}
}
}

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

@ -3596,6 +3596,11 @@ namespace Shentun.Peis.Migrations
.IsFixedLength()
.HasComment("仪器类别编号");
b.Property<string>("Alias")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("alias");
b.Property<char>("CheckTypeFlag")
.HasMaxLength(1)
.HasColumnType("character(1)")

Loading…
Cancel
Save