package cn.com.ty.lift.system.homepage.controller;

import cn.com.ty.lift.system.homepage.dao.dto.request.LiftDataRequest;
import cn.com.ty.lift.system.homepage.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/14
 * @description 企业-电梯分布图
 */
@RestController
@RequestMapping("/home/enterprise/lift")
public class LiftDataEnterpriseController {

    @Resource
    private LiftDataService liftDataService;

    /**
     * @param
     * @return
     * @description 获取电梯数量
     * @date 2020/2/14 1:02 下午
     */
    @RequestMapping("/liftNum")
    public RestResponse liftNum(@RequestBody LiftDataRequest liftDataRequest) {
        return liftDataService.liftNum(liftDataRequest);
    }

    /**
     * @param
     * @return
     * @description 获取电梯数据信息
     * @date 2020/2/14 1:07 下午
     */
    @RequestMapping("/liftDataList")
    public RestResponse getLiftDataList(@RequestBody LiftDataRequest liftDataRequest) {
        return liftDataService.getLiftDataList(liftDataRequest);
    }

}
