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

import cn.com.ty.lift.batch.applet.dao.model.request.LiftDataRequest;
import cn.com.ty.lift.batch.applet.service.LiftDataService;
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/lift")
public class LiftDataStatisticsController {

    @Resource
    private LiftDataService liftDataService;

    /**
     * @param
     * @return
     * @description 电梯情况总览
     * @date 2020/2/5 2:40 下午
     */
    @RequestMapping("/liftOverView")
    public RestResponse liftOverView(@RequestBody LiftDataRequest liftDataRequest) {
        return liftDataService.liftOverView(liftDataRequest);
    }

    /**
     * @param
     * @return
     * @description 站点排名
     * @date 2020/2/5 2:42 下午
     */
    @RequestMapping("/regionRank")
    public RestResponse regionRank(@RequestBody LiftDataRequest liftDataRequest) {
        return liftDataService.regionRank(liftDataRequest);
    }

    /**
     * @param
     * @return
     * @description 获取各项目的电梯台量
     * @date 2020/2/5 4:46 下午
     */
    @RequestMapping("/projectLiftNums")
    public RestResponse projectLiftNums(@RequestBody LiftDataRequest liftDataRequest) {
        return liftDataService.projectLiftNums(liftDataRequest);
    }

}
