廖井涛
2024-04-11 af1a961e1d714f6f3ab714d7b7a790275cc799e4
north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java
@@ -3,10 +3,8 @@
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.entity.mm.MaterialInventory;
import com.example.erp.entity.mm.MaterialOutbound;
import com.example.erp.entity.mm.MaterialOutboundDetail;
import com.example.erp.entity.mm.MaterialStore;
import com.example.erp.entity.mm.*;
import com.example.erp.entity.pp.OptimizeUse;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.mm.MaterialInventoryService;
import com.example.erp.service.mm.MaterialStoreService;
@@ -53,10 +51,22 @@
        return Result.seccess(materialInventoryService.getSelectMaterialInventoryDate(pageNum,pageSize,selectDate,materialInventory));
    }
    @ApiOperation("物料库存工程加时间查询接口")
    @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("物料库存查询接口")
    @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("物料库存工程查询接口")
    @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("材料出库查询接口")
@@ -71,7 +81,8 @@
        return Result.seccess(materialInventoryService.getSelectMaterialOutbound(pageNum,pageSize,materialOutboundDetail));
    }
    @ApiOperation("材料出库修改接口")
    @ApiOperation("材料出库审核接口")
    @PostMapping("/updateMaterialOutboundToExamine")
    public Result updateMaterialOutboundToExamine( @RequestBody Map<String,Object> object){
        if(materialInventoryService.updateMaterialOutboundToExamine(object)){
@@ -96,6 +107,42 @@
        }
    }
    @ApiOperation("物料返库新增接口")
    @PostMapping("/saveReturningWarehouse")
    public Result saveReturningWarehouse( @RequestBody Map<String,Object>  object){
        if(materialInventoryService.saveReturningWarehouse(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"保存失败");
        }
    }
    @ApiOperation("物料返库新增查询接口")
    @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("物料返库审核接口")
    @PostMapping("/updateReturningWarehouseToExamine")
    public Result updateReturningWarehouseToExamine( @RequestBody Map<String,Object> object){
        if(materialInventoryService.updateReturningWarehouseToExamine(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"审核失败");
        }
    }
    @ApiOperation("物料返库查询接口")
    @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));
    }