新火炬后端单体项目初始化代码
zhangherong
昨天 eeebc22772cbf7dc03ed4bc6f734e6de9f5c3e75
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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);
    }
}