package com.yh.saas.plugin.yiliangyiyun.controller;


import com.baomidou.mybatisplus.plugins.Page;
import com.yh.saas.plugin.yiliangyiyun.entity.CollectionWarehousingRecord;
import com.yh.saas.plugin.yiliangyiyun.entity.FuelFillingInfo;
import com.yh.saas.plugin.yiliangyiyun.service.IFuelFillingInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 记录加油信息 前端控制器
 * </p>
 *
 * @author Gdc
 * @since 2022-06-24
 */
@RestController
@RequestMapping("/fuelFillingInfo")
public class FuelFillingInfoController {
    @Autowired
    private IFuelFillingInfoService fuelFillingInfoService;
    /**
     * 添加长途加油信息
     *
     * @param fuelFillingInfo
     * @return
     */
    @PostMapping("/api/addFilling")
    public String addFilling(@RequestBody FuelFillingInfo fuelFillingInfo) {
        return fuelFillingInfoService.addFilling(fuelFillingInfo);
    }
    /**
     * 长途加油列表
     *
     * @param fuelFillingInfo
     * @return
     */
    @GetMapping("/selectFilling")
    public Page<FuelFillingInfo> selectFilling(FuelFillingInfo fuelFillingInfo) {
        return fuelFillingInfoService.selectFilling(fuelFillingInfo);
    }
    /**
     * 查看长途加油信息
     *
     * @param id
     * @return
     */
    @GetMapping("/getFilling")
    public FuelFillingInfo getFilling(@RequestParam String id) {
        return fuelFillingInfoService.getFilling(id);
    }

    /**
     * 加油管理列表(PC)
     *
     * @param fuelFillingInfo
     * @return
     */
    @GetMapping("/selectFillingPc")
    public Page<FuelFillingInfo> selectFillingPc(FuelFillingInfo fuelFillingInfo) {
        return fuelFillingInfoService.selectFillingPc(fuelFillingInfo);
    }

    /**
     * 加油管理付款
     * @param fuelFillingInfo1
     * @return
     */
    @PostMapping("/api/fillingPayMoney")
    public String fillingPayMoney(@RequestBody FuelFillingInfo fuelFillingInfo1){
        return fuelFillingInfoService.fillingPayMoney(fuelFillingInfo1);
    }
}

