| | |
| | | .in(TProjectDept::getParentId, proIds)); |
| | | // 获取片区id |
| | | List<String> areaIds = tProjectDeptList.stream().map(TProjectDept::getId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty(areaIds)){ |
| | | return; |
| | | } |
| | | |
| | | // 计算每天需要抽取多少个保洁员 |
| | | long count = cleanerService.count(Wrappers.lambdaQuery(TCleaner.class) |
| | |
| | | task.setLocationId(tLocation.getId()); |
| | | task.setImplementTime(LocalDateTime.now().plusDays(1)); |
| | | task.setTaskType(1); |
| | | task.setTemplateId(detail.getId()); |
| | | tasks.add(task); |
| | | } |
| | | taskCleanService.saveBatch(tasks); |
| | | template.setTaskCount(tasks.size()); |
| | | templateService.updateById(template); |
| | | templateDetailService.updateById(detail); |
| | | }); |
| | | |