岗位当班签到BUG修复

This commit is contained in:
何美荣 2026-06-05 18:34:42 +08:00
parent b6c4b30923
commit 48135e1fdd

View File

@ -426,21 +426,28 @@ namespace APT.FO.WebApi.Controllers.Api.FO
model.SHIFT_STATUS = (int)FOShiftStatusEnum.; model.SHIFT_STATUS = (int)FOShiftStatusEnum.;
model.AUDIT_DATE = DateTime.Now; model.AUDIT_DATE = DateTime.Now;
var currCalendar = this.GetEntity<T_FM_CALENDAR_CLASS>(t => t.CLASS_ID == model.CLASS_ID); var currCalendar = this.GetEntity<T_FM_CALENDAR_CLASS>(t => t.CLASS_ID == model.CLASS_ID);
var currCalendarID = currCalendar.CALENDAR_ID; if (currCalendar != null)
var currDepartmentConfig = GetEntity<T_FM_DEPARTMENT_CALENDAR_CONFIG_TEAM>(t => t.TEAM_ID == model.CLASS_TEAM_ID && t.IS_DELETED == false, "Nav_DepartmentCalendarConfig");
if (currDepartmentConfig != null && currDepartmentConfig.Nav_DepartmentCalendarConfig.IS_HANDOVER == true)
{ {
var currCalendarID = currCalendar.CALENDAR_ID;
var currDepartmentConfig = GetEntity<T_FM_DEPARTMENT_CALENDAR_CONFIG_TEAM>(t => t.TEAM_ID == model.CLASS_TEAM_ID && t.IS_DELETED == false, "Nav_DepartmentCalendarConfig");
if (currDepartmentConfig != null && currDepartmentConfig.Nav_DepartmentCalendarConfig.IS_HANDOVER == true)
{
var searchFilter = new BaseFilter(model.ORG_ID); var searchFilter = new BaseFilter(model.ORG_ID);
searchFilter.SelectField = new string[] { "TEAM_ID", "PERSON_ID", "Nav_Person.Nav_Post", "Nav_Person.Nav_User", "Nav_DepartmentScheduling" }; searchFilter.SelectField = new string[] { "TEAM_ID", "PERSON_ID", "Nav_Person.Nav_Post", "Nav_Person.Nav_User", "Nav_DepartmentScheduling" };
var nextClassUsersAll = GetEntities<T_FM_DEPARTMENT_SCHEDULING_DETAIL>(i => i.DEPARTMENT_SCHEDULING_ID == model.NEXT_CLASS_TEAM_ID && i.Nav_Person.Nav_Post.ID == model.DEPARTMENT_POST_ID && i.Nav_Person.Nav_User.ENABLE_STATUS == 0, searchFilter).ToList(); var nextClassUsersAll = GetEntities<T_FM_DEPARTMENT_SCHEDULING_DETAIL>(i => i.DEPARTMENT_SCHEDULING_ID == model.NEXT_CLASS_TEAM_ID && i.Nav_Person.Nav_Post.ID == model.DEPARTMENT_POST_ID && i.Nav_Person.Nav_User.ENABLE_STATUS == 0, searchFilter).ToList();
if (nextClassUsersAll.Any()) if (nextClassUsersAll.Any())
{ {
CreateChangeShiftRecord(model, users, files, nextClassUsersAll); CreateChangeShiftRecord(model, users, files, nextClassUsersAll);
}
else
{
model.REMARK = "未能找到接班人员";
}
} }
else else if (model.IS_HANDOVER)
{ {
model.REMARK = "未能找到接班人员"; CreateChangeShiftRecord(entity, users, files, null);
} }
} }
else if (model.IS_HANDOVER) else if (model.IS_HANDOVER)