廖井涛
2024-05-16 b79c8277a4a7a2e137e20055fbcd7339daaab7da
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
package com.example.erp.controller.mm;
 
 
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.entity.mm.MaterialStore;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.mm.MaterialStoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.Map;
 
@RestController
@RequestMapping("/MaterialStore")
@Api(value="物料controller",tags={"物料操作接口"})
public class MaterialStoreController {
    @Autowired
    MaterialStoreService materialStoreService;
 
    @ApiOperation("物料新增接口")
    @SaCheckPermission("CreateIngredients.add")
    @PostMapping("/saveMaterialStore")
    public Result saveMaterialStore( @RequestBody Map<String,Object>  object){
        return Result.seccess(materialStoreService.saveMaterialStore(object));
    }
 
    @ApiOperation("物料查询接口")
    @SaCheckPermission("SelectIngredients.search")
    @PostMapping("/getSelectMaterialStore/{pageNum}/{pageSize}")
    public Result getSelectMaterialStore(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody MaterialStore materialStore){
        return Result.seccess(materialStoreService.getSelectMaterialStore(pageNum,pageSize,materialStore));
    }
 
    @ApiOperation("物料删除接口")
    @SaCheckPermission("SelectIngredients.delete")
    @PostMapping("/deleteMaterialStore")
    public Result deleteMaterialStore( @RequestBody Map<String,Object>  object){
        return Result.seccess(materialStoreService.deleteMaterialStore(object));
    }
 
 
}