feat(wms): 新增报表导出文件管理功能
新增报表导出文件管理模块,包含后端接口和前端页面 在各类报表页面添加保存报表功能 优化CoilSelector和CoilCard组件显示 调整分页大小和表格高度 统一各产线报表配置 修复文件预览组件高度问题
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
package com.klp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.domain.vo.ReportExportFileVo;
|
||||
import com.klp.domain.bo.ReportExportFileBo;
|
||||
import com.klp.service.IReportExportFileService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 报导出文件
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-04-11
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wms/exportFile")
|
||||
public class ReportExportFileController extends BaseController {
|
||||
|
||||
private final IReportExportFileService iReportExportFileService;
|
||||
|
||||
/**
|
||||
* 查询报导出文件列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ReportExportFileVo> list(ReportExportFileBo bo, PageQuery pageQuery) {
|
||||
return iReportExportFileService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报导出文件列表
|
||||
*/
|
||||
@Log(title = "报导出文件", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ReportExportFileBo bo, HttpServletResponse response) {
|
||||
List<ReportExportFileVo> list = iReportExportFileService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "报导出文件", ReportExportFileVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报导出文件详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public R<ReportExportFileVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(iReportExportFileService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报导出文件
|
||||
*/
|
||||
@Log(title = "报导出文件", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ReportExportFileBo bo) {
|
||||
return toAjax(iReportExportFileService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报导出文件
|
||||
*/
|
||||
@Log(title = "报导出文件", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ReportExportFileBo bo) {
|
||||
return toAjax(iReportExportFileService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报导出文件
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@Log(title = "报导出文件", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(iReportExportFileService.deleteWithValidByIds(Arrays.asList(ids), true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user