package com.huimv.getdata.controller;

import com.huimv.getdata.entity.center.CaiGouJinE;
import com.huimv.getdata.entity.center.DangQianYvQi;
import com.huimv.getdata.entity.center.XiaoShouE;
import com.huimv.getdata.entity.center.YangMaoZhiCaiGouJinE;
import com.huimv.getdata.entity.voucher.LinJinHuanKuanQi;
import com.huimv.getdata.service.IErpCenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

@RestController
@RequestMapping("/erp-center")
public class CenterController {
    @Autowired
    private IErpCenterService centerService;


    @RequestMapping(value = "/getXiaoShouE",method = RequestMethod.GET)
    public List<XiaoShouE> getXiaoShouE(@RequestParam(value = "date" ,required = false) String date){
        return centerService.getXiaoShouE(date);
    }

    @RequestMapping(value = "/getDangQianYvQi",method = RequestMethod.GET)
    public List<DangQianYvQi> getDangQianYvQi(@RequestParam(value = "date" ,required = false) String date){
        return centerService.getDangQianYvQi(date);
    }

    @RequestMapping(value = "/getCaiGouJinE",method = RequestMethod.GET)
    public List<CaiGouJinE> getCaiGouJinE(@RequestParam(value = "date" ,required = false) String date){
        return centerService.getCaiGouJinE(date);
    }

    @RequestMapping(value = "/getYangMaoZhiCaiGouJinE",method = RequestMethod.GET)
    public List<YangMaoZhiCaiGouJinE> getYangMaoZhiCaiGouJinE(@RequestParam(value = "date" ,required = false) String date){
        return centerService.getYangMaoZhiCaiGouJinE(date);
    }
}
