package com.sckw.report.controller;

import com.sckw.core.model.page.PageResult;
import com.sckw.core.web.response.HttpResult;
import com.sckw.report.service.KwFleetService;
import lombok.AllArgsConstructor;
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;

import java.util.HashMap;

/**
 * @author zk
 * @desc 运力报表
 * @date 2023/7/8 0008
 */
@AllArgsConstructor
@RestController
@RequestMapping("/kwFleet")
public class KwFleetController {

    @Autowired
    KwFleetService fleetService;

    /**
     * @param params {page：页数、pageSize：每页条数、。。。}
     * @desc 分页查询
     * @author zk
     * @date 2023/9/1
     **/
    @PostMapping("/capacity")
    public HttpResult capacity(@RequestBody HashMap params) {
        PageResult pageResult = fleetService.capacity(params);
        return HttpResult.ok(pageResult);
    }
}
