Commit 58b29509 authored by 黄奎's avatar 黄奎

页面修改

parent a5ffe5da
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Edu.Model.Entity.Duty
......@@ -33,7 +31,6 @@ namespace Edu.Model.Entity.Duty
/// </summary>
public string MachineCode { get; set; }
/// <summary>
/// 创建人
/// </summary>
......@@ -49,7 +46,6 @@ namespace Edu.Model.Entity.Duty
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
......@@ -65,6 +61,14 @@ namespace Edu.Model.Entity.Duty
/// </summary>
public int School_Id { get; set; }
/// <summary>
/// 删除状态
/// </summary>
public int Status { get; set; }
/// <summary>
/// 突发事件抄送人员
/// </summary>
public string SendEmployeeIds { get; set; }
}
}
......@@ -353,7 +353,7 @@ namespace Edu.Module.Duty
WorkList = pList,
//突发事项列表
EmergenciesList = contentList?.Where(qitem => qitem.PlanType == 3)?.ToList() ?? new List<RB_Duty_Content_ViewModel>(),
//交接事项列表
//交接事项
HandoverList = contentList?.Where(qitem => qitem.PlanType == 2)?.ToList() ?? new List<RB_Duty_Content_ViewModel>(),
ReciveMan = nextModel?.DutyManName ?? "",
GiveMan = previousModel?.DutyManName ?? "",
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Linq;
using Edu.Cache.User;
using Edu.Common.API;
using Edu.Common.Plugin;
......@@ -10,7 +7,6 @@ using Edu.Module.Duty;
using Edu.Module.User;
using Edu.WebApi.Filter;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Edu.WebApi.Controllers.Duty
......@@ -21,7 +17,14 @@ namespace Edu.WebApi.Controllers.Duty
[EnableCors("AllowCors")]
public class DutyController : BaseController
{
/// <summary>
/// 值班配置处理类对象
/// </summary>
public readonly DutyModule dutyModule = new DutyModule();
/// <summary>
/// 校区处理类对象
/// </summary>
public readonly SchoolModule schoolModule = new SchoolModule();
#region 班次管理
......@@ -35,11 +38,9 @@ namespace Edu.WebApi.Controllers.Duty
{
var query = new RB_Duty_Frequency_ViewModel()
{
Group_Id = base.UserInfo.Group_Id,
};
var list = dutyModule.GetDutyFrequencyRepository(query);
var list = dutyModule.GetDutyFrequencyModule(query);
foreach (var item in list)
{
if (item.CreateBy > 0)
......@@ -61,7 +62,6 @@ namespace Edu.WebApi.Controllers.Duty
{
var query = new RB_Duty_Frequency_ViewModel()
{
Group_Id = base.UserInfo.Group_Id,
Id = base.ParmJObj.GetInt("Id"),
};
......@@ -69,7 +69,7 @@ namespace Edu.WebApi.Controllers.Duty
{
return ApiResult.Failed("请传入班次Id");
}
var model = dutyModule.GetDutyFrequencyRepository(query).FirstOrDefault();
var model = dutyModule.GetDutyFrequencyModule(query).FirstOrDefault();
if (model == null || model.Id <= 0)
{
return ApiResult.Failed("数据不存在");
......@@ -82,8 +82,6 @@ namespace Edu.WebApi.Controllers.Duty
return ApiResult.Success(data: model);
}
/// <summary>
/// 获取班次列表
/// </summary>
......@@ -123,14 +121,10 @@ namespace Edu.WebApi.Controllers.Duty
}
query.UpdateBy = base.UserInfo.Id;
query.UpdateTime = System.DateTime.Now;
bool retult = dutyModule.SetFrequencyModel(query);
bool retult = dutyModule.SetFrequencyModule(query);
return retult ? ApiResult.Success("新增/修改班次成功") : ApiResult.Failed("新增/修改班次失败");
}
/// <summary>
/// 删除班次
/// </summary>
......@@ -155,10 +149,8 @@ namespace Edu.WebApi.Controllers.Duty
{
var query = new RB_Duty_Item_ViewModel()
{
Group_Id = base.UserInfo.Group_Id,
};
var list = dutyModule.GetDutyItemRepository(query);
foreach (var item in list)
{
......@@ -316,8 +308,6 @@ namespace Edu.WebApi.Controllers.Duty
#endregion
#region 值班设置管理
/// <summary>
/// 获取设置列表
......@@ -328,11 +318,9 @@ namespace Edu.WebApi.Controllers.Duty
{
var query = new RB_Duty_Config_ViewModel()
{
Group_Id = base.UserInfo.Group_Id,
School_Id = base.ParmJObj.GetInt("School_Id"),
};
var list = dutyModule.GetDutyConfigRepository(query);
foreach (var item in list)
{
......@@ -375,8 +363,6 @@ namespace Edu.WebApi.Controllers.Duty
return ApiResult.Success(data: model);
}
/// <summary>
/// 获取设置列表
/// </summary>
......@@ -409,7 +395,6 @@ namespace Edu.WebApi.Controllers.Duty
{
return ApiResult.Failed("请输入值班机器码");
}
var oldList = dutyModule.GetDutyConfigList(new RB_Duty_Config_ViewModel { Group_Id = base.UserInfo.Group_Id, MachineCode = query.MachineCode });
if (oldList != null && oldList.Any(x => x.Id != query.Id))
{
......@@ -422,14 +407,10 @@ namespace Edu.WebApi.Controllers.Duty
}
query.UpdateBy = base.UserInfo.Id;
query.UpdateTime = System.DateTime.Now;
bool retult = dutyModule.SetDutyConfigModel(query);
return retult ? ApiResult.Success("新增/修改值班设置成功") : ApiResult.Failed("新增/修改值班设置失败");
}
/// <summary>
/// 删除值班设置
/// </summary>
......@@ -441,8 +422,6 @@ namespace Edu.WebApi.Controllers.Duty
var flag = dutyModule.RemoveConfigModule(Id);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
}
}
}
\ No newline at end of file
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