From eea0208236cf8fe6b862401d33e3b12c64804ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E9=B8=BF=E5=B1=95?= <18031053041@163.com> Date: Wed, 17 Jun 2026 17:18:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E5=95=86=E5=90=8C=E6=AD=A5BUG?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/domain/thirdparty/MdmMerchantSyncFilter.java | 2 +- .../server/MdmMasterDataApplicationService.java | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/thirdparty/MdmMerchantSyncFilter.java b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/thirdparty/MdmMerchantSyncFilter.java index c5ed5f366..e6b62e6b5 100644 --- a/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/thirdparty/MdmMerchantSyncFilter.java +++ b/mhd-common/mhd-common-core/src/main/java/com/mhd/common/core/domain/thirdparty/MdmMerchantSyncFilter.java @@ -101,7 +101,7 @@ public final class MdmMerchantSyncFilter { if (!isCustomer(record)) { return SkipReason.NOT_CUSTOMER; } - if (!belongsToOrg(record.getDesc24(), orgNcCode, syncOrganizationId, topOrganizationId)) { + if (StringUtils.isNotEmpty(orgNcCode) && !orgNcCode.equals(trim(record.getCode()))) { return SkipReason.ORG_MISMATCH; } if (StringUtils.isEmpty(trim(record.getDesc1()))) { diff --git a/mhd_thrid_party/src/main/java/com/linke/thirdParty/application/server/MdmMasterDataApplicationService.java b/mhd_thrid_party/src/main/java/com/linke/thirdParty/application/server/MdmMasterDataApplicationService.java index fe8a28f10..7d2164e26 100644 --- a/mhd_thrid_party/src/main/java/com/linke/thirdParty/application/server/MdmMasterDataApplicationService.java +++ b/mhd_thrid_party/src/main/java/com/linke/thirdParty/application/server/MdmMasterDataApplicationService.java @@ -50,7 +50,7 @@ public class MdmMasterDataApplicationService { } /** - * MDM 对 DESC24 条件未严格过滤,按 orgNcCode 在应用侧二次过滤并修正分页描述。 + * 按组织NC编码匹配客商CODE,过滤无关数据并修正分页描述。 */ private MdmMerchantQueryResultDTO applyOrgFilter(MdmMerchantQueryDTO queryDTO, MdmMerchantQueryResultDTO result) { if (result == null || StringUtils.isEmpty(queryDTO.getOrgNcCode()) @@ -60,14 +60,12 @@ public class MdmMasterDataApplicationService { String orgNcCode = queryDTO.getOrgNcCode().trim(); int rawCount = result.getDataInfo().size(); List filtered = result.getDataInfo().stream() - .filter(record -> MdmMerchantSyncFilter.belongsToOrg( - record.getDesc24(), orgNcCode, - queryDTO.getSyncOrganizationId(), queryDTO.getTopOrganizationId())) + .filter(record -> orgNcCode.equals(record.getCode())) .collect(Collectors.toList()); result.setDataInfo(filtered); if (rawCount != filtered.size()) { String note = String.format( - "(MDM原始%d条,按DESC24=%s或南光本组织空DESC24过滤后%d条;MDM总条数totalNumber为未过滤全库统计)", + "(MDM原始%d条,按CODE=%s过滤后%d条;MDM总条数totalNumber为未过滤全库统计)", rawCount, orgNcCode, filtered.size()); result.setDesc(StringUtils.isEmpty(result.getDesc()) ? note : result.getDesc() + note); log.info("MDM客商查询应用侧过滤 orgNcCode={}, rawPageSize={}, filteredPageSize={}, mdmTotalNumber={}", @@ -111,9 +109,6 @@ public class MdmMasterDataApplicationService { private String buildRequestBody(MdmMerchantQueryDTO queryDTO) { JSONObject dataInfoItem = new JSONObject(); - if (StringUtils.isNotEmpty(queryDTO.getOrgNcCode())) { - dataInfoItem.put("DESC24", queryDTO.getOrgNcCode()); - } if (StringUtils.isNotEmpty(queryDTO.getLastModifyRecordTime())) { dataInfoItem.put("LASTMODIFYRECORDTIME", queryDTO.getLastModifyRecordTime()); }