应征入伍保留学籍申请表-附件上传

This commit is contained in:
2025-11-17 17:45:34 +08:00
parent 013eaa5d6d
commit 0aeb9f2dd8
10 changed files with 170 additions and 27 deletions

View File

@@ -2,6 +2,7 @@ package com.srs.web.controller.routine;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -37,11 +38,10 @@ public class RtEnlistmentReserveAttachController extends BaseController {
/**
* 查询保留学籍申请附件(入伍通知书等)列表
*/
@PreAuthorize("@ss.hasPermi('routine:enlistmentReserveAttach:list')")
@GetMapping("/list")
@ApiOperation("查询保留学籍申请附件(入伍通知书等)列表")
public TableDataInfo list(RtEnlistmentReserveAttach rtEnlistmentReserveAttach)
{
@PreAuthorize("@ss.hasPermi('routine:enlistmentReserveAttach:list')")
@GetMapping("/list")
@ApiOperation("查询保留学籍申请附件(入伍通知书等)列表")
public TableDataInfo list(RtEnlistmentReserveAttach rtEnlistmentReserveAttach) {
startPage();
List<RtEnlistmentReserveAttach> list = rtEnlistmentReserveAttachService.selectRtEnlistmentReserveAttachList(rtEnlistmentReserveAttach);
return getDataTable(list);
@@ -54,8 +54,7 @@ public class RtEnlistmentReserveAttachController extends BaseController {
@Log(title = "保留学籍申请附件(入伍通知书等)", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ApiOperation("导出保留学籍申请附件(入伍通知书等)列表")
public void export(HttpServletResponse response, RtEnlistmentReserveAttach rtEnlistmentReserveAttach)
{
public void export(HttpServletResponse response, RtEnlistmentReserveAttach rtEnlistmentReserveAttach) {
List<RtEnlistmentReserveAttach> list = rtEnlistmentReserveAttachService.selectRtEnlistmentReserveAttachList(rtEnlistmentReserveAttach);
ExcelUtil<RtEnlistmentReserveAttach> util = new ExcelUtil<RtEnlistmentReserveAttach>(RtEnlistmentReserveAttach.class);
util.exportExcel(response, list, "保留学籍申请附件(入伍通知书等)数据");
@@ -67,8 +66,7 @@ public class RtEnlistmentReserveAttachController extends BaseController {
@PreAuthorize("@ss.hasPermi('routine:enlistmentReserveAttach:query')")
@GetMapping(value = "/{id}")
@ApiOperation("获取保留学籍申请附件(入伍通知书等)详细信息")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(rtEnlistmentReserveAttachService.selectRtEnlistmentReserveAttachById(id));
}
@@ -79,21 +77,44 @@ public class RtEnlistmentReserveAttachController extends BaseController {
@Log(title = "保留学籍申请附件(入伍通知书等)", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ApiOperation("新增保留学籍申请附件(入伍通知书等)")
public AjaxResult add(@RequestBody RtEnlistmentReserveAttach rtEnlistmentReserveAttach)
{
public AjaxResult add(@RequestBody RtEnlistmentReserveAttach rtEnlistmentReserveAttach) {
return toAjax(rtEnlistmentReserveAttachService.insertRtEnlistmentReserveAttach(rtEnlistmentReserveAttach));
}
/**
* 修改保留学籍申请附件(入伍通知书等)
* 批量新增保留学籍申请附件(入伍通知书等)
*/
@PreAuthorize("@ss.hasPermi('routine:enlistmentReserveAttach:add')")
@Log(title = "保留学籍申请附件(入伍通知书等)", businessType = BusinessType.INSERT)
@PostMapping("/batchAdd") // 注意:修改接口路径避免与原单条接口冲突
@ApiOperation("批量新增保留学籍申请附件(入伍通知书等)")
public AjaxResult batchAdd(@RequestBody List<RtEnlistmentReserveAttach> attachList) {
// 1. 校验参数合法性
if (attachList == null || attachList.isEmpty()) {
return AjaxResult.error("批量插入失败:附件列表不能为空");
}
// 2. 调用Service层批量插入方法
int rows = rtEnlistmentReserveAttachService.batchInsertRtEnlistmentReserveAttach(attachList);
// 3. 返回结果rows为成功插入的条数
return rows > 0 ? AjaxResult.success("批量插入成功,共插入 " + rows + " 条记录")
: AjaxResult.error("批量插入失败");
}
/**
* 批量修改保留学籍申请附件
*/
@PreAuthorize("@ss.hasPermi('routine:enlistmentReserveAttach:edit')")
@Log(title = "保留学籍申请附件(入伍通知书等)", businessType = BusinessType.UPDATE)
@PostMapping("/update")
@ApiOperation("修改保留学籍申请附件(入伍通知书等)")
public AjaxResult edit(@RequestBody RtEnlistmentReserveAttach rtEnlistmentReserveAttach)
{
return toAjax(rtEnlistmentReserveAttachService.updateRtEnlistmentReserveAttach(rtEnlistmentReserveAttach));
@Log(title = "保留学籍申请附件", businessType = BusinessType.UPDATE)
@PostMapping("/batchUpdate")
@ApiOperation("批量修改保留学籍申请附件")
public AjaxResult batchUpdate(@RequestBody List<RtEnlistmentReserveAttach> attachList) {
int rows = rtEnlistmentReserveAttachService.batchUpdateRtEnlistmentReserveAttach(attachList);
return rows > 0 ? AjaxResult.success("批量修改成功,共更新 " + rows + " 条记录")
: AjaxResult.error("批量修改失败,未找到匹配的记录");
}
/**
@@ -103,8 +124,7 @@ public class RtEnlistmentReserveAttachController extends BaseController {
@Log(title = "保留学籍申请附件(入伍通知书等)", businessType = BusinessType.DELETE)
@PostMapping("/{ids}")
@ApiOperation("删除保留学籍申请附件(入伍通知书等)")
public AjaxResult remove(@PathVariable Long[] ids)
{
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(rtEnlistmentReserveAttachService.deleteRtEnlistmentReserveAttachByIds(ids));
}
}

View File

@@ -88,7 +88,7 @@ public class RtEnlistmentReserveController extends BaseController {
@PostMapping("/add")
@ApiOperation("新增应征入伍保留学籍申请")
public AjaxResult add(@RequestBody RtEnlistmentReserve rtEnlistmentReserve) {
return toAjax(rtEnlistmentReserveService.insertRtEnlistmentReserve(rtEnlistmentReserve));
return success(rtEnlistmentReserveService.insertRtEnlistmentReserve(rtEnlistmentReserve));
}
/**