!64 feat(excel): BgPartymatter/BgTakepulse Controller 适配 ExcelColumn 导入导出

* feat(excel): BgPartymatter/BgTakepulse Controller 适配 ExcelColumn 导入导出
* feat(excel): BgPartymatter/BgTakepulse 实体补充 ExcelColumn 导入导出注解
This commit is contained in:
wsm
2026-07-01 11:39:33 +00:00
parent d6baa52d9f
commit eb581e069c
4 changed files with 134 additions and 7 deletions
@@ -10,6 +10,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.bg.xispeak.entity.BgXiSpeak;
import org.jeecg.modules.demo.dqinspecttask.entity.DqInspectTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@@ -388,7 +390,42 @@ public class BgPartymatterController extends JeecgController<BgPartymatter, IBgP
}
/*--------------------------------子表处理-党委会反馈表-end----------------------------------------------*/
/**
* 通过EasyExcel校验数据,只返回校验结果,不保存到数据库
*/
@RequiresPermissions("bgpartymatter:bg_partymatter:importExcel")
@RequestMapping(value = "/checkExcelByEasyExcel", method = RequestMethod.POST)
public Result<?> checkExcelByEasyExcel(HttpServletRequest request) {
return super.checkExcelByEasyExcel(request, BgPartymatter.class);
}
/**
* 通过EasyExcel导入数据,支持字典校验和Hibernate Validator
*/
@RequiresPermissions("bgpartymatter:bg_partymatter:importExcel")
@PostMapping(value = "/importExcelByEasyExcel")
public Result<?> importExcelByEasyExcel(HttpServletRequest request) {
return super.importExcelByEasyExcel(request, BgPartymatter.class);
}
/**
* 通过EasyExcel导出数据
*/
@RequiresPermissions("bgpartymatter:bg_partymatter:exportXls")
@GetMapping(value = "/exportXlsByEasyExcel")
public void exportXlsByEasyExcel(HttpServletRequest request, HttpServletResponse response,
BgPartymatter bgPartymatter) throws IOException {
super.exportXlsByEasyExcel(request, response, bgPartymatter, BgPartymatter.class, "dq_inspect_task");
}
/**
* 仅导出Excel表头(EasyExcel
*/
@RequiresPermissions("bgpartymatter:bg_partymatter:exportXls")
@GetMapping(value = "/exportXlsHeaders")
public void exportXlsHeaders(HttpServletResponse response) throws IOException {
super.exportXlsHeadersByEasyExcel(response, BgPartymatter.class, "dq_inspect_task");
}
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.util.excel.annotation.ExcelColumn;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
@@ -55,65 +56,80 @@ public class BgPartymatter implements Serializable {
private java.lang.String sysOrgCode;
/**年份*/
@Excel(name = "年份", width = 15)
@ExcelColumn(name = "年份", width = 15)
@Schema(description = "年份")
private java.lang.String year;
/**会议类型*/
@Excel(name = "会议类型", width = 15, dicCode = "meeting_type")
@ExcelColumn(name = "会议类型", width = 15, dicCode = "meeting_type")
@Schema(description = "会议类型:party党委会,office所务会")
@TableField("meeting_type")
private java.lang.String meetingType;
/**密级*/
@Excel(name = "密级", width = 15,dicCode ="secret_level" )
@ExcelColumn(name = "密级", width = 15, dicCode = "secret_level")
@Dict(dicCode = "secret_level")
@Schema(description = "密级")
private java.lang.String secretLevel;
/**序号*/
@Excel(name = "序号", width = 15)
@ExcelColumn(name = "序号", width = 15)
@Schema(description = "序号")
private java.lang.String number;
/**议题序号*/
@Excel(name = "议题序号", width = 15)
@ExcelColumn(name = "议题序号", width = 15)
@Schema(description = "议题序号")
@TableField("item_number")
private java.lang.Integer itemNumber;
/**会议时间*/
@Excel(name = "会议时间", width = 15, format = "yyyy-MM-dd")
@ExcelColumn(name = "会议时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Schema(description = "会议时间")
private java.util.Date matterTime;
/**事项名称*/
@Excel(name = "事项名称", width = 15)
@ExcelColumn(name = "事项名称", width = 15)
@Schema(description = "事项名称")
private java.lang.String title;
/**会议决议*/
@Excel(name = "会议决议", width = 15)
@ExcelColumn(name = "会议决议", width = 15)
@Schema(description = "会议决议")
private java.lang.String content;
/**事项目录编码*/
@Excel(name = "事项目录编码", width = 15)
@ExcelColumn(name = "事项目录编码", width = 15)
@Schema(description = "事项目录编码")
private java.lang.String matterCode;
/**抄告单编号*/
@Excel(name = "抄告单编号", width = 15)
@ExcelColumn(name = "抄告单编号", width = 15)
@Schema(description = "抄告单编号")
private java.lang.String noticeNumber;
/**是否为三重一大决策*/
@Excel(name = "是否为三重一大决策", width = 15, dicCode = "yn")
@ExcelColumn(name = "是否为三重一大决策", width = 15, dicCode = "yn")
@Dict(dicCode = "yn")
@Schema(description = "是否为三重一大决策")
private java.lang.String isImportant;
/**主办部门*/
@Excel(name = "主办部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ExcelColumn(name = "主办部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "主办部门")
private java.lang.String responDeptid;
/**协办部门*/
@Excel(name = "协办部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ExcelColumn(name = "协办部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "协办部门")
private java.lang.String assistDeptid;
/**实际执行情况*/
@Excel(name = "实际执行情况", width = 15)
@ExcelColumn(name = "实际执行情况", width = 15)
@Schema(description = "实际执行情况")
private java.lang.String actualExect;
/**完成状态*/
@@ -127,52 +143,62 @@ public class BgPartymatter implements Serializable {
private java.lang.String superviseCount;
/**要求完成日期*/
@Excel(name = "要求完成日期", width = 15, format = "yyyy-MM-dd")
@ExcelColumn(name = "要求完成日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Schema(description = "要求完成日期")
private java.util.Date deadline;
/**是否急件*/
@Excel(name = "是否急件", width = 15, dicCode = "yn")
@ExcelColumn(name = "是否急件", width = 15, dicCode = "yn")
@Dict(dicCode = "yn")
@Schema(description = "是否急件")
private java.lang.String urgencyLevel;
/**是否需要所办领导审批*/
@Excel(name = "是否需要所办领导审批", width = 15,replace = {"是_1","否_0"} )
@ExcelColumn(name = "是否需要所办领导审批", width = 15, replace = {"是_1","否_0"})
@Schema(description = "是否需要所办领导审批")
private java.lang.String isNeedAppro;
/**所办领导*/
@Excel(name = "所办领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ExcelColumn(name = "所办领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Schema(description = "所办领导")
private java.lang.String supDeptleaderid;
/**是否抄送所领导*/
@Excel(name = "是否抄送所领导", width = 15,replace = {"是_1","否_0"} )
@ExcelColumn(name = "是否抄送所领导", width = 15, replace = {"是_1","否_0"})
@Schema(description = "是否抄送所领导")
private java.lang.String isNeedSuoleader;
/**抄送所领导*/
@Excel(name = "抄送所领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ExcelColumn(name = "抄送所领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Schema(description = "抄送所领导")
private java.lang.String suoleaderid;
/**删除标识*/
@Excel(name = "删除标识", width = 15)
//@Excel(name = "删除标识", width = 15)
@Schema(description = "删除标识")
@TableLogic(value = "0", delval = "1")
private java.lang.String delFlag = "0";
/**是否需要重复督办*/
/**是否需要重复督办*/
@Excel(name = "是否需要重复督办", width = 15)
@ExcelColumn(name = "是否需要重复督办", width = 15)
@Schema(description = "是否需要重复督办")
private java.lang.String isNeedInterval;
/**重复类型*/
@Excel(name = "重复类型", width = 15)
@ExcelColumn(name = "重复类型", width = 15)
@Schema(description = "重复类型")
private java.lang.String intervalType;
/**重复次数*/
@Excel(name = "重复次数", width = 15)
@ExcelColumn(name = "重复次数", width = 15)
@Schema(description = "重复次数")
private java.lang.String startCount;
/**重复开始时间*/
@Excel(name = "重复开始时间", width = 15, format = "yyyy-MM-dd")
@ExcelColumn(name = "重复开始时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Schema(description = "重复开始时间")
@@ -20,6 +20,7 @@ import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.vo.LoginUser;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.common.util.oConvertUtils;
@@ -55,7 +56,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
@RestController
@RequestMapping("/bqtakepulse/bgTakepulse")
@Slf4j
public class BgTakepulseController {
public class BgTakepulseController extends JeecgController<BgTakepulse, IBgTakepulseService> {
@Autowired
private IBgTakepulseService bgTakepulseService;
@Autowired
@@ -377,4 +378,41 @@ public class BgTakepulseController {
return Result.OK("文件导入失败!");
}
/**
* 通过EasyExcel校验数据,只返回校验结果,不保存到数据库
*/
@RequiresPermissions("bqtakepulse:bg_takepulse:importExcel")
@RequestMapping(value = "/checkExcelByEasyExcel", method = RequestMethod.POST)
public Result<?> checkExcelByEasyExcel(HttpServletRequest request) {
return super.checkExcelByEasyExcel(request, BgTakepulse.class);
}
/**
* 通过EasyExcel导入数据,支持字典校验和Hibernate Validator
*/
@RequiresPermissions("bqtakepulse:bg_takepulse:importExcel")
@PostMapping(value = "/importExcelByEasyExcel")
public Result<?> importExcelByEasyExcel(HttpServletRequest request) {
return super.importExcelByEasyExcel(request, BgTakepulse.class);
}
/**
* 通过EasyExcel导出数据
*/
@RequiresPermissions("bqtakepulse:bg_takepulse:exportXls")
@GetMapping(value = "/exportXlsByEasyExcel")
public void exportXlsByEasyExcel(HttpServletRequest request, HttpServletResponse response,
BgTakepulse bgTakepulse) throws IOException {
super.exportXlsByEasyExcel(request, response, bgTakepulse, BgTakepulse.class, "我为四所把把脉");
}
/**
* 仅导出Excel表头(EasyExcel
*/
@RequiresPermissions("bqtakepulse:bg_takepulse:exportXls")
@GetMapping(value = "/exportXlsHeaders")
public void exportXlsHeaders(HttpServletResponse response) throws IOException {
super.exportXlsHeadersByEasyExcel(response, BgTakepulse.class, "我为四所把把脉");
}
}
@@ -13,6 +13,7 @@ import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.util.excel.annotation.ExcelColumn;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -54,97 +55,118 @@ public class BgTakepulse implements Serializable {
private java.lang.String sysOrgCode;
/**密级*/
@Excel(name = "密级", width = 15, dicCode = "secret_level")
@ExcelColumn(name = "密级", width = 15, dicCode = "secret_level")
@Dict(dicCode = "secret_level")
@Schema(description = "密级")
private java.lang.String secretLevel;
/**年份*/
@Excel(name = "年份", width = 15, dicCode = "super_year")
@ExcelColumn(name = "年份", width = 15, dicCode = "super_year")
@Dict(dicCode = "super_year")
@Schema(description = "年份")
private java.lang.String year;
/**序号*/
@Excel(name = "序号", width = 15)
@ExcelColumn(name = "序号", width = 15)
@Schema(description = "序号")
private java.lang.String number;
/**会议类型:行政线、技术线*/
@Excel(name = "会议类型:行政线、技术线", width = 15, dicCode = "super_takepulse_type")
@Excel(name = "会议类型", width = 15, dicCode = "super_takepulse_type")
@ExcelColumn(name = "会议类型", width = 15, dicCode = "super_takepulse_type")
@Dict(dicCode = "super_takepulse_type")
@Schema(description = "会议类型:行政线、技术线")
private java.lang.String taskType;
/**类别:党的建设等其他*/
@Excel(name = "类别:党的建设等其他", width = 15)
@Excel(name = "类别", width = 15)
@ExcelColumn(name = "类别", width = 15)
@Schema(description = "类别:党的建设等其他")
private java.lang.String type;
/**提出人*/
@Excel(name = "提出人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ExcelColumn(name = "提出人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Schema(description = "提出人")
private java.lang.String proposer;
/**意见主题*/
@Excel(name = "意见主题", width = 15)
@ExcelColumn(name = "意见主题", width = 15)
@Schema(description = "意见主题")
private java.lang.String title;
/**具体意见*/
@Excel(name = "具体意见", width = 15)
@ExcelColumn(name = "具体意见", width = 15)
@Schema(description = "具体意见")
private java.lang.String content;
/**责任领导*/
@Excel(name = "责任领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ExcelColumn(name = "责任领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Schema(description = "责任领导")
private java.lang.String suoleader;
/**牵头部门*/
@Excel(name = "牵头部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ExcelColumn(name = "牵头部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "牵头部门")
private java.lang.String responDeptid;
/**协办部门*/
@Excel(name = "协办部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ExcelColumn(name = "协办部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Schema(description = "协办部门")
private java.lang.String assistDeptid;
/**落实部门*/
@Excel(name = "落实部门", width = 15)
@ExcelColumn(name = "落实部门", width = 15)
@Schema(description = "落实部门")
private java.lang.String implementDeptid;
/**是否采纳*/
@Excel(name = "是否采纳", width = 15,dicCode = "yn" )
@Excel(name = "是否采纳", width = 15, dicCode = "yn")
@ExcelColumn(name = "是否采纳", width = 15, dicCode = "yn")
@Schema(description = "是否采纳")
private java.lang.String isAdopt;
/**落实措施/解释说明*/
@Excel(name = "落实措施/解释说明", width = 15)
@ExcelColumn(name = "落实措施/解释说明", width = 15)
@Schema(description = "落实措施/解释说明")
private java.lang.String measure;
/**措施数量*/
@Excel(name = "措施数量", width = 15)
@ExcelColumn(name = "措施数量", width = 15)
@Schema(description = "措施数量")
private java.lang.Integer measureNumber;
/**成果形式*/
@Excel(name = "成果形式", width = 15)
@ExcelColumn(name = "成果形式", width = 15)
@Schema(description = "成果形式")
private java.lang.String achievement;
/**要求完成日期*/
@Excel(name = "要求完成日期", width = 15, format = "yyyy-MM-dd")
@ExcelColumn(name = "要求完成日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Schema(description = "要求完成日期")
private java.util.Date deadline;
/**备注*/
@Excel(name = "备注", width = 15)
@ExcelColumn(name = "备注", width = 15)
@Schema(description = "备注")
private java.lang.String remark;
/**执行情况*/
@Excel(name = "执行情况", width = 15)
@ExcelColumn(name = "执行情况", width = 15)
@Schema(description = "执行情况")
private java.lang.String actualExect;
/**实际完成时间*/
@Excel(name = "实际完成时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@ExcelColumn(name = "实际完成时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "实际完成时间")
private java.util.Date actualTime;
/**提出人确认*/
@Excel(name = "提出人确认", width = 15)
@ExcelColumn(name = "提出人确认", width = 15)
@Schema(description = "提出人确认")
private java.lang.String proposerConfirm;
/**完成状态*/
@@ -154,6 +176,7 @@ public class BgTakepulse implements Serializable {
private java.lang.String bpmStatus;
/**调整落实措施及执行情况*/
@Excel(name = "调整落实措施及执行情况", width = 15)
@ExcelColumn(name = "调整落实措施及执行情况", width = 15)
@Schema(description = "调整落实措施及执行情况")
private java.lang.String actSt;
/**督办次数*/
@@ -162,14 +185,17 @@ public class BgTakepulse implements Serializable {
private java.lang.String superviseCount;
/**紧急程度*/
@Excel(name = "紧急程度", width = 15)
@ExcelColumn(name = "紧急程度", width = 15)
@Schema(description = "紧急程度")
private java.lang.String urgencyLevel;
/**是否需要所办领导审批*/
@Excel(name = "是否需要所办领导审批", width = 15 ,dicCode = "yn")
@Excel(name = "是否需要所办领导审批", width = 15, dicCode = "yn")
@ExcelColumn(name = "是否需要所办领导审批", width = 15, dicCode = "yn")
@Schema(description = "是否需要所办领导审批")
private java.lang.String isNeedAppro;
/**所办领导*/
@Excel(name = "所办领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ExcelColumn(name = "所办领导", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Schema(description = "所办领导")
private java.lang.String supDeptleaderid;