package com.sky.ioc.controller.security;

import com.sky.ioc.entity.domain.security.SecurityDoor;
import com.sky.ioc.entity.domain.security.SecurityDoorRecord;
import com.sky.ioc.entity.params.IocParam;
import com.sky.ioc.entity.params.security.PersonParam;
import com.sky.ioc.service.meeting.MeetingRecordService;
import com.sky.ioc.service.parking.ParkService;
import com.sky.ioc.service.personnel.PersonnelService;
import com.sky.ioc.service.security.SecurityDoorRecordService;
import com.sky.ioc.service.security.SecurityDoorService;
import com.sky.ioc.service.security.SecurityPersonService;
import com.sky.ioc.service.security.SecurityService;
import com.sky.ioc.service.space.BuildingFloorService;
import com.sky.ioc.service.space.CompanyService;
import com.sky.ioc.tool.ReturnMsg;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * TODO
 *
 * @Description
 * @Author LunCe
 * @Date 2023/3/7 9:57
 **/



@Api(tags = "智慧安防----安防人员")
@Slf4j
@RestController
@RequestMapping("/security_person")
public class PersonController {


    @Autowired
    private SecurityService securityService;

    @Autowired
    private SecurityPersonService securityPersonService;

    @Autowired
    private PersonnelService personnelService;

    @ApiOperation("核心指标")
    @PostMapping("/getSecurityCoreIndicators")
    public ReturnMsg getSecurityCoreIndicators(@RequestBody IocParam iocParam){
        return personnelService.getSecurityCoreIndicators(iocParam);
    }


    @ApiOperation("保有量")
    @PostMapping("/getPopulationPerson")
    public ReturnMsg getPopulationPerson(@RequestBody IocParam iocParam){
        return personnelService.getPopulationPerson(iocParam);
    }


    @ApiOperation("大楼客流量")
    @PostMapping("/getPassengerFlow")
    public ReturnMsg getPassengerFlow(@RequestBody IocParam iocParam){
        return personnelService.getPassengerFlow(iocParam);
    }

    @ApiOperation("今日值班情况")
    @PostMapping("/getDuty")
    public ReturnMsg getDuty(@RequestBody PersonParam personParam){
        return securityPersonService.getPersonList(personParam);
    }

    @Autowired
    MeetingRecordService meetingRecordService;

    @ApiOperation("")
    @PostMapping("/getData")
    public ReturnMsg getData(){
        return meetingRecordService.getMeetingRecordList();
    }


}
