package com.yuchen.saas.park.service.controller.property;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.yuchen.saas.park.api.dto.property.PropertyFeeStatisticsQueryDto;
import com.yuchen.saas.park.api.vo.property.PropertyFeeStatisticsVo;
import com.yuchen.saas.park.service.service.property.bill.PropertyBillService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Author 蔡文强
 * @Date 2023/12/28 10:56
 * @Description 物业收费统计 前端控制器
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/propertyFeeStatistics")
public class PropertyFeeStatisticsController {

    @Resource
    private PropertyBillService propertyBillService;

    /**
     * 查询物业收费统计数据
     * @param queryDto 物业收费统计数据查询参数
     * @return 物业收费统计数据Vo
     */
    @PostMapping("/getFeeStatistics")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "查询物业收费统计数据", notes = "查询物业收费统计数据")
    public R<PropertyFeeStatisticsVo> getFeeStatistics(@Validated @RequestBody PropertyFeeStatisticsQueryDto queryDto) {
        return R.data(propertyBillService.getFeeStatistics(queryDto));
    }

}
