package vip.xiaonuo.money.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.money.entity.MoneyCost;
import vip.xiaonuo.money.entity.MoneyForecast;
import vip.xiaonuo.money.param.MoneyInOutParam;
import vip.xiaonuo.money.service.IMoneyForecastService;

import java.util.List;

/**
 * <p>
 * 财务费用预测 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-21
 */
@Api(tags = "费用预测控制器")
@ApiSupport(author = "SNOWY_TEAM", order = 1)
@RestController
@Validated
public class MoneyForecastController {

    @Autowired
    private IMoneyForecastService forecastService;

    @ApiOperationSupport(order = 1)
    @ApiOperation("费用预测")
    @PostMapping("/money-forecast/listForecast")
    public CommonResult<List<MoneyForecast>> listForecast(@RequestBody MoneyInOutParam outParam) {
        return CommonResult.data(forecastService.listForecast(outParam));
    }
}
