Commit 866eadd6 authored by liudong1993's avatar liudong1993

课耗统计 班级课时分钟

parent 674a3f4c
......@@ -117,6 +117,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public decimal BaseHourFee { get; set; }
/// <summary>
/// 班级课时分钟数
/// </summary>
public int ClassHourMinute { get; set; }
/// <summary>
/// 合同编号
/// </summary>
......
......@@ -2401,7 +2401,9 @@ namespace Edu.Module.Finance
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 KSNum = Math.Round(Convert.ToDecimal(Minutes) / configModel.BasicMinutes, 2, MidpointRounding.AwayFromZero); // 未达到一课时时间 算不算一课时
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
decimal KSNum = Math.Round(Convert.ToDecimal(Minutes) / ClassHourMinute, 2, MidpointRounding.AwayFromZero); // 未达到一课时时间 算不算一课时
var typeModel = cTypeList.Where(x => x.CTypeId == item.ClassType).FirstOrDefault();
......@@ -2409,7 +2411,7 @@ namespace Edu.Module.Finance
//课时费 需要每个班级 单独计算 因为 班级有附加费用
decimal KSMoney = KSNum * unitPrice;
decimal HourMoney = Math.Round(unitPrice / configModel.BasicMinutes * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
decimal HourMoney = Math.Round(unitPrice / ClassHourMinute * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
DateList.Add(new RB_Teaching_BonusDetail_ViewModel
{
......@@ -2549,7 +2551,9 @@ namespace Edu.Module.Finance
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 KSNum = Math.Round(Convert.ToDecimal(Minutes) / configModel.BasicMinutes, 2, MidpointRounding.AwayFromZero); // 未达到一课时时间 算不算一课时
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
decimal KSNum = Math.Round(Convert.ToDecimal(Minutes) / ClassHourMinute, 2, MidpointRounding.AwayFromZero); // 未达到一课时时间 算不算一课时
var typeModel = cTypeList.Where(x => x.CTypeId == item.ClassType).FirstOrDefault();
......@@ -2557,7 +2561,7 @@ namespace Edu.Module.Finance
//课时费 需要每个班级 单独计算 因为 班级有附加费用
decimal KSMoney = KSNum * unitPrice;
decimal HourMoney = Math.Round(unitPrice / configModel.BasicMinutes * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
decimal HourMoney = Math.Round(unitPrice / ClassHourMinute * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
DateList.Add(new RB_Teaching_BonusDetail_ViewModel
{
......@@ -2725,7 +2729,9 @@ namespace Edu.Module.Finance
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 KSNum = Math.Round(Convert.ToDecimal(Minutes) / configModel.BasicMinutes, 2, MidpointRounding.AwayFromZero); // 未达到一课时时间 算不算一课时
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
decimal KSNum = Math.Round(Convert.ToDecimal(Minutes) / ClassHourMinute, 2, MidpointRounding.AwayFromZero); // 未达到一课时时间 算不算一课时
var typeModel = cTypeList.Where(x => x.CTypeId == item.ClassType).FirstOrDefault();
......@@ -2733,7 +2739,7 @@ namespace Edu.Module.Finance
//课时费 需要每个班级 单独计算 因为 班级有附加费用
decimal KSMoney = KSNum * unitPrice;
decimal HourMoney = Math.Round(unitPrice / configModel.BasicMinutes * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
decimal HourMoney = Math.Round(unitPrice / ClassHourMinute * 60, 2, MidpointRounding.AwayFromZero);//每小时课时费
RList.Add(new RB_Teaching_BonusDetail_ViewModel
......@@ -2823,7 +2829,9 @@ namespace Edu.Module.Finance
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 KSNum = Math.Round(Convert.ToDecimal(Minutes) / configModel.BasicMinutes, 2, MidpointRounding.AwayFromZero); // 未达到一课时时间 算不算一课时
decimal ClassHourMinute = configModel.BasicMinutes;//课时分钟数
if (item.ClassHourMinute > 0) { ClassHourMinute = item.ClassHourMinute; }
decimal KSNum = Math.Round(Convert.ToDecimal(Minutes) / ClassHourMinute, 2, MidpointRounding.AwayFromZero); // 未达到一课时时间 算不算一课时
var typeModel = cTypeList.Where(x => x.CTypeId == item.ClassType).FirstOrDefault();
......@@ -2831,7 +2839,7 @@ namespace Edu.Module.Finance
//课时费 需要每个班级 单独计算 因为 班级有附加费用
decimal KSMoney = KSNum * unitPrice;
decimal HourMoney = Math.Round(unitPrice / configModel.BasicMinutes * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
decimal HourMoney = Math.Round(unitPrice / ClassHourMinute * 60, 2, MidpointRounding.AwayFromZero);//没小时课时费
RList.Add(new RB_Teaching_BonusDetail_ViewModel
{
......
......@@ -434,7 +434,7 @@ GROUP BY tt.TeacherId,tt.OrderGuestId
}
string sql = $@"
SELECT p.TeacherId,t2.TeacherName,t2.BaseHourFee,c.ClassName,co.CourseName,p.ClassId,c.ClassType,c.CouseId,p.ClassDate,p.ClassTimeId,t.StartTime as StartDate,t.EndTime as EndDate FROM rb_class_check p
SELECT p.TeacherId,t2.TeacherName,t2.BaseHourFee,c.ClassName,co.CourseName,p.ClassId,c.ClassType,c.ClassHourMinute,c.CouseId,p.ClassDate,p.ClassTimeId,t.StartTime as StartDate,t.EndTime as EndDate FROM rb_class_check p
INNER JOIN rb_class_time t on p.ClassTimeId = t.ClassTimeId
LEFT JOIN rb_teacher t2 on p.TeacherId = t2.TId
LEFT JOIN rb_class c on p.ClassId = c.ClassId
......@@ -468,7 +468,7 @@ ORDER BY p.ClassDate ASC
}
string sql = $@"
SELECT p.TeacherId,t2.TeacherName,t2.BaseHourFee,c.ClassName,co.CourseName,p.ClassId,c.ClassType,c.CouseId,p.ClassDate,p.ClassTimeId,t.StartTime as StartDate,t.EndTime as EndDate FROM rb_class_check p
SELECT p.TeacherId,t2.TeacherName,t2.BaseHourFee,c.ClassName,co.CourseName,p.ClassId,c.ClassType,c.ClassHourMinute,c.CouseId,p.ClassDate,p.ClassTimeId,t.StartTime as StartDate,t.EndTime as EndDate FROM rb_class_check p
INNER JOIN rb_class_time t on p.ClassTimeId = t.ClassTimeId
LEFT JOIN rb_teacher t2 on p.TeacherId = t2.TId
LEFT JOIN rb_class c on p.ClassId = c.ClassId
......
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