Commit 9805c8b7 authored by 黄奎's avatar 黄奎

页面修改

parent 4e89a539
......@@ -1546,6 +1546,20 @@ namespace Edu.WebApi.Controllers.Finance
StatusName = "驳回";
}
var FinanceList = item.FinanceList.Where(x => x.Type == WFTempLateClassEnum.IN).ToList();
decimal unitHourPrice = 0;
decimal usePrice = 0;
if (item.TotalClassHours > 0)
{
unitHourPrice = Math.Round(item.TotalCourseFee / item.TotalClassHours, 2);
usePrice = Math.Round(Convert.ToDecimal(item.UseClassHours) / item.TotalClassHours * 100, 2);
}
decimal total = 0;
if (item.Unit_Price > 0)
{
total= Math.Round((item.Income - item.Expend) / item.Unit_Price, 2);
}
if (FinanceList.Any())
{
int Num = 0;
......@@ -1570,7 +1584,7 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value: item.StudentName){ Rowspan = Count },
new ExcelColumn(value: item.CreateByName){ Rowspan = Count },
new ExcelColumn(value: item.TotalClassHours.ToString()){ Rowspan = Count },
new ExcelColumn(value: (item.TotalClassHours > 0 ? Math.Round(item.TotalCourseFee / item.TotalClassHours, 2, MidpointRounding.AwayFromZero) : 0).ToString()){ Rowspan = Count },
new ExcelColumn(value: unitHourPrice.ToString()){ Rowspan = Count },
new ExcelColumn(value: item.TotalCourseFee.ToString()){ Rowspan = Count },
new ExcelColumn(value: item.TotalBookFee.ToString()){ Rowspan = Count },
new ExcelColumn(value: item.TotalClassFee.ToString()){ Rowspan = Count },
......@@ -1583,10 +1597,10 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value: bankModel != null ? bankModel.Alias + bankModel.BankNo : ""){ },
new ExcelColumn(value: PreferPrice.ToString()){ Rowspan = Count },
new ExcelColumn(value: item.Income.ToString()){ Rowspan = Count },
new ExcelColumn(value: Math.Round((item.Income - item.Expend) / item.Unit_Price,2,MidpointRounding.AwayFromZero).ToString()){ Rowspan = Count },
new ExcelColumn(value:total.ToString() ){ Rowspan = Count },
new ExcelColumn(value: item.UseBookFee.ToString("0.######")){ Rowspan = Count },
new ExcelColumn(value: item.UseCoursewareFee.ToString("0.######")){ Rowspan = Count },
new ExcelColumn(value: (item.TotalClassHours > 0 ? Math.Round(Convert.ToDecimal(item.UseClassHours) / item.TotalClassHours * 100, 2, MidpointRounding.AwayFromZero) : 0).ToString() + "%"){ Rowspan = Count },
new ExcelColumn(value: (usePrice).ToString() + "%"){ Rowspan = Count },
new ExcelColumn(value: item.UseClassHours.ToString()){ Rowspan = Count },
new ExcelColumn(value: item.Unit_Price.ToString("0.######")){ Rowspan = Count },
new ExcelColumn(value: item.UseCourseFee.ToString("0.######")){ Rowspan = Count },
......@@ -1647,6 +1661,12 @@ namespace Edu.WebApi.Controllers.Finance
}
else
{
decimal unitPrice = 0;
if (item.Unit_Price > 0)
{
unitPrice=Math.Round(item.Income / item.Unit_Price, 2);
}
ExcelDataSource firstRow = new ExcelDataSource(30)
{
ExcelRows = new List<ExcelColumn>()
......@@ -1661,7 +1681,7 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value: item.StudentName){ },
new ExcelColumn(value: item.CreateByName){ },
new ExcelColumn(value: item.TotalClassHours.ToString()){ },
new ExcelColumn(value: (item.TotalClassHours > 0 ? Math.Round(item.TotalCourseFee / item.TotalClassHours, 2, MidpointRounding.AwayFromZero) : 0).ToString()){ },
new ExcelColumn(value: unitHourPrice.ToString()){ },
new ExcelColumn(value: item.TotalCourseFee.ToString()){ },
new ExcelColumn(value: item.TotalBookFee.ToString()){ },
new ExcelColumn(value: item.TotalClassFee.ToString()){ },
......@@ -1674,10 +1694,10 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value: ""){ },
new ExcelColumn(value: "0"){ },
new ExcelColumn(value: item.Income.ToString()){ },
new ExcelColumn(value: Math.Round(item.Income / item.Unit_Price,2,MidpointRounding.AwayFromZero).ToString()){ },
new ExcelColumn(value: unitPrice.ToString()){ },
new ExcelColumn(value: item.UseBookFee.ToString("0.######")){ },
new ExcelColumn(value: item.UseCoursewareFee.ToString("0.######")){ },
new ExcelColumn(value: (item.TotalClassHours > 0 ? Math.Round(Convert.ToDecimal(item.UseClassHours) / item.TotalClassHours * 100, 2, MidpointRounding.AwayFromZero) : 0).ToString() + "%"){ },
new ExcelColumn(value: usePrice.ToString() + "%"){ },
new ExcelColumn(value: item.UseClassHours.ToString()){ },
new ExcelColumn(value: item.Unit_Price.ToString("0.######")){ },
new ExcelColumn(value: item.UseCourseFee.ToString("0.######")){ },
......
......@@ -235,7 +235,7 @@ namespace Edu.WebApi.Timers
if (Interlocked.Exchange(ref marketconsultant_Timer, 1) == 0)
{
var today = DateTime.Now;
if (today.Hour > 8 && today.Hour < 10)
if (today.Hour >= 8 && today.Hour <= 10)
{
var currentDate = Common.ConvertHelper.FormatDate(today);
string cacheData = redis.Get(createMarkDataKey);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment