Commit 2cdac6f9 authored by 黄奎's avatar 黄奎

页面修改

parent d799607a
......@@ -596,5 +596,17 @@ namespace Edu.Common
return ReadConfigKey("MallJwtSecretKey");
}
}
/// <summary>
/// 值班日期验证
/// </summary>
public static DateTime DutyDate
{
get
{
DateTime.TryParse(ReadConfigKey("DutyDate"), out DateTime dt);
return dt;
}
}
}
}
\ No newline at end of file
......@@ -890,7 +890,7 @@ namespace Edu.Module.Duty
}
if (!string.IsNullOrEmpty(tempStr))
{
empList = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { QIds = tempStr });
empList = accountRepository.GetEmployeeListRepository(new Model.ViewModel.User.Employee_ViewModel() { QIds = tempStr.TrimStart(',').TrimEnd(',') });
}
}
foreach (var item in contentList)
......@@ -1290,7 +1290,10 @@ namespace Edu.Module.Duty
}
if (Status == 2)
{
var workContentList= duty_ContentRepository.GetDutyContentListRepository(new RB_Duty_Content_ViewModel() { PlanId = Id, PlanShift = Shift, PlanType = 1,CreateBy=DutyMan }).ToList();
var dutyModel = duty_PlanRepository.GetEntity(Id);
if (dutyModel.Date >= Common.Config.DutyDate)
{
var workContentList = duty_ContentRepository.GetDutyContentListRepository(new RB_Duty_Content_ViewModel() { PlanId = Id, PlanShift = Shift, PlanType = 1, CreateBy = DutyMan }).ToList();
if (workContentList != null && workContentList.Count > 0)
{
foreach (var item in workContentList)
......@@ -1307,6 +1310,7 @@ namespace Edu.Module.Duty
}
}
}
}
if (dt < startTime)
{
message = "还未到下班时间,不能打卡!";
......
......@@ -361,7 +361,7 @@ namespace Edu.WebApi.Controllers.Duty
{
Id = 0,
PlanShift = Shift,
PlanType =3,
PlanType = 3,
PlanId = Id,
OtherContent = "无",
OtherRemark = "无",
......@@ -369,7 +369,12 @@ namespace Edu.WebApi.Controllers.Duty
WorkIsFinish = 1,
ItemId = 0,
ItemType = 0,
});
CreateBy = base.UserInfo.Id,
CreateTime = DateTime.Now,
UpdateBy=base.UserInfo.Id,
UpdateTime=DateTime.Now,
Group_Id = base.UserInfo.Group_Id,
}); ;
}
if (IsHandover==1)
{
......@@ -385,6 +390,11 @@ namespace Edu.WebApi.Controllers.Duty
WorkIsFinish = 1,
ItemId = 0,
ItemType = 0,
CreateBy = base.UserInfo.Id,
CreateTime = DateTime.Now,
UpdateBy = base.UserInfo.Id,
UpdateTime = DateTime.Now,
Group_Id = base.UserInfo.Group_Id,
});
}
}
......
......@@ -75,5 +75,7 @@
//超过下班时间60分钟不能打卡
"MoreThanMinutes": 60,
//连续缺课课时
"AbsentHours": 12
"AbsentHours": 12,
//值班时间验证日期
"DutyDate": "2021-06-30"
}
\ 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