package cn.com.ty.lift.batch.applet.controller;

import cn.com.ty.lift.batch.applet.dao.model.request.AnnualInspectionDataRequest;
import cn.com.ty.lift.batch.applet.service.AnnualInspectionDataService;
import cn.com.xwy.boot.web.dto.RestResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author huangyuan
 * @date 2020/2/3
 * @description 小程序年检数据统计
 */
@RestController
@RequestMapping("/applet/annual")
public class AnnualInspectionDataStatisticsController {
    @Resource
    private AnnualInspectionDataService annualInspectionDataService;

    /**
     * @param
     * @return
     * @description 年检总览
     * @date 2020/2/5 4:05 下午
     */
    @RequestMapping("/annualOverView")
    public RestResponse annualOverView(@RequestBody AnnualInspectionDataRequest annualInspectionDataRequest) {
        return annualInspectionDataService.annualOverView(annualInspectionDataRequest);
    }

    /**
     * @param
     * @return
     * @description 年检进度前五的项目
     * @date 2020/2/5 4:10 下午
     */
    @RequestMapping("/annualProgress")
    public RestResponse annualProgress(@RequestBody AnnualInspectionDataRequest annualInspectionDataRequest) {
        return annualInspectionDataService.annualProgress(annualInspectionDataRequest);
    }

    /**
     * @param
     * @return
     * @description 获取所有项目的年检进度
     * @date 2020/2/5 4:14 下午
     */
    @RequestMapping("/allProjectAnnualProgress")
    public RestResponse allProjectAnnualProgress(@RequestBody AnnualInspectionDataRequest annualInspectionDataRequest) {
        return annualInspectionDataService.allProjectAnnualProgress(annualInspectionDataRequest);
    }
}
