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

import cn.com.ty.lift.batch.applet.dao.model.request.CommonRequest;
import cn.com.ty.lift.batch.applet.service.MaintenanceDataService;
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/maintenance")
public class MaintenanceDataStatisticsController {

    @Resource
    private MaintenanceDataService maintenanceDataService;

    /**
     * @param commonRequest 年份
     * @return
     * @description 获取维保月份总览数据
     * @date 2020/5/22 10:31 上午
     */
    @RequestMapping("/monthMaintenanceOverView")
    public RestResponse monthMaintenanceOverView(@RequestBody CommonRequest commonRequest) {
        return maintenanceDataService.monthMaintenanceOverView(commonRequest);
    }

    /**
     * @param
     * @return
     * @description 获取维保统计的总览情况
     * @date 2020/2/5 4:50 下午
     */
    @RequestMapping("/maintenanceOverView")
    public RestResponse maintenanceOverView(@RequestBody CommonRequest commonRequest) {
        return maintenanceDataService.maintenanceOverView(commonRequest);
    }

    /**
     * @param
     * @return
     * @description 超期统计
     * @date 2020/2/5 4:53 下午
     */
    @RequestMapping("/beyondStatistics")
    public RestResponse beyondStatistics(@RequestBody CommonRequest commonRequest) {
        return maintenanceDataService.beyondStatistics(commonRequest);
    }
}
