新增待办信息
This commit is contained in:
@@ -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<BizMeetingInfo> implements Serializable {
|
||||
|
||||
@@ -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<BizMeetingInfo> listData(BizMeetingInfo bizMeetingInfo, HttpServletRequest request, HttpServletResponse response) {
|
||||
bizMeetingInfo.setPage(new Page<>(request, response));
|
||||
Page<BizMeetingInfo> 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<BizMeetingInfo> 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<BizMeetingInfo> listData(BizMeetingInfo bizMeetingInfo, HttpServletRequest request, HttpServletResponse response) {
|
||||
bizMeetingInfo.setPage(new Page<>(request, response));
|
||||
Page<BizMeetingInfo> page = bizMeetingInfoService.findPage(bizMeetingInfo);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载模板
|
||||
*/
|
||||
@RequiresPermissions("biz:meetingInfo:view")
|
||||
@RequestMapping(value = "importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
BizMeetingInfo bizMeetingInfo = new BizMeetingInfo();
|
||||
List<BizMeetingInfo> 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<BizMeetingInfo> 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<BizMeetingInfo> 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("删除会议信息成功!"));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user