Commit 5d91009b authored by liudong1993's avatar liudong1993

1

parent ddece21f
......@@ -1099,7 +1099,7 @@ namespace Edu.WebApi.Controllers.Finance
})
}),
PreferPrice = x.FinanceList.Where(t => t.Type == WFTempLateClassEnum.IN)?.Sum(x => (x.Money ?? 0) + (x.Fee ?? 0)) ?? 0,
EffectiveClassHours = x.Unit_Price > 0 ? Math.Round(x.Income / x.Unit_Price, 2, MidpointRounding.AwayFromZero) : 0,
EffectiveClassHours = x.Unit_Price > 0 ? Math.Round((x.Income - x.Expend) / x.Unit_Price, 2, MidpointRounding.AwayFromZero) : 0,
x.Income,
x.Expend,
x.UseBookFee,
......@@ -1110,7 +1110,7 @@ namespace Edu.WebApi.Controllers.Finance
x.UseCourseFee,
x.AdjustPrice,
SurplusCourseHours = x.TotalClassHours - x.UseClassHours,
SurplusMoney = x.Income - x.UseBookFee - x.UseCoursewareFee - x.UseCourseFee - x.AdjustPrice
SurplusMoney = x.Income - x.Expend - x.UseBookFee - x.UseCoursewareFee - x.UseCourseFee - x.AdjustPrice
});
return ApiResult.Success("", pageModel);
}
......@@ -1241,7 +1241,7 @@ 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.Unit_Price,2,MidpointRounding.AwayFromZero).ToString()){ Rowspan = Count },
new ExcelColumn(value: Math.Round((item.Income - item.Expend) / item.Unit_Price,2,MidpointRounding.AwayFromZero).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 },
......@@ -1251,7 +1251,7 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value: item.Expend.ToString()){ Rowspan = Count },
new ExcelColumn(value: item.AdjustPrice.ToString("0.######")){ Rowspan = Count },
new ExcelColumn(value: (item.TotalClassHours - item.UseClassHours).ToString()){ Rowspan = Count },
new ExcelColumn(value: (item.Income - item.UseBookFee - item.UseCoursewareFee - item.UseCourseFee - item.AdjustPrice).ToString("0.######")){ Rowspan = Count },
new ExcelColumn(value: (item.Income - item.Expend - item.UseBookFee - item.UseCoursewareFee - item.UseCourseFee - item.AdjustPrice).ToString("0.######")){ Rowspan = Count },
}
};
slist.Add(firstRow);
......
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