package com.project.zcustom.controller.building;

import com.project.common.core.controller.BaseController;
import com.project.common.core.domain.AjaxResult;
import com.project.zcustom.service.service.smart.IPlatBuildingService;
import lombok.RequiredArgsConstructor;
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.RestController;

@RestController
@RequestMapping("/large/second")
@RequiredArgsConstructor(onConstructor_ = @Autowired)
public class PlatBuildProtectController extends BaseController {

    @Autowired
    private IPlatBuildingService platBuildingService;

    /**
     * 巡更次数统计(近6月)
     */
    @GetMapping("/frequency")
    public AjaxResult frequency() {
        return AjaxResult.success("查询成功", platBuildingService.frequency());
    }

    /**
     * 巡更及时率
     */
    @GetMapping("/patrol")
    public AjaxResult patrol() {
        return AjaxResult.success("查询成功", platBuildingService.patrol());
    }

    /**
     * 巡更点统计
     */
    @GetMapping("/patrolPoint")
    public AjaxResult patrolPoint() {
        return AjaxResult.success("查询成功", platBuildingService.patrolPoint());
    }
}
