|
|
@@ -125,10 +125,14 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
} else if (ObjectUtil.equal(record.getPlanStatus(), PlanStatus.USING.getCode())) {
|
|
|
record.setHasTaskCurrentCycle(!new Date().before(record.getEffectiveTime()));
|
|
|
} else if (ObjectUtil.equal(record.getPlanStatus(), PlanStatus.DELETED.getCode())) {
|
|
|
- boolean b = !new Date().before(record.getEffectiveTime());
|
|
|
- DateRange dr = DateUtils.getStartAndEnd(new Date(), record.getPlanCycle());
|
|
|
- b &= (!record.getWithdrawTime().before(dr.getStartTime()));
|
|
|
- record.setHasTaskCurrentCycle(b);
|
|
|
+ if (ObjectUtil.isNull(record.getEffectiveTime()) || ObjectUtil.isNull(record.getWithdrawTime())) {
|
|
|
+ record.setHasTaskCurrentCycle(false);
|
|
|
+ } else {
|
|
|
+ boolean b = !new Date().before(record.getEffectiveTime());
|
|
|
+ DateRange dr = DateUtils.getStartAndEnd(new Date(), record.getPlanCycle());
|
|
|
+ b &= (!record.getWithdrawTime().before(dr.getStartTime()));
|
|
|
+ record.setHasTaskCurrentCycle(b);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
@@ -991,8 +995,8 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
if (null == r || null == r.getData()) {
|
|
|
throw new SystemException(ErrorMsgConstants.GENERATE_PDF_ERROR);
|
|
|
}
|
|
|
- Long id= (Long)data.get("id");
|
|
|
- if(ObjectUtil.isNull(id)){
|
|
|
+ Long id = (Long) data.get("id");
|
|
|
+ if (ObjectUtil.isNull(id)) {
|
|
|
throw new SystemException(ErrorMsgConstants.GENERATE_PDF_ERROR);
|
|
|
}
|
|
|
String pdfUrl = r.getData();
|