feat(inspectimprove): 实体添加ExcelColumn注解,新增EasyExcel导入和校验接口

- DjInspectImprove 实体所有@Excel字段补全@ExcelColumn注解
- DjInspectImproveController 新增/importExcelByEasyExcel和/checkExcelByEasyExcel接口

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wsm
2026-06-30 10:29:46 +08:00
co-authored by Claude Opus 4.7
parent 16343d2e99
commit adcb72c3d2
2 changed files with 45 additions and 9 deletions
@@ -282,14 +282,6 @@ public class DjInspectImproveController extends JeecgController<DjInspectImprove
return super.exportXls(request, djInspectImprove, DjInspectImprove.class, "巡视整改台账"); return super.exportXls(request, djInspectImprove, DjInspectImprove.class, "巡视整改台账");
} }
/**
* 仅导出Excel表头(EasyExcel
*/
@RequiresPermissions("dj.inspectimprove:dj_inspect_improve:exportXls")
@GetMapping(value = "/exportXlsHeaders")
public void exportXlsHeaders(HttpServletResponse response) throws IOException {
super.exportXlsHeadersByEasyExcel(response, DjInspectImprove.class, "巡视整改台账");
}
/** /**
* 通过excel导入数据 * 通过excel导入数据
@@ -304,4 +296,30 @@ public class DjInspectImproveController extends JeecgController<DjInspectImprove
return super.importExcel(request, response, DjInspectImprove.class); return super.importExcel(request, response, DjInspectImprove.class);
} }
} /**
* 仅导出Excel表头(EasyExcel
*/
@RequiresPermissions("dj.inspectimprove:dj_inspect_improve:exportXls")
@GetMapping(value = "/exportXlsHeaders")
public void exportXlsHeaders(HttpServletResponse response) throws IOException {
super.exportXlsHeadersByEasyExcel(response, DjInspectImprove.class, "巡视整改台账");
}
/**
* 通过EasyExcel导入数据
*/
@RequiresPermissions("dj.inspectimprove:dj_inspect_improve:importExcel")
@RequestMapping(value = "/importExcelByEasyExcel", method = RequestMethod.POST)
public Result<?> importExcelByEasyExcel(HttpServletRequest request) {
return super.importExcelByEasyExcel(request, DjInspectImprove.class);
}
/**
* 通过EasyExcel校验数据,只返回校验结果,不保存到数据库
*/
@RequiresPermissions("dj.inspectimprove:dj_inspect_improve:importExcel")
@RequestMapping(value = "/checkExcelByEasyExcel", method = RequestMethod.POST)
public Result<?> checkExcelByEasyExcel(HttpServletRequest request) {
return super.checkExcelByEasyExcel(request, DjInspectImprove.class);
}
}
@@ -13,6 +13,7 @@ import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.util.excel.annotation.ExcelColumn;
import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
@@ -64,73 +65,90 @@ public class DjInspectImprove implements Serializable {
private java.lang.String hasChild; private java.lang.String hasChild;
/**问题分类*/ /**问题分类*/
@Excel(name = "问题分类", width = 15) @Excel(name = "问题分类", width = 15)
@ExcelColumn(name = "问题分类", width = 15, dicCode = "inspect_improve_type")
@Schema(description = "问题分类") @Schema(description = "问题分类")
@Dict(dicCode = "inspect_improve_type") @Dict(dicCode = "inspect_improve_type")
private java.lang.Integer questionCategory; private java.lang.Integer questionCategory;
/**面上问题*/ /**面上问题*/
@Excel(name = "面上问题", width = 15) @Excel(name = "面上问题", width = 15)
@ExcelColumn(name = "面上问题", width = 15)
@Schema(description = "面上问题") @Schema(description = "面上问题")
private java.lang.String mianshangQuestion; private java.lang.String mianshangQuestion;
/**具体问题*/ /**具体问题*/
@Excel(name = "具体问题", width = 15) @Excel(name = "具体问题", width = 15)
@ExcelColumn(name = "具体问题", width = 15)
@Schema(description = "具体问题") @Schema(description = "具体问题")
private java.lang.String specicalQuestion; private java.lang.String specicalQuestion;
/**巡视建议*/ /**巡视建议*/
@Excel(name = "巡视建议", width = 15) @Excel(name = "巡视建议", width = 15)
@ExcelColumn(name = "巡视建议", width = 15)
@Schema(description = "巡视建议") @Schema(description = "巡视建议")
private java.lang.String inspectAdvice; private java.lang.String inspectAdvice;
/**整改措施*/ /**整改措施*/
@Excel(name = "整改措施", width = 15) @Excel(name = "整改措施", width = 15)
@ExcelColumn(name = "整改措施", width = 15)
@Schema(description = "整改措施") @Schema(description = "整改措施")
private java.lang.String improveMeasure; private java.lang.String improveMeasure;
/**完成时限*/ /**完成时限*/
@Excel(name = "完成时限", width = 15, format = "yyyy-MM-dd") @Excel(name = "完成时限", width = 15, format = "yyyy-MM-dd")
@ExcelColumn(name = "完成时限", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd")
@Schema(description = "完成时限") @Schema(description = "完成时限")
private java.util.Date deadline; private java.util.Date deadline;
/**目标节点*/ /**目标节点*/
@Excel(name = "目标节点", width = 15) @Excel(name = "目标节点", width = 15)
@ExcelColumn(name = "目标节点", width = 15)
@Schema(description = "目标节点") @Schema(description = "目标节点")
private java.lang.String targetNode; private java.lang.String targetNode;
/**问题责任领导*/ /**问题责任领导*/
@Excel(name = "问题责任领导", width = 15) @Excel(name = "问题责任领导", width = 15)
@ExcelColumn(name = "问题责任领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Schema(description = "问题责任领导") @Schema(description = "问题责任领导")
private java.lang.String questionResLeader; private java.lang.String questionResLeader;
/**问题责任部门*/ /**问题责任部门*/
@Excel(name = "问题责任部门", width = 15) @Excel(name = "问题责任部门", width = 15)
@ExcelColumn(name = "问题责任部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "问题责任部门") @Schema(description = "问题责任部门")
private java.lang.String questionResDept; private java.lang.String questionResDept;
/**措施责任领导*/ /**措施责任领导*/
@Excel(name = "措施责任领导", width = 15) @Excel(name = "措施责任领导", width = 15)
@ExcelColumn(name = "措施责任领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Schema(description = "措施责任领导") @Schema(description = "措施责任领导")
private java.lang.String measureResLeader; private java.lang.String measureResLeader;
/**措施责任部门*/ /**措施责任部门*/
@Excel(name = "措施责任部门", width = 15) @Excel(name = "措施责任部门", width = 15)
@ExcelColumn(name = "措施责任部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "措施责任部门") @Schema(description = "措施责任部门")
private java.lang.String measureResDept; private java.lang.String measureResDept;
/**整改交付成果*/ /**整改交付成果*/
@Excel(name = "整改交付成果", width = 15) @Excel(name = "整改交付成果", width = 15)
@ExcelColumn(name = "整改交付成果", width = 15)
@Schema(description = "整改交付成果") @Schema(description = "整改交付成果")
private java.lang.String rectificationEvidence; private java.lang.String rectificationEvidence;
/**成效评价标准*/ /**成效评价标准*/
@Excel(name = "成效评价标准", width = 15) @Excel(name = "成效评价标准", width = 15)
@ExcelColumn(name = "成效评价标准", width = 15)
@Schema(description = "成效评价标准") @Schema(description = "成效评价标准")
private java.lang.String evaluationCriterion; private java.lang.String evaluationCriterion;
/**工作进展*/ /**工作进展*/
@Excel(name = "工作进展", width = 15) @Excel(name = "工作进展", width = 15)
@ExcelColumn(name = "工作进展", width = 15)
@Schema(description = "工作进展") @Schema(description = "工作进展")
private java.lang.String workProgress; private java.lang.String workProgress;
/**检查情况*/ /**检查情况*/
@Excel(name = "检查情况", width = 15) @Excel(name = "检查情况", width = 15)
@ExcelColumn(name = "检查情况", width = 15)
@Schema(description = "检查情况") @Schema(description = "检查情况")
private java.lang.String inspectionStatus; private java.lang.String inspectionStatus;
/**监督意见*/ /**监督意见*/
@Excel(name = "监督意见", width = 15) @Excel(name = "监督意见", width = 15)
@ExcelColumn(name = "监督意见", width = 15)
@Schema(description = "监督意见") @Schema(description = "监督意见")
private java.lang.String supervisoryOpinion; private java.lang.String supervisoryOpinion;
/**措施数量*/ /**措施数量*/
@Excel(name = "措施数量", width = 15) @Excel(name = "措施数量", width = 15)
@ExcelColumn(name = "措施数量", width = 15)
@Schema(description = "措施数量") @Schema(description = "措施数量")
private java.lang.Integer measureCount; private java.lang.Integer measureCount;
} }