|
|
@ -119,8 +119,8 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
case 1: {//当前天
|
|
|
|
case 1: {//当前天
|
|
|
|
Date startTime = sdf.parse(year + "-" + month + "-" + day + " 00:00:00"); |
|
|
|
Date startTime = sdf.parse(year + "-" + month + "-" + day + " 00:00:00"); |
|
|
|
Date endTime = sdf.parse(year + "-" + month + "-" + day + " 23:59:59"); |
|
|
|
Date endTime = sdf.parse(year + "-" + month + "-" + day + " 23:59:59"); |
|
|
|
queryWrapper.ge("create_time", startTime); |
|
|
|
queryWrapper.ge("start_time", startTime); |
|
|
|
queryWrapper.le("create_time", endTime); |
|
|
|
queryWrapper.le("start_time", endTime); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
case 2: {//当前周
|
|
|
|
case 2: {//当前周
|
|
|
@ -135,16 +135,16 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
int day2 = now1.get(Calendar.DAY_OF_MONTH); |
|
|
|
int day2 = now1.get(Calendar.DAY_OF_MONTH); |
|
|
|
Date startTime = sdf.parse(year1 + "-" + month1 + "-" + day1 + " 00:00:00"); |
|
|
|
Date startTime = sdf.parse(year1 + "-" + month1 + "-" + day1 + " 00:00:00"); |
|
|
|
Date endTime = sdf.parse(year2 + "-" + month2 + "-" + day2 + " 23:59:59"); |
|
|
|
Date endTime = sdf.parse(year2 + "-" + month2 + "-" + day2 + " 23:59:59"); |
|
|
|
queryWrapper.ge("create_time", startTime); |
|
|
|
queryWrapper.ge("start_time", startTime); |
|
|
|
queryWrapper.le("create_time", endTime); |
|
|
|
queryWrapper.le("start_time", endTime); |
|
|
|
} |
|
|
|
} |
|
|
|
case 3: {//当前月
|
|
|
|
case 3: {//当前月
|
|
|
|
int minDay = now.getActualMinimum(Calendar.DAY_OF_MONTH); |
|
|
|
int minDay = now.getActualMinimum(Calendar.DAY_OF_MONTH); |
|
|
|
int lastDay = now.getActualMaximum(Calendar.DAY_OF_MONTH); |
|
|
|
int lastDay = now.getActualMaximum(Calendar.DAY_OF_MONTH); |
|
|
|
Date startTime = sdf.parse(year + "-" + month + "-" + minDay + " 00:00:00"); |
|
|
|
Date startTime = sdf.parse(year + "-" + month + "-" + minDay + " 00:00:00"); |
|
|
|
Date endTime = sdf.parse(year + "-" + month + "-" + lastDay + " 23:59:59"); |
|
|
|
Date endTime = sdf.parse(year + "-" + month + "-" + lastDay + " 23:59:59"); |
|
|
|
queryWrapper.ge("create_time", startTime); |
|
|
|
queryWrapper.ge("start_time", startTime); |
|
|
|
queryWrapper.le("create_time", endTime); |
|
|
|
queryWrapper.le("start_time", endTime); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
// case 4: {
|
|
|
|
// case 4: {
|
|
|
@ -164,16 +164,23 @@ public class TaskController extends JeecgController<Task, ITaskService> { |
|
|
|
String projectId = task.getProjectId(); |
|
|
|
String projectId = task.getProjectId(); |
|
|
|
queryWrapper.like("project_id", projectId); |
|
|
|
queryWrapper.like("project_id", projectId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (task != null && StringUtils.isNotBlank(task.getTypeId())) { |
|
|
|
List<SysUser> sysUsers = taskService.UserIdByUserName(userName); |
|
|
|
String typeId = task.getTypeId(); |
|
|
|
if (sysUsers != null && sysUsers.size() > 0) |
|
|
|
queryWrapper.like("type_id", typeId); |
|
|
|
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<SysUser> 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())) { |
|
|
|
if (task != null && StringUtils.isNotBlank(task.getTaskName())) { |
|
|
|
String tas = task.getTaskName(); |
|
|
|
String tas = task.getTaskName(); |
|
|
|
if (tas.startsWith("*") && tas.endsWith("*")) |
|
|
|
if (tas.startsWith("*") && tas.endsWith("*")) |
|
|
|