feat(oapi): 应用内审批 oapi——待办/办件查询 + 办理(operator 复核)+ 待办跳转 bizUrl 优先
build / build-push (push) Successful in 1m29s
build / build-push (push) Successful in 1m29s
- GET /oapi/flow/tasks/todo?schId&assigneeId&bizType&page&size(出参含 biz 定位/快照/版本)
- GET /oapi/flow/instances?schId&bizType&status&page&size(查询不限办理人)
- POST /oapi/flow/task/{taskId}/approve|reject?schId&operatorId&operatorName:
operatorId 按任务办理人逐字复核(非办理人→业务码拒绝不 500),拒绝必填意见,
opinion 经事件链透传到回调 payload;审批后回调/待办减一自动复用
- 待办通知 jumpPath:办件 bizUrl 优先(空回落 /task/{taskId})
契约 IT +3(todo 过滤分页/instances 状态过滤/办理三态+payload 断言),
单测 UserMsgNotifierBizUrlTest 两态;全量 99 单测 + 11 契约 IT 绿。
This commit is contained in:
@@ -15,7 +15,8 @@ import java.util.Collections;
|
||||
|
||||
/**
|
||||
* 站内信/待办角标通知(概览 §七 契约,回调通知"业务系统"、本类通知"人",两通道互不替代):
|
||||
* - 任务到达:msgType=2、bizType=flow.task、msgNo=task:{taskId}、jumpPath=/task/{taskId}、todo +1
|
||||
* - 任务到达:msgType=2、bizType=flow.task、msgNo=task:{taskId}、jumpPath=bizUrl 优先(空回落
|
||||
* /task/{taskId})、todo +1
|
||||
* - 任务被办理:todo -1(办理人)
|
||||
* - 完成/拒绝/撤回:msgType=1、bizType=flow.result、content 必填(结果+意见)、msgNo 带 version
|
||||
* (重提重启多轮终态互不幂等吞掉)
|
||||
@@ -68,10 +69,14 @@ public class UserMsgNotifier {
|
||||
String title = "您有新的待办:" + safe(instance.getBizTitle());
|
||||
String content = "「" + safe(instance.getBizTitle()) + "」等待您审批"
|
||||
+ (task.getNodeName() == null ? "" : "(" + task.getNodeName() + ")");
|
||||
// 跳转路径:办件自带 bizUrl(应用详情页)优先——应用内审批免跳流程中心;
|
||||
// 未传 bizUrl 回落流程中心办理页 /task/{taskId}
|
||||
String jumpPath = instance.getBizUrl() == null || instance.getBizUrl().trim().isEmpty()
|
||||
? "/task/" + task.getId() : instance.getBizUrl();
|
||||
userMsgClient.sendUserMsg(instance.getSchId().intValue(),
|
||||
Collections.singletonList(task.getAssigneeId()), 2,
|
||||
"flow.task", String.valueOf(instance.getId()), title, content,
|
||||
"/task/" + task.getId(), "task:" + task.getId(), 30);
|
||||
jumpPath, "task:" + task.getId(), 30);
|
||||
userMsgClient.todoInc(instance.getSchId().intValue(),
|
||||
Collections.singletonList(task.getAssigneeId()), 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user