package com.jeethink.tjfx.controller;

import com.jeethink.common.core.controller.BaseController;
import com.jeethink.common.core.domain.AjaxResult;
import com.jeethink.tjfx.service.ITjfxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * 统计分析
 *
 * @author wms
 */
@RestController
@RequestMapping("/tjfx/tjfx")
public class TjfxController extends BaseController
{

    @Autowired
    private ITjfxService tjfxService;

    /**
     * 查询首页顶部数据
     * @return
     */
    @GetMapping("/selectShowData")
    public AjaxResult selectShowData(){
        HashMap map = new HashMap();
        map = tjfxService.selectShowData();
        return AjaxResult.success(map);
    }

    /**
     * 查询首页接收记录
     * @return
     */
    @GetMapping("/selectReceiveList")
    public AjaxResult selectReceiveList(){
        List<HashMap> receiveList = tjfxService.selectReceiveList();
        return AjaxResult.success(receiveList);
    }
    @GetMapping("/selectBorrowList")
    public AjaxResult selectBorrowList(){
        List<HashMap> borrowList = tjfxService.selectBorrowList();
        return AjaxResult.success(borrowList);
    }
    @GetMapping("/selectReturnList")
    public AjaxResult selectReturnList(){
        List<HashMap> returnList = tjfxService.selectReturnList();
        return AjaxResult.success(returnList);
    }
    @GetMapping("/selectPieChartList")
    public AjaxResult selectPieChartList(){
        List<HashMap> pieChartList = tjfxService.selectPieChartList();
        return AjaxResult.success(pieChartList);
    }
    @GetMapping("/selectRKListByMonth")
    public AjaxResult selectRKListByMonth(){
        List<HashMap> RKListByMonth = tjfxService.selectRKListByMonth();
        return AjaxResult.success(RKListByMonth);
    }
    @GetMapping("/selectJyPieChartList")
    public AjaxResult selectJyPieChartList(){
        List<HashMap> pieChartList = tjfxService.selectJyPieChartList();
        return AjaxResult.success(pieChartList);
    }
    @GetMapping("/selectTJListByMonth")
    public AjaxResult selectTJListByMonth(){
        List<HashMap> list = tjfxService.selectTJListByMonth();
        return AjaxResult.success(list);
    }
    @GetMapping("/selectTJListByYear")
    public AjaxResult selectTJListByYear(){
        List<HashMap> list = tjfxService.selectTJListByYear();
        return AjaxResult.success(list);
    }
    @GetMapping("/selectReceiveLineList")
    public AjaxResult selectReceiveLineList(){
        List<HashMap> list = tjfxService.selectReceiveLineList();
        return AjaxResult.success(list);
    }
    @GetMapping("/selectBorrowBarList")
    public AjaxResult selectBorrowBarList(){
        List<HashMap> list = tjfxService.selectBorrowBarList();
        return AjaxResult.success(list);
    }


}
