refactor(credit): 重构司法信用实体和导入参数结构
- 修改 CreditBreachOfTrust 实体字段定义,调整案号、当事人、涉案金额等字段映射 - 创建新的 CreditBreachOfTrustImportParam 导入参数类替代原有司法通用参数 - 更新 Controller 中的导入功能实现,使用新的参数类进行数据转换 - 调整查询条件过滤逻辑,移除不必要的字段匹配 - 为终本案件模块创建独立的导入参数类 CreditFinalVersionImportParam - 优化导入模板生成逻辑,支持按标签页名称查找对应工作表 - 重构终本案件实体字段映射,调整被执行人和申请执行人字段定义 - 更新 Excel 导入验证逻辑,简化空行判断条件
This commit is contained in:
@@ -335,10 +335,7 @@ public class CreditGqdjController extends BaseController {
|
||||
entity.setDataType(param.getDataType());
|
||||
entity.setPlaintiffAppellant(param.getPlaintiffAppellant());
|
||||
entity.setAppellee(param.getAppellee());
|
||||
entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty());
|
||||
entity.setOccurrenceTime(param.getOccurrenceTime());
|
||||
entity.setCaseNumber(param.getCaseNumber());
|
||||
entity.setCauseOfAction(param.getCauseOfAction());
|
||||
entity.setInvolvedAmount(param.getInvolvedAmount());
|
||||
entity.setCourtName(param.getCourtName());
|
||||
entity.setDataStatus(param.getDataStatus());
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.credit.entity.CreditXgxf;
|
||||
import com.gxwebsoft.credit.param.CreditJudicialImportParam;
|
||||
import com.gxwebsoft.credit.param.CreditXgxfImportParam;
|
||||
import com.gxwebsoft.credit.param.CreditXgxfParam;
|
||||
import com.gxwebsoft.credit.service.CreditXgxfService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -145,9 +145,9 @@ public class CreditXgxfController extends BaseController {
|
||||
|
||||
try {
|
||||
int sheetIndex = ExcelImportSupport.findSheetIndex(file, "限制高消费", 0);
|
||||
ExcelImportSupport.ImportResult<CreditJudicialImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditJudicialImportParam.class, this::isEmptyImportRow, sheetIndex);
|
||||
List<CreditJudicialImportParam> list = importResult.getData();
|
||||
ExcelImportSupport.ImportResult<CreditXgxfImportParam> importResult = ExcelImportSupport.read(
|
||||
file, CreditXgxfImportParam.class, this::isEmptyImportRow, sheetIndex);
|
||||
List<CreditXgxfImportParam> list = importResult.getData();
|
||||
int usedTitleRows = importResult.getTitleRows();
|
||||
int usedHeadRows = importResult.getHeadRows();
|
||||
|
||||
@@ -165,7 +165,7 @@ public class CreditXgxfController extends BaseController {
|
||||
List<Integer> chunkRowNumbers = new ArrayList<>(chunkSize);
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
CreditJudicialImportParam param = list.get(i);
|
||||
CreditXgxfImportParam param = list.get(i);
|
||||
try {
|
||||
CreditXgxf item = convertImportParamToEntity(param);
|
||||
|
||||
@@ -295,23 +295,20 @@ public class CreditXgxfController extends BaseController {
|
||||
@Operation(summary = "下载限制高消费导入模板")
|
||||
@GetMapping("/import/template")
|
||||
public void downloadTemplate(HttpServletResponse response) throws IOException {
|
||||
List<CreditJudicialImportParam> templateList = new ArrayList<>();
|
||||
List<CreditXgxfImportParam> templateList = new ArrayList<>();
|
||||
|
||||
CreditJudicialImportParam example = new CreditJudicialImportParam();
|
||||
CreditXgxfImportParam example = new CreditXgxfImportParam();
|
||||
example.setDataType("限制高消费");
|
||||
example.setPlaintiffAppellant("原告示例");
|
||||
example.setAppellee("被告示例");
|
||||
example.setOtherPartiesThirdParty("第三人示例");
|
||||
example.setOccurrenceTime("2024-01-01");
|
||||
example.setCaseNumber("(2024)示例案号");
|
||||
example.setCauseOfAction("案由示例");
|
||||
example.setInvolvedAmount("100000");
|
||||
example.setCourtName("示例法院");
|
||||
example.setDataStatus("已公开");
|
||||
example.setComments("备注信息");
|
||||
templateList.add(example);
|
||||
|
||||
Workbook workbook = ExcelImportSupport.buildTemplate("限制高消费导入模板", "限制高消费", CreditJudicialImportParam.class, templateList);
|
||||
Workbook workbook = ExcelImportSupport.buildTemplate("限制高消费导入模板", "限制高消费", CreditXgxfImportParam.class, templateList);
|
||||
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=credit_xgxf_import_template.xlsx");
|
||||
@@ -320,29 +317,24 @@ public class CreditXgxfController extends BaseController {
|
||||
workbook.close();
|
||||
}
|
||||
|
||||
private boolean isEmptyImportRow(CreditJudicialImportParam param) {
|
||||
private boolean isEmptyImportRow(CreditXgxfImportParam param) {
|
||||
if (param == null) {
|
||||
return true;
|
||||
}
|
||||
return ImportHelper.isBlank(param.getCaseNumber())
|
||||
&& ImportHelper.isBlank(param.getPlaintiffAppellant())
|
||||
&& ImportHelper.isBlank(param.getAppellee())
|
||||
&& ImportHelper.isBlank(param.getCauseOfAction());
|
||||
return ImportHelper.isBlank(param.getCaseNumber());
|
||||
}
|
||||
|
||||
private CreditXgxf convertImportParamToEntity(CreditJudicialImportParam param) {
|
||||
private CreditXgxf convertImportParamToEntity(CreditXgxfImportParam param) {
|
||||
CreditXgxf entity = new CreditXgxf();
|
||||
|
||||
entity.setCaseNumber(param.getCaseNumber());
|
||||
entity.setDataType(param.getDataType());
|
||||
entity.setPlaintiffAppellant(param.getPlaintiffAppellant());
|
||||
entity.setAppellee(param.getAppellee());
|
||||
entity.setOtherPartiesThirdParty(param.getOtherPartiesThirdParty());
|
||||
entity.setOccurrenceTime(param.getOccurrenceTime());
|
||||
entity.setCaseNumber(param.getCaseNumber());
|
||||
entity.setCauseOfAction(param.getCauseOfAction());
|
||||
entity.setInvolvedAmount(param.getInvolvedAmount());
|
||||
entity.setOccurrenceTime(param.getOccurrenceTime());
|
||||
entity.setCourtName(param.getCourtName());
|
||||
entity.setDataStatus(param.getDataStatus());
|
||||
entity.setReleaseDate(param.getReleaseDate());
|
||||
entity.setComments(param.getComments());
|
||||
|
||||
return entity;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CreditFinalVersion implements Serializable {
|
||||
@Schema(description = "执行法院")
|
||||
private String courtName;
|
||||
|
||||
@Schema(description = "立案时间")
|
||||
@Schema(description = "立案日期")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Schema(description = "终本日期")
|
||||
|
||||
@@ -30,37 +30,36 @@ public class CreditGqdj implements Serializable {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "原告/上诉人")
|
||||
private String plaintiffAppellant;
|
||||
|
||||
@Schema(description = "被告/被上诉人")
|
||||
@TableField("Appellee")
|
||||
private String appellee;
|
||||
|
||||
@Schema(description = "其他当事人/第三人")
|
||||
private String otherPartiesThirdParty;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Schema(description = "案号")
|
||||
@Schema(description = "执行通知文书号")
|
||||
private String caseNumber;
|
||||
|
||||
@Schema(description = "案由")
|
||||
private String causeOfAction;
|
||||
@Schema(description = "被执行人")
|
||||
private String appellee;
|
||||
|
||||
@Schema(description = "涉案金额")
|
||||
@Schema(description = "冻结股权标的企业")
|
||||
private String plaintiffAppellant;
|
||||
|
||||
@Schema(description = "被执行人持有股权、其他投资权益数额")
|
||||
private String involvedAmount;
|
||||
|
||||
@Schema(description = "法院")
|
||||
@Schema(description = "执行法院")
|
||||
private String courtName;
|
||||
|
||||
@Schema(description = "数据状态")
|
||||
@Schema(description = "类型")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private String dataStatus;
|
||||
|
||||
@Schema(description = "冻结日期自")
|
||||
private String freezeDateStart;
|
||||
|
||||
@Schema(description = "冻结日期至")
|
||||
private String freezeDateEnd;
|
||||
|
||||
@Schema(description = "公示日期")
|
||||
private String publicDate;
|
||||
|
||||
@Schema(description = "企业ID")
|
||||
private Integer companyId;
|
||||
|
||||
|
||||
@@ -30,34 +30,36 @@ public class CreditXgxf implements Serializable {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "数据类型")
|
||||
@Schema(description = "案号")
|
||||
private String caseNumber;
|
||||
|
||||
@Schema(description = "限消令对象")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "原告/上诉人")
|
||||
@Schema(description = "限制法定代表人")
|
||||
private String plaintiffAppellant;
|
||||
|
||||
@Schema(description = "被告/被上诉人")
|
||||
@TableField("Appellee")
|
||||
@Schema(description = "申请人")
|
||||
private String appellee;
|
||||
|
||||
@Schema(description = "涉案金额(元)")
|
||||
private String involvedAmount;
|
||||
|
||||
@Schema(description = "立案日期")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Schema(description = "执行法院")
|
||||
private String courtName;
|
||||
|
||||
@Schema(description = "发布日期")
|
||||
private String releaseDate;
|
||||
|
||||
@Schema(description = "其他当事人/第三人")
|
||||
private String otherPartiesThirdParty;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Schema(description = "案号")
|
||||
private String caseNumber;
|
||||
|
||||
@Schema(description = "案由")
|
||||
private String causeOfAction;
|
||||
|
||||
@Schema(description = "涉案金额")
|
||||
private String involvedAmount;
|
||||
|
||||
@Schema(description = "法院")
|
||||
private String courtName;
|
||||
|
||||
@Schema(description = "数据状态")
|
||||
private String dataStatus;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class CreditFinalVersionImportParam implements Serializable {
|
||||
@Excel(name = "执行法院")
|
||||
private String courtName;
|
||||
|
||||
@Excel(name = "立案时间")
|
||||
@Excel(name = "立案日期")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Excel(name = "终本日期")
|
||||
|
||||
@@ -45,7 +45,7 @@ public class CreditFinalVersionParam extends BaseParam {
|
||||
@Schema(description = "执行法院")
|
||||
private String courtName;
|
||||
|
||||
@Schema(description = "立案时间")
|
||||
@Schema(description = "立案日期")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Schema(description = "终本日期")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.gxwebsoft.credit.param;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -12,40 +13,33 @@ import java.io.Serializable;
|
||||
public class CreditGqdjImportParam implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "案号")
|
||||
@Excel(name = "执行通知文书号")
|
||||
private String caseNumber;
|
||||
|
||||
@Excel(name = "冻结股权标的企业")
|
||||
private String name;
|
||||
|
||||
@Excel(name = "被执行人")
|
||||
private String name1;
|
||||
private String appellee;
|
||||
|
||||
|
||||
@Excel(name = "执行法院")
|
||||
@Excel(name = "冻结股权标的企业")
|
||||
private String plaintiffAppellant;
|
||||
|
||||
@Excel(name = "被执行人持有股权、其他投资权益数额")
|
||||
private String appellee;
|
||||
private String involvedAmount;
|
||||
|
||||
@Excel(name = "其他当事人/第三人")
|
||||
private String otherPartiesThirdParty;
|
||||
@Excel(name = "执行法院")
|
||||
private String courtName;
|
||||
|
||||
// @Excel(name = "公示日期")
|
||||
// private String occurrenceTime;
|
||||
//
|
||||
// @Excel(name = "案由")
|
||||
// private String causeOfAction;
|
||||
//
|
||||
// @Excel(name = "涉案金额")
|
||||
// private String involvedAmount;
|
||||
//
|
||||
// @Excel(name = "法院")
|
||||
// private String courtName;
|
||||
//
|
||||
// @Excel(name = "数据状态")
|
||||
// private String dataStatus;
|
||||
//
|
||||
// @Excel(name = "备注")
|
||||
// private String comments;
|
||||
@Excel(name = "类型")
|
||||
private String dataType;
|
||||
|
||||
@Excel(name = "状态")
|
||||
private String dataStatus;
|
||||
|
||||
@Excel(name = "冻结日期自")
|
||||
private String freezeDateStart;
|
||||
|
||||
@Excel(name = "冻结日期至")
|
||||
private String freezeDateEnd;
|
||||
|
||||
@Excel(name = "公示日期")
|
||||
private String publicDate;
|
||||
}
|
||||
|
||||
@@ -27,36 +27,36 @@ public class CreditGqdjParam extends BaseParam {
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "原告/上诉人")
|
||||
private String plaintiffAppellant;
|
||||
|
||||
@Schema(description = "被告/被上诉人")
|
||||
private String appellee;
|
||||
|
||||
@Schema(description = "其他当事人/第三人")
|
||||
private String otherPartiesThirdParty;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Schema(description = "案号")
|
||||
@Schema(description = "执行通知文书号")
|
||||
private String caseNumber;
|
||||
|
||||
@Schema(description = "案由")
|
||||
private String causeOfAction;
|
||||
@Schema(description = "被执行人")
|
||||
private String appellee;
|
||||
|
||||
@Schema(description = "涉案金额")
|
||||
@Schema(description = "冻结股权标的企业")
|
||||
private String plaintiffAppellant;
|
||||
|
||||
@Schema(description = "被执行人持有股权、其他投资权益数额")
|
||||
private String involvedAmount;
|
||||
|
||||
@Schema(description = "法院")
|
||||
@Schema(description = "执行法院")
|
||||
private String courtName;
|
||||
|
||||
@Schema(description = "数据状态")
|
||||
@Schema(description = "类型")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private String dataStatus;
|
||||
|
||||
@Schema(description = "冻结日期自")
|
||||
private String freezeDateStart;
|
||||
|
||||
@Schema(description = "冻结日期至")
|
||||
private String freezeDateEnd;
|
||||
|
||||
@Schema(description = "公示日期")
|
||||
private String publicDate;
|
||||
|
||||
@Schema(description = "企业ID")
|
||||
private Integer companyId;
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.credit.param;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 司法通用导入参数
|
||||
*/
|
||||
@Data
|
||||
public class CreditXgxfImportParam implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "案号")
|
||||
private String caseNumber;
|
||||
|
||||
@Excel(name = "限消令对象")
|
||||
private String dataType;
|
||||
|
||||
@Excel(name = "限制法定代表人")
|
||||
private String plaintiffAppellant;
|
||||
|
||||
@Excel(name = "申请人")
|
||||
private String appellee;
|
||||
|
||||
@Excel(name = "涉案金额(元)")
|
||||
private String involvedAmount;
|
||||
|
||||
@Excel(name = "立案日期")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Excel(name = "执行法院")
|
||||
private String courtName;
|
||||
|
||||
@Excel(name = "发布日期")
|
||||
private String releaseDate;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String comments;
|
||||
|
||||
}
|
||||
@@ -27,33 +27,36 @@ public class CreditXgxfParam extends BaseParam {
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "数据类型")
|
||||
@Schema(description = "案号")
|
||||
private String caseNumber;
|
||||
|
||||
@Schema(description = "限消令对象")
|
||||
private String dataType;
|
||||
|
||||
@Schema(description = "原告/上诉人")
|
||||
@Schema(description = "限制法定代表人")
|
||||
private String plaintiffAppellant;
|
||||
|
||||
@Schema(description = "被告/被上诉人")
|
||||
@Schema(description = "申请人")
|
||||
private String appellee;
|
||||
|
||||
@Schema(description = "涉案金额(元)")
|
||||
private String involvedAmount;
|
||||
|
||||
@Schema(description = "立案日期")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Schema(description = "执行法院")
|
||||
private String courtName;
|
||||
|
||||
@Schema(description = "发布日期")
|
||||
private String releaseDate;
|
||||
|
||||
@Schema(description = "其他当事人/第三人")
|
||||
private String otherPartiesThirdParty;
|
||||
|
||||
@Schema(description = "发生时间")
|
||||
private String occurrenceTime;
|
||||
|
||||
@Schema(description = "案号")
|
||||
private String caseNumber;
|
||||
|
||||
@Schema(description = "案由")
|
||||
private String causeOfAction;
|
||||
|
||||
@Schema(description = "涉案金额")
|
||||
private String involvedAmount;
|
||||
|
||||
@Schema(description = "法院")
|
||||
private String courtName;
|
||||
|
||||
@Schema(description = "数据状态")
|
||||
private String dataStatus;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user