Browse Source

领取

master
wxd 7 days ago
parent
commit
9d53c75649
  1. 21
      src/Shentun.Peis.Application.Contracts/PatientRegisters/BatchUpdatePatientRegisterReportReceiveInputDto.cs
  2. 13
      src/Shentun.Peis.Application.Contracts/PeisReports/GetPatientRegisterReportDto.cs
  3. 11
      src/Shentun.Peis.Application/AsbitemMutualExclusions/AsbitemMutualExclusionAppService.cs
  4. 47
      src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
  5. 10
      src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs
  6. 4
      src/Shentun.Peis.DbMigrator/appsettings.json
  7. 16456
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20251210012240_update_patient_register_add_report_receive.Designer.cs
  8. 50
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20251210012240_update_patient_register_add_report_receive.cs
  9. 17
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

21
src/Shentun.Peis.Application.Contracts/PatientRegisters/BatchUpdatePatientRegisterReportReceiveInputDto.cs

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.PatientRegisters
{
public class BatchUpdatePatientRegisterReportReceiveInputDto
{
public List<Guid> PatientRegisterIds { get; set; } = new List<Guid>();
/// <summary>
/// 是否领取
/// </summary>
public char IsReceiveReport { get; set; } = 'Y';
/// <summary>
/// 领取人
/// </summary>
public string ReportReceiveName { get; set; }
}
}

13
src/Shentun.Peis.Application.Contracts/PeisReports/GetPatientRegisterReportDto.cs

@ -179,7 +179,20 @@ namespace Shentun.Peis.PeisReports
/// </summary> /// </summary>
public string AuditDate { get; set; } public string AuditDate { get; set; }
/// <summary>
/// 报告是否领取
/// </summary>
public char IsReceiveReport { get; set; }
/// <summary>
/// 报告领取人
/// </summary>
public string ReportReceiveName { get; set; }
/// <summary>
/// 报告领取时间
/// </summary>
public string ReportReceiveDate { get; set; }
} }
} }

11
src/Shentun.Peis.Application/AsbitemMutualExclusions/AsbitemMutualExclusionAppService.cs

@ -114,11 +114,14 @@ namespace Shentun.Peis.AsbitemMutualExclusions
foreach (var item in input.MutualExclusionAsbitemIds) foreach (var item in input.MutualExclusionAsbitemIds)
{ {
asbitemMutualExclusionList.Add(new AsbitemMutualExclusion
if (input.AsbitemId != item)
{ {
AsbitemId = input.AsbitemId,
MutualExclusionAsbitemId = item
});
asbitemMutualExclusionList.Add(new AsbitemMutualExclusion
{
AsbitemId = input.AsbitemId,
MutualExclusionAsbitemId = item
});
}
} }
await _asbitemMutualExclusionRepository.InsertManyAsync(asbitemMutualExclusionList); await _asbitemMutualExclusionRepository.InsertManyAsync(asbitemMutualExclusionList);

47
src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs

@ -26,6 +26,7 @@ using Shentun.Peis.PeisReports;
using Shentun.Peis.RegisterAsbitems; using Shentun.Peis.RegisterAsbitems;
using Shentun.Peis.RegisterCheckAsbitems; using Shentun.Peis.RegisterCheckAsbitems;
using Shentun.Peis.RegisterChecks; using Shentun.Peis.RegisterChecks;
using Shentun.Peis.Rooms;
using Shentun.Peis.SumSuggestionContents; using Shentun.Peis.SumSuggestionContents;
using Shentun.Peis.SumSuggestionHeaders; using Shentun.Peis.SumSuggestionHeaders;
using Shentun.Peis.SumSummaryContents; using Shentun.Peis.SumSummaryContents;
@ -4289,6 +4290,52 @@ namespace Shentun.Peis.PatientRegisters
} }
} }
/// <summary>
/// 批量领取报告 取消领取
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/PatientRegister/BatchUpdatePatientRegisterReportReceive")]
public async Task BatchUpdatePatientRegisterReportReceiveAsync(BatchUpdatePatientRegisterReportReceiveInputDto input)
{
if (!input.PatientRegisterIds.Any())
{
throw new UserFriendlyException("未选择人员Id");
}
List<PatientRegister> patientRegisters = new List<PatientRegister>();
var idPage = (input.PatientRegisterIds.Count / 200) + 1;
for (int i = 0; i < idPage; i++)
{
List<Guid> ids = input.PatientRegisterIds.Skip(i).Take(200).ToList();
var patientRegisterList = await _repository.GetListAsync(m => ids.Contains(m.Id));
patientRegisters.AddRange(patientRegisterList);
}
patientRegisters = patientRegisters.Distinct().ToList();
foreach (var item in patientRegisters)
{
if (input.IsReceiveReport == 'Y')
{
item.IsReceiveReport = 'Y';
item.ReportReceiveDate = DateTime.Now;
item.ReportReceiveName = input.ReportReceiveName;
}
else
{
item.IsReceiveReport = 'N';
item.ReportReceiveDate = DateTime.Now;
item.ReportReceiveName = "";
}
}
await _repository.UpdateManyAsync(patientRegisters);
}
private async Task UpdateRegisterChecks(CreateRegisterCheckAsbitemEntity createRegisterCheckAsbitemEntity) private async Task UpdateRegisterChecks(CreateRegisterCheckAsbitemEntity createRegisterCheckAsbitemEntity)
{ {
if (createRegisterCheckAsbitemEntity == null) if (createRegisterCheckAsbitemEntity == null)

10
src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs

@ -128,7 +128,10 @@ namespace Shentun.Peis.PeisReports
a.MedicalConclusionId, a.MedicalConclusionId,
a.AuditDate, a.AuditDate,
a.AuditDoctorId, a.AuditDoctorId,
a.ReportPrintOperating
a.ReportPrintOperating,
a.IsReceiveReport,
a.ReportReceiveDate,
a.ReportReceiveName
}, },
//RegisterCheckCompleteFlag = registerCheck.CompleteFlag, //RegisterCheckCompleteFlag = registerCheck.CompleteFlag,
//IsCheck = asbitem.IsCheck, //IsCheck = asbitem.IsCheck,
@ -389,7 +392,10 @@ namespace Shentun.Peis.PeisReports
SummaryDoctorName = _cacheService.GetSurnameAsync(s.a.SummaryDoctorId).GetAwaiter().GetResult(), SummaryDoctorName = _cacheService.GetSurnameAsync(s.a.SummaryDoctorId).GetAwaiter().GetResult(),
AuditDate = DataHelper.ConversionDateShortToString(s.a.AuditDate), AuditDate = DataHelper.ConversionDateShortToString(s.a.AuditDate),
AuditDoctorName = _cacheService.GetSurnameAsync(s.a.AuditDoctorId).GetAwaiter().GetResult(), AuditDoctorName = _cacheService.GetSurnameAsync(s.a.AuditDoctorId).GetAwaiter().GetResult(),
ReportPrintName = _cacheService.GetSurnameAsync(s.a.ReportPrintOperating).GetAwaiter().GetResult()
ReportPrintName = _cacheService.GetSurnameAsync(s.a.ReportPrintOperating).GetAwaiter().GetResult(),
IsReceiveReport = s.a.IsReceiveReport,
ReportReceiveDate = DataHelper.ConversionDateShortToString(s.a.ReportReceiveDate),
ReportReceiveName = s.a.ReportReceiveName
}); });
} }

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=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=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=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": { "OpenIddict": {
"Applications": { "Applications": {

16456
src/Shentun.Peis.EntityFrameworkCore/Migrations/20251210012240_update_patient_register_add_report_receive.Designer.cs
File diff suppressed because it is too large
View File

50
src/Shentun.Peis.EntityFrameworkCore/Migrations/20251210012240_update_patient_register_add_report_receive.cs

@ -0,0 +1,50 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class update_patient_register_add_report_receive : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<char>(
name: "is_receive_report",
table: "patient_register",
type: "character(1)",
nullable: false,
defaultValueSql: "'N'",
comment: "报告是否领取");
migrationBuilder.AddColumn<DateTime>(
name: "report_receive_date",
table: "patient_register",
type: "timestamp without time zone",
nullable: true,
comment: "报告领取时间");
migrationBuilder.AddColumn<string>(
name: "report_receive_name",
table: "patient_register",
type: "text",
nullable: true,
comment: "报告领取人");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "is_receive_report",
table: "patient_register");
migrationBuilder.DropColumn(
name: "report_receive_date",
table: "patient_register");
migrationBuilder.DropColumn(
name: "report_receive_name",
table: "patient_register");
}
}
}

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

@ -7722,6 +7722,13 @@ namespace Shentun.Peis.Migrations
.HasDefaultValueSql("'N'") .HasDefaultValueSql("'N'")
.HasComment("电话随访"); .HasComment("电话随访");
b.Property<char>("IsReceiveReport")
.ValueGeneratedOnAdd()
.HasColumnType("character(1)")
.HasColumnName("is_receive_report")
.HasDefaultValueSql("'N'")
.HasComment("报告是否领取");
b.Property<char>("IsRecoverGuide") b.Property<char>("IsRecoverGuide")
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasMaxLength(1) .HasMaxLength(1)
@ -7881,6 +7888,16 @@ namespace Shentun.Peis.Migrations
.HasColumnName("report_print_times") .HasColumnName("report_print_times")
.HasComment("体检报告打印次数"); .HasComment("体检报告打印次数");
b.Property<DateTime?>("ReportReceiveDate")
.HasColumnType("timestamp without time zone")
.HasColumnName("report_receive_date")
.HasComment("报告领取时间");
b.Property<string>("ReportReceiveName")
.HasColumnType("text")
.HasColumnName("report_receive_name")
.HasComment("报告领取人");
b.Property<string>("Salesman") b.Property<string>("Salesman")
.HasMaxLength(20) .HasMaxLength(20)
.HasColumnType("character varying(20)") .HasColumnType("character varying(20)")

Loading…
Cancel
Save