wxd 2 years ago
parent
commit
93f20b5bc2
  1. 10
      src/Shentun.Peis.Application/ChargeReports/ChargeReportAppService.cs

10
src/Shentun.Peis.Application/ChargeReports/ChargeReportAppService.cs

@ -1,6 +1,7 @@
using JetBrains.Annotations;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using NPOI.SS.Formula.Functions;
using Shentun.Peis.Charges;
using Shentun.Peis.Enums;
@ -489,7 +490,7 @@ namespace Shentun.Peis.ChargeReports
PatientNo = s.PatientNo,
SexName = s.SexName,
StandardPrice = DataHelper.DecimalRetainDecimals(s.f.StandardPrice * s.f.Amount, 2),
Discount = Math.Floor((s.b.ChargePrice * s.b.Amount) / (s.f.StandardPrice.Value * s.f.Amount.Value)) + "%"
Discount = s.f.StandardPrice.Value * s.f.Amount.Value == 0 ? "0%" : Math.Floor((s.b.ChargePrice * s.b.Amount) / (s.f.StandardPrice.Value * s.f.Amount.Value)) + "%"
}).ToList();
return patientRegisterGroup;
@ -562,7 +563,7 @@ namespace Shentun.Peis.ChargeReports
PatientNo = s.PatientNo,
SexName = s.SexName,
StandardPrice = DataHelper.DecimalRetainDecimals(s.f.StandardPrice * s.f.Amount, 2),
Discount = Math.Floor((s.b.ChargePrice * s.b.Amount) / (s.f.StandardPrice.Value * s.f.Amount.Value)) + "%"
Discount = s.f.StandardPrice.Value * s.f.Amount.Value==0 ? "0%": Math.Floor((s.b.ChargePrice * s.b.Amount) / (s.f.StandardPrice.Value * s.f.Amount.Value)) + "%"
}).ToList();
return patientRegisterGroup;
@ -613,7 +614,7 @@ namespace Shentun.Peis.ChargeReports
};
var ggg = query.ToQueryString();
if (input.UserIds.Any())
@ -637,6 +638,9 @@ namespace Shentun.Peis.ChargeReports
query = query.Where(m => m.PatientNo == input.PatientNo);
}
var ggggg = query.ToList();
var personalFeeDetailsReportInFeeSummary_Details = query.GroupBy(g => g.e.Id).Select(s => new GetPersonalFeeDetailsReportInFeeSummary_Detail
{
Age = s.FirstOrDefault().Age,

Loading…
Cancel
Save