package com.ruoyi.web.controller.warehouse.reportManagement;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.finance.domain.TWareHouseFees;
import com.ruoyi.finance.service.ITFeeService;
import com.ruoyi.reportManagement.domain.TWhgenleg;
import com.ruoyi.reportManagement.service.ITWhgenlegService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 应收总账Controller
 *
 * @author ruoyi
 * @date 2020-12-23
 */
@RestController
@RequestMapping("/warehouseBusiness/receivable")
public class ReceivableController extends BaseController {

    @Autowired
    private ITFeeService tFeeService;

    /**
     * 查询应收总账列表
     */
    @PreAuthorize("@ss.hasPermi('warehouseBusiness:receivable:list')")
    @GetMapping("/list")
    public TableDataInfo chargeList(TWareHouseFees tWareHouseFees) {
        startPage();
        tWareHouseFees.setfDc("D");
        List<Map<String, Object>> list = tFeeService.warehouseBillsFeesList(tWareHouseFees);
        return getDataTable(list);
    }

    /**
     * 导出库存总账列表
     *//*
    @PreAuthorize("@ss.hasPermi('warehouseBusiness:receivable:export')")
    @Log(title = "库存总账", businessType = BusinessType.EXPORT)
    @GetMapping("/export")
    public AjaxResult export(TWhgenleg tWhgenleg) {
        List<TWhgenleg> list = tWhgenlegService.selectTWhgenlegList(tWhgenleg);
        ExcelUtil<TWhgenleg> util = new ExcelUtil<TWhgenleg>(TWhgenleg.class);
        return util.exportExcel(list, "whgenleg");
    }*/



}
