|
|
@@ -703,15 +703,14 @@ public class TMonitoringRetrievalPlanServiceImpl extends ServiceImpl<TMonitoring
|
|
|
@Transactional
|
|
|
@Override
|
|
|
public int updateTMonitoringRetrievalPlan(TMonitoringRetrievalPlan tMonitoringRetrievalPlan) {
|
|
|
- List<CoreMonitoringRetrievalTask> coreMonitoringRetrievalTasks = iCoreMonitoringRetrievalTaskService.selectComplete(tMonitoringRetrievalPlan.getId());
|
|
|
+ boolean isComplete = getIsComplete(tMonitoringRetrievalPlan.getId());
|
|
|
//如果计划下面的任务都是没完成就删除所有任务,有完成就只修改
|
|
|
-//
|
|
|
TMonitoringRetrievalPlan plan = baseMapper.selectById(tMonitoringRetrievalPlan.getId());
|
|
|
BeanUtils.copyProperties(tMonitoringRetrievalPlan, plan);
|
|
|
SysRole sysRole = remoteRoleService.getRoleById(tMonitoringRetrievalPlan.getRoleId(), SecurityConstants.INNER);
|
|
|
plan.setRoleName(sysRole.getRoleName());
|
|
|
int i = tMonitoringRetrievalPlanMapper.updateById(plan);
|
|
|
- if (CollectionUtils.isEmpty(coreMonitoringRetrievalTasks)) {
|
|
|
+ if (isComplete) {
|
|
|
coreMonitoringRetrievalTaskBuilderService.deleteWaitTaskByPlanId(tMonitoringRetrievalPlan.getId());
|
|
|
try {
|
|
|
QueryWrapper queryWrapper = new QueryWrapper();
|