Commit 5fb5ada1 authored by 黄奎's avatar 黄奎

页面修改

parent 26544ba7
...@@ -105,6 +105,17 @@ namespace Edu.Model.ViewModel.Duty ...@@ -105,6 +105,17 @@ namespace Edu.Model.ViewModel.Duty
/// 出勤状态(1-迟到,2-早退,3-缺勤,4-正常) /// 出勤状态(1-迟到,2-早退,3-缺勤,4-正常)
/// </summary> /// </summary>
public int QAttendanceStatus { get; set; } public int QAttendanceStatus { get; set; }
/// <summary>
/// 配置班次上班时间
/// </summary>
public string ConfigStartTime { get; set; }
/// <summary>
/// 配置班次下班时间
/// </summary>
public string ConfigEndTime { get; set; }
} }
/// <summary> /// <summary>
......
...@@ -1390,13 +1390,17 @@ namespace Edu.Module.Course ...@@ -1390,13 +1390,17 @@ namespace Edu.Module.Course
{ {
List<object> time = new List<object>(); List<object> time = new List<object>();
var tempTimeList = timeList?.Where(qitem => qitem.ClassPlanId == item.ClassPlanId)?.OrderBy(qitem => qitem.StartTime)?.ToList(); var tempTimeList = timeList?.Where(qitem => qitem.ClassPlanId == item.ClassPlanId)?.OrderBy(qitem => qitem.StartTime)?.ToList();
int tempTotalNum = order_GuestRepository.GetGuestNum(new RB_Order_Guest_ViewModel() { ClassId = item.ClassId, GuestState = 1 });
int TotalNum = 0;
int NoCheckNum = 0;
if (tempTimeList != null && tempTimeList.Count > 0) if (tempTimeList != null && tempTimeList.Count > 0)
{ {
foreach (var subItem in tempTimeList) foreach (var subItem in tempTimeList)
{ {
int totalNum = checkLogList.Where(x => x.ClassTimeId == subItem.ClassTimeId).Count(); TotalNum += tempTotalNum;
var checkList = checkLogList.Where(x => x.CheckStatus == 0 && x.ClassTimeId == subItem.ClassTimeId).ToList(); var checkList = checkLogList.Where(x => x.CheckStatus == 0 && x.ClassTimeId == subItem.ClassTimeId).ToList();
var noCheckList = checkLogList.Where(x => x.CheckStatus == 1 && x.ClassTimeId == subItem.ClassTimeId).ToList(); var noCheckList = checkLogList.Where(x => x.CheckStatus == 1 && x.ClassTimeId == subItem.ClassTimeId).ToList();
NoCheckNum += noCheckList.Count();
var obj = new var obj = new
{ {
subItem.StartTime, subItem.StartTime,
...@@ -1405,7 +1409,6 @@ namespace Edu.Module.Course ...@@ -1405,7 +1409,6 @@ namespace Edu.Module.Course
CheckList = checkList.Select(qitem => new { qitem.GuestName }), CheckList = checkList.Select(qitem => new { qitem.GuestName }),
NoCheckNum = noCheckList.Count(), NoCheckNum = noCheckList.Count(),
NoCheckList = noCheckList.Select(qitem => new { qitem.GuestName }), NoCheckList = noCheckList.Select(qitem => new { qitem.GuestName }),
ColorType = item.TeacherId != item.Teacher_Id ? 1 : (totalNum == noCheckList.Count() ? 2 : 3),
}; };
time.Add(obj); time.Add(obj);
} }
...@@ -1413,6 +1416,7 @@ namespace Edu.Module.Course ...@@ -1413,6 +1416,7 @@ namespace Edu.Module.Course
var planCheckObj = new var planCheckObj = new
{ {
item.TeacherName, item.TeacherName,
ColorType = item.TeacherId != item.Teacher_Id ? 1 : (TotalNum == NoCheckNum ? 2 : 3),
IsAlternate = item.TeacherId == item.Teacher_Id ? 0 : 1,//是否代课老师 IsAlternate = item.TeacherId == item.Teacher_Id ? 0 : 1,//是否代课老师
MonthStr = item.ClassDate.ToString("MM"), MonthStr = item.ClassDate.ToString("MM"),
DayStr = item.ClassDate.ToString("dd"), DayStr = item.ClassDate.ToString("dd"),
......
...@@ -73,7 +73,6 @@ namespace Edu.Module.Duty ...@@ -73,7 +73,6 @@ namespace Edu.Module.Duty
List<RB_Duty_PlanDetails_ViewModel> planDetails = new List<RB_Duty_PlanDetails_ViewModel>(); List<RB_Duty_PlanDetails_ViewModel> planDetails = new List<RB_Duty_PlanDetails_ViewModel>();
if (!string.IsNullOrEmpty(ids)) if (!string.IsNullOrEmpty(ids))
{ {
//QDutyMan=query.QDutyMan
planDetails = GetDutyPlanDetailsListModule(new RB_Duty_PlanDetails_ViewModel() { QPlanIds = ids, QDutyStatus = query.QDutyStatus, QAttendanceStatus = query.QAttendanceStatus }, IsQueryDutyMan: true); planDetails = GetDutyPlanDetailsListModule(new RB_Duty_PlanDetails_ViewModel() { QPlanIds = ids, QDutyStatus = query.QDutyStatus, QAttendanceStatus = query.QAttendanceStatus }, IsQueryDutyMan: true);
} }
foreach (var item in list) foreach (var item in list)
...@@ -253,6 +252,14 @@ namespace Edu.Module.Duty ...@@ -253,6 +252,14 @@ namespace Edu.Module.Duty
var empModel = empList?.Where(qitem => qitem.Id == item.DutyMan)?.FirstOrDefault(); var empModel = empList?.Where(qitem => qitem.Id == item.DutyMan)?.FirstOrDefault();
item.DutyManName = empModel?.EmployeeName ?? ""; item.DutyManName = empModel?.EmployeeName ?? "";
item.DutyManIcon = empModel?.UserIcon ?? ""; item.DutyManIcon = empModel?.UserIcon ?? "";
if (string.IsNullOrEmpty(item.StartTime) && !string.IsNullOrEmpty(item.ConfigStartTime))
{
item.StartTime = item.ConfigStartTime;
}
if (string.IsNullOrEmpty(item.EndTime) && !string.IsNullOrEmpty(item.ConfigEndTime))
{
item.EndTime = item.ConfigEndTime;
}
} }
} }
return list; return list;
......
...@@ -21,7 +21,7 @@ namespace Edu.Repository.Duty ...@@ -21,7 +21,7 @@ namespace Edu.Repository.Duty
{ {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" builder.AppendFormat(@"
SELECT A.*,IFNULL(B.Name,'') AS ShiftName,IFNULL(B.StartTime,'') AS StartTime,IFNULL(B.EndTime,'') AS EndTime SELECT A.*,IFNULL(B.Name,'') AS ShiftName,IFNULL(B.StartTime,'') AS ConfigStartTime,IFNULL(B.EndTime,'') AS ConfigEndTime
FROM RB_Duty_PlanDetails AS A LEFT JOIN rb_duty_frequency AS B ON A.Shift=B.Id FROM RB_Duty_PlanDetails AS A LEFT JOIN rb_duty_frequency AS B ON A.Shift=B.Id
WHERE 1=1 WHERE 1=1
"); ");
......
...@@ -1219,7 +1219,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -1219,7 +1219,7 @@ namespace Edu.WebApi.Controllers.Course
DueInMoney = orderS?.DueInMoney ?? 0, DueInMoney = orderS?.DueInMoney ?? 0,
GuestNum = orderS?.GuestNum ?? 0, GuestNum = orderS?.GuestNum ?? 0,
CancelNum = orderS?.CancelNum ?? 0, CancelNum = orderS?.CancelNum ?? 0,
CommissionMoney = orderS?.CommissionMoney ?? 0, CommissionMoney = (orderS?.CommissionMoney ?? 0)>0?(orderS?.CommissionMoney ?? 0):0,
ExtraRewardMoney = orderS?.ExtraRewardMoney ?? 0 ExtraRewardMoney = orderS?.ExtraRewardMoney ?? 0
}, },
List = orderList?.Select(x => new List = orderList?.Select(x => new
......
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