Commit 2f083632 authored by liudong1993's avatar liudong1993

1 课时调整

parent 02b6f841
......@@ -527,6 +527,7 @@ namespace Edu.Module.Course
{
//上课课时
decimal KSNum = item.CurrentDeductionHours;//使用签到表的课时
if (item.ClassId == 18) { KSNum = 0; }//18班级暂不算课时
var typeModel = typeList.Where(x => x.CTypeId == item.ClassType).FirstOrDefault();
......
......@@ -2414,10 +2414,12 @@ namespace Edu.Module.Finance
{
foreach (var item in list)
{
int Minutes = (int)(Convert.ToDateTime("2021-06-29 " + item.EndDate) - Convert.ToDateTime("2021-06-29 " + item.StartDate)).TotalMinutes;
decimal Hours = Math.Round(Convert.ToDecimal(Minutes) / 60, 2, MidpointRounding.AwayFromZero);//小时
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
//if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
//上课课时
decimal KSNum = item.CurrentDeductionHours;//使用签到表的课时
if (item.ClassId == 18) { KSNum = 0; }//特殊班级处理
decimal Hours = Math.Round(KSNum * ClassHourMinute / 60, 2, MidpointRounding.AwayFromZero);//小时
var typeModel = cTypeList.Where(x => x.CTypeId == item.ClassType).FirstOrDefault();
......@@ -2425,8 +2427,6 @@ namespace Edu.Module.Finance
//课时费 需要每个班级 单独计算 因为 班级有附加费用
decimal KSMoney = KSNum * unitPrice;
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
decimal HourMoney = Math.Round(unitPrice / ClassHourMinute * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
DateList.Add(new RB_Teaching_BonusDetail_ViewModel
......@@ -2564,10 +2564,12 @@ namespace Edu.Module.Finance
{
foreach (var item in list)
{
int Minutes = (int)(Convert.ToDateTime("2021-06-29 " + item.EndDate) - Convert.ToDateTime("2021-06-29 " + item.StartDate)).TotalMinutes;
decimal Hours = Math.Round(Convert.ToDecimal(Minutes) / 60, 2, MidpointRounding.AwayFromZero);//小时
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
//if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
//上课课时
decimal KSNum = item.CurrentDeductionHours;//使用签到表课时
if (item.ClassId == 18) { KSNum = 0; }//特殊班级处理
decimal Hours = Math.Round(KSNum * ClassHourMinute / 60, 2, MidpointRounding.AwayFromZero);//小时
var typeModel = cTypeList.Where(x => x.CTypeId == item.ClassType).FirstOrDefault();
......@@ -2575,8 +2577,6 @@ namespace Edu.Module.Finance
//课时费 需要每个班级 单独计算 因为 班级有附加费用
decimal KSMoney = KSNum * unitPrice;
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
decimal HourMoney = Math.Round(unitPrice / ClassHourMinute * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
DateList.Add(new RB_Teaching_BonusDetail_ViewModel
......@@ -2740,10 +2740,12 @@ namespace Edu.Module.Finance
if (configModel == null || configModel.BasicHourFee <= 0 || configModel.BasicMinutes <= 0) { return RList; }
foreach (var item in list) {
int Minutes = (int)(Convert.ToDateTime("2021-06-29 " + item.EndDate) - Convert.ToDateTime("2021-06-29 " + item.StartDate)).TotalMinutes;
decimal Hours = Math.Round(Convert.ToDecimal(Minutes) / 60, 2, MidpointRounding.AwayFromZero);//小时
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
//if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
//上课课时
decimal KSNum = item.CurrentDeductionHours;//课时直接取这里的了, 这个可手动调整了;
if (item.ClassId == 18) { KSNum = 0; }//特殊班级处理
decimal Hours = Math.Round(KSNum * ClassHourMinute / 60, 2, MidpointRounding.AwayFromZero);//小时
var typeModel = cTypeList.Where(x => x.CTypeId == item.ClassType).FirstOrDefault();
......@@ -2751,8 +2753,6 @@ namespace Edu.Module.Finance
//课时费 需要每个班级 单独计算 因为 班级有附加费用
decimal KSMoney = KSNum * unitPrice;
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
decimal HourMoney = Math.Round(unitPrice / ClassHourMinute * 60, 2, MidpointRounding.AwayFromZero);//每小时课时费
......@@ -2857,10 +2857,12 @@ namespace Edu.Module.Finance
decimal TKSNum = 0, TDKNum = 0, THourMoney = 0, THours = 0, TKSMoney = 0;
foreach (var item in list)
{
int Minutes = (int)(Convert.ToDateTime("2021-06-29 " + item.EndDate) - Convert.ToDateTime("2021-06-29 " + item.StartDate)).TotalMinutes;
decimal Hours = Math.Round(Convert.ToDecimal(Minutes) / 60, 2, MidpointRounding.AwayFromZero);//小时
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
//if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
//上课课时
decimal KSNum = item.CurrentDeductionHours;
if (item.ClassId == 18) { KSNum = 0; }//特殊班级处理
decimal Hours = Math.Round(KSNum * ClassHourMinute / 60, 2, MidpointRounding.AwayFromZero);//小时
var typeModel = cTypeList.Where(x => x.CTypeId == item.ClassType).FirstOrDefault();
......@@ -2868,8 +2870,6 @@ namespace Edu.Module.Finance
//课时费 需要每个班级 单独计算 因为 班级有附加费用
decimal KSMoney = KSNum * unitPrice;
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
decimal HourMoney = Math.Round(unitPrice / ClassHourMinute * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
RList.Add(new RB_Teaching_BonusDetail_ViewModel
......
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