package vip.xiaonuo.warehouse.controller;


import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.common.pojo.CommonResult;
import vip.xiaonuo.warehouse.entity.WarehouseAge;
import vip.xiaonuo.warehouse.entity.WarehouseStockVo;
import vip.xiaonuo.warehouse.param.WarehouseAgeParam;
import vip.xiaonuo.warehouse.param.WarehouseStockDetailParam;
import vip.xiaonuo.warehouse.param.WarehouseStockParam;
import vip.xiaonuo.warehouse.service.IWarehouseAgeService;

import java.util.List;

/**
 * <p>
 * 仓库物料库龄 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-12-04
 */
@RestController
@RequestMapping("/warehouse-age")
@Api(tags = "仓库物料库龄")
@ApiSupport(author = "wang", order = 1)
@Validated
public class WarehouseAgeController {

    @Autowired
    private IWarehouseAgeService ageService;

    @ApiOperationSupport(order = 1)
    @ApiOperation("物料库龄分析")
    @PostMapping("/warehouse-stock/getOneTail")
    public CommonResult<WarehouseAge> listAge(@RequestBody WarehouseAgeParam detailParam) {
        return CommonResult.data(ageService.listAge(detailParam));
    }
}
