diff --git a/PEIS/Entity/EnrollmentFeeItem.cs b/PEIS/Entity/EnrollmentFeeItem.cs index 76fa518..f8d353a 100644 --- a/PEIS/Entity/EnrollmentFeeItem.cs +++ b/PEIS/Entity/EnrollmentFeeItem.cs @@ -55,6 +55,10 @@ namespace PEIS.Entity [RefFlag(true)] public Decimal? Discount { get; set; } + //总价 + [RefFlag(true)] + public Decimal? TotalPrice { get; set; } + //是否治疗费 [RefFlag(true)] public Boolean IsHide { get; set; } diff --git a/PEIS/Model/StatisticalReportModel.cs b/PEIS/Model/StatisticalReportModel.cs index 306320c..f0c677a 100644 --- a/PEIS/Model/StatisticalReportModel.cs +++ b/PEIS/Model/StatisticalReportModel.cs @@ -348,6 +348,7 @@ namespace PEIS.Model a.FeeItemName, a.Price, COUNT ( * ) AS Quantity, + CONVERT ( DECIMAL ( 18, 2 ), SUM ( a.Price )) AS TotalPrice, b.Discount, Convert(decimal(18,2),SUM ( a.Price ) * b.Discount / 10) AS Fee FROM @@ -369,6 +370,7 @@ namespace PEIS.Model a.FeeItemName, a.Price, COUNT ( * ) AS Quantity, + CONVERT ( DECIMAL ( 18, 2 ), SUM ( a.Price )) AS TotalPrice, b.Discount, Convert(decimal(18,2),SUM ( a.Price ) * b.Discount / 10) AS Fee FROM @@ -395,6 +397,7 @@ namespace PEIS.Model a.FeeItemName, a.Price, COUNT ( * ) AS Quantity, + CONVERT ( DECIMAL ( 18, 2 ), SUM ( a.Price )) AS TotalPrice, b.Discount, Convert(decimal(18,2),SUM ( a.Price ) * b.Discount / 10) AS Fee FROM @@ -416,6 +419,7 @@ namespace PEIS.Model a.FeeItemName, a.Price, COUNT ( * ) AS Quantity, + CONVERT ( DECIMAL ( 18, 2 ), SUM ( a.Price )) AS TotalPrice, b.Discount, Convert(decimal(18,2),SUM ( a.Price ) * b.Discount / 10) AS Fee FROM @@ -442,6 +446,7 @@ namespace PEIS.Model a.FeeItemName, a.Price, COUNT ( * ) AS Quantity, + CONVERT ( DECIMAL ( 18, 2 ), SUM ( a.Price )) AS TotalPrice, b.Discount, Convert(decimal(18,2),SUM ( a.Price ) * b.Discount / 10) AS Fee FROM @@ -463,6 +468,7 @@ namespace PEIS.Model a.FeeItemName, a.Price, COUNT ( * ) AS Quantity, + CONVERT ( DECIMAL ( 18, 2 ), SUM ( a.Price )) AS TotalPrice, b.Discount, Convert(decimal(18,2),SUM ( a.Price ) * b.Discount / 10) AS Fee FROM diff --git a/PEIS/ReportFiles/CostCount.frx b/PEIS/ReportFiles/CostCount.frx index 8c2eaa8..937c27e 100644 --- a/PEIS/ReportFiles/CostCount.frx +++ b/PEIS/ReportFiles/CostCount.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -20,8 +20,10 @@ namespace FastReport { public double itemTotal = 0; + public double itemFee = 0; public double itemPrice = 0; public double deptTotal= 0; + public double deptFee = 0; public double deptPrice = 0; public string deptName = "科室"; @@ -35,27 +37,33 @@ namespace FastReport if(deptName.Equals(rowData["DeptName"].ToString())) { deptTotal += Convert.ToDouble(rowData["Quantity"].ToString()); - deptPrice += Convert.ToDouble(rowData["Fee"].ToString()); + deptFee += Convert.ToDouble(rowData["Fee"].ToString()); + deptPrice += Convert.ToDouble(rowData["TotalPrice"].ToString()); Cell181.Text = deptTotal.ToString(); - Cell186.Text = deptPrice.ToString(); + Cell183.Text = deptPrice.ToString(); + Cell186.Text = deptFee.ToString(); }else{ if(deptName == "科室"){ deptTotal = Convert.ToDouble(rowData["Quantity"].ToString()); - deptPrice = Convert.ToDouble(rowData["Fee"].ToString()); + deptFee = Convert.ToDouble(rowData["Fee"].ToString()); + deptPrice = Convert.ToDouble(rowData["TotalPrice"].ToString()); Cell181.Text = deptTotal.ToString(); - Cell186.Text = deptPrice.ToString(); + Cell183.Text = deptPrice.ToString(); + Cell186.Text = deptFee.ToString(); }else{ deptTotal = Convert.ToDouble(rowData["Quantity"].ToString()); - deptPrice = Convert.ToDouble(rowData["Fee"].ToString()); + deptFee = Convert.ToDouble(rowData["Fee"].ToString()); + deptPrice = Convert.ToDouble(rowData["TotalPrice"].ToString()); Cell181.Text = deptTotal.ToString(); - Cell186.Text = deptPrice.ToString(); + Cell183.Text = deptPrice.ToString(); + Cell186.Text = deptFee.ToString(); } deptName = rowData["DeptName"].ToString(); @@ -67,27 +75,34 @@ namespace FastReport if(feeItem.Equals(rowData["FeeItemName"].ToString())) { itemTotal += Convert.ToDouble(rowData["Quantity"].ToString()); - itemPrice += Convert.ToDouble(rowData["Fee"].ToString()); + itemFee += Convert.ToDouble(rowData["Fee"].ToString()); + itemPrice += Convert.ToDouble(rowData["TotalPrice"].ToString()); - Cell172.Text = itemTotal.ToString(); - Cell177.Text = itemPrice.ToString(); + Cell212.Text = itemTotal.ToString(); + Cell218.Text = itemFee.ToString(); + Cell216.Text = itemPrice.ToString(); }else{ if(feeItem == "项目"){ itemTotal = Convert.ToDouble(rowData["Quantity"].ToString()); - itemPrice = Convert.ToDouble(rowData["Fee"].ToString()); + itemFee = Convert.ToDouble(rowData["Fee"].ToString()); + itemPrice = Convert.ToDouble(rowData["TotalPrice"].ToString()); - Cell172.Text = itemTotal.ToString(); - Cell177.Text = itemPrice.ToString(); + Cell212.Text = itemTotal.ToString(); + Cell218.Text = itemFee.ToString(); + Cell216.Text = itemPrice.ToString(); }else{ itemTotal = Convert.ToDouble(rowData["Quantity"].ToString()); - itemPrice = Convert.ToDouble(rowData["Fee"].ToString()); + itemFee = Convert.ToDouble(rowData["Fee"].ToString()); + itemPrice = Convert.ToDouble(rowData["TotalPrice"].ToString()); - Cell172.Text = itemTotal.ToString(); - Cell177.Text = itemPrice.ToString(); + Cell212.Text = itemTotal.ToString(); + Cell218.Text = itemFee.ToString(); + Cell216.Text = itemPrice.ToString(); + } feeItem = rowData["FeeItemName"].ToString(); @@ -102,10 +117,6 @@ namespace FastReport - - - - @@ -128,16 +139,17 @@ namespace FastReport - + - + - - + + + @@ -146,55 +158,60 @@ namespace FastReport - - + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -202,14 +219,14 @@ namespace FastReport - + - - + + diff --git a/PEIS/View/statistics/StatisticalReportForm.cs b/PEIS/View/statistics/StatisticalReportForm.cs index 6d12642..b26228e 100644 --- a/PEIS/View/statistics/StatisticalReportForm.cs +++ b/PEIS/View/statistics/StatisticalReportForm.cs @@ -168,10 +168,6 @@ namespace PEIS.View.Statistics break; case "CostCount": sReport.RegisterData(_eFeeItems, "p"); - sReport.SetParameterValue("TotalQuantity", _eFeeItems.Sum(s => s.Quantity)); - sReport.SetParameterValue("TotalSettlePrice", _eFeeItems.Sum(s => s.SettlePrice)); - sReport.SetParameterValue("TotalSettleFee", _eFeeItems.Sum(s => s.SettleFee)); - sReport.SetParameterValue("TotalPrice", _eFeeItems.Sum(s => s.Price)); sReport.SetParameterValue("TotalFee", _eFeeItems.Sum(s => s.Fee)); sReport.SetParameterValue("DeptName", (DeptComboBox.SelectedItem as User)?.DeptName); break;