New file |
| | |
| | | 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)); |
| | | } |
| | | |
| | | |
| | | } |