Commit aca713f3 authored by 黄奎's avatar 黄奎

页面修改

parent 9a308c62
This diff is collapsed.
......@@ -127,43 +127,22 @@ namespace Edu.WebApi.Controllers.Duty
//当前班次
var currentModel = new RB_Duty_PlanDetails_ViewModel();
//上一个班次(交班)
var previousModel = new RB_Duty_PlanDetails_ViewModel();
var previousModel = new List<RB_Duty_PlanDetails_ViewModel>();
//下一个班次(接班)
var nextModel = new RB_Duty_PlanDetails_ViewModel();
//当前值班人员索引
int currentIndex = 0;
if (item.PlanDetails != null && item.PlanDetails.Count > 0)
{
currentIndex = dutyPlanModule.CalcCurrentDutyManIndexModule_V2(item);
//上一个班次索引
int previousIndex = currentIndex - 1;
//下一个班次索引
int nextIndex = currentIndex + 1;
var nextModel = new List<RB_Duty_PlanDetails_ViewModel>();
var dic = dutyPlanModule.CalcCurrentDutyManIndexModule_V3(item);
//当前班次
currentModel = item.PlanDetails[currentIndex];
//上一个班次
if (previousIndex >= 0)
{
previousModel = item.PlanDetails[previousIndex];
}
//下一个班次
if (nextIndex < item.PlanDetails.Count)
{
nextModel = item.PlanDetails[nextIndex];
}
}
currentModel = dic["current"].FirstOrDefault();
string jiaoBanMan = "";//交班人
string jieBanMan = "";//接班人
if (nextModel != null&&nextModel.Id>0)
if (dic["next"] != null&& dic["next"].Count>0)
{
jieBanMan = nextModel?.DutyManName ?? "";
jieBanMan = string.Join(",", dic["next"].Select(qitem => qitem.DutyManName));
}
if (previousModel!=null && previousModel.Id>0)
if (dic["previous"] != null && dic["previous"].Count>0)
{
jiaoBanMan = previousModel?.DutyManName ?? "";
jiaoBanMan = string.Join(",", dic["previous"].Select(qitem => qitem.DutyManName)); ;
}
if (currentModel.Status == Common.Enum.Duty.DutyStatusEnum.NoStart)
{
......
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