From 02a5c4407451c4101a5bbea5d88d5d1f0d5a4aa0 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期五, 11 七月 2025 11:51:49 +0800 Subject: [PATCH] bug修改 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/task/TaskUtil.java | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/task/TaskUtil.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/task/TaskUtil.java index bde453c..d15f91c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/task/TaskUtil.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/task/TaskUtil.java @@ -325,17 +325,16 @@ 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(); } -- Gitblit v1.7.1