Commit d1c925a1 authored by 黄奎's avatar 黄奎

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents 64def134 674a3f4c
...@@ -21,10 +21,16 @@ namespace Edu.Model.ViewModel.Course ...@@ -21,10 +21,16 @@ namespace Edu.Model.ViewModel.Course
/// 教师名称 /// 教师名称
/// </summary> /// </summary>
public string TeacherName { get; set; } public string TeacherName { get; set; }
/// <summary>
/// 时间段
/// </summary>
public string TimeBucket { get; set; }
/// <summary> /// <summary>
/// 班级名称 /// 班级名称
/// </summary> /// </summary>
public string ClassName { get; set; } public string ClassName { get; set; }
/// <summary> /// <summary>
/// 代课课时 /// 代课课时
/// </summary> /// </summary>
...@@ -39,5 +45,38 @@ namespace Edu.Model.ViewModel.Course ...@@ -39,5 +45,38 @@ namespace Edu.Model.ViewModel.Course
/// 奖金确认 1是 /// 奖金确认 1是
/// </summary> /// </summary>
public int Q_BonusConfirm { get; set; } public int Q_BonusConfirm { get; set; }
#region 报表统计
/// <summary>
/// 课程id
/// </summary>
public int CouseId { get; set; }
/// <summary>
/// 课程名称
/// </summary>
public string CourseName { get; set; }
/// <summary>
/// 课时数量
/// </summary>
public decimal KSNum { get; set; }
/// <summary>
/// 抵扣课时数量
/// </summary>
public decimal DKNum { get; set; }
/// <summary>
/// 小时
/// </summary>
public decimal Hours { get; set; }
/// <summary>
/// 小时课时费
/// </summary>
public decimal HourMoney { get; set; }
#endregion
} }
} }
\ No newline at end of file
...@@ -605,7 +605,7 @@ namespace Edu.Module.Course ...@@ -605,7 +605,7 @@ namespace Edu.Module.Course
List<int> TeacherIdList = blist.Select(x => x.TeacherId).Distinct().ToList(); List<int> TeacherIdList = blist.Select(x => x.TeacherId).Distinct().ToList();
foreach (var item in TeacherIdList) foreach (var item in TeacherIdList)
{ {
var qblist = blist.Where(x => x.TeacherId == item).OrderBy(x => x.UnitPrice).ThenBy(x => x.Date).ToList(); var qblist = blist.Where(x => x.TeacherId == item).OrderBy(x => x.Date).ThenBy(x => x.UnitPrice).ToList();
int BasicHours = configModel.BasicHours; int BasicHours = configModel.BasicHours;
foreach (var qitem in qblist) foreach (var qitem in qblist)
{ {
......
This diff is collapsed.
...@@ -455,12 +455,12 @@ ORDER BY p.ClassDate ASC ...@@ -455,12 +455,12 @@ ORDER BY p.ClassDate ASC
/// <param name="endMonth"></param> /// <param name="endMonth"></param>
/// <param name="group_Id"></param> /// <param name="group_Id"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Class_Check_ViewModel> GetTeacherConsumptionHoursDetialList(int teacherId, int schoolId, string startMonth, string endMonth, int group_Id) public List<RB_Class_Check_ViewModel> GetTeacherConsumptionHoursDetialList(string teacherIds, int schoolId, string startMonth, string endMonth, int group_Id)
{ {
string where = $@" "; string where = $@" ";
if (teacherId > 0) if (!string.IsNullOrEmpty(teacherIds))
{ {
where += $@" and p.TeacherId ={teacherId}"; where += $@" and p.TeacherId in({teacherIds})";
} }
if (schoolId >= 0) if (schoolId >= 0)
{ {
......
...@@ -1457,7 +1457,7 @@ namespace Edu.WebApi.Controllers.Finance ...@@ -1457,7 +1457,7 @@ namespace Edu.WebApi.Controllers.Finance
return ApiResult.Failed("日期格式有误"); return ApiResult.Failed("日期格式有误");
} }
var list = financeModule.GetTeacherConsumptionHoursStatistics(pageModel.PageIndex, pageModel.PageSize, out long count, TeacherId, SchoolId, StartMonth, EndMonth, userInfo.Group_Id); var list = financeModule.GetTeacherConsumptionHoursStatistics_V2(pageModel.PageIndex, pageModel.PageSize, out long count, TeacherId, SchoolId, StartMonth, EndMonth, userInfo.Group_Id);
pageModel.Count = Convert.ToInt32(count); pageModel.Count = Convert.ToInt32(count);
pageModel.PageData = list; pageModel.PageData = list;
return ApiResult.Success("", pageModel); return ApiResult.Success("", pageModel);
...@@ -1480,6 +1480,7 @@ namespace Edu.WebApi.Controllers.Finance ...@@ -1480,6 +1480,7 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value:"专职/兼职"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"专职/兼职"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"老师姓名"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"老师姓名"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"上课课时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"上课课时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"基础课时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"上课金额"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"上课金额"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"课时转换/小时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"课时转换/小时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"课时费"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER } new ExcelColumn(value:"课时费"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }
...@@ -1566,7 +1567,23 @@ namespace Edu.WebApi.Controllers.Finance ...@@ -1566,7 +1567,23 @@ namespace Edu.WebApi.Controllers.Finance
var list = financeModule.GetTeacherConsumptionHoursDetialPageList(pageModel.PageIndex, pageModel.PageSize, out long count, TeacherId, SchoolId, StartMonth, EndMonth, userInfo.Group_Id); var list = financeModule.GetTeacherConsumptionHoursDetialPageList(pageModel.PageIndex, pageModel.PageSize, out long count, TeacherId, SchoolId, StartMonth, EndMonth, userInfo.Group_Id);
pageModel.Count = Convert.ToInt32(count); pageModel.Count = Convert.ToInt32(count);
pageModel.PageData = list; pageModel.PageData = list.Select(x => new
{
Date = x.Date.ToString("yyyy-MM-dd"),
x.TimeBucket,
x.TeacherId,
x.TeacherName,
x.ClassId,
x.ClassName,
x.CouseId,
x.CourseName,
x.KSNum,
x.DKNum,
x.Hours,
x.HourMoney,
x.UnitPrice,
KSMoney = x.Money
});
return ApiResult.Success("", pageModel); return ApiResult.Success("", pageModel);
} }
...@@ -1587,7 +1604,9 @@ namespace Edu.WebApi.Controllers.Finance ...@@ -1587,7 +1604,9 @@ namespace Edu.WebApi.Controllers.Finance
new ExcelColumn(value:"班级"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"班级"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"课程"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"课程"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"老师名称"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"老师名称"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"课时单价"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"上课课时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"上课课时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"基础课时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"课时转换/小时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"课时转换/小时"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"课时费单价元/小时"){CellWidth=25,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"课时费单价元/小时"){CellWidth=25,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
new ExcelColumn(value:"老师课时费"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER }, new ExcelColumn(value:"老师课时费"){CellWidth=15,HAlignmentEnum= HAlignmentEnum.CENTER,VAlignmentEnum= VAlignmentEnum.CENTER },
......
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