New file |
| | |
| | | package com.example.erp.controller.mm; |
| | | |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.mm.MaterialStore; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.mm.FinishedGoodsInventoryService; |
| | | import com.example.erp.service.mm.MaterialService; |
| | | 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.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/Material") |
| | | @Api(value="物料controller",tags={"物料操作接口"}) |
| | | public class MaterialController { |
| | | @Autowired |
| | | MaterialService faterialService; |
| | | |
| | | @ApiOperation("物料新增接口") |
| | | @PostMapping("/saveMaterialStore") |
| | | public Result saveMaterialStore( @RequestBody Map<String,Object> object){ |
| | | if(faterialService.saveMaterialStore(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("物料查询接口") |
| | | @PostMapping("/getSelectMaterialStore/{pageNum}/{pageSize}") |
| | | public Result getSelectMaterialStore(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody MaterialStore materialStore){ |
| | | return Result.seccess(faterialService.getSelectMaterialStore(pageNum,pageSize,materialStore)); |
| | | } |
| | | |
| | | @ApiOperation("物料删除接口") |
| | | @PostMapping("/deleteMaterialStore") |
| | | public Result deleteMaterialStore( @RequestBody Map<String,Object> object){ |
| | | if(faterialService.deleteMaterialStore(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |