|
|
@@ -400,7 +400,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
.ne(Resumption::getStatus, ResumptionTaskStatus.Completed.getCode())
|
|
|
.and(w ->
|
|
|
w.ge(Resumption::getYmdDate, date)
|
|
|
- .or(w1 -> w1.le(Resumption::getPlanEndTime, date))
|
|
|
+ .or(w1 -> w1.ge(Resumption::getPlanEndTime, date))
|
|
|
));
|
|
|
}
|
|
|
|
|
|
@@ -534,7 +534,8 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
|
|
|
//任务为使用中且有已完成或停用,则下个周期生效,需要副本;任务为使用中且无已完成,则删除所有任务,并重新生成任务
|
|
|
Boolean needCopy = (ObjectUtil.equal(app.getTaskHasCompleted(), 1)
|
|
|
- && ObjectUtil.equal(existPlan.getPlanStatus(), PlanStatus.USING.getCode())) || ObjectUtil.equal(existPlan.getPlanStatus(), PlanStatus.DELETED.getCode());
|
|
|
+ && ObjectUtil.equal(existPlan.getPlanStatus(), PlanStatus.USING.getCode()))
|
|
|
+ || ObjectUtil.equal(existPlan.getPlanStatus(), PlanStatus.DELETED.getCode());
|
|
|
List<Object> needRebuildPlans = new ArrayList<>();
|
|
|
//修改所有子计划
|
|
|
List<AppPlan> appPlans = baseMapper.selectList(new LambdaQueryWrapper<AppPlan>().eq(AppPlan::getParentId, plan.getId()));
|
|
|
@@ -548,10 +549,12 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
baseMapper.copyChildren(ap.getId(), newChildPlanId, newPlanID);
|
|
|
baseMapper.copyPlanOrgs(ap.getId(), newChildPlanId);
|
|
|
baseMapper.copyPlanRoles(ap.getId(), newChildPlanId);
|
|
|
- baseMapper.copyPlanPoints(ap.getId(), newChildPlanId);
|
|
|
+ Integer c= baseMapper.copyPlanPoints(ap.getId(), newChildPlanId);
|
|
|
|
|
|
baseMapper.updateById(ap);
|
|
|
baseMapper.deleteById(ap.getId());
|
|
|
+
|
|
|
+ child=baseMapper.selectById(newChildPlanId);
|
|
|
} else {
|
|
|
needRebuildPlans.add(child);
|
|
|
}
|
|
|
@@ -704,7 +707,7 @@ public class AppPlanServiceImpl extends ServiceImpl<AppPlanMapper, AppPlan> impl
|
|
|
plan.setPlanCreateOrgName(null);
|
|
|
baseMapper.updateById(plan);
|
|
|
|
|
|
- if (needCopy && ObjectUtil.equal(plan.getPlanOfOrgType(), OrgTypeEnum.HANG_SHE.getCode().longValue())) {
|
|
|
+ if (!needCopy && ObjectUtil.equal(plan.getPlanOfOrgType(), OrgTypeEnum.HANG_SHE.getCode().longValue())) {
|
|
|
needRebuildPlans.add(baseMapper.selectById(plan.getId()));
|
|
|
}
|
|
|
resumptionTaskBusiness.rebuildCurrentCycleTask(needRebuildPlans);
|