| | |
| | | } |
| | | |
| | | public List<LightTaskDto> listLightTask(BaseConditionVO conditionVO, String keyword, Integer order, Integer seq) { |
| | | // LambdaQueryWrapper<LightTask> wrapper = Wrappers.lambdaQuery(LightTask.class); |
| | | // if (StrUtil.isNotBlank(keyword)) { |
| | | // wrapper.like(LightTask::getTaskName, keyword); |
| | | // } |
| | | // //不是超管需要筛选 |
| | | // if (SecurityUtils.getClientId() != null) { |
| | | // wrapper.eq(LightTask::getClientId, SecurityUtils.getUserId()).or(w -> { |
| | | // w.eq(LightTask::getUserId, SecurityUtils.getUserId()); |
| | | // }); |
| | | // } |
| | | |
| | | //排序字段 |
| | | String orderByResult = "task_id"; |
| | |
| | | if (!removeByIds(taskIdList)) { |
| | | throw new BusinessException("删除任务失败"); |
| | | } |
| | | |
| | | boolean del; |
| | | // 删除绑定灯杆 |
| | | // if (!lightTaskPoleRelationService.remove(Wrappers.lambdaQuery(LightTaskPoleRelation.class).notIn(LightTaskPoleRelation::getTaskId, taskIdList))) { |
| | | // throw new BusinessException("未找到任务/灯杆绑定关系"); |
| | | // } |
| | | // lightTaskPoleRelationService.remove(Wrappers.lambdaQuery(LightTaskPoleRelation.class).in(LightTaskPoleRelation::getTaskId, taskIdList)); |
| | | taskIdList.forEach(taskId -> { |
| | | lightTaskPoleRelationService.remove(Wrappers.lambdaQuery(LightTaskPoleRelation.class).eq(LightTaskPoleRelation::getTaskId, taskId)); |
| | | }); |
| | | |
| | | /** |
| | | * 删除控灯任务日志记录开始 |