|
@@ -335,7 +335,11 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
|
|
|
// }
|
|
|
// vo2.setPlanDays(new BigDecimal(i));
|
|
|
}else {
|
|
|
- vo2.setPlanDays(new BigDecimal(CommonUtil.getWorkDays(startDate, endDate)));
|
|
|
+ try {
|
|
|
+ vo2.setPlanDays(new BigDecimal(CommonUtil.getWorkDays(startDate, endDate)));
|
|
|
+ }catch (NullPointerException e){
|
|
|
+ throw new ServiceException("请不要刷新这么快,请稍后再试");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
//如果计划已经完成,则不计算超预算
|
|
@@ -540,6 +544,9 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
|
|
|
if (info.getDictValue().intValue() == 2){
|
|
|
return new BigDecimal(startDate.until(endDate,ChronoUnit.DAYS)).intValue() + 1 ;
|
|
|
}else {
|
|
|
+ if (startDate.until(endDate,ChronoUnit.DAYS) > 35){
|
|
|
+ throw new ServiceException("请不要制定超过一个月的固定计划");
|
|
|
+ }
|
|
|
return CommonUtil.getWorkDays(startDate, endDate);
|
|
|
}
|
|
|
}
|
|
@@ -1123,10 +1130,14 @@ public class ProjectCostBudgetServiceImpl extends BaseServiceImpl<ProjectCostBud
|
|
|
if (l.getPlanStartTime().until(l.getPlanEndTime(), ChronoUnit.DAYS) > 35) {
|
|
|
throw new ServiceException("请不要制定超过一个月的固定计划");
|
|
|
}else {
|
|
|
- l.setPlanDays(new BigDecimal(CommonUtil.getWorkDays(budgetVO2.getPlanStartTime(), budgetVO2.getPlanEndTime())));
|
|
|
+ if (l.getIsShowDelete() != 0) {
|
|
|
+ l.setPlanDays(new BigDecimal(CommonUtil.getWorkDays(budgetVO2.getPlanStartTime(), budgetVO2.getPlanEndTime())));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //设置子计划在父计划显示的任务类型
|
|
|
+ l.setPlanTaskTypeValue(task.getDictName());
|
|
|
//计算最大日期和最小日期
|
|
|
if (l.getPlanStartTime().isBefore(startDate)){
|
|
|
startDate = l.getPlanStartTime();
|