package com.fjhx.jxst.controller.settlement;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.jxst.entity.sales.dto.SalesContractDto;
import com.fjhx.jxst.entity.sales.dto.SalesContractSelectDto;
import com.fjhx.jxst.entity.statement.bo.SettlementBo;
import com.fjhx.jxst.service.sales.SalesContractService;
import org.springframework.beans.factory.annotation.Autowired;
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;

/**
 * <p>
 * 利润结算表 前端控制器
 * </p>
 *
 * @author
 * @since 2023-11-26
 */
@RestController
@RequestMapping("/settlement")
public class SettlementController {

    @Autowired
    private SalesContractService salesContractService;

    /**
     * 利润结算表
     */
    @PostMapping("/getProfitClearingPage")
    Page<SettlementBo> getProfitClearingPage(@RequestBody SalesContractSelectDto dto) {
        return salesContractService.getProfitClearingPage(dto);
    }

    /**
     * 利润结算表头部统计
     */
    @PostMapping("/getProfitClearingHead")
    SettlementBo getProfitClearingHead(@RequestBody SalesContractSelectDto dto) {
        return salesContractService.getProfitClearingHead(dto);
    }

    /**
     * 预算
     */
    @PostMapping("/budget")
    void budget(@RequestBody SalesContractDto dto){
        salesContractService.budget(dto);
    }

}
