100 lines
3.8 KiB
Java
100 lines
3.8 KiB
Java
|
|
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.WmsCoilStatisticsSummaryVo;
|
|||
|
|
import com.klp.domain.bo.WmsCoilStatisticsSummaryBo;
|
|||
|
|
import com.klp.service.IWmsCoilStatisticsSummaryService;
|
|||
|
|
import com.klp.common.core.page.TableDataInfo;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 钢卷生产统计汇总(数据透视结果持久化)
|
|||
|
|
*
|
|||
|
|
* @author klp
|
|||
|
|
* @date 2026-03-07
|
|||
|
|
*/
|
|||
|
|
@Validated
|
|||
|
|
@RequiredArgsConstructor
|
|||
|
|
@RestController
|
|||
|
|
@RequestMapping("/wms/coilStatisticsSummary")
|
|||
|
|
public class WmsCoilStatisticsSummaryController extends BaseController {
|
|||
|
|
|
|||
|
|
private final IWmsCoilStatisticsSummaryService iWmsCoilStatisticsSummaryService;
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 查询钢卷生产统计汇总(数据透视结果持久化)列表
|
|||
|
|
*/
|
|||
|
|
@GetMapping("/list")
|
|||
|
|
public TableDataInfo<WmsCoilStatisticsSummaryVo> list(WmsCoilStatisticsSummaryBo bo, PageQuery pageQuery) {
|
|||
|
|
return iWmsCoilStatisticsSummaryService.queryPageList(bo, pageQuery);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 导出钢卷生产统计汇总(数据透视结果持久化)列表
|
|||
|
|
*/
|
|||
|
|
@Log(title = "钢卷生产统计汇总(数据透视结果持久化)", businessType = BusinessType.EXPORT)
|
|||
|
|
@PostMapping("/export")
|
|||
|
|
public void export(WmsCoilStatisticsSummaryBo bo, HttpServletResponse response) {
|
|||
|
|
List<WmsCoilStatisticsSummaryVo> list = iWmsCoilStatisticsSummaryService.queryList(bo);
|
|||
|
|
ExcelUtil.exportExcel(list, "钢卷生产统计汇总(数据透视结果持久化)", WmsCoilStatisticsSummaryVo.class, response);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 获取钢卷生产统计汇总(数据透视结果持久化)详细信息
|
|||
|
|
*
|
|||
|
|
* @param summaryId 主键
|
|||
|
|
*/
|
|||
|
|
@GetMapping("/{summaryId}")
|
|||
|
|
public R<WmsCoilStatisticsSummaryVo> getInfo(@NotNull(message = "主键不能为空")
|
|||
|
|
@PathVariable Long summaryId) {
|
|||
|
|
return R.ok(iWmsCoilStatisticsSummaryService.queryById(summaryId));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 新增钢卷生产统计汇总(数据透视结果持久化)
|
|||
|
|
*/
|
|||
|
|
@Log(title = "钢卷生产统计汇总(数据透视结果持久化)", businessType = BusinessType.INSERT)
|
|||
|
|
@RepeatSubmit()
|
|||
|
|
@PostMapping()
|
|||
|
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody WmsCoilStatisticsSummaryBo bo) {
|
|||
|
|
return toAjax(iWmsCoilStatisticsSummaryService.insertByBo(bo));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 修改钢卷生产统计汇总(数据透视结果持久化)
|
|||
|
|
*/
|
|||
|
|
@Log(title = "钢卷生产统计汇总(数据透视结果持久化)", businessType = BusinessType.UPDATE)
|
|||
|
|
@RepeatSubmit()
|
|||
|
|
@PutMapping()
|
|||
|
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody WmsCoilStatisticsSummaryBo bo) {
|
|||
|
|
return toAjax(iWmsCoilStatisticsSummaryService.updateByBo(bo));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 删除钢卷生产统计汇总(数据透视结果持久化)
|
|||
|
|
*
|
|||
|
|
* @param summaryIds 主键串
|
|||
|
|
*/
|
|||
|
|
@Log(title = "钢卷生产统计汇总(数据透视结果持久化)", businessType = BusinessType.DELETE)
|
|||
|
|
@DeleteMapping("/{summaryIds}")
|
|||
|
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|||
|
|
@PathVariable Long[] summaryIds) {
|
|||
|
|
return toAjax(iWmsCoilStatisticsSummaryService.deleteWithValidByIds(Arrays.asList(summaryIds), true));
|
|||
|
|
}
|
|||
|
|
}
|