This commit is contained in:
2026-02-06 12:40:30 +08:00
parent 4832929a11
commit 46b5ce3971

View File

@@ -322,6 +322,13 @@ public class CreditJudgmentDebtorController extends BaseController {
return headerText.equals(value.trim()); return headerText.equals(value.trim());
} }
private static boolean hasMeaningfulPartyValue(String value) {
if (ImportHelper.isBlank(value)) {
return false;
}
return !"-".equals(value.trim());
}
private CreditJudgmentDebtor convertImportParamToEntity(CreditJudgmentDebtorImportParam param) { private CreditJudgmentDebtor convertImportParamToEntity(CreditJudgmentDebtorImportParam param) {
CreditJudgmentDebtor entity = new CreditJudgmentDebtor(); CreditJudgmentDebtor entity = new CreditJudgmentDebtor();
@@ -333,13 +340,11 @@ public class CreditJudgmentDebtorController extends BaseController {
} }
// Some upstream XLS templates store party/company name in "原告/上诉人/被告/第三人" columns. // Some upstream XLS templates store party/company name in "原告/上诉人/被告/第三人" columns.
// When present, use them to populate the debtor "name" for compatibility. // When present, use them to populate the debtor "name" for compatibility.
if (!ImportHelper.isBlank(param.getPlaintiffAppellant())) { if (hasMeaningfulPartyValue(param.getPlaintiffAppellant())) {
debtorName = param.getPlaintiffAppellant().trim(); debtorName = param.getPlaintiffAppellant().trim();
} } else if (hasMeaningfulPartyValue(param.getAppellee())) {
if (!ImportHelper.isBlank(param.getAppellee())) {
debtorName = param.getAppellee().trim(); debtorName = param.getAppellee().trim();
} } else if (hasMeaningfulPartyValue(param.getOtherPartiesThirdParty())) {
if (!ImportHelper.isBlank(param.getOtherPartiesThirdParty())) {
debtorName = param.getOtherPartiesThirdParty().trim(); debtorName = param.getOtherPartiesThirdParty().trim();
} }
entity.setName(debtorName); entity.setName(debtorName);