|
@@ -341,14 +341,13 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
thresholdMap.put(dictData.getDictLabel(), dictData.getDictValue());
|
|
|
}
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- Date thresholdTimeStart = null;
|
|
|
- Date thresholdTimeEnd = null;
|
|
|
Date subTime = planYear.getPlanDemandSubTime();
|
|
|
try {
|
|
|
+ Date thresholdTimeStart = dateFormat.parse(thresholdMap.get("起止时间开始"));
|
|
|
+ Date thresholdTimeEnd = dateFormat.parse(thresholdMap.get("起止时间结束"));
|
|
|
+ ;
|
|
|
if (!ObjectUtils.isEmpty(thresholdTimeStart) && !ObjectUtils.isEmpty(thresholdTimeEnd)) {
|
|
|
- thresholdTimeStart = dateFormat.parse(thresholdMap.get("起止时间开始"));
|
|
|
- thresholdTimeEnd = dateFormat.parse(thresholdMap.get("起止时间结束"));
|
|
|
- if (!subTime.after(thresholdTimeStart) && !subTime.before(thresholdTimeEnd)) {
|
|
|
+ if (subTime.before(thresholdTimeStart) || subTime.after(thresholdTimeEnd)) {
|
|
|
return false;
|
|
|
}
|
|
|
}
|