修复:子任务组审核通过后钉钉通知显示完整任务明细
问题:当子任务组逐个审核通过时,钉钉通知只显示当前审核通过的这一组子任务的积分(如46分), 而任务卡片显示的是所有子任务组的汇总积分(如59.30分),导致数据不一致。 修复:在 TaskItemService.approveTaskItemGroup 发送通知时, 获取该任务的所有子任务组明细,而不是只显示当前审核的这一组, 确保通知中的积分与任务卡片保持一致。
This commit is contained in:
parent
a41553fe88
commit
d20b5fc989
@ -1116,10 +1116,17 @@ public class TaskItemService {
|
||||
|
||||
content.append(" \n");
|
||||
|
||||
// 任务明细(与第一轮格式完全一致)
|
||||
if (!groupItems.isEmpty()) {
|
||||
// 🔥 任务明细:获取该任务的所有子任务组(不只是当前审核的这一组)
|
||||
// 这样通知显示的积分才与任务卡片一致
|
||||
List<TaskItem> allTaskItems = taskItemMapper.selectList(
|
||||
new LambdaQueryWrapper<TaskItem>()
|
||||
.eq(TaskItem::getTaskId, taskId)
|
||||
.orderBy(true, true, TaskItem::getGroupNo)
|
||||
);
|
||||
|
||||
if (!allTaskItems.isEmpty()) {
|
||||
content.append("**任务明细**: \n");
|
||||
for (TaskItem item : groupItems) {
|
||||
for (TaskItem item : allTaskItems) {
|
||||
// 通过任务类型ID获取接单部门名称
|
||||
String deptName = "未指定";
|
||||
if (item.getTaskTypeId() != null) {
|
||||
@ -1141,7 +1148,7 @@ public class TaskItemService {
|
||||
// 格式化工时显示(与第一轮一致)
|
||||
String hoursDisplay = formatEstimatedHours(item.getEstimatedHours());
|
||||
|
||||
content.append(" \n");
|
||||
content.append(" \n");
|
||||
content.append("▸ **").append(deptName).append("** | ")
|
||||
.append(item.getTotalScore()).append("分 | ")
|
||||
.append(hoursDisplay).append(" \n");
|
||||
@ -1161,7 +1168,7 @@ public class TaskItemService {
|
||||
content.append(" └ ").append(typeName)
|
||||
.append(" ×").append(qty)
|
||||
.append(" = ").append(score).append("分 \n");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("解析任务类型明细失败: {}", e.getMessage());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user