| | |
| | | |
| | | boolean syncMesRequested = Boolean.TRUE.equals(reqVO.getSyncMes()); |
| | | List<MdmAgentImportPreflightRespVO.Issue> blockingItems = new ArrayList<>(); |
| | | if (syncMesRequested) { |
| | | if (syncMesRequested && !policy.isAllowMesSync()) { |
| | | blockingItems.add(issue("MES_SYNC_DISABLED", "syncMes", |
| | | "本阶段不开放同步 MES,请关闭 syncMes 后重试", false)); |
| | | "服务未开放同步 MES,请关闭 syncMes 后重试", false)); |
| | | } |
| | | |
| | | // 4. 文件内重复编码:所有重复行一起阻断,避免“首行建、次行跳”的误导 |
| | |
| | | .build()) |
| | | .authorization(MdmAgentImportPreflightRespVO.Authorization.builder() |
| | | .userId(principal.userId()) |
| | | .tenantId(principal.tenantId()) |
| | | .permission(SystemAgentBridgeGuard.PERMISSION_ITEM_IMPORT) |
| | | .policyRevision(MdmAgentImportPolicy.POLICY_REVISION) |
| | | .build()) |
| | |
| | | .blocked(blockedCount) |
| | | .build()) |
| | | .canCommit(canCommit) |
| | | .sideEffects(canCommit ? List.of("mdm_item.create:" + createCount) : List.of()) |
| | | .sideEffects(canCommit |
| | | ? (syncMesRequested |
| | | ? List.of("mdm_item.create:" + createCount, "mes_md_item.sync:" + createCount) |
| | | : List.of("mdm_item.create:" + createCount)) |
| | | : List.of()) |
| | | .rows(rows) |
| | | .blockingItems(blockingItems) |
| | | .build(); |
| | |
| | | Map<String, Object> canonical = new LinkedHashMap<>(); |
| | | canonical.put("policy_revision", MdmAgentImportPolicy.POLICY_REVISION); |
| | | canonical.put("user_id", principal.userId()); |
| | | canonical.put("tenant_id", principal.tenantId()); |
| | | canonical.put("attachment_id", attachment.attachmentId()); |
| | | canonical.put("session_id", attachment.sessionId()); |
| | | canonical.put("source_sha256", sourceSha256.toLowerCase(Locale.ROOT)); |