| | |
| | | tasks.add(task); |
| | | } |
| | | |
| | | // 添加应生成任务数量 |
| | | TTemplateCount templateCount = new TTemplateCount(); |
| | | templateCount.setTemplateId(detail.getTemplateId()); |
| | | // 查询所有的保洁员下面的点位 |
| | | List<String> cleanIds = cleaners.stream().map(TCleaner::getId).collect(Collectors.toList()); |
| | | List<TLocation> tLocations = locationService.list(Wrappers.lambdaQuery(TLocation.class) |
| | | .in(TLocation::getLocationCleaner, cleanIds)); |
| | | templateCount.setTaskCount(tLocations.size()); |
| | | templateCount.setUserId(sysUser.getUserId()); |
| | | templateCountService.save(templateCount); |
| | | |
| | | // 添加应生成任务数量 |
| | | TTemplateCount templateCount = new TTemplateCount(); |
| | | templateCount.setTemplateId(detail.getTemplateId()); |
| | | // 查询所有的保洁员下面的点位 |
| | | List<String> cleanIds = cleaners.stream().map(TCleaner::getId).collect(Collectors.toList()); |
| | | List<TLocation> tLocations = locationService.list(Wrappers.lambdaQuery(TLocation.class) |
| | | .in(TLocation::getLocationCleaner, cleanIds)); |
| | | templateCount.setTaskCount(tLocations.size()); |
| | | templateCount.setUserId(sysUser.getUserId()); |
| | | templateCountService.save(templateCount); |
| | | taskCleanService.saveBatch(tasks); |
| | | taskCount = taskCount + tasks.size(); |
| | | } |