Browse Source

条码分组增加份数

master
wxd 1 year ago
parent
commit
4eed8fd84e
  1. 5
      src/Shentun.Peis.Application.Contracts/SampleGroups/CreateSampleGroupDto.cs
  2. 8
      src/Shentun.Peis.Application.Contracts/SampleGroups/SampleGroupDto.cs
  3. 5
      src/Shentun.Peis.Application.Contracts/SampleGroups/UpdateSampleGroupDto.cs
  4. 44
      src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
  5. 11
      src/Shentun.Peis.Application/SampleGroups/SampleGroupAppService.cs
  6. 6
      src/Shentun.Peis.Domain/PrintReports/LisRequestReportDto.cs
  7. 6
      src/Shentun.Peis.Domain/SampleGroups/SampleGroup.cs
  8. 5
      src/Shentun.Peis.Domain/SampleGroups/SampleGroupManager.cs
  9. 2
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/SampleGroups/SampleGroupDbMapping.cs
  10. 15050
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240717101825_sample_group_add_sample_container_print_count.Designer.cs
  11. 27
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240717101825_sample_group_add_sample_container_print_count.cs
  12. 15050
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240717102128_sample_group_add_sample_container_print_count_2.Designer.cs
  13. 25
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240717102128_sample_group_add_sample_container_print_count_2.cs
  14. 7
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

5
src/Shentun.Peis.Application.Contracts/SampleGroups/CreateSampleGroupDto.cs

@ -19,5 +19,10 @@ namespace Shentun.Peis.SampleGroups
/// 标本容器ID
/// </summary>
public Guid SampleContainerId { get; set; }
/// <summary>
/// 条码打印数量
/// </summary>
public int SamplePrintCount { get; set; } = 1;
}
}

8
src/Shentun.Peis.Application.Contracts/SampleGroups/SampleGroupDto.cs

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Volo.Abp.Application.Dtos;
@ -26,6 +27,11 @@ namespace Shentun.Peis.SampleGroups
public string SimpleCode { get; set; }
public int DisplayOrder { get; set; }
/// <summary>
/// 条码打印数量
/// </summary>
public int SamplePrintCount { get; set; }
}
}

5
src/Shentun.Peis.Application.Contracts/SampleGroups/UpdateSampleGroupDto.cs

@ -21,5 +21,10 @@ namespace Shentun.Peis.SampleGroups
/// </summary>
[Required]
public Guid SampleContainerId { get; set; }
/// <summary>
/// 条码打印数量
/// </summary>
public int SamplePrintCount { get; set; } = 1;
}
}

44
src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs

@ -327,7 +327,8 @@ namespace Shentun.Peis.PrintReports
lisRequest,
sampleContainerHaveEmpty,
sampleTypeHaveEmpty,
sampleGroupName = sampleGroupHaveEmpty.DisplayName
sampleGroupName = sampleGroupHaveEmpty != null ? sampleGroupHaveEmpty.DisplayName : "",
samplePrintCount = sampleGroupHaveEmpty != null ? sampleGroupHaveEmpty.SamplePrintCount : 0
}
).ToList();
lisRequests = query.Select(o => o.lisRequest).Distinct().ToList();
@ -354,8 +355,8 @@ namespace Shentun.Peis.PrintReports
SampleContainerRemark = (o.sampleContainerHaveEmpty == null) ? "" : o.sampleContainerHaveEmpty.ContainerRemark,
SampleTypeName = (o.sampleTypeHaveEmpty == null) ? "" : o.sampleTypeHaveEmpty.DisplayName,
SexName = o.sex.DisplayName,
CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(o.patientRegister.CustomerOrgId).Result.DisplayName,
DepartmentName = _cacheService.GetCustomerOrgNameAsync(o.patientRegister.CustomerOrgId).Result,
CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(o.patientRegister.CustomerOrgId).Result.ShortName,
DepartmentName = _cacheService.GetCustomerOrgAsync(o.patientRegister.CustomerOrgId).Result.ShortName,
IsPrint = o.lisRequest.IsPrint,
IsSignIn = o.lisRequest.IsSignIn,
SamplingTime = o.lisRequest.SamplingTime,
@ -363,7 +364,8 @@ namespace Shentun.Peis.PrintReports
SignInPerson = o.lisRequest.SignInPerson,
SignInTime = o.lisRequest.SignInTime,
SampleGroupName = o.sampleGroupName,
MobileTelephone = o.patient.MobileTelephone
MobileTelephone = o.patient.MobileTelephone,
SamplePrintCount = o.samplePrintCount
}).ToList();
var entlist = lisRequestReportDtoList.GroupBy(g => new
@ -412,7 +414,8 @@ namespace Shentun.Peis.PrintReports
SignInPerson = s.Key.SignInPerson,
SignInTime = s.Key.SignInTime,
SampleGroupName = s.FirstOrDefault().SampleGroupName,
MobileTelephone = s.Key.MobileTelephone
MobileTelephone = s.Key.MobileTelephone,
SamplePrintCount = s.FirstOrDefault().SamplePrintCount
}).ToList();
await uow.CompleteAsync();
@ -459,7 +462,8 @@ namespace Shentun.Peis.PrintReports
lisRequest,
sampleContainer,
sampleType,
sampleGroupName = sampleGroupHaveEmpty.DisplayName
sampleGroupName = sampleGroupHaveEmpty != null ? sampleGroupHaveEmpty.DisplayName : "",
samplePrintCount = sampleGroupHaveEmpty != null ? sampleGroupHaveEmpty.SamplePrintCount : 1
}).Distinct().ToList();
if (!list.Any())
@ -490,10 +494,11 @@ namespace Shentun.Peis.PrintReports
ContainerColor = lisRequestInfo.sampleContainer.ContainerColor,
SampleContainerRemark = lisRequestInfo.sampleContainer.ContainerRemark,
AsbitemNames = string.Join(",", list.OrderBy(o => o.asbitem.DisplayOrder).Select(o => o.asbitem.DisplayName).Distinct()),
CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(lisRequestInfo.patientRegister.CustomerOrgId).Result.DisplayName,
DepartmentName = _cacheService.GetCustomerOrgNameAsync(lisRequestInfo.patientRegister.CustomerOrgId).Result,
CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(lisRequestInfo.patientRegister.CustomerOrgId).Result.ShortName,
DepartmentName = _cacheService.GetCustomerOrgAsync(lisRequestInfo.patientRegister.CustomerOrgId).Result.ShortName,
SampleGroupName = lisRequestInfo.sampleGroupName,
MobileTelephone = lisRequestInfo.patient.MobileTelephone
MobileTelephone = lisRequestInfo.patient.MobileTelephone,
SamplePrintCount = lisRequestInfo.samplePrintCount
};
return lisRequestDto;
@ -740,7 +745,7 @@ namespace Shentun.Peis.PrintReports
SexName = _cacheService.GetSexNameAsync(patientRegister.SexId).Result,
IsCheckRequest = itemTypeHaveEmpty != null ? itemTypeHaveEmpty.IsCheckRequest : 'N',
BarcodeMode = asbitemHaveEmpty != null ? asbitemHaveEmpty.BarcodeMode : '0',
CustomerOrgId= patientRegister.CustomerOrgId,
CustomerOrgId = patientRegister.CustomerOrgId,
MobileTelephone = patient.MobileTelephone
}).ToList();
@ -765,7 +770,7 @@ namespace Shentun.Peis.PrintReports
SexName = s.FirstOrDefault().SexName,
CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(s.FirstOrDefault().CustomerOrgId).Result.DisplayName,
DepartmentName = _cacheService.GetCustomerOrgNameAsync(s.FirstOrDefault().CustomerOrgId).Result,
MobileTelephone= s.FirstOrDefault().MobileTelephone
MobileTelephone = s.FirstOrDefault().MobileTelephone
});
}
else if (s.Where(m => m.BarcodeMode == '1').Count() > 0)
@ -779,8 +784,8 @@ namespace Shentun.Peis.PrintReports
PatientName = s.FirstOrDefault().PatientName,
PatientRegisterNo = s.FirstOrDefault().PatientRegisterNo,
SexName = s.FirstOrDefault().SexName,
CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(s.FirstOrDefault().CustomerOrgId).Result.DisplayName,
DepartmentName = _cacheService.GetCustomerOrgNameAsync(s.FirstOrDefault().CustomerOrgId).Result,
CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(s.FirstOrDefault().CustomerOrgId).Result.ShortName,
DepartmentName = _cacheService.GetCustomerOrgAsync(s.FirstOrDefault().CustomerOrgId).Result.ShortName,
MobileTelephone = s.FirstOrDefault().MobileTelephone
});
}
@ -791,7 +796,7 @@ namespace Shentun.Peis.PrintReports
return pacsNoReportDtos;
}
/// <summary>
/// 打印Pacs条码数据 单个条码打印
/// </summary>
@ -824,7 +829,8 @@ namespace Shentun.Peis.PrintReports
PatientRegisterNo = patientRegister.PatientRegisterNo,
SexName = _cacheService.GetSexNameAsync(patientRegister.SexId).Result,
IsCheckRequest = itemTypeHaveEmpty != null ? itemTypeHaveEmpty.IsCheckRequest : 'N',
BarcodeMode = asbitemHaveEmpty != null ? asbitemHaveEmpty.BarcodeMode : '0'
BarcodeMode = asbitemHaveEmpty != null ? asbitemHaveEmpty.BarcodeMode : '0',
CustomerOrgId = patientRegister.CustomerOrgId,
}).ToList();
@ -843,8 +849,8 @@ namespace Shentun.Peis.PrintReports
PatientName = queryGroup.FirstOrDefault().PatientName,
PatientRegisterNo = queryGroup.FirstOrDefault().PatientRegisterNo,
SexName = queryGroup.FirstOrDefault().SexName,
CustomerOrgName = "",
DepartmentName = ""
CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(queryGroup.FirstOrDefault().CustomerOrgId).Result.ShortName,
DepartmentName = _cacheService.GetCustomerOrgAsync(queryGroup.FirstOrDefault().CustomerOrgId).Result.ShortName
};
}
else if (queryGroup.Where(m => m.BarcodeMode == '1').Count() > 0)
@ -857,8 +863,8 @@ namespace Shentun.Peis.PrintReports
PatientName = queryGroup.FirstOrDefault().PatientName,
PatientRegisterNo = queryGroup.FirstOrDefault().PatientRegisterNo,
SexName = queryGroup.FirstOrDefault().SexName,
CustomerOrgName = "",
DepartmentName = ""
CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(queryGroup.FirstOrDefault().CustomerOrgId).Result.ShortName,
DepartmentName = _cacheService.GetCustomerOrgAsync(queryGroup.FirstOrDefault().CustomerOrgId).Result.ShortName
};
}

11
src/Shentun.Peis.Application/SampleGroups/SampleGroupAppService.cs

@ -82,13 +82,13 @@ namespace Shentun.Peis.SampleGroups
/// <returns></returns>
public async Task<List<SampleGroupDto>> GetListInFilterAsync(GetListInFilterDto input)
{
var entlist =(await Repository.GetQueryableAsync()).Include(c => c.SampleContainer).Include(c => c.SampleType).ToList();
var entlist = (await Repository.GetQueryableAsync()).Include(c => c.SampleContainer).Include(c => c.SampleType).ToList();
if (!string.IsNullOrEmpty(input.Filter))
entlist = entlist.Where(m => m.DisplayName.Contains(input.Filter)).ToList();
var entdto = entlist.Select(s => new SampleGroupDto
{
CreationTime = s.CreationTime,
@ -103,11 +103,12 @@ namespace Shentun.Peis.SampleGroups
SampleTypeId = s.SampleTypeId,
SampleContainerName = s.SampleContainer.DisplayName,
SampleTypeName = s.SampleType.DisplayName,
SamplePrintCount = s.SamplePrintCount,
CreatorName = _cacheService.GetSurnameAsync(s.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(s.LastModifierId).Result
}).OrderBy(m => m.DisplayOrder).ToList();
return entdto;
return entdto;
}
@ -149,7 +150,7 @@ namespace Shentun.Peis.SampleGroups
return base.DeleteAsync(id);
}
/// <summary>
/// 修改排序 置顶,置底

6
src/Shentun.Peis.Domain/PrintReports/LisRequestReportDto.cs

@ -1,6 +1,7 @@
using Shentun.Peis.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -117,6 +118,11 @@ namespace Shentun.Peis.PrintReports
/// 手机号
/// </summary>
public string MobileTelephone { get; set; }
/// <summary>
/// 条码打印数量
/// </summary>
public int SamplePrintCount { get; set; }
}

6
src/Shentun.Peis.Domain/SampleGroups/SampleGroup.cs

@ -46,6 +46,12 @@ namespace Shentun.Peis.Models
[Column("display_order")]
public int DisplayOrder { get; set; }
/// <summary>
/// 条码打印数量
/// </summary>
[Column("sample_print_count")]
public int SamplePrintCount { get; set; }
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }

5
src/Shentun.Peis.Domain/SampleGroups/SampleGroupManager.cs

@ -41,7 +41,8 @@ namespace Shentun.Peis.SampleGroups
SimpleCode = LanguageConverter.GetPYSimpleCode(entity.DisplayName),
DisplayOrder = await EntityHelper.CreateMaxDisplayOrder<SampleGroup>(_repository),
SampleContainerId = entity.SampleContainerId,
SampleTypeId = entity.SampleTypeId
SampleTypeId = entity.SampleTypeId,
SamplePrintCount = entity.SamplePrintCount
};
}
/// <summary>
@ -66,7 +67,7 @@ namespace Shentun.Peis.SampleGroups
}
targetEntity.SampleContainerId = sourceEntity.SampleContainerId;
targetEntity.SampleTypeId = sourceEntity.SampleTypeId;
targetEntity.SamplePrintCount = sourceEntity.SamplePrintCount;
}

2
src/Shentun.Peis.EntityFrameworkCore/DbMapping/SampleGroups/SampleGroupDbMapping.cs

@ -20,7 +20,7 @@ namespace Shentun.Peis.DbMapping
entity.Property(t => t.DisplayName).HasComment("名称").IsRequired();
entity.Property(t => t.SampleTypeId).HasComment("标本类型ID").IsRequired().IsFixedLength();
entity.Property(t => t.SampleContainerId).HasComment("标本容器ID").IsRequired().IsFixedLength();
entity.Property(t => t.SamplePrintCount).HasComment("条码打印数量").IsRequired().HasDefaultValueSql("1");
entity.Property(e => e.Id).IsFixedLength().IsRequired();
//entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");

15050
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240717101825_sample_group_add_sample_container_print_count.Designer.cs
File diff suppressed because it is too large
View File

27
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240717101825_sample_group_add_sample_container_print_count.cs

@ -0,0 +1,27 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class sample_group_add_sample_container_print_count : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "sample_container_print_count",
table: "sample_group",
type: "integer",
nullable: false,
defaultValueSql: "1",
comment: "条码打印数量");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "sample_container_print_count",
table: "sample_group");
}
}
}

15050
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240717102128_sample_group_add_sample_container_print_count_2.Designer.cs
File diff suppressed because it is too large
View File

25
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240717102128_sample_group_add_sample_container_print_count_2.cs

@ -0,0 +1,25 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class sample_group_add_sample_container_print_count_2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "sample_container_print_count",
table: "sample_group",
newName: "sample_print_count");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "sample_print_count",
table: "sample_group",
newName: "sample_container_print_count");
}
}
}

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

@ -9450,6 +9450,13 @@ namespace Shentun.Peis.Migrations
.IsFixedLength()
.HasComment("标本容器ID");
b.Property<int>("SamplePrintCount")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("sample_print_count")
.HasDefaultValueSql("1")
.HasComment("条码打印数量");
b.Property<Guid>("SampleTypeId")
.HasColumnType("uuid")
.HasColumnName("sample_type_id")

Loading…
Cancel
Save