diff --git a/WebStarter/Controllers/BasicConfig/BaseConfigController.cs b/WebStarter/Controllers/BasicConfig/BaseConfigController.cs index 8ade8b0..d6c183a 100644 --- a/WebStarter/Controllers/BasicConfig/BaseConfigController.cs +++ b/WebStarter/Controllers/BasicConfig/BaseConfigController.cs @@ -306,12 +306,15 @@ namespace WebStarter.Controllers.BasicConfig for (int i = 0; i < timePeriods.Count; i++) { - for (int j = i + 1; j < timePeriods.Count; j++) + if (timePeriods[i].StartHour != 0 && timePeriods[i].StartMinute != 0 && timePeriods[i].StartSecond != 0 && timePeriods[i].EndHour != 0 && timePeriods[i].EndMinute != 0 && timePeriods[i].EndSecond != 0)//排除开始和结束时间都是0点的不判断 { - if (timePeriods[i].Contains(timePeriods[j]) || timePeriods[j].Contains(timePeriods[i])) + for (int j = i + 1; j < timePeriods.Count; j++) { - notHasOverlap = false; - return notHasOverlap; + if (timePeriods[i].Contains(timePeriods[j]) || timePeriods[j].Contains(timePeriods[i])) + { + notHasOverlap = false; + return notHasOverlap; + } } } }