!52 feat(excel): 新增EasyExcel分批导入,支持字典校验和Hibernate Validator
* feat(excel): 新增EasyExcel分批导入,支持字典校验和Hibernate Validator * feat(excel): 新增EasyExcel导出工具类,基于@Excel注解解析并支持模板表头下载 * chore: 添加easyexcel依赖
This commit is contained in:
+20
@@ -373,6 +373,26 @@ public class BgXiSpeakController extends JeecgController<BgXiSpeak, IBgXiSpeakSe
|
||||
return super.importExcel(request, response, BgXiSpeak.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过EasyExcel导入数据
|
||||
*/
|
||||
@RequiresPermissions("bg.xispeak:bg_xi_speak:importExcel")
|
||||
@RequestMapping(value = "/importExcelByEasyExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcelByEasyExcel(HttpServletRequest request) {
|
||||
return super.importExcelByEasyExcel(request, BgXiSpeak.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 仅导出Excel表头(EasyExcel)
|
||||
*/
|
||||
@RequiresPermissions("bg.xispeak:bg_xi_speak:exportXls")
|
||||
@GetMapping(value = "/exportXlsHeaders")
|
||||
public void exportXlsHeaders(HttpServletResponse response) throws IOException {
|
||||
super.exportXlsHeadersByEasyExcel(response, BgXiSpeak.class, "习总书记重要讲话指示批示情况");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量查询多个 xispeak 节点下的反馈统计数量
|
||||
*
|
||||
|
||||
+9
-6
@@ -7,7 +7,6 @@ import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@@ -15,6 +14,8 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -83,9 +84,10 @@ public class BgXiSpeak implements Serializable {
|
||||
@Schema(description = "学习传达研究部署情况")
|
||||
private java.lang.String status;
|
||||
/**密级*/
|
||||
@Excel(name = "密级", width = 15, dicCode = "secret_level")
|
||||
@Excel(name = "密级(请填入非秘/秘密/机密)-必填", width = 15, dicCode = "secret_level")
|
||||
@Dict(dicCode = "secret_level")
|
||||
@Schema(description = "密级")
|
||||
@NotBlank
|
||||
private java.lang.String secretLevel;
|
||||
/**责任人*/
|
||||
@Excel(name = "责任人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||
@@ -102,8 +104,9 @@ public class BgXiSpeak implements Serializable {
|
||||
@Schema(description = "牵头部门")
|
||||
private java.lang.String leadDepartment;
|
||||
/**贯彻落实措施*/
|
||||
@Excel(name = "贯彻落实措施", width = 15)
|
||||
@Excel(name = "贯彻落实措施-必填", width = 15)
|
||||
@Schema(description = "贯彻落实措施")
|
||||
@NotBlank
|
||||
private java.lang.String implMeasures;
|
||||
/**会议决策数*/
|
||||
@Excel(name = "会议决策数", width = 15)
|
||||
@@ -126,7 +129,7 @@ public class BgXiSpeak implements Serializable {
|
||||
@Schema(description = "报告反馈情况")
|
||||
private java.lang.String reportFeedbackStatus;
|
||||
/**是否存在完成风险(0不存在,1存在)*/
|
||||
@Excel(name = "是否存在完成风险(0不存在,1存在)", width = 15, dicCode = "true_or_flase")
|
||||
@Excel(name = "是否存在完成风险(请填入是/否)", width = 15, dicCode = "true_or_flase")
|
||||
@Schema(description = "是否存在完成风险(0不存在,1存在)")
|
||||
private java.lang.Integer isCompletionRisk;
|
||||
/**拖期风险应对措施*/
|
||||
@@ -134,7 +137,7 @@ public class BgXiSpeak implements Serializable {
|
||||
@Schema(description = "拖期风险应对措施")
|
||||
private java.lang.String delayRiskMitigation;
|
||||
/**完成状态(0推进中,1已完成)*/
|
||||
@Excel(name = "完成状态(0推进中,1已完成)", width = 15, dicCode = "db_status")
|
||||
@Excel(name = "完成状态(请填入推进中/已完成)-必填", width = 15, dicCode = "db_status")
|
||||
@Schema(description = "完成状态(0推进中,1已完成)")
|
||||
@Dict( dicCode = "db_status")
|
||||
private java.lang.Integer completionStatus;
|
||||
@@ -170,7 +173,7 @@ public class BgXiSpeak implements Serializable {
|
||||
@Schema(description = "领导userId字段")
|
||||
private java.lang.String sdwLeaderList;
|
||||
/**dw领导userId字段*/
|
||||
@Excel(name = "是否需要sdw审批", width = 15)
|
||||
@Excel(name = "是否需要sdw审批(请填入是/否)", width = 15,dicCode = "true_or_flase")
|
||||
@Schema(description = "是否需要sdw审批")
|
||||
private java.lang.Integer needSdwApproval;
|
||||
|
||||
|
||||
+9
@@ -282,6 +282,15 @@ public class DjInspectImproveController extends JeecgController<DjInspectImprove
|
||||
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导入数据
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user