fix(trace): 科室视图抄送行补遮蔽——ccTraceRow 补 fillCcScope 取 node.receivers 落 assigneeType/deptKey/deptName(NOTIFY 用 receivers 而非 assignee,直接复用 fillAssigneeScope 会空填),applyAssigneeScope 抽公共落值段;FlowEngineIT 增 ccTraceRows_carryDeptScope_forDeptView + 原 notify 用例补 USERS 断言;FlowTestSupport 增 notifyDeptDef。mvn test 209 全绿
build / build-push (push) Successful in 49s
build / build-push (push) Successful in 49s
This commit is contained in:
@@ -304,7 +304,8 @@ public class FlowQueryService {
|
||||
rows.add(new TimedRow(r.getDecideTime(), 1, r.getId(), routeTraceRow(r)));
|
||||
}
|
||||
for (FlwCc c : ccs) {
|
||||
rows.add(new TimedRow(c.getSentTime(), 2, c.getId(), ccTraceRow(c)));
|
||||
rows.add(new TimedRow(c.getSentTime(), 2, c.getId(),
|
||||
ccTraceRow(c, model, instance, deptNames)));
|
||||
}
|
||||
rows.sort(Comparator.comparing((TimedRow r) -> r.time,
|
||||
Comparator.nullsLast(Comparator.naturalOrder()))
|
||||
@@ -355,8 +356,11 @@ public class FlowQueryService {
|
||||
return row;
|
||||
}
|
||||
|
||||
/** 抄送轨迹行(kind=CC):no taskId/opinion,接收人记在 assignee* 字段(前端复用人列) */
|
||||
private static Map<String, Object> ccTraceRow(FlwCc c) {
|
||||
/** 抄送轨迹行(kind=CC):no taskId/opinion,接收人记在 assignee* 字段(前端复用人列)。
|
||||
* 2026-10-12 补科室口径:抄送节点用 receivers,走 {@link #fillCcScope} 富化 assigneeType,
|
||||
* 前端 dept 档据此显科室名 / "抄送对象",不再回落接收人真实姓名。 */
|
||||
private Map<String, Object> ccTraceRow(FlwCc c, FlowDefModel model, FlwInstance instance,
|
||||
Map<String, String> deptNames) {
|
||||
Map<String, Object> row = new HashMap<>();
|
||||
row.put("rowKey", "cc" + c.getId());
|
||||
row.put("ccId", c.getId());
|
||||
@@ -367,6 +371,7 @@ public class FlowQueryService {
|
||||
row.put("assigneeName", c.getUserName());
|
||||
row.put("status", null);
|
||||
row.put("time", str(c.getSentTime()));
|
||||
fillCcScope(row, model, c.getNodeId(), instance.getSchId(), deptNames);
|
||||
return row;
|
||||
}
|
||||
|
||||
@@ -469,6 +474,25 @@ public class FlowQueryService {
|
||||
Long schId, Map<String, String> deptNames) {
|
||||
FlowDefModel.Node node = model == null ? null : model.node(nodeId);
|
||||
FlowDefModel.Assignee assignee = node == null ? null : node.assignee;
|
||||
applyAssigneeScope(row, assignee, schId, deptNames);
|
||||
}
|
||||
|
||||
/**
|
||||
* 抄送行(kind=CC)科室口径富化(2026-10-12):NOTIFY 节点的接收人存在 {@code receivers}
|
||||
* 字段而非 {@code assignee},故不能直接复用 {@link #fillAssigneeScope}——否则取到的 assignee
|
||||
* 恒为 null,dept 档下抄送行只能回落接收人真实姓名(原先的泄露点)。
|
||||
* 节点在定义里找不到(重提后的老节点、已删节点)不填,前端统一显示"抄送对象"。
|
||||
*/
|
||||
private void fillCcScope(Map<String, Object> row, FlowDefModel model, String nodeId,
|
||||
Long schId, Map<String, String> deptNames) {
|
||||
FlowDefModel.Node node = model == null ? null : model.node(nodeId);
|
||||
FlowDefModel.Assignee receivers = node == null ? null : node.receivers;
|
||||
applyAssigneeScope(row, receivers, schId, deptNames);
|
||||
}
|
||||
|
||||
/** 两种口径的公共落值:assigneeType 必填;DEPT_KEY 另填 deptKey + 映射里的科室名 */
|
||||
private void applyAssigneeScope(Map<String, Object> row, FlowDefModel.Assignee assignee,
|
||||
Long schId, Map<String, String> deptNames) {
|
||||
if (assignee == null || assignee.type == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user