客商同步BUG修改
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ public final class MdmMerchantSyncFilter {
|
|||||||
if (!isCustomer(record)) {
|
if (!isCustomer(record)) {
|
||||||
return SkipReason.NOT_CUSTOMER;
|
return SkipReason.NOT_CUSTOMER;
|
||||||
}
|
}
|
||||||
if (!belongsToOrg(record.getDesc24(), orgNcCode, syncOrganizationId, topOrganizationId)) {
|
if (StringUtils.isNotEmpty(orgNcCode) && !orgNcCode.equals(trim(record.getCode()))) {
|
||||||
return SkipReason.ORG_MISMATCH;
|
return SkipReason.ORG_MISMATCH;
|
||||||
}
|
}
|
||||||
if (StringUtils.isEmpty(trim(record.getDesc1()))) {
|
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) {
|
private MdmMerchantQueryResultDTO applyOrgFilter(MdmMerchantQueryDTO queryDTO, MdmMerchantQueryResultDTO result) {
|
||||||
if (result == null || StringUtils.isEmpty(queryDTO.getOrgNcCode())
|
if (result == null || StringUtils.isEmpty(queryDTO.getOrgNcCode())
|
||||||
@@ -60,14 +60,12 @@ public class MdmMasterDataApplicationService {
|
|||||||
String orgNcCode = queryDTO.getOrgNcCode().trim();
|
String orgNcCode = queryDTO.getOrgNcCode().trim();
|
||||||
int rawCount = result.getDataInfo().size();
|
int rawCount = result.getDataInfo().size();
|
||||||
List<MdmMerchantRecordDTO> filtered = result.getDataInfo().stream()
|
List<MdmMerchantRecordDTO> filtered = result.getDataInfo().stream()
|
||||||
.filter(record -> MdmMerchantSyncFilter.belongsToOrg(
|
.filter(record -> orgNcCode.equals(record.getCode()))
|
||||||
record.getDesc24(), orgNcCode,
|
|
||||||
queryDTO.getSyncOrganizationId(), queryDTO.getTopOrganizationId()))
|
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
result.setDataInfo(filtered);
|
result.setDataInfo(filtered);
|
||||||
if (rawCount != filtered.size()) {
|
if (rawCount != filtered.size()) {
|
||||||
String note = String.format(
|
String note = String.format(
|
||||||
"(MDM原始%d条,按DESC24=%s或南光本组织空DESC24过滤后%d条;MDM总条数totalNumber为未过滤全库统计)",
|
"(MDM原始%d条,按CODE=%s过滤后%d条;MDM总条数totalNumber为未过滤全库统计)",
|
||||||
rawCount, orgNcCode, filtered.size());
|
rawCount, orgNcCode, filtered.size());
|
||||||
result.setDesc(StringUtils.isEmpty(result.getDesc()) ? note : result.getDesc() + note);
|
result.setDesc(StringUtils.isEmpty(result.getDesc()) ? note : result.getDesc() + note);
|
||||||
log.info("MDM客商查询应用侧过滤 orgNcCode={}, rawPageSize={}, filteredPageSize={}, mdmTotalNumber={}",
|
log.info("MDM客商查询应用侧过滤 orgNcCode={}, rawPageSize={}, filteredPageSize={}, mdmTotalNumber={}",
|
||||||
@@ -111,9 +109,6 @@ public class MdmMasterDataApplicationService {
|
|||||||
|
|
||||||
private String buildRequestBody(MdmMerchantQueryDTO queryDTO) {
|
private String buildRequestBody(MdmMerchantQueryDTO queryDTO) {
|
||||||
JSONObject dataInfoItem = new JSONObject();
|
JSONObject dataInfoItem = new JSONObject();
|
||||||
if (StringUtils.isNotEmpty(queryDTO.getOrgNcCode())) {
|
|
||||||
dataInfoItem.put("DESC24", queryDTO.getOrgNcCode());
|
|
||||||
}
|
|
||||||
if (StringUtils.isNotEmpty(queryDTO.getLastModifyRecordTime())) {
|
if (StringUtils.isNotEmpty(queryDTO.getLastModifyRecordTime())) {
|
||||||
dataInfoItem.put("LASTMODIFYRECORDTIME", queryDTO.getLastModifyRecordTime());
|
dataInfoItem.put("LASTMODIFYRECORDTIME", queryDTO.getLastModifyRecordTime());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user