diff --git a/PEIS/App.config b/PEIS/App.config
index e1a080b..e35a23d 100644
--- a/PEIS/App.config
+++ b/PEIS/App.config
@@ -15,9 +15,9 @@
-
+
-
+
diff --git a/PEIS/PEIS.csproj b/PEIS/PEIS.csproj
index 4249c07..df43b45 100644
--- a/PEIS/PEIS.csproj
+++ b/PEIS/PEIS.csproj
@@ -699,9 +699,6 @@
Always
-
- Always
-
diff --git a/PEIS/ReportFiles/CostCount.frx b/PEIS/ReportFiles/CostCount.frx
index 933b944..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");
-// if(deptName.Equals(rowData["DeptName"].ToString()))
-// {
-// deptSum += Convert.ToDouble(rowData["SettleFee"].ToString());
-// deptHisSum += Convert.ToDouble(rowData["Fee"].ToString());
-//
-// Cell38.Text = deptSum.ToString();
-// Cell50.Text = deptHisSum.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();
-//
-// }else{
-//
-// deptSum = Convert.ToDouble(rowData["SettleFee"].ToString());
-// deptHisSum = Convert.ToDouble(rowData["Fee"].ToString());
-//
-// Cell38.Text = deptSum.ToString();
-// Cell50.Text = deptHisSum.ToString();
-// }
-//
-// deptName = rowData["DeptName"].ToString();
-// }
+ #region 科室
+ if(deptName.Equals(rowData["DeptName"].ToString()))
+ {
+ deptTotal += Convert.ToDouble(rowData["Quantity"].ToString());
+ deptPrice += Convert.ToDouble(rowData["Fee"].ToString());
+
+ Cell181.Text = deptTotal.ToString();
+ Cell186.Text = deptPrice.ToString();
+ }else{
+
+ if(deptName == "科室"){
+
+ deptTotal = Convert.ToDouble(rowData["Quantity"].ToString());
+ deptPrice = Convert.ToDouble(rowData["Fee"].ToString());
+
+ Cell181.Text = deptTotal.ToString();
+ Cell186.Text = deptPrice.ToString();
+
+ }else{
+
+ 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
}
}
}
@@ -83,7 +118,7 @@ namespace FastReport
-
+
@@ -92,7 +127,7 @@ namespace FastReport
-
+
@@ -115,7 +150,7 @@ namespace FastReport
-
+
@@ -139,7 +174,7 @@ namespace FastReport
-
+
@@ -156,7 +191,7 @@ namespace FastReport
-
+
@@ -164,7 +199,7 @@ namespace FastReport
-
+
@@ -188,7 +223,7 @@ namespace FastReport
-
+
@@ -213,7 +248,7 @@ namespace FastReport
-
+