Commit a64cd6ff authored by 黄奎's avatar 黄奎

也没修过

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