不知道啥时候的判断条件导致报错,先去掉

This commit is contained in:
何美荣 2026-05-24 01:29:47 +08:00
parent 2914bbd3b7
commit ff62dea1c6

View File

@ -201,11 +201,11 @@ namespace APT.FO.WebApi.Controllers.Api.FO
{
var currCalendarID = currCalendar.CALENDAR_ID;
var currDepartmentConfig = GetEntity<T_FM_DEPARTMENT_CALENDAR_CONFIG_TEAM>(t => t.TEAM_ID == entity.CLASS_TEAM_ID && t.IS_DELETED == false, "Nav_DepartmentCalendarConfig");
if (currDepartmentConfig.Nav_DepartmentCalendarConfig == null)
if (currDepartmentConfig==null || currDepartmentConfig.Nav_DepartmentCalendarConfig == null)
{
throw new Exception("未找到排班数据!");
//throw new Exception("未找到排班数据!");
}
if (currDepartmentConfig.Nav_DepartmentCalendarConfig.IS_HANDOVER == true)
if (currDepartmentConfig != null && currDepartmentConfig.Nav_DepartmentCalendarConfig != null&& currDepartmentConfig.Nav_DepartmentCalendarConfig.IS_HANDOVER == true)
{
var searchFilter = new BaseFilter(entity.ORG_ID);
searchFilter.SelectField = new string[] { "TEAM_ID", "PERSON_ID", "Nav_Person.Nav_Post", "Nav_Person.Nav_User", "Nav_DepartmentScheduling" };