Commit a64cd6ff authored by 黄奎's avatar 黄奎

也没修过

parent a7e1c459
......@@ -20,9 +20,15 @@ namespace Edu.Common.Enum.Duty
DutyIng = 1,
/// <summary>
/// 值班完成
/// 完成
/// </summary>
[EnumField("值班完成")]
[EnumField("完成")]
DutyFinished = 2,
/// <summary>
/// 未值班
/// </summary>
[EnumField("未值班")]
NoDuty = 3,
}
}
......@@ -58,35 +58,11 @@ namespace Edu.Model.ViewModel.Duty
{
get
{
string str = "未开始";
if (this.Status == 1)
{
str = "已打卡";
}
if (this.Status == 2)
{
str = "已交接";
}
return str;
return Common.Plugin.EnumHelper.ToName(this.Status);
}
}
/// <summary>
/// 值班状态(见枚举)
/// </summary>
public DutyStatusEnum DutyStatus { get; set; }
/// <summary>
/// 值班状态字符串
/// </summary>
public string DutyStatusStr
{
get
{
string str = Common.Plugin.EnumHelper.ToName(this.DutyStatus);
return str;
}
}
/// <summary>
/// 突发事件总数
......
This diff is collapsed.
......@@ -63,8 +63,7 @@ namespace Edu.WebApi.Controllers.Duty
PlanDate = Common.ConvertHelper.FormatDate(item.Date),
item.SchoolName,
item.School_Id,
item.DutyStatus,
item.DutyStatusStr,
PlanDetails = item?.PlanDetails?.Select(qitem => new
{
qitem.Id,
......@@ -75,8 +74,7 @@ namespace Edu.WebApi.Controllers.Duty
qitem.EndTime,
qitem.Shift,
qitem.ShiftName,
qitem.DutyStatus,
qitem.DutyStatusStr,
qitem.Status,
qitem.CheckTimeStr,
qitem.FinishTimeStr,
......@@ -144,6 +142,7 @@ namespace Edu.WebApi.Controllers.Duty
nextModel = item.PlanDetails[nextIndex];
}
}
string jiaoBanMan = "";//交班人
string jieBanMan = "";//接班人
if (nextModel != null&&nextModel.Id>0)
......@@ -155,6 +154,10 @@ namespace Edu.WebApi.Controllers.Duty
{
jiaoBanMan = previousModel?.DutyManName ?? "";
}
if (currentModel.Status == Common.Enum.Duty.DutyStatusEnum.NoStart)
{
currentModel.Status= dutyPlanModule.CalcDutyPlanStatusModule(item.Date, currentModel.StartTime, currentModel.EndTime);
}
result.Add(new
{
item.Id,
......@@ -165,17 +168,19 @@ namespace Edu.WebApi.Controllers.Duty
currentModel.StartTime,
currentModel.EndTime,
PlanList = currentModel?.WorkContentList ?? new List<RB_Duty_PlanWork_ViewModel>(),
currentModel.CheckLateTime,
currentModel.FinishLateTime,
currentModel.BurstCount,
currentModel.HandoverCount,
ReciveMan= jieBanMan,
GiveMan= jiaoBanMan,
item.CreateByName,
currentModel.DutyStatus,
currentModel.DutyStatusStr,
currentModel.Status,
currentModel.StatusStr,
item.TotalBurstCount,
item.TotalHandoverCount,
currentModel.CheckTimeStr,
currentModel.CheckLateTime,
currentModel.FinishTimeStr,
currentModel.FinishLateTime,
});
}
pageModel.Count = rowsCount;
......
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