package com.fjhx.form.controller;

import com.fjhx.form.service.StatisticsService;
import com.fjhx.sale.entity.contract.vo.ContractVo;
import com.fjhx.sale.entity.purchase.vo.EhsdPurchaseVo;
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.List;
import java.util.Map;


@RestController
@RequestMapping("/statistics")
public class StatisticsController {

    @Autowired
    private StatisticsService statisticsService;

    /**
     * 工作事项统计
     *
     * @return
     */
    @GetMapping("/workStatistics")
    public Map<String, Long> workStatistics() {
        return statisticsService.workStatistics();
    }

    /**
     * 合同近7天出货列表
     */
    @GetMapping("/getRecentContractShipmentList")
    List<ContractVo> getRecentContractShipmentList() {
        return statisticsService.getRecentContractShipmentList();
    }

    /**
     * 采购近7天到货列表
     */
    @GetMapping("/getRecentPurchaseArrivalList")
    List<EhsdPurchaseVo> getRecentPurchaseArrivalList() {
        return statisticsService.getRecentPurchaseArrivalList();
    }


}
