客商同步BUG修改
This commit is contained in:
+1
-1
@@ -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()))) {
|
||||
|
||||
+3
-8
@@ -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<MdmMerchantRecordDTO> 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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user