feat(controller): 更新批量导入公司ID匹配逻辑
- 将公司名称匹配方法从精确匹配改为包含匹配模式 - 添加当事人角色字段的优先级处理机制:原告/上诉人 > 被告/被上诉人 > 其他当事人/第三人 - 在多个控制器中统一实现新的匹配策略 - 为CreditJudgmentDebtorController添加备用名称字段回退机制 - 移除原有的单一字段匹配参数,改用多角色字段组合匹配
This commit is contained in:
@@ -156,7 +156,9 @@ public class CreditBreachOfTrustController extends BaseController {
|
|||||||
User loginUser = getLoginUser();
|
User loginUser = getLoginUser();
|
||||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||||
|
|
||||||
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName(
|
// Party columns may contain multiple roles/names; match if any company name is contained in the text.
|
||||||
|
// Priority: 原告/上诉人 > 被告/被上诉人 > 其他当事人/第三人
|
||||||
|
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyNameContainedInText(
|
||||||
creditBreachOfTrustService,
|
creditBreachOfTrustService,
|
||||||
creditCompanyService,
|
creditCompanyService,
|
||||||
currentTenantId,
|
currentTenantId,
|
||||||
@@ -164,13 +166,15 @@ public class CreditBreachOfTrustController extends BaseController {
|
|||||||
limit,
|
limit,
|
||||||
CreditBreachOfTrust::getId,
|
CreditBreachOfTrust::getId,
|
||||||
CreditBreachOfTrust::setId,
|
CreditBreachOfTrust::setId,
|
||||||
CreditBreachOfTrust::getPlaintiffAppellant,
|
|
||||||
CreditBreachOfTrust::getCompanyId,
|
CreditBreachOfTrust::getCompanyId,
|
||||||
CreditBreachOfTrust::setCompanyId,
|
CreditBreachOfTrust::setCompanyId,
|
||||||
CreditBreachOfTrust::getHasData,
|
CreditBreachOfTrust::getHasData,
|
||||||
CreditBreachOfTrust::setHasData,
|
CreditBreachOfTrust::setHasData,
|
||||||
CreditBreachOfTrust::getTenantId,
|
CreditBreachOfTrust::getTenantId,
|
||||||
CreditBreachOfTrust::new
|
CreditBreachOfTrust::new,
|
||||||
|
CreditBreachOfTrust::getPlaintiffAppellant,
|
||||||
|
CreditBreachOfTrust::getAppellee,
|
||||||
|
CreditBreachOfTrust::getOtherPartiesThirdParty
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!stats.anyDataRead) {
|
if (!stats.anyDataRead) {
|
||||||
|
|||||||
@@ -159,7 +159,9 @@ public class CreditCourtAnnouncementController extends BaseController {
|
|||||||
User loginUser = getLoginUser();
|
User loginUser = getLoginUser();
|
||||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||||
|
|
||||||
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName(
|
// Party columns may contain multiple roles/names; match if any company name is contained in the text.
|
||||||
|
// Priority: 原告/上诉人 > 被告/被上诉人 > 其他当事人/第三人
|
||||||
|
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyNameContainedInText(
|
||||||
creditCourtAnnouncementService,
|
creditCourtAnnouncementService,
|
||||||
creditCompanyService,
|
creditCompanyService,
|
||||||
currentTenantId,
|
currentTenantId,
|
||||||
@@ -167,13 +169,15 @@ public class CreditCourtAnnouncementController extends BaseController {
|
|||||||
limit,
|
limit,
|
||||||
CreditCourtAnnouncement::getId,
|
CreditCourtAnnouncement::getId,
|
||||||
CreditCourtAnnouncement::setId,
|
CreditCourtAnnouncement::setId,
|
||||||
CreditCourtAnnouncement::getAppellee,
|
|
||||||
CreditCourtAnnouncement::getCompanyId,
|
CreditCourtAnnouncement::getCompanyId,
|
||||||
CreditCourtAnnouncement::setCompanyId,
|
CreditCourtAnnouncement::setCompanyId,
|
||||||
CreditCourtAnnouncement::getHasData,
|
CreditCourtAnnouncement::getHasData,
|
||||||
CreditCourtAnnouncement::setHasData,
|
CreditCourtAnnouncement::setHasData,
|
||||||
CreditCourtAnnouncement::getTenantId,
|
CreditCourtAnnouncement::getTenantId,
|
||||||
CreditCourtAnnouncement::new
|
CreditCourtAnnouncement::new,
|
||||||
|
CreditCourtAnnouncement::getPlaintiffAppellant,
|
||||||
|
CreditCourtAnnouncement::getAppellee,
|
||||||
|
CreditCourtAnnouncement::getOtherPartiesThirdParty
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!stats.anyDataRead) {
|
if (!stats.anyDataRead) {
|
||||||
|
|||||||
@@ -160,7 +160,9 @@ public class CreditCourtSessionController extends BaseController {
|
|||||||
User loginUser = getLoginUser();
|
User loginUser = getLoginUser();
|
||||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||||
|
|
||||||
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName(
|
// Party columns may contain multiple roles/names; match if any company name is contained in the text.
|
||||||
|
// Priority: 原告/上诉人 > 被告/被上诉人 > 其他当事人/第三人
|
||||||
|
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyNameContainedInText(
|
||||||
creditCourtSessionService,
|
creditCourtSessionService,
|
||||||
creditCompanyService,
|
creditCompanyService,
|
||||||
currentTenantId,
|
currentTenantId,
|
||||||
@@ -168,13 +170,15 @@ public class CreditCourtSessionController extends BaseController {
|
|||||||
limit,
|
limit,
|
||||||
CreditCourtSession::getId,
|
CreditCourtSession::getId,
|
||||||
CreditCourtSession::setId,
|
CreditCourtSession::setId,
|
||||||
CreditCourtSession::getAppellee,
|
|
||||||
CreditCourtSession::getCompanyId,
|
CreditCourtSession::getCompanyId,
|
||||||
CreditCourtSession::setCompanyId,
|
CreditCourtSession::setCompanyId,
|
||||||
CreditCourtSession::getHasData,
|
CreditCourtSession::getHasData,
|
||||||
CreditCourtSession::setHasData,
|
CreditCourtSession::setHasData,
|
||||||
CreditCourtSession::getTenantId,
|
CreditCourtSession::getTenantId,
|
||||||
CreditCourtSession::new
|
CreditCourtSession::new,
|
||||||
|
CreditCourtSession::getPlaintiffAppellant,
|
||||||
|
CreditCourtSession::getAppellee,
|
||||||
|
CreditCourtSession::getOtherPartiesThirdParty
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!stats.anyDataRead) {
|
if (!stats.anyDataRead) {
|
||||||
|
|||||||
@@ -159,7 +159,9 @@ public class CreditDeliveryNoticeController extends BaseController {
|
|||||||
User loginUser = getLoginUser();
|
User loginUser = getLoginUser();
|
||||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||||
|
|
||||||
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName(
|
// Party columns may contain multiple roles/names; match if any company name is contained in the text.
|
||||||
|
// Priority: 原告/上诉人 > 被告/被上诉人 > 其他当事人/第三人
|
||||||
|
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyNameContainedInText(
|
||||||
creditDeliveryNoticeService,
|
creditDeliveryNoticeService,
|
||||||
creditCompanyService,
|
creditCompanyService,
|
||||||
currentTenantId,
|
currentTenantId,
|
||||||
@@ -167,13 +169,15 @@ public class CreditDeliveryNoticeController extends BaseController {
|
|||||||
limit,
|
limit,
|
||||||
CreditDeliveryNotice::getId,
|
CreditDeliveryNotice::getId,
|
||||||
CreditDeliveryNotice::setId,
|
CreditDeliveryNotice::setId,
|
||||||
CreditDeliveryNotice::getOtherPartiesThirdParty,
|
|
||||||
CreditDeliveryNotice::getCompanyId,
|
CreditDeliveryNotice::getCompanyId,
|
||||||
CreditDeliveryNotice::setCompanyId,
|
CreditDeliveryNotice::setCompanyId,
|
||||||
CreditDeliveryNotice::getHasData,
|
CreditDeliveryNotice::getHasData,
|
||||||
CreditDeliveryNotice::setHasData,
|
CreditDeliveryNotice::setHasData,
|
||||||
CreditDeliveryNotice::getTenantId,
|
CreditDeliveryNotice::getTenantId,
|
||||||
CreditDeliveryNotice::new
|
CreditDeliveryNotice::new,
|
||||||
|
CreditDeliveryNotice::getPlaintiffAppellant,
|
||||||
|
CreditDeliveryNotice::getAppellee,
|
||||||
|
CreditDeliveryNotice::getOtherPartiesThirdParty
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!stats.anyDataRead) {
|
if (!stats.anyDataRead) {
|
||||||
|
|||||||
@@ -160,7 +160,9 @@ public class CreditFinalVersionController extends BaseController {
|
|||||||
User loginUser = getLoginUser();
|
User loginUser = getLoginUser();
|
||||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||||
|
|
||||||
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName(
|
// Party columns may contain multiple roles/names; match if any company name is contained in the text.
|
||||||
|
// Priority: 原告/上诉人 > 被告/被上诉人 > 其他当事人/第三人
|
||||||
|
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyNameContainedInText(
|
||||||
creditFinalVersionService,
|
creditFinalVersionService,
|
||||||
creditCompanyService,
|
creditCompanyService,
|
||||||
currentTenantId,
|
currentTenantId,
|
||||||
@@ -168,13 +170,15 @@ public class CreditFinalVersionController extends BaseController {
|
|||||||
limit,
|
limit,
|
||||||
CreditFinalVersion::getId,
|
CreditFinalVersion::getId,
|
||||||
CreditFinalVersion::setId,
|
CreditFinalVersion::setId,
|
||||||
CreditFinalVersion::getAppellee,
|
|
||||||
CreditFinalVersion::getCompanyId,
|
CreditFinalVersion::getCompanyId,
|
||||||
CreditFinalVersion::setCompanyId,
|
CreditFinalVersion::setCompanyId,
|
||||||
CreditFinalVersion::getHasData,
|
CreditFinalVersion::getHasData,
|
||||||
CreditFinalVersion::setHasData,
|
CreditFinalVersion::setHasData,
|
||||||
CreditFinalVersion::getTenantId,
|
CreditFinalVersion::getTenantId,
|
||||||
CreditFinalVersion::new
|
CreditFinalVersion::new,
|
||||||
|
CreditFinalVersion::getPlaintiffAppellant,
|
||||||
|
CreditFinalVersion::getAppellee,
|
||||||
|
CreditFinalVersion::getOtherPartiesThirdParty
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!stats.anyDataRead) {
|
if (!stats.anyDataRead) {
|
||||||
|
|||||||
@@ -169,7 +169,8 @@ public class CreditJudgmentDebtorController extends BaseController {
|
|||||||
User loginUser = getLoginUser();
|
User loginUser = getLoginUser();
|
||||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||||
|
|
||||||
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName(
|
// Party columns may contain multiple roles/names; match if any company name is contained in the text.
|
||||||
|
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyNameContainedInText(
|
||||||
creditJudgmentDebtorService,
|
creditJudgmentDebtorService,
|
||||||
creditCompanyService,
|
creditCompanyService,
|
||||||
currentTenantId,
|
currentTenantId,
|
||||||
@@ -177,13 +178,17 @@ public class CreditJudgmentDebtorController extends BaseController {
|
|||||||
limit,
|
limit,
|
||||||
CreditJudgmentDebtor::getId,
|
CreditJudgmentDebtor::getId,
|
||||||
CreditJudgmentDebtor::setId,
|
CreditJudgmentDebtor::setId,
|
||||||
CreditJudgmentDebtor::getName,
|
|
||||||
CreditJudgmentDebtor::getCompanyId,
|
CreditJudgmentDebtor::getCompanyId,
|
||||||
CreditJudgmentDebtor::setCompanyId,
|
CreditJudgmentDebtor::setCompanyId,
|
||||||
CreditJudgmentDebtor::getHasData,
|
CreditJudgmentDebtor::getHasData,
|
||||||
CreditJudgmentDebtor::setHasData,
|
CreditJudgmentDebtor::setHasData,
|
||||||
CreditJudgmentDebtor::getTenantId,
|
CreditJudgmentDebtor::getTenantId,
|
||||||
CreditJudgmentDebtor::new
|
CreditJudgmentDebtor::new,
|
||||||
|
// Priority: 原告/上诉人 > 被告/被上诉人 > 其他当事人/第三人; fall back to "name" if party columns are empty.
|
||||||
|
CreditJudgmentDebtor::getPlaintiffAppellant,
|
||||||
|
CreditJudgmentDebtor::getAppellee,
|
||||||
|
CreditJudgmentDebtor::getOtherPartiesThirdParty,
|
||||||
|
CreditJudgmentDebtor::getName
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!stats.anyDataRead) {
|
if (!stats.anyDataRead) {
|
||||||
|
|||||||
@@ -159,7 +159,8 @@ public class CreditMediationController extends BaseController {
|
|||||||
User loginUser = getLoginUser();
|
User loginUser = getLoginUser();
|
||||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||||
|
|
||||||
// Special: otherPartiesThirdParty may contain multiple roles + names; match if any company name is contained in the text.
|
// Party columns may contain multiple roles/names; match if any company name is contained in the text.
|
||||||
|
// Priority: 原告/上诉人 > 被告/被上诉人 > 其他当事人/第三人
|
||||||
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyNameContainedInText(
|
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyNameContainedInText(
|
||||||
creditMediationService,
|
creditMediationService,
|
||||||
creditCompanyService,
|
creditCompanyService,
|
||||||
@@ -174,8 +175,9 @@ public class CreditMediationController extends BaseController {
|
|||||||
CreditMediation::setHasData,
|
CreditMediation::setHasData,
|
||||||
CreditMediation::getTenantId,
|
CreditMediation::getTenantId,
|
||||||
CreditMediation::new,
|
CreditMediation::new,
|
||||||
CreditMediation::getOtherPartiesThirdParty,
|
CreditMediation::getPlaintiffAppellant,
|
||||||
CreditMediation::getAppellee
|
CreditMediation::getAppellee,
|
||||||
|
CreditMediation::getOtherPartiesThirdParty
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!stats.anyDataRead) {
|
if (!stats.anyDataRead) {
|
||||||
|
|||||||
@@ -160,7 +160,9 @@ public class CreditXgxfController extends BaseController {
|
|||||||
User loginUser = getLoginUser();
|
User loginUser = getLoginUser();
|
||||||
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
Integer currentTenantId = loginUser != null ? loginUser.getTenantId() : null;
|
||||||
|
|
||||||
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyName(
|
// Party columns may contain multiple roles/names; match if any company name is contained in the text.
|
||||||
|
// Priority: 原告/上诉人 > 被告/被上诉人 > 其他当事人/第三人
|
||||||
|
BatchImportSupport.CompanyIdRefreshStats stats = batchImportSupport.refreshCompanyIdByCompanyNameContainedInText(
|
||||||
creditXgxfService,
|
creditXgxfService,
|
||||||
creditCompanyService,
|
creditCompanyService,
|
||||||
currentTenantId,
|
currentTenantId,
|
||||||
@@ -168,13 +170,15 @@ public class CreditXgxfController extends BaseController {
|
|||||||
limit,
|
limit,
|
||||||
CreditXgxf::getId,
|
CreditXgxf::getId,
|
||||||
CreditXgxf::setId,
|
CreditXgxf::setId,
|
||||||
CreditXgxf::getDataType,
|
|
||||||
CreditXgxf::getCompanyId,
|
CreditXgxf::getCompanyId,
|
||||||
CreditXgxf::setCompanyId,
|
CreditXgxf::setCompanyId,
|
||||||
CreditXgxf::getHasData,
|
CreditXgxf::getHasData,
|
||||||
CreditXgxf::setHasData,
|
CreditXgxf::setHasData,
|
||||||
CreditXgxf::getTenantId,
|
CreditXgxf::getTenantId,
|
||||||
CreditXgxf::new
|
CreditXgxf::new,
|
||||||
|
CreditXgxf::getPlaintiffAppellant,
|
||||||
|
CreditXgxf::getAppellee,
|
||||||
|
CreditXgxf::getOtherPartiesThirdParty
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!stats.anyDataRead) {
|
if (!stats.anyDataRead) {
|
||||||
|
|||||||
Reference in New Issue
Block a user