From c86e90ba635b44bc007d3ac784ef4935d1d185a9 Mon Sep 17 00:00:00 2001 From: gaoxq <376340421@qq.com> Date: Fri, 2 Jan 2026 19:54:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BE=85=E5=8A=9E=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/biz/entity/BizMeetingInfo.java | 2 +- .../biz/web/BizMeetingInfoController.java | 214 +++++++++--------- 2 files changed, 111 insertions(+), 105 deletions(-) diff --git a/web-api/src/main/java/com/jeesite/modules/biz/entity/BizMeetingInfo.java b/web-api/src/main/java/com/jeesite/modules/biz/entity/BizMeetingInfo.java index 7dc2f11a..5003c6e7 100644 --- a/web-api/src/main/java/com/jeesite/modules/biz/entity/BizMeetingInfo.java +++ b/web-api/src/main/java/com/jeesite/modules/biz/entity/BizMeetingInfo.java @@ -49,7 +49,7 @@ import java.io.Serial; @Column(name = "f_flow_id", attrName = "fflowId", label = "流程id", isUpdate = false, isQuery = false), @Column(name = "f_flow_task_id", attrName = "fflowTaskId", label = "流程任务主键", isUpdate = false, isQuery = false), @Column(name = "f_flow_state", attrName = "fflowState", label = "流程任务状态", isUpdate = false, isQuery = false, isUpdateForce = true), -}, orderBy = "a.id DESC" +}, orderBy = "a.create_time DESC" ) @Data public class BizMeetingInfo extends DataEntity implements Serializable { diff --git a/web-api/src/main/java/com/jeesite/modules/biz/web/BizMeetingInfoController.java b/web-api/src/main/java/com/jeesite/modules/biz/web/BizMeetingInfoController.java index dd0e8ac3..42e43b84 100644 --- a/web-api/src/main/java/com/jeesite/modules/biz/web/BizMeetingInfoController.java +++ b/web-api/src/main/java/com/jeesite/modules/biz/web/BizMeetingInfoController.java @@ -1,6 +1,9 @@ package com.jeesite.modules.biz.web; import java.util.List; + +import com.jeesite.modules.sys.entity.User; +import com.jeesite.modules.sys.utils.UserUtils; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; @@ -26,6 +29,7 @@ import com.jeesite.modules.biz.service.BizMeetingInfoService; /** * 会议主表Controller + * * @author gaoxq * @version 2026-01-02 */ @@ -33,114 +37,116 @@ import com.jeesite.modules.biz.service.BizMeetingInfoService; @RequestMapping(value = "${adminPath}/biz/meetingInfo") public class BizMeetingInfoController extends BaseController { - private final BizMeetingInfoService bizMeetingInfoService; + private final BizMeetingInfoService bizMeetingInfoService; - public BizMeetingInfoController(BizMeetingInfoService bizMeetingInfoService) { - this.bizMeetingInfoService = bizMeetingInfoService; - } - - /** - * 获取数据 - */ - @ModelAttribute - public BizMeetingInfo get(String id, boolean isNewRecord) { - return bizMeetingInfoService.get(id, isNewRecord); - } - - /** - * 查询列表 - */ - @RequiresPermissions("biz:meetingInfo:view") - @RequestMapping(value = {"list", ""}) - public String list(BizMeetingInfo bizMeetingInfo, Model model) { - model.addAttribute("bizMeetingInfo", bizMeetingInfo); - return "modules/biz/bizMeetingInfoList"; - } - - /** - * 查询列表数据 - */ - @RequiresPermissions("biz:meetingInfo:view") - @RequestMapping(value = "listData") - @ResponseBody - public Page listData(BizMeetingInfo bizMeetingInfo, HttpServletRequest request, HttpServletResponse response) { - bizMeetingInfo.setPage(new Page<>(request, response)); - Page page = bizMeetingInfoService.findPage(bizMeetingInfo); - return page; - } + public BizMeetingInfoController(BizMeetingInfoService bizMeetingInfoService) { + this.bizMeetingInfoService = bizMeetingInfoService; + } - /** - * 查看编辑表单 - */ - @RequiresPermissions("biz:meetingInfo:view") - @RequestMapping(value = "form") - public String form(BizMeetingInfo bizMeetingInfo, Model model) { - model.addAttribute("bizMeetingInfo", bizMeetingInfo); - return "modules/biz/bizMeetingInfoForm"; - } + /** + * 获取数据 + */ + @ModelAttribute + public BizMeetingInfo get(String id, boolean isNewRecord) { + return bizMeetingInfoService.get(id, isNewRecord); + } - /** - * 保存数据 - */ - @RequiresPermissions("biz:meetingInfo:edit") - @PostMapping(value = "save") - @ResponseBody - public String save(@Validated BizMeetingInfo bizMeetingInfo) { - bizMeetingInfoService.save(bizMeetingInfo); - return renderResult(Global.TRUE, text("保存会议信息成功!")); - } + /** + * 查询列表 + */ + @RequiresPermissions("biz:meetingInfo:view") + @RequestMapping(value = {"list", ""}) + public String list(BizMeetingInfo bizMeetingInfo, Model model) { + model.addAttribute("bizMeetingInfo", bizMeetingInfo); + return "modules/biz/bizMeetingInfoList"; + } - /** - * 导出数据 - */ - @RequiresPermissions("biz:meetingInfo:view") - @RequestMapping(value = "exportData") - public void exportData(BizMeetingInfo bizMeetingInfo, HttpServletResponse response) { - List list = bizMeetingInfoService.findList(bizMeetingInfo); - String fileName = "会议信息" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx"; - try(ExcelExport ee = new ExcelExport("会议信息", BizMeetingInfo.class)){ - ee.setDataList(list).write(response, fileName); - } - } + /** + * 查询列表数据 + */ + @RequiresPermissions("biz:meetingInfo:view") + @RequestMapping(value = "listData") + @ResponseBody + public Page listData(BizMeetingInfo bizMeetingInfo, HttpServletRequest request, HttpServletResponse response) { + bizMeetingInfo.setPage(new Page<>(request, response)); + Page page = bizMeetingInfoService.findPage(bizMeetingInfo); + return page; + } - /** - * 下载模板 - */ - @RequiresPermissions("biz:meetingInfo:view") - @RequestMapping(value = "importTemplate") - public void importTemplate(HttpServletResponse response) { - BizMeetingInfo bizMeetingInfo = new BizMeetingInfo(); - List list = ListUtils.newArrayList(bizMeetingInfo); - String fileName = "会议信息模板.xlsx"; - try(ExcelExport ee = new ExcelExport("会议信息", BizMeetingInfo.class, Type.IMPORT)){ - ee.setDataList(list).write(response, fileName); - } - } + /** + * 查看编辑表单 + */ + @RequiresPermissions("biz:meetingInfo:view") + @RequestMapping(value = "form") + public String form(BizMeetingInfo bizMeetingInfo, Model model) { + model.addAttribute("bizMeetingInfo", bizMeetingInfo); + return "modules/biz/bizMeetingInfoForm"; + } + + /** + * 保存数据 + */ + @RequiresPermissions("biz:meetingInfo:edit") + @PostMapping(value = "save") + @ResponseBody + public String save(@Validated BizMeetingInfo bizMeetingInfo) { + User user = UserUtils.getUser(); + bizMeetingInfo.setCreateUser(user.getLoginCode()); + bizMeetingInfoService.save(bizMeetingInfo); + return renderResult(Global.TRUE, text("保存会议信息成功!")); + } + + /** + * 导出数据 + */ + @RequiresPermissions("biz:meetingInfo:view") + @RequestMapping(value = "exportData") + public void exportData(BizMeetingInfo bizMeetingInfo, HttpServletResponse response) { + List list = bizMeetingInfoService.findList(bizMeetingInfo); + String fileName = "会议信息" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx"; + try (ExcelExport ee = new ExcelExport("会议信息", BizMeetingInfo.class)) { + ee.setDataList(list).write(response, fileName); + } + } + + /** + * 下载模板 + */ + @RequiresPermissions("biz:meetingInfo:view") + @RequestMapping(value = "importTemplate") + public void importTemplate(HttpServletResponse response) { + BizMeetingInfo bizMeetingInfo = new BizMeetingInfo(); + List list = ListUtils.newArrayList(bizMeetingInfo); + String fileName = "会议信息模板.xlsx"; + try (ExcelExport ee = new ExcelExport("会议信息", BizMeetingInfo.class, Type.IMPORT)) { + ee.setDataList(list).write(response, fileName); + } + } + + /** + * 导入数据 + */ + @ResponseBody + @RequiresPermissions("biz:meetingInfo:edit") + @PostMapping(value = "importData") + public String importData(MultipartFile file) { + try { + String message = bizMeetingInfoService.importData(file); + return renderResult(Global.TRUE, "posfull:" + message); + } catch (Exception ex) { + return renderResult(Global.FALSE, "posfull:" + ex.getMessage()); + } + } + + /** + * 删除数据 + */ + @RequiresPermissions("biz:meetingInfo:edit") + @RequestMapping(value = "delete") + @ResponseBody + public String delete(BizMeetingInfo bizMeetingInfo) { + bizMeetingInfoService.delete(bizMeetingInfo); + return renderResult(Global.TRUE, text("删除会议信息成功!")); + } - /** - * 导入数据 - */ - @ResponseBody - @RequiresPermissions("biz:meetingInfo:edit") - @PostMapping(value = "importData") - public String importData(MultipartFile file) { - try { - String message = bizMeetingInfoService.importData(file); - return renderResult(Global.TRUE, "posfull:"+message); - } catch (Exception ex) { - return renderResult(Global.FALSE, "posfull:"+ex.getMessage()); - } - } - - /** - * 删除数据 - */ - @RequiresPermissions("biz:meetingInfo:edit") - @RequestMapping(value = "delete") - @ResponseBody - public String delete(BizMeetingInfo bizMeetingInfo) { - bizMeetingInfoService.delete(bizMeetingInfo); - return renderResult(Global.TRUE, text("删除会议信息成功!")); - } - } \ No newline at end of file