From b8fe16f88ee06c0134302fdf6bdf5708671129f5 Mon Sep 17 00:00:00 2001 From: shiji <1913712590@qq.com> Date: Wed, 19 Jul 2023 17:03:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=A8=A1=E5=9D=97=20=20?= =?UTF-8?q?=E8=B4=A3=E4=BB=BB=E4=BA=BA=E4=B8=8B=E6=8B=89=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=20=E6=A0=B9=E6=8D=AE=20=E4=BB=BB=E5=8A=A1=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/task/TaskList.vue | 6 ++- .../task/controller/TaskController.java | 37 +++++++++++-------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/task/TaskList.vue b/ant-design-vue-jeecg/src/views/task/TaskList.vue index 044b232..3c453fb 100644 --- a/ant-design-vue-jeecg/src/views/task/TaskList.vue +++ b/ant-design-vue-jeecg/src/views/task/TaskList.vue @@ -42,9 +42,11 @@ - + - + diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java index d20bd8e..108c9e6 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java @@ -119,8 +119,8 @@ public class TaskController extends JeecgController { case 1: {//当前天 Date startTime = sdf.parse(year + "-" + month + "-" + day + " 00:00:00"); Date endTime = sdf.parse(year + "-" + month + "-" + day + " 23:59:59"); - queryWrapper.ge("create_time", startTime); - queryWrapper.le("create_time", endTime); + queryWrapper.ge("start_time", startTime); + queryWrapper.le("start_time", endTime); break; } case 2: {//当前周 @@ -135,16 +135,16 @@ public class TaskController extends JeecgController { int day2 = now1.get(Calendar.DAY_OF_MONTH); Date startTime = sdf.parse(year1 + "-" + month1 + "-" + day1 + " 00:00:00"); Date endTime = sdf.parse(year2 + "-" + month2 + "-" + day2 + " 23:59:59"); - queryWrapper.ge("create_time", startTime); - queryWrapper.le("create_time", endTime); + queryWrapper.ge("start_time", startTime); + queryWrapper.le("start_time", endTime); } case 3: {//当前月 int minDay = now.getActualMinimum(Calendar.DAY_OF_MONTH); int lastDay = now.getActualMaximum(Calendar.DAY_OF_MONTH); Date startTime = sdf.parse(year + "-" + month + "-" + minDay + " 00:00:00"); Date endTime = sdf.parse(year + "-" + month + "-" + lastDay + " 23:59:59"); - queryWrapper.ge("create_time", startTime); - queryWrapper.le("create_time", endTime); + queryWrapper.ge("start_time", startTime); + queryWrapper.le("start_time", endTime); break; } // case 4: { @@ -164,16 +164,23 @@ public class TaskController extends JeecgController { String projectId = task.getProjectId(); queryWrapper.like("project_id", projectId); } + if (task != null && StringUtils.isNotBlank(task.getTypeId())) { + String typeId = task.getTypeId(); + queryWrapper.like("type_id", typeId); + } - List sysUsers = taskService.UserIdByUserName(userName); - if (sysUsers != null && sysUsers.size() > 0) - queryWrapper.and(qw -> { - for (int i = 0; i < sysUsers.size(); i++) { - qw.like("manager_users", sysUsers.get(i).getId()); - if (i != sysUsers.size() - 1) - qw.or(); - } - }); + if (task != null && StringUtils.isNotBlank(task.getManagerUsers())) { + String managerUsers = task.getManagerUsers(); + queryWrapper.like("manager_users", managerUsers); + } +// List sysUsers = taskService.UserIdByUserName(userName); +// queryWrapper.and(qw -> { +// for (int i = 0; i < sysUsers.size(); i++) { +// qw.like("manager_users", sysUsers.get(i).getId()); +// if (i != sysUsers.size() - 1) +// qw.or(); +// } +// }); if (task != null && StringUtils.isNotBlank(task.getTaskName())) { String tas = task.getTaskName(); if (tas.startsWith("*") && tas.endsWith("*"))