| | |
| | | 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.*; |
| | |
| | | MaterialInventoryService materialInventoryService; |
| | | |
| | | @ApiOperation("物料出库新增接口") |
| | | @SaCheckPermission("CreateOutbound.add") |
| | | @PostMapping("/saveMaterialOutbound") |
| | | public Result saveMaterialOutbound( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.saveMaterialOutbound(object)){ |
| | |
| | | } |
| | | |
| | | @ApiOperation("物料新增接口") |
| | | @SaCheckPermission("SelectIngredientsStock.add") |
| | | @PostMapping("/saveMaterialInventory") |
| | | public Result saveMaterialInventory( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.saveMaterialInventory(object)){ |
| | |
| | | } |
| | | |
| | | @ApiOperation("物料库存加时间查询接口") |
| | | @SaCheckPermission("SelectIngredientsStock.search") |
| | | @PostMapping("/getSelectMaterialInventoryDate/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectMaterialInventoryDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> selectDate, @RequestBody MaterialInventory materialInventory){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialInventoryDate(pageNum,pageSize,selectDate,materialInventory)); |
| | | } |
| | | |
| | | @ApiOperation("物料库存工程加时间查询接口") |
| | | @SaCheckPermission("SelectIngredientsStock.search") |
| | | @PostMapping("/getSelectMaterialInventoryEngineeringDate/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectMaterialInventoryEngineeringDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> selectDate, @RequestBody MaterialInventory materialInventory){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialInventoryEngineeringDate(pageNum,pageSize,selectDate,materialInventory)); |
| | | } |
| | | |
| | | @ApiOperation("物料库存查询接口") |
| | | @SaCheckPermission("CreateOutbound.search") |
| | | @PostMapping("/getSelectMaterialInventory/{pageNum}/{pageSize}") |
| | | public Result getSelectMaterialInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody MaterialInventory materialInventory){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialInventory(pageNum,pageSize,materialInventory)); |
| | | } |
| | | |
| | | @ApiOperation("物料库存工程查询接口") |
| | | @SaCheckPermission("SelectIngredientsStock.search") |
| | | @PostMapping("/getSelectMaterialInventoryEngineering/{pageNum}/{pageSize}") |
| | | public Result getSelectMaterialInventoryEngineering(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OptimizeUse optimizeUse){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialInventoryEngineering(pageNum,pageSize,optimizeUse)); |
| | | } |
| | | |
| | | @ApiOperation("材料出库查询接口") |
| | | @ApiOperation("材料出库加时间查询接口") |
| | | @SaCheckPermission("MaterialOutbound.search") |
| | | @PostMapping("/getSelectMaterialOutboundDate/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectMaterialOutboundDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> selectDate, @RequestBody MaterialOutbound materialOutbound){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialOutboundDate(pageNum,pageSize,selectDate, materialOutbound)); |
| | | } |
| | | |
| | | @ApiOperation("材料出库查询接口") |
| | | @SaCheckPermission("CreateOutbound.search") |
| | | @PostMapping("/getSelectMaterialOutbound/{pageNum}/{pageSize}") |
| | | public Result getSelectMaterialOutbound(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody MaterialOutboundDetail materialOutboundDetail){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialOutbound(pageNum,pageSize,materialOutboundDetail)); |
| | |
| | | |
| | | |
| | | @ApiOperation("材料出库审核接口") |
| | | @SaCheckPermission("CreateOutbound.review") |
| | | @PostMapping("/updateMaterialOutboundToExamine") |
| | | public Result updateMaterialOutboundToExamine( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.updateMaterialOutboundToExamine(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialInventoryService.updateMaterialOutboundToExamine(object)); |
| | | } |
| | | |
| | | @ApiOperation("物料删除接口") |
| | | @ApiOperation("材料出库删除接口") |
| | | @SaCheckPermission("MaterialOutbound.delete") |
| | | @PostMapping("/deleteMaterialOutbound") |
| | | public Result deleteMaterialOutbound( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.deleteMaterialOutbound(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialInventoryService.deleteMaterialOutbound(object)); |
| | | } |
| | | |
| | | @ApiOperation("物料返库新增接口") |
| | | @SaCheckPermission("ReturnToStorageCreate.add") |
| | | @PostMapping("/saveReturningWarehouse") |
| | | public Result saveReturningWarehouse( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.saveReturningWarehouse(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialInventoryService.saveReturningWarehouse(object)); |
| | | } |
| | | |
| | | @ApiOperation("物料返库新增查询接口") |
| | | @SaCheckPermission("ReturnToStorageCreate.search") |
| | | @PostMapping("/getSelectReturningWarehouse/{pageNum}/{pageSize}") |
| | | public Result getSelectReturningWarehouse(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody ReturningWarehouseDetail returningWarehouseDetail){ |
| | | return Result.seccess(materialInventoryService.getSelectReturningWarehouse(pageNum,pageSize,returningWarehouseDetail)); |
| | | } |
| | | |
| | | @ApiOperation("物料返库审核接口") |
| | | @SaCheckPermission("ReturnToStorageCreate.review") |
| | | @PostMapping("/updateReturningWarehouseToExamine") |
| | | public Result updateReturningWarehouseToExamine( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.updateReturningWarehouseToExamine(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialInventoryService.updateReturningWarehouseToExamine(object)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("物料返库查询接口") |
| | | @SaCheckPermission("ReturnToStorage.search") |
| | | @PostMapping("/getSelectReturningWarehouseDate/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectReturningWarehouseDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> selectDate, @RequestBody ReturningWarehouse returningWarehouse){ |
| | | return Result.seccess(materialInventoryService.getSelectReturningWarehouseDate(pageNum,pageSize,selectDate, returningWarehouse)); |