guoyujie
2025-10-14 81cad8df0f1b33700e7fc80f271eda7f1180efb0
north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java
@@ -5,6 +5,7 @@
import com.example.erp.common.Constants;
import com.example.erp.common.Result;
import com.example.erp.dto.mm.FinishedOperateLogDTO;
import com.example.erp.dto.mm.MaterialLogDTO;
import com.example.erp.entity.mm.*;
import com.example.erp.entity.pp.OptimizeUse;
import com.example.erp.exception.ServiceException;
@@ -44,6 +45,7 @@
    public Result saveMaterialInventory( @RequestBody Map<String,Object>  object){
        return Result.seccess(materialInventoryService.saveMaterialInventory(object));
    }
    @ApiOperation("物料库存加时间查询接口")
    @SaCheckPermission("selectIngredientsStock.search")
@@ -178,7 +180,7 @@
    @PostMapping("/exportMaterialLogReport/{type}")
    public void exportMaterialLogReport(@PathVariable String type, HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
        //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字
        DownExcel.download(response, MaterialLog.class, materialInventoryService.exportMaterialLogReport(dates,type),"orderReport");
        DownExcel.download(response, MaterialLogDTO.class, materialInventoryService.exportMaterialLogReport(dates,type),"orderReport");
    }
@@ -188,7 +190,40 @@
        return  Result.seccess(materialInventoryService.mesMaterialOutbound(reportingWork));
    }
    @ApiOperation("mes原片查询")
    @PostMapping  ("/mesOriginalSelect")
    public Result mesOriginalSelect()  {
        return  Result.seccess(materialInventoryService.mesOriginalSelect());
    }
    @ApiOperation("物料新增返回接口")
    @PostMapping("/cancelMaterialAdditionRecord")
    public Result cancelMaterialAdditionRecord( @RequestBody Map<String,Object>  object){
        return Result.seccess(materialInventoryService.cancelMaterialAdditionRecord(object));
    }
    @ApiOperation("优化物料库存记录查询接口")
    @SaCheckPermission("warehouseReport.search")
    @PostMapping("/getOptimizeOutboundReport/{type}/{pageNum}/{pageSize}/{selectDate}")
    public Result getOptimizeOutboundReport(@PathVariable String type,@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody MaterialLog materialLog){
        return Result.seccess(materialInventoryService.getOptimizeOutboundReport(type,pageNum,pageSize,selectDate,materialLog));
    }
    @ApiOperation("物料出库保存并审核接口")
    @SaCheckPermission("createOutbound.add")
    @PostMapping("/saveToExamineMaterialOutbound")
    public Result saveToExamineMaterialOutbound( @RequestBody Map<String,Object>  object){
        return Result.seccess(materialInventoryService.saveToExamineMaterialOutbound(object));
    }
    @ApiOperation("物料库存修改接口")
    @SaCheckPermission("selectIngredientsStock.add")
    @PostMapping("/updateMaterialInventory")
    public Result updateMaterialInventory( @RequestBody Map<String,Object>  object){
        return Result.seccess(materialInventoryService.updateMaterialInventory(object));
    }
}