增加延期信息
This commit is contained in:
parent
5d48ce35ce
commit
38cbdf6c04
@ -62,7 +62,7 @@ public class TaskReminderService {
|
||||
return;
|
||||
}
|
||||
|
||||
TaskReminderConfig.Schedule schedule = group.getSchedules().get(scheduleType);
|
||||
TaskReminderConfig.Schedule schedule = group.getSchedules().get(scheduleType.getCode());
|
||||
if (schedule == null) {
|
||||
logger.error("群组 {} 未配置 {} 提醒时间", groupId, scheduleType);
|
||||
return;
|
||||
|
||||
@ -58,10 +58,7 @@ public class ZentaoApiService {
|
||||
|
||||
if (group.getZentao().getKanbanId() != null) {
|
||||
// 看板模式:尝试多个可能的API路径
|
||||
urlsToTry.add(group.getZentao().getApiUrl() + "/api.php/v1/kanbans/" + group.getZentao().getKanbanId());
|
||||
urlsToTry.add(group.getZentao().getApiUrl() + "/api.php/v1/executions/" + group.getZentao().getProjectId() + "/tasks");
|
||||
urlsToTry.add(group.getZentao().getApiUrl() + "/api.php/v1/projects/" + group.getZentao().getProjectId() + "/executions");
|
||||
urlsToTry.add(group.getZentao().getApiUrl() + "/api.php/v1/tasks?execution=" + group.getZentao().getProjectId());
|
||||
} else {
|
||||
// 传统项目模式
|
||||
urlsToTry.add(group.getZentao().getApiUrl() + "/api.php/v1/projects/" + group.getZentao().getProjectId() + "/tasks");
|
||||
|
||||
@ -159,13 +159,13 @@ public class ZentaoTaskReminderService {
|
||||
long overdueBugs = unresolvedBugs.stream().filter(ZentaoBug::isOverdue).count();
|
||||
|
||||
message.append("📊 **项目概况**\n");
|
||||
message.append("未完成任务: ").append(incompleteTasks.size()).append("个");
|
||||
message.append("未完成TASK: ").append(incompleteTasks.size()).append("个");
|
||||
if (overdueTasks > 0) {
|
||||
message.append(",已过期: ").append(overdueTasks).append("个");
|
||||
}
|
||||
message.append("\n");
|
||||
|
||||
message.append("未解决BUG: ").append(unresolvedBugs.size()).append("个");
|
||||
message.append("未解决BUGFIX: ").append(unresolvedBugs.size()).append("个");
|
||||
if (overdueBugs > 0) {
|
||||
message.append(",已过期: ").append(overdueBugs).append("个");
|
||||
}
|
||||
@ -192,29 +192,25 @@ public class ZentaoTaskReminderService {
|
||||
|
||||
// 显示任务
|
||||
for (ZentaoTask task : items.tasks) {
|
||||
String statusIcon = task.isOverdue() ? "🔴" : "⚪";
|
||||
message.append("- ").append(statusIcon).append(" [任务").append(task.getId()).append("] ")
|
||||
.append(task.getName());
|
||||
if (task.getDeadline() != null && !task.getDeadline().isEmpty() &&
|
||||
!"0000-00-00".equals(task.getDeadline())) {
|
||||
message.append(" (").append(task.getDeadline()).append(")");
|
||||
String statusIcon = task.isOverdue() ? "<font color=\"warning\">" : "<font color=\"info\">";
|
||||
message.append(statusIcon).append(" [TASK-").append(task.getId()).append("] ").append(task.getName());
|
||||
if (task.getDeadline() != null && !task.getDeadline().isEmpty() && !"0000-00-00".equals(task.getDeadline())) {
|
||||
message.append(" \n截止日期:").append(task.getDeadline());
|
||||
}
|
||||
message.append("\n");
|
||||
message.append("</font>\n");
|
||||
}
|
||||
|
||||
// 显示BUG
|
||||
for (ZentaoBug bug : items.bugs) {
|
||||
String statusIcon = bug.isOverdue() ? "🔴" : "🐛";
|
||||
message.append("- ").append(statusIcon).append(" [BUG").append(bug.getId()).append("] ")
|
||||
.append(bug.getTitle());
|
||||
String statusIcon = bug.isOverdue() ? "<font color=\"warning\">🔴" : "<font color=\"info\">🐛";
|
||||
message.append(statusIcon).append(" [BUGFIX-").append(bug.getId()).append("] ").append(bug.getTitle());
|
||||
if (bug.getSeverity() != null && !bug.getSeverity().isEmpty()) {
|
||||
message.append(" [").append(bug.getSeverityDesc()).append("]");
|
||||
}
|
||||
if (bug.getDeadline() != null && !bug.getDeadline().isEmpty() &&
|
||||
!"0000-00-00".equals(bug.getDeadline())) {
|
||||
message.append(" (").append(bug.getDeadline()).append(")");
|
||||
if (bug.getDeadline() != null && !bug.getDeadline().isEmpty() && !"0000-00-00".equals(bug.getDeadline())) {
|
||||
message.append(" \n截止日期:").append(bug.getDeadline());
|
||||
}
|
||||
message.append("\n");
|
||||
message.append("</font>\n");
|
||||
}
|
||||
message.append("\n");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user