From 2690104bb08a8acec979d3b243c22dfad7671ec6 Mon Sep 17 00:00:00 2001 From: lsm Date: Fri, 26 Jul 2024 15:19:16 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=B4=B9=E7=94=A8=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PEIS/ReportFiles/CostCount.frx | 293 ++++++++++++++++++++------------- 1 file changed, 183 insertions(+), 110 deletions(-) diff --git a/PEIS/ReportFiles/CostCount.frx b/PEIS/ReportFiles/CostCount.frx index f18f61a..8c2eaa8 100644 --- a/PEIS/ReportFiles/CostCount.frx +++ b/PEIS/ReportFiles/CostCount.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -19,45 +19,80 @@ namespace FastReport public class ReportScript { - public double totalSum = 0; - public double totalHisSum = 0; - public double deptSum = 0; - public double deptHisSum = 0; + public double itemTotal = 0; + public double itemPrice = 0; + public double deptTotal= 0; + public double deptPrice = 0; public string deptName = "科室"; + public string feeItem = "项目"; private void CostCount_AfterData(object sender, EventArgs e) { DataSourceBase rowData = Report.GetDataSource("P"); + #region 科室 if(deptName.Equals(rowData["DeptName"].ToString())) { - deptSum += Convert.ToDouble(rowData["SettleFee"].ToString()); - deptHisSum += Convert.ToDouble(rowData["Fee"].ToString()); + deptTotal += Convert.ToDouble(rowData["Quantity"].ToString()); + deptPrice += Convert.ToDouble(rowData["Fee"].ToString()); - Cell38.Text = deptSum.ToString(); - Cell50.Text = deptHisSum.ToString(); + Cell181.Text = deptTotal.ToString(); + Cell186.Text = deptPrice.ToString(); }else{ if(deptName == "科室"){ - deptSum = Convert.ToDouble(rowData["SettleFee"].ToString()); - deptHisSum = Convert.ToDouble(rowData["Fee"].ToString()); - - Cell38.Text = rowData["SettleFee"].ToString(); - Cell50.Text = rowData["Fee"].ToString(); + deptTotal = Convert.ToDouble(rowData["Quantity"].ToString()); + deptPrice = Convert.ToDouble(rowData["Fee"].ToString()); + + Cell181.Text = deptTotal.ToString(); + Cell186.Text = deptPrice.ToString(); }else{ - deptSum = Convert.ToDouble(rowData["SettleFee"].ToString()); - deptHisSum = Convert.ToDouble(rowData["Fee"].ToString()); - - Cell38.Text = deptSum.ToString(); - Cell50.Text = deptHisSum.ToString(); + deptTotal = Convert.ToDouble(rowData["Quantity"].ToString()); + deptPrice = Convert.ToDouble(rowData["Fee"].ToString()); + + Cell181.Text = deptTotal.ToString(); + Cell186.Text = deptPrice.ToString(); } deptName = rowData["DeptName"].ToString(); } + #endregion + + #region 项目 + + if(feeItem.Equals(rowData["FeeItemName"].ToString())) + { + itemTotal += Convert.ToDouble(rowData["Quantity"].ToString()); + itemPrice += Convert.ToDouble(rowData["Fee"].ToString()); + + Cell172.Text = itemTotal.ToString(); + Cell177.Text = itemPrice.ToString(); + }else{ + + if(feeItem == "项目"){ + + itemTotal = Convert.ToDouble(rowData["Quantity"].ToString()); + itemPrice = Convert.ToDouble(rowData["Fee"].ToString()); + + Cell172.Text = itemTotal.ToString(); + Cell177.Text = itemPrice.ToString(); + + }else{ + + itemTotal = Convert.ToDouble(rowData["Quantity"].ToString()); + itemPrice = Convert.ToDouble(rowData["Fee"].ToString()); + + Cell172.Text = itemTotal.ToString(); + Cell177.Text = itemPrice.ToString(); + } + + feeItem = rowData["FeeItemName"].ToString(); + } + #endregion } } } @@ -73,110 +108,148 @@ namespace FastReport - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - + +