feat(import): 完善信用数据导入功能

- 新增数据类型和数据状态字段支持
- 添加原告/上诉人、被告/被上诉人等当事人字段
- 增加涉案金额、法院、发生时间等业务字段
- 实现新旧字段兼容性处理逻辑
- 更新导入模板示例数据配置
- 优化导入参数验证规则
- 扩展实体类字段映射关系
This commit is contained in:
2026-01-31 01:42:04 +08:00
parent 7c0df4fd08
commit ede52b6309
14 changed files with 362 additions and 64 deletions

View File

@@ -567,10 +567,13 @@ public class CreditBreachOfTrustController extends BaseController {
List<CreditBreachOfTrustImportParam> templateList = new ArrayList<>();
CreditBreachOfTrustImportParam example = new CreditBreachOfTrustImportParam();
example.setDataType("失信被执行人");
example.setCaseNumber("2024示例案号");
example.setPlaintiffAppellant("原告示例");
example.setAppellee("被告示例");
example.setOtherPartiesThirdParty("第三人示例");
example.setInvolvedAmount("20,293.91");
example.setDataStatus("正常");
example.setOccurrenceTime("2024-01-01");
example.setCourtName("示例法院");
example.setReleaseDate("2024-01-01");
@@ -591,18 +594,39 @@ public class CreditBreachOfTrustController extends BaseController {
}
return ImportHelper.isBlank(param.getCaseNumber())
&& ImportHelper.isBlank(param.getPlaintiffAppellant())
&& ImportHelper.isBlank(param.getAppellee());
&& ImportHelper.isBlank(param.getPlaintiffAppellant2())
&& ImportHelper.isBlank(param.getAppellee())
&& ImportHelper.isBlank(param.getAppellee2());
}
private CreditBreachOfTrust convertImportParamToEntity(CreditBreachOfTrustImportParam param) {
CreditBreachOfTrust entity = new CreditBreachOfTrust();
entity.setDataType(param.getDataType());
entity.setCaseNumber(param.getCaseNumber());
entity.setPlaintiffAppellant(param.getPlaintiffAppellant());
entity.setAppellee(param.getAppellee());
entity.setInvolvedAmount(param.getInvolvedAmount());
entity.setOccurrenceTime(param.getOccurrenceTime());
entity.setCourtName(param.getCourtName());
String plaintiffAppellant = !ImportHelper.isBlank(param.getPlaintiffAppellant2())
? param.getPlaintiffAppellant2()
: param.getPlaintiffAppellant();
entity.setPlaintiffAppellant(plaintiffAppellant);
String appellee = !ImportHelper.isBlank(param.getAppellee2())
? param.getAppellee2()
: param.getAppellee();
entity.setAppellee(appellee);
entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty());
entity.setDataStatus(param.getDataStatus());
entity.setInvolvedAmount(!ImportHelper.isBlank(param.getInvolvedAmount2())
? param.getInvolvedAmount2()
: param.getInvolvedAmount());
entity.setOccurrenceTime(!ImportHelper.isBlank(param.getOccurrenceTime2())
? param.getOccurrenceTime2()
: param.getOccurrenceTime());
entity.setCourtName(!ImportHelper.isBlank(param.getCourtName2())
? param.getCourtName2()
: param.getCourtName());
entity.setReleaseDate(param.getReleaseDate());
entity.setComments(param.getComments());

View File

@@ -364,9 +364,14 @@ public class CreditCaseFilingController extends BaseController {
List<CreditCaseFilingImportParam> templateList = new ArrayList<>();
CreditCaseFilingImportParam example = new CreditCaseFilingImportParam();
example.setDataType("立案信息");
example.setPlaintiffAppellant("原告示例");
example.setAppellee("被告示例");
example.setOtherPartiesThirdParty2("第三人示例");
example.setInvolvedAmount("100000");
example.setDataStatus("正常");
example.setCaseNumber("2024示例案号");
example.setCauseOfAction("案由示例");
example.setOtherPartiesThirdParty("当事人示例");
example.setCourtName("示例法院");
example.setOccurrenceTime("2024-01-01");
example.setComments("备注信息");
@@ -386,21 +391,50 @@ public class CreditCaseFilingController extends BaseController {
return true;
}
return ImportHelper.isBlank(param.getCaseNumber())
&& ImportHelper.isBlank(param.getPlaintiffAppellant())
&& ImportHelper.isBlank(param.getAppellee())
&& ImportHelper.isBlank(param.getCauseOfAction())
&& ImportHelper.isBlank(param.getOtherPartiesThirdParty())
&& ImportHelper.isBlank(param.getOtherPartiesThirdParty2())
&& ImportHelper.isBlank(param.getCourtName())
&& ImportHelper.isBlank(param.getCourtName2())
&& ImportHelper.isBlank(param.getOccurrenceTime())
&& ImportHelper.isBlank(param.getOccurrenceTime2())
&& ImportHelper.isBlank(param.getInvolvedAmount())
&& ImportHelper.isBlank(param.getInvolvedAmount2())
&& ImportHelper.isBlank(param.getDataStatus())
&& ImportHelper.isBlank(param.getDataType())
&& ImportHelper.isBlank(param.getComments());
}
private CreditCaseFiling convertImportParamToEntity(CreditCaseFilingImportParam param) {
CreditCaseFiling entity = new CreditCaseFiling();
// Template compatibility: prefer new columns when present.
String occurrenceTime = !ImportHelper.isBlank(param.getOccurrenceTime2())
? param.getOccurrenceTime2()
: param.getOccurrenceTime();
String otherPartiesThirdParty = !ImportHelper.isBlank(param.getOtherPartiesThirdParty2())
? param.getOtherPartiesThirdParty2()
: param.getOtherPartiesThirdParty();
String courtName = !ImportHelper.isBlank(param.getCourtName2())
? param.getCourtName2()
: param.getCourtName();
String involvedAmount = !ImportHelper.isBlank(param.getInvolvedAmount2())
? param.getInvolvedAmount2()
: param.getInvolvedAmount();
entity.setDataType(param.getDataType());
entity.setPlaintiffAppellant(param.getPlaintiffAppellant());
entity.setAppellee(param.getAppellee());
entity.setDataStatus(param.getDataStatus());
entity.setCaseNumber(param.getCaseNumber());
entity.setCauseOfAction(param.getCauseOfAction());
entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty());
entity.setCourtName(param.getCourtName());
entity.setOccurrenceTime(param.getOccurrenceTime());
entity.setOtherPartiesThirdParty(otherPartiesThirdParty);
entity.setCourtName(courtName);
entity.setOccurrenceTime(occurrenceTime);
entity.setInvolvedAmount(involvedAmount);
entity.setComments(param.getComments());
return entity;

View File

@@ -366,10 +366,14 @@ public class CreditCourtAnnouncementController extends BaseController {
CreditCourtAnnouncementImportParam example = new CreditCourtAnnouncementImportParam();
example.setDataType("法院公告");
example.setPlaintiffAppellant("原告示例");
example.setAppellee("被告示例");
example.setOtherPartiesThirdParty("第三人示例");
example.setOccurrenceTime("2024-01-01");
example.setCaseNumber("2024示例案号");
example.setCauseOfAction("案由示例");
example.setCourtName("示例法院");
example.setInvolvedAmount("100000");
example.setDataStatus("正常");
example.setComments("备注信息");
templateList.add(example);
@@ -393,12 +397,29 @@ public class CreditCourtAnnouncementController extends BaseController {
private CreditCourtAnnouncement convertImportParamToEntity(CreditCourtAnnouncementImportParam param) {
CreditCourtAnnouncement entity = new CreditCourtAnnouncement();
entity.setDataType(param.getDataType());
entity.setPlaintiffAppellant(param.getPlaintiffAppellant());
entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty());
String dataType = !ImportHelper.isBlank(param.getDataType2())
? param.getDataType2()
: param.getDataType();
String plaintiffAppellant = !ImportHelper.isBlank(param.getPlaintiffAppellant2())
? param.getPlaintiffAppellant2()
: param.getPlaintiffAppellant();
String otherPartiesThirdParty = !ImportHelper.isBlank(param.getOtherPartiesThirdParty2())
? param.getOtherPartiesThirdParty2()
: param.getOtherPartiesThirdParty();
String involvedAmount = !ImportHelper.isBlank(param.getInvolvedAmount2())
? param.getInvolvedAmount2()
: param.getInvolvedAmount();
entity.setDataType(dataType);
entity.setPlaintiffAppellant(plaintiffAppellant);
entity.setAppellee(param.getAppellee());
entity.setOtherPartiesThirdParty(otherPartiesThirdParty);
entity.setOccurrenceTime(param.getOccurrenceTime());
entity.setCaseNumber(param.getCaseNumber());
entity.setCauseOfAction(param.getCauseOfAction());
entity.setCourtName(param.getCourtName());
entity.setInvolvedAmount(involvedAmount);
entity.setDataStatus(param.getDataStatus());
entity.setComments(param.getComments());
return entity;

View File

@@ -571,11 +571,16 @@ public class CreditCourtSessionController extends BaseController {
List<CreditCourtSessionImportParam> templateList = new ArrayList<>();
CreditCourtSessionImportParam example = new CreditCourtSessionImportParam();
example.setOtherPartiesThirdParty("当事人");
example.setDataType("开庭公告");
example.setPlaintiffAppellant("原告示例");
example.setAppellee("被告示例");
example.setOtherPartiesThirdParty2("第三人示例");
example.setCaseNumber("2024示例案号");
example.setCauseOfAction("案由示例");
example.setCourtName("示例法院");
example.setOccurrenceTime("2024-01-01");
example.setInvolvedAmount("100000");
example.setDataStatus("正常");
example.setComments("备注信息");
templateList.add(example);
@@ -599,12 +604,29 @@ public class CreditCourtSessionController extends BaseController {
private CreditCourtSession convertImportParamToEntity(CreditCourtSessionImportParam param) {
CreditCourtSession entity = new CreditCourtSession();
entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty());
entity.setOccurrenceTime(param.getOccurrenceTime());
entity.setCaseNumber(param.getCaseNumber());
entity.setCauseOfAction(param.getCauseOfAction());
entity.setCourtName(param.getCourtName());
entity.setComments(param.getComments());
// Template compatibility: prefer new columns ("发生时间"/"其他当事人/第三人") when present.
String occurrenceTime = !ImportHelper.isBlank(param.getOccurrenceTime2())
? param.getOccurrenceTime2()
: param.getOccurrenceTime();
String otherPartiesThirdParty = !ImportHelper.isBlank(param.getOtherPartiesThirdParty2())
? param.getOtherPartiesThirdParty2()
: param.getOtherPartiesThirdParty();
String involvedAmount = !ImportHelper.isBlank(param.getInvolvedAmount2())
? param.getInvolvedAmount2()
: param.getInvolvedAmount();
entity.setDataType(param.getDataType());
entity.setPlaintiffAppellant(param.getPlaintiffAppellant());
entity.setAppellee(param.getAppellee());
entity.setDataStatus(param.getDataStatus());
entity.setInvolvedAmount(involvedAmount);
entity.setOtherPartiesThirdParty(otherPartiesThirdParty);
entity.setOccurrenceTime(occurrenceTime);
entity.setCaseNumber(param.getCaseNumber());
entity.setCauseOfAction(param.getCauseOfAction());
entity.setCourtName(param.getCourtName());
entity.setComments(param.getComments());
return entity;
}

View File

@@ -365,7 +365,12 @@ public class CreditDeliveryNoticeController extends BaseController {
List<CreditDeliveryNoticeImportParam> templateList = new ArrayList<>();
CreditDeliveryNoticeImportParam example = new CreditDeliveryNoticeImportParam();
example.setOtherPartiesThirdParty("第三人示例");
example.setDataType("送达公告");
example.setPlaintiffAppellant("原告示例");
example.setAppellee("被告示例");
example.setOtherPartiesThirdParty2("第三人示例");
example.setInvolvedAmount("100000");
example.setDataStatus("正常");
example.setOccurrenceTime("2024-01-01");
example.setCaseNumber("2024示例案号");
example.setCauseOfAction("案由示例");
@@ -387,17 +392,40 @@ public class CreditDeliveryNoticeController extends BaseController {
return true;
}
return ImportHelper.isBlank(param.getCaseNumber())
&& ImportHelper.isBlank(param.getCauseOfAction());
&& ImportHelper.isBlank(param.getCauseOfAction())
&& ImportHelper.isBlank(param.getOtherPartiesThirdParty())
&& ImportHelper.isBlank(param.getOtherPartiesThirdParty2())
&& ImportHelper.isBlank(param.getPlaintiffAppellant())
&& ImportHelper.isBlank(param.getAppellee());
}
private CreditDeliveryNotice convertImportParamToEntity(CreditDeliveryNoticeImportParam param) {
CreditDeliveryNotice entity = new CreditDeliveryNotice();
entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty());
entity.setOccurrenceTime(param.getOccurrenceTime());
String occurrenceTime = !ImportHelper.isBlank(param.getOccurrenceTime2())
? param.getOccurrenceTime2()
: param.getOccurrenceTime();
String otherPartiesThirdParty = !ImportHelper.isBlank(param.getOtherPartiesThirdParty2())
? param.getOtherPartiesThirdParty2()
: param.getOtherPartiesThirdParty();
String courtName = !ImportHelper.isBlank(param.getCourtName2())
? param.getCourtName2()
: param.getCourtName();
String involvedAmount = !ImportHelper.isBlank(param.getInvolvedAmount2())
? param.getInvolvedAmount2()
: param.getInvolvedAmount();
entity.setDataType(param.getDataType());
entity.setPlaintiffAppellant(param.getPlaintiffAppellant());
entity.setAppellee(param.getAppellee());
entity.setInvolvedAmount(involvedAmount);
entity.setDataStatus(param.getDataStatus());
entity.setOtherPartiesThirdParty(otherPartiesThirdParty);
entity.setOccurrenceTime(occurrenceTime);
entity.setCaseNumber(param.getCaseNumber());
entity.setCauseOfAction(param.getCauseOfAction());
entity.setCourtName(param.getCourtName());
entity.setCourtName(courtName);
entity.setComments(param.getComments());
return entity;

View File

@@ -574,7 +574,9 @@ public class CreditFinalVersionController extends BaseController {
example.setCaseNumber("2024示例案号");
example.setPlaintiffAppellant("原告示例");
example.setAppellee("被告示例");
example.setOtherPartiesThirdParty("第三人示例");
example.setInvolvedAmount("20,293.91");
example.setDataStatus("正常");
example.setCourtName("示例法院");
example.setOccurrenceTime("2024-01-01");
example.setFinalDate("2024-01-01");
@@ -600,13 +602,34 @@ public class CreditFinalVersionController extends BaseController {
private CreditFinalVersion convertImportParamToEntity(CreditFinalVersionImportParam param) {
CreditFinalVersion entity = new CreditFinalVersion();
String plaintiffAppellant = !ImportHelper.isBlank(param.getPlaintiffAppellant2())
? param.getPlaintiffAppellant2()
: param.getPlaintiffAppellant();
String appellee = !ImportHelper.isBlank(param.getAppellee2())
? param.getAppellee2()
: param.getAppellee();
String otherPartiesThirdParty = !ImportHelper.isBlank(param.getOtherPartiesThirdParty())
? param.getOtherPartiesThirdParty()
: param.getOtherPartiesThirdParty2();
String involvedAmount = !ImportHelper.isBlank(param.getInvolvedAmount2())
? param.getInvolvedAmount2()
: param.getInvolvedAmount();
String courtName = !ImportHelper.isBlank(param.getCourtName2())
? param.getCourtName2()
: param.getCourtName();
String occurrenceTime = !ImportHelper.isBlank(param.getOccurrenceTime2())
? param.getOccurrenceTime2()
: param.getOccurrenceTime();
entity.setCaseNumber(param.getCaseNumber());
entity.setPlaintiffAppellant(param.getPlaintiffAppellant());
entity.setAppellee(param.getAppellee());
entity.setPlaintiffAppellant(plaintiffAppellant);
entity.setAppellee(appellee);
entity.setUnfulfilledAmount(param.getUnfulfilledAmount());
entity.setInvolvedAmount(param.getInvolvedAmount());
entity.setCourtName(param.getCourtName());
entity.setOccurrenceTime(param.getOccurrenceTime());
entity.setInvolvedAmount(involvedAmount);
entity.setOtherPartiesThirdParty(otherPartiesThirdParty);
entity.setDataStatus(param.getDataStatus());
entity.setCourtName(courtName);
entity.setOccurrenceTime(occurrenceTime);
entity.setFinalDate(param.getFinalDate());
entity.setComments(param.getComments());