修复:子任务组审核时自动识别预先指定的接收人
问题:在明细完善阶段预先指定了设计师的子任务,审核通过后没有自动指派给该设计师, 而是变成 pending 状态等待抢单,导致设计师没有收到钉钉个人通知。 修复:在 approveTaskItemGroup 方法中,优先检查子任务是否已预先指定了接收人, 如果有且审核人没有重新指定其他人,则自动使用预先指定的接收人。
This commit is contained in:
parent
b4bafab04f
commit
dc2cb78b26
@ -932,7 +932,18 @@ public class TaskItemService {
|
||||
throw new BusinessException(ResultCode.PARAM_ERROR, "该组没有待审核的子任务");
|
||||
}
|
||||
|
||||
// 4. 如果指定了接收人,验证接收人并直接分配
|
||||
// 4. 🔥 优先检查子任务是否已预先指定了接收人(在明细完善阶段指定的)
|
||||
// 如果子任务已有接收人且审核人没有重新指定,则使用预先指定的接收人
|
||||
if (assignedReceiverId == null) {
|
||||
// 检查第一个子任务是否已有预先指定的接收人
|
||||
TaskItem firstItem = groupItems.get(0);
|
||||
if (firstItem.getReceiverId() != null) {
|
||||
assignedReceiverId = firstItem.getReceiverId();
|
||||
log.info("子任务组已预先指定接收人: receiverId={}, 自动使用", assignedReceiverId);
|
||||
}
|
||||
}
|
||||
|
||||
// 5. 如果指定了接收人(包括预先指定的),验证接收人并直接分配
|
||||
if (assignedReceiverId != null) {
|
||||
com.designhub.entity.User receiver = userService.getUserById(assignedReceiverId);
|
||||
if (receiver == null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user