diff --git a/src/Shentun.WebPeis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterInputDto.cs b/src/Shentun.WebPeis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterInputDto.cs index 77b70b7..d643fc8 100644 --- a/src/Shentun.WebPeis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterInputDto.cs +++ b/src/Shentun.WebPeis.Application.Contracts/AppointPatientRegisters/AppointPatientRegisterInputDto.cs @@ -7,8 +7,8 @@ namespace Shentun.WebPeis.AppointPatientRegisters public class AppointPatientRegisterInputDto { public Guid? MedicalCenterId { get; set; } - public string IdNo { get; set; } - public string MobilePhone { get; set; } + public string? IdNo { get; set; } + public string? MobilePhone { get; set; } public DateTime? AppointStartDate { get; set; } public DateTime? AppointStopDate { get; set; } diff --git a/src/Shentun.WebPeis.Application.Contracts/AppointRegisterAsbitems/AppointRegisterAsbitemDto.cs b/src/Shentun.WebPeis.Application.Contracts/AppointRegisterAsbitems/AppointRegisterAsbitemDto.cs index 909b731..b9a209c 100644 --- a/src/Shentun.WebPeis.Application.Contracts/AppointRegisterAsbitems/AppointRegisterAsbitemDto.cs +++ b/src/Shentun.WebPeis.Application.Contracts/AppointRegisterAsbitems/AppointRegisterAsbitemDto.cs @@ -14,8 +14,19 @@ namespace Shentun.WebPeis.AppointRegisterAsbitems /// 组合项目ID /// public Guid AsbitemId { get; set; } + /// + /// 组合项目名称 + /// public string AsbitemName { get; set; } /// + /// 项目类别ID + /// + public Guid ItemTypeId { get; set; } + /// + /// 项目类别名称 + /// + public string ItemTypeName { get; set; } + /// /// 预约主档ID /// public Guid AppointPatientRegisterId { get; set; } @@ -41,5 +52,12 @@ namespace Shentun.WebPeis.AppointRegisterAsbitems public short Amount { get; set; } public char IsInMedicalPackage { get; set; } = 'N'; + /// + /// 项目类别顺序 + /// + + public int ItemTypeDisplayOrder { get; set; } + + public int DisplayOrder { get; set; } } } diff --git a/src/Shentun.WebPeis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs b/src/Shentun.WebPeis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs index 698a616..173a2e8 100644 --- a/src/Shentun.WebPeis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs +++ b/src/Shentun.WebPeis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs @@ -245,6 +245,8 @@ namespace Shentun.WebPeis.AppointPatientRegisters from appointRegisterAsbitem in await _appointRegisterAsbitemRepository.GetQueryableAsync() join asbitem in await _asbitemRepository.GetQueryableAsync() on appointRegisterAsbitem.AsbitemId equals asbitem.AsbitemId + join itemType in await _itemTypeRepository.GetQueryableAsync() + on asbitem.ItemTypeId equals itemType.ItemTypeId orderby appointPatientRegister.AppointDate where appointRegisterAsbitem.AppointPatientRegisterId == input.AppointPatientRegisterId select new AppointRegisterAsbitemDto() @@ -255,7 +257,11 @@ namespace Shentun.WebPeis.AppointPatientRegisters StandardPrice = appointRegisterAsbitem.StandardPrice, ChargePrice = appointRegisterAsbitem.ChargePrice, Amount = appointRegisterAsbitem.Amount, - IsCharge = appointRegisterAsbitem.IsCharge + IsCharge = appointRegisterAsbitem.IsCharge, + DisplayOrder = asbitem.DisplayOrder, + ItemTypeId = itemType.ItemTypeId, + ItemTypeName = itemType.ItemTypeName, + ItemTypeDisplayOrder = itemType.DisplayOrder, } ).ToList(); @@ -274,15 +280,20 @@ namespace Shentun.WebPeis.AppointPatientRegisters .Where(o => o.CustomerOrgGroupId == appointPatientRegister.CustomerOrgGroupId) .Select(x => x.AsbitemId).ToList(); } - + var itemTypes = await _itemTypeRepository.GetListAsync(); appointRegisterAsbitemDtos.ForEach(o => { if (asbitems.Where(x => x == o.AsbitemId).ToList().Any()) { o.IsInMedicalPackage = 'Y'; } + var itemType = itemTypes.Where(o => o.ItemTypeId == o.ItemTypeId).First(); + itemType = itemTypes.Where(o=>o.PathCode == itemType.PathCode.Substring(0,5)).First(); + o.ItemTypeId = itemType.ItemTypeId; + o.ItemTypeDisplayOrder = itemType.DisplayOrder; }); - + appointRegisterAsbitemDtos = appointRegisterAsbitemDtos.OrderBy(o=>o.ItemTypeDisplayOrder) + .OrderBy(o=>o.DisplayOrder).ToList(); return appointRegisterAsbitemDtos; } }