NmmsAnalysisController.java 1.4 KB
package com.tianbo.imfClient.controller;

import com.tianbo.imfClient.dao.ORIGINMANIFESTMASTERMapper;
import com.tianbo.imfClient.model.ORIGINMANIFESTMASTER;
import com.tianbo.imfClient.model.ResultJson;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;

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

/**
 * 出港运抵服务接口
 */
@RestController
@RequestMapping("/nmmsAnalysis")
public class NmmsAnalysisController {

    @Autowired
    private ORIGINMANIFESTMASTERMapper mapper;
    /**
     * 查询统计出港业务数据接口
     */
    @GetMapping("/analysis")
    public ResultJson analysis(@RequestParam(value = "startdate",required = true) String startdate,
                               @RequestParam(value = "enddate",required = true) String enddate,
                               @RequestParam(value = "flightno",required = false) String flightno
    ){

        Map map = new HashMap();
        map.put("startdate",startdate);
        map.put("enddate",enddate);
        map.put("flightno",flightno);
        List<ORIGINMANIFESTMASTER> list = mapper.analysis_with_tally(map);

        return  new ResultJson("200","success",list);
    }
}