package com.ruoyi.web.controller.shipping.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.shipping.service.ITCntrnoService;
import com.ruoyi.shipping.service.ITVesselService;
import com.ruoyi.shipping.service.ITVoyageService;
import com.ruoyi.shipping.service.ITWarehousebillsCntritemsService;
import com.ruoyi.warehouseBusiness.service.ITWarehousebillsfeesService;
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("/shipping/homePage")
public class HomePage  extends BaseController {
    @Autowired
    private ITCntrnoService tCntrnoService;
    @Autowired
    private ITWarehousebillsfeesService itWarehousebillsfeesService;
    @Autowired
    private ITWarehousebillsCntritemsService itWarehousebillsCntritemsService;
    @Autowired
    private ITVoyageService itVoyageService;

    //首页箱分布
    @GetMapping("/homeBox")
    public AjaxResult homeBox(){
        return AjaxResult.success(tCntrnoService.homeBox());
    }
    //船动态
    @GetMapping("/shipDynamic")
    public AjaxResult shipDynamic(){
        return AjaxResult.success(itVoyageService.shipDynamic());
    }
    //订舱排名
    @GetMapping("/bookingSpace")
    public AjaxResult bookingSpace(){
        return AjaxResult.success(itWarehousebillsCntritemsService.bookingSpace());
    }
    //应收款排名
    @GetMapping("/accountsDue")
    public AjaxResult accountsDue(){
        return AjaxResult.success(itWarehousebillsfeesService.accountsDue());
    }
}
