18 changed files with 15306 additions and 17 deletions
-
5src/Shentun.Peis.Application.Contracts/PeisReports/GetPatientRegisterReportDto.cs
-
11src/Shentun.Peis.Application.Contracts/QueueRegisters/MedicalCenterIdInputDto.cs
-
24src/Shentun.Peis.Application.Contracts/QueueRegisters/RoomQueueListDto.cs
-
16src/Shentun.Peis.Application.Contracts/Rooms/UpdateManySortRoomInputDto.cs
-
4src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs
-
25src/Shentun.Peis.Application/PrintReports/PrintReportAppService.cs
-
66src/Shentun.Peis.Application/QueueRegisters/QueueRegisterAppService.cs
-
28src/Shentun.Peis.Application/Rooms/RoomAppService.cs
-
15src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs
-
28src/Shentun.Peis.Domain.Shared/Enums/QueueRegisterCompleteFlag.cs
-
8src/Shentun.Peis.Domain/PatientRegisters/PatientRegister.cs
-
5src/Shentun.Peis.Domain/PrintReports/LisRequestReportDto.cs
-
2src/Shentun.Peis.Domain/QueueRegisters/QueueRegister.cs
-
2src/Shentun.Peis.Domain/RegisterCheckItems/RegisterCheckItem.cs
-
1src/Shentun.Peis.EntityFrameworkCore/DbMapping/PatientRegisters/PatientRegisterDbMapping.cs
-
15043src/Shentun.Peis.EntityFrameworkCore/Migrations/20240716110145_patient_register_add.Designer.cs
-
28src/Shentun.Peis.EntityFrameworkCore/Migrations/20240716110145_patient_register_add.cs
-
12src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs
@ -0,0 +1,11 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Shentun.Peis.QueueRegisters |
|||
{ |
|||
public class MedicalCenterIdInputDto |
|||
{ |
|||
public Guid MedicalCenterId { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Shentun.Peis.QueueRegisters |
|||
{ |
|||
public class RoomQueueListDto |
|||
{ |
|||
/// <summary>
|
|||
/// 科室名称
|
|||
/// </summary>
|
|||
public string ItemTypeName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 房间名称
|
|||
/// </summary>
|
|||
public string RoomName { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 候诊人数
|
|||
/// </summary>
|
|||
public int WaitCount { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Text; |
|||
|
|||
namespace Shentun.Peis.Rooms |
|||
{ |
|||
public class UpdateManySortRoomInputDto |
|||
{ |
|||
public Guid RoomId { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// 修改方式:1 置顶 2 置底
|
|||
/// </summary>
|
|||
public int SortType { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,66 @@ |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Shentun.Peis.Enums; |
|||
using Shentun.Peis.Models; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Services; |
|||
using Volo.Abp.Domain.Repositories; |
|||
|
|||
namespace Shentun.Peis.QueueRegisters |
|||
{ |
|||
/// <summary>
|
|||
/// 叫号排队
|
|||
/// </summary>
|
|||
[Authorize] |
|||
[ApiExplorerSettings(GroupName = "Work")] |
|||
public class QueueRegisterAppService : ApplicationService |
|||
{ |
|||
private readonly IRepository<QueueRegister, Guid> _queueRegisterRepository; |
|||
private readonly IRepository<Room, Guid> _roomRepository; |
|||
private readonly IRepository<ItemType, Guid> _itemTypeRepository; |
|||
public QueueRegisterAppService( |
|||
IRepository<QueueRegister, Guid> queueRegisterRepository, |
|||
IRepository<ItemType, Guid> itemTypeRepository, |
|||
IRepository<Room, Guid> roomRepository) |
|||
{ |
|||
_queueRegisterRepository = queueRegisterRepository; |
|||
_itemTypeRepository = itemTypeRepository; |
|||
_roomRepository = roomRepository; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取房间排队信息
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
[HttpPost("api/app/QueueRegister/GetRoomQueueList")] |
|||
public async Task<List<RoomQueueListDto>> GetRoomQueueListAsync(MedicalCenterIdInputDto input) |
|||
{ |
|||
if (input.MedicalCenterId == Guid.Empty) |
|||
throw new UserFriendlyException("体检中心不能为空"); |
|||
|
|||
var entListDto = (from room in await _roomRepository.GetQueryableAsync() |
|||
join queueRegister in (await _queueRegisterRepository.GetQueryableAsync()) |
|||
.Where(m => m.CompleteFlag == QueueRegisterCompleteFlag.Wait && m.CreationTime >= DateTime.Now.Date).AsQueryable() |
|||
on room.Id equals queueRegister.RoomId into queueRegisterTemp |
|||
from queueRegisterEmpty in queueRegisterTemp.DefaultIfEmpty() |
|||
join itemType in await _itemTypeRepository.GetQueryableAsync() |
|||
on room.ItemTypeId equals itemType.Id into itemTypeTemp |
|||
from itemTypeEmpty in itemTypeTemp.DefaultIfEmpty() |
|||
group new { room, itemTypeEmpty, queueRegisterEmpty } by room.Id into roomGroup |
|||
select new RoomQueueListDto |
|||
{ |
|||
ItemTypeName = roomGroup.FirstOrDefault().itemTypeEmpty != null ? roomGroup.FirstOrDefault().itemTypeEmpty.DisplayName : "", |
|||
RoomName = roomGroup.FirstOrDefault().room.DisplayName, |
|||
WaitCount = roomGroup.Count(c => c.queueRegisterEmpty != null) |
|||
}).ToList(); |
|||
|
|||
return entListDto; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.ComponentModel; |
|||
using System.Text; |
|||
|
|||
namespace Shentun.Peis.Enums |
|||
{ |
|||
public static class QueueRegisterCompleteFlag |
|||
{ |
|||
/// <summary>
|
|||
/// 候诊
|
|||
/// </summary>
|
|||
[Description("候诊")] |
|||
public const char Wait = '0'; |
|||
|
|||
/// <summary>
|
|||
/// 已呼
|
|||
/// </summary>
|
|||
[Description("已呼")] |
|||
public const char AlreadyCalled = '1'; |
|||
|
|||
/// <summary>
|
|||
/// 过号
|
|||
/// </summary>
|
|||
[Description("过号")] |
|||
public const char OverNumber = '2'; |
|||
} |
|||
} |
|||
15043
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240716110145_patient_register_add.Designer.cs
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,28 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Shentun.Peis.Migrations |
|||
{ |
|||
public partial class patient_register_add : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<char>( |
|||
name: "is_upload_appoint", |
|||
table: "patient_register", |
|||
type: "character(1)", |
|||
maxLength: 1, |
|||
nullable: false, |
|||
defaultValueSql: "'N'", |
|||
comment: "是否上传预约备单到WEB"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "is_upload_appoint", |
|||
table: "patient_register"); |
|||
} |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue