package org.jeecg.modules.pms.controller;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.modules.pms.entity.PmsProcessBillMaterials;
|
import org.jeecg.modules.pms.service.IPmsProcessBillMaterialsService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* @Description: 订单BOM
|
* @Author: jeecg-boot
|
* @Date: 2025-07-01
|
* @Version: V1.0
|
*/
|
@Api(tags = "订单BOM")
|
@RestController
|
@RequestMapping("/pms/processBillMaterials")
|
@Slf4j
|
public class PmsProcessBillMaterialsController extends JeecgController<PmsProcessBillMaterials, IPmsProcessBillMaterialsService> {
|
@Autowired
|
private IPmsProcessBillMaterialsService pmsProcessBillMaterialsService;
|
|
/**
|
* 分页列表查询
|
*
|
* @param query
|
* @param pageNo
|
* @param pageSize
|
* @return
|
*/
|
@ApiOperation(value = "订单BOM-分页列表查询", notes = "订单BOM-分页列表查询")
|
@GetMapping(value = "/list")
|
public Result<IPage<PmsProcessBillMaterials>> queryPageList(PmsProcessBillMaterials query,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
// QueryWrapper<PmsProcessBillMaterials> queryWrapper = QueryGenerator.initQueryWrapper(pmsProcessBillMaterials, req.getParameterMap());
|
Page<PmsProcessBillMaterials> page = new Page<PmsProcessBillMaterials>(pageNo, pageSize);
|
IPage<PmsProcessBillMaterials> pageList = pmsProcessBillMaterialsService.queryPageList(page, query);
|
return Result.OK(pageList);
|
}
|
|
/**
|
* 通过id查询
|
*
|
* @param id
|
* @return
|
*/
|
//@AutoLog(value = "订单BOM-通过id查询")
|
@ApiOperation(value = "订单BOM-通过id查询", notes = "订单BOM-通过id查询")
|
@GetMapping(value = "/queryById")
|
public Result<PmsProcessBillMaterials> queryById(@RequestParam(name = "id", required = true) String id) {
|
PmsProcessBillMaterials pmsProcessBillMaterials = pmsProcessBillMaterialsService.getById(id);
|
if (pmsProcessBillMaterials == null) {
|
return Result.error("未找到对应数据");
|
}
|
return Result.OK(pmsProcessBillMaterials);
|
}
|
}
|