feat(wms/report): 新增WMS报表通用配置管理功能
- 新增WmsReportConfig实体类、Bo、Vo和Mapper,定义报表配置的数据结构 - 新增IWmsReportConfigService接口及WmsReportConfigServiceImpl实现类,提供增删改查和分页查询服务 - 新增WmsReportConfigController控制器,提供配置列表、详情、新增、修改、删除和导出的API接口 - 在WmsReportConfigMapper.xml中映射数据库字段与实体属性
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.WmsReportConfigVo;
|
||||
import com.klp.domain.bo.WmsReportConfigBo;
|
||||
import com.klp.service.IWmsReportConfigService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* WMS报通用配置
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-05-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wms/reportConfig")
|
||||
public class WmsReportConfigController extends BaseController {
|
||||
|
||||
private final IWmsReportConfigService iWmsReportConfigService;
|
||||
|
||||
/**
|
||||
* 查询WMS报通用配置列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<WmsReportConfigVo> list(WmsReportConfigBo bo, PageQuery pageQuery) {
|
||||
return iWmsReportConfigService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出WMS报通用配置列表
|
||||
*/
|
||||
@Log(title = "WMS报通用配置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(WmsReportConfigBo bo, HttpServletResponse response) {
|
||||
List<WmsReportConfigVo> list = iWmsReportConfigService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "WMS报通用配置", WmsReportConfigVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取WMS报通用配置详细信息
|
||||
*
|
||||
* @param configId 主键
|
||||
*/
|
||||
@GetMapping("/{configId}")
|
||||
public R<WmsReportConfigVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long configId) {
|
||||
return R.ok(iWmsReportConfigService.queryById(configId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增WMS报通用配置
|
||||
*/
|
||||
@Log(title = "WMS报通用配置", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsReportConfigBo bo) {
|
||||
return toAjax(iWmsReportConfigService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改WMS报通用配置
|
||||
*/
|
||||
@Log(title = "WMS报通用配置", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsReportConfigBo bo) {
|
||||
return toAjax(iWmsReportConfigService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除WMS报通用配置
|
||||
*
|
||||
* @param configIds 主键串
|
||||
*/
|
||||
@Log(title = "WMS报通用配置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{configIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] configIds) {
|
||||
return toAjax(iWmsReportConfigService.deleteWithValidByIds(Arrays.asList(configIds), true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user