fix(credit): 修复执行标的字段类型错误
- 将CreditJudgmentDebtor实体类中的amount字段类型从BigDecimal改为String - 将CreditJudgmentDebtorParam参数类中的amount字段类型从BigDecimal改为String - 在导入处理中移除对amount字段的BigDecimal解析 - 添加对name1字段的空值检查 - 调整债务人名称赋值逻辑,优先使用name字段,为空时使用name1字段 - 添加调试日志输出导入数据大小
This commit is contained in:
@@ -143,6 +143,7 @@ public class CreditJudgmentDebtorController extends BaseController {
|
||||
ExcelImportSupport.ImportResult<CreditJudgmentDebtorImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudgmentDebtorImportParam.class, this::isEmptyImportRow);
|
||||
List<CreditJudgmentDebtorImportParam> list = importResult.getData();
|
||||
System.out.println("list = " + list.size());
|
||||
int usedTitleRows = importResult.getTitleRows();
|
||||
int usedHeadRows = importResult.getHeadRows();
|
||||
|
||||
@@ -244,11 +245,11 @@ public class CreditJudgmentDebtorController extends BaseController {
|
||||
}
|
||||
|
||||
private boolean isEmptyImportRow(CreditJudgmentDebtorImportParam param) {
|
||||
System.out.println("param2 = " + param);
|
||||
if (param == null) {
|
||||
return true;
|
||||
}
|
||||
return ImportHelper.isBlank(param.getCaseNumber())
|
||||
&& ImportHelper.isBlank(param.getName())
|
||||
&& ImportHelper.isBlank(param.getCode());
|
||||
}
|
||||
|
||||
@@ -256,10 +257,12 @@ public class CreditJudgmentDebtorController extends BaseController {
|
||||
CreditJudgmentDebtor entity = new CreditJudgmentDebtor();
|
||||
|
||||
entity.setCaseNumber(param.getCaseNumber());
|
||||
entity.setName(param.getName());
|
||||
entity.setName1(param.getName1());
|
||||
String debtorName = ImportHelper.isBlank(param.getName()) ? param.getName1() : param.getName();
|
||||
entity.setName(debtorName);
|
||||
entity.setCode(param.getCode());
|
||||
entity.setOccurrenceTime(param.getOccurrenceTime());
|
||||
entity.setAmount(ImportHelper.parseBigDecimal(param.getAmount(), "执行标的(元)"));
|
||||
entity.setAmount(param.getAmount());
|
||||
entity.setDataStatus(param.getDataStatus());
|
||||
entity.setComments(param.getComments());
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class CreditJudgmentDebtor implements Serializable {
|
||||
private String occurrenceTime;
|
||||
|
||||
@Schema(description = "执行标的(元)")
|
||||
private BigDecimal amount;
|
||||
private String amount;
|
||||
|
||||
@Schema(description = "法院")
|
||||
private String courtName;
|
||||
|
||||
@@ -41,7 +41,7 @@ public class CreditJudgmentDebtorParam extends BaseParam {
|
||||
|
||||
@Schema(description = "执行标的(元)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal amount;
|
||||
private String amount;
|
||||
|
||||
@Schema(description = "法院")
|
||||
private String courtName;
|
||||
|
||||
Reference in New Issue
Block a user