|
|
|
@ -46,6 +46,7 @@ using System.Security; |
|
|
|
using System.Security.Cryptography; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Transactions; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.Application.Dtos; |
|
|
|
using Volo.Abp.Application.Services; |
|
|
|
@ -882,9 +883,17 @@ namespace Shentun.Peis.PatientRegisters |
|
|
|
patientRegister, |
|
|
|
patient, |
|
|
|
patientRegisterExterHaveEmpty, |
|
|
|
registerCheckAsbitem, |
|
|
|
chargePayHaveEmpty, |
|
|
|
payModePayHaveEmpty |
|
|
|
registerCheckAsbitem = new |
|
|
|
{ |
|
|
|
registerCheckAsbitem.StandardPrice, |
|
|
|
registerCheckAsbitem.Amount, |
|
|
|
registerCheckAsbitem.ChargePrice, |
|
|
|
registerCheckAsbitem.IsCharge, |
|
|
|
}, |
|
|
|
payModePayHaveEmpty = new |
|
|
|
{ |
|
|
|
payModePayHaveEmpty.DisplayName |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
@ -964,11 +973,17 @@ namespace Shentun.Peis.PatientRegisters |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
//var ggg = entlist.ToList();
|
|
|
|
//var fff = entlist.ToQueryString();
|
|
|
|
|
|
|
|
var queryGroup = entlist.ToList().GroupBy(g => g.patientRegister); |
|
|
|
|
|
|
|
//gpt var queryGroup = entlist.GroupBy(g => g.patientRegister);
|
|
|
|
|
|
|
|
|
|
|
|
int totalCount = queryGroup.Count(); |
|
|
|
|
|
|
|
//gpt 按patientRegister分组,然后实现分页
|
|
|
|
|
|
|
|
var pagedGroups = queryGroup |
|
|
|
.OrderByDescending(g => g.Key.CompleteFlag) |
|
|
|
.ThenBy(g => g.Key.Id) |
|
|
|
@ -976,6 +991,8 @@ namespace Shentun.Peis.PatientRegisters |
|
|
|
.Take(input.MaxResultCount) |
|
|
|
.ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<GetPatientRegisterWithChargeDto> entListDto = new List<GetPatientRegisterWithChargeDto>(); |
|
|
|
|
|
|
|
foreach (var group in pagedGroups) |
|
|
|
@ -1066,9 +1083,10 @@ namespace Shentun.Peis.PatientRegisters |
|
|
|
}; |
|
|
|
entDto.StandardAmount = group.GroupBy(g => g.registerCheckAsbitem).Sum(s => s.Key.StandardPrice * s.Key.Amount); |
|
|
|
entDto.ReceivableAmount = group.GroupBy(g => g.registerCheckAsbitem).Sum(s => s.Key.ChargePrice * s.Key.Amount); |
|
|
|
if (group.Count(m => m.chargePayHaveEmpty != null) > 0) |
|
|
|
entDto.ChargeAmount = group.Where(m => m.registerCheckAsbitem.IsCharge == 'Y').GroupBy(g => g.registerCheckAsbitem).Sum(s => s.Key.ChargePrice * s.Key.Amount); |
|
|
|
if (group.Count(m => m.payModePayHaveEmpty != null) > 0) |
|
|
|
{ |
|
|
|
entDto.ChargeAmount = group.Where(m => m.chargePayHaveEmpty != null).GroupBy(g => g.chargePayHaveEmpty).Sum(s => s.Key.ChargeMoney); |
|
|
|
|
|
|
|
entDto.ChargePayMode = string.Join(",", group.Where(m => m.payModePayHaveEmpty != null).GroupBy(g => g.payModePayHaveEmpty).Select(s => s.Key.DisplayName)); |
|
|
|
} |
|
|
|
else |
|
|
|
@ -1088,6 +1106,9 @@ namespace Shentun.Peis.PatientRegisters |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 获取档案登记信息 根据档案号或者条码号(档案号条件返回最新的一条)
|
|
|
|
/// </summary>
|
|
|
|
|