package com.ruoyi.screen.service.impl;

import com.ruoyi.screen.domain.response.*;
import com.ruoyi.screen.mapper.ZongzhiScreenSaftyMapper;
import com.ruoyi.screen.service.ZongzhiScreenSaftyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 大屏网络安全实现层
 */
@Service
public class ZongzhiScreenSaftyServiceImpl implements ZongzhiScreenSaftyService {
    @Autowired
    private ZongzhiScreenSaftyMapper zongzhiScreenSaftyMapper;

    @Override
    public List<ZongzhiSourceResponse> getSource() {
        return zongzhiScreenSaftyMapper.getSource();
    }

    @Override
    public List<ZongzhiSafetyResponse> getsafety() {
        return zongzhiScreenSaftyMapper.getsafety();
    }

    @Override
    public List<ZongzhiSafetyListResponse> getSafetyList() {
        return zongzhiScreenSaftyMapper.getSafetyList();
    }

    @Override
    public List<ZongzhiSuperviseResponse> getsupervise() {
        List list = new ArrayList<>();
        //等保系统
        List<ZongzhiDengbaoSystemResponse> zongzhiDengbaoSystemResponse = zongzhiScreenSaftyMapper.getDengbaoSystem();
        //等保单位
        List<ZongzhiDengbaoUnitResponse> zongzhiDengbaoUnitResponse = zongzhiScreenSaftyMapper.getDengbaoUnit();
        //政府网站
        List<ZongzhiZhengfuResponse> zongzhiZhengfuResponse = zongzhiScreenSaftyMapper.getZhengfu();
        //idc单位
        List<ZongzhiIdcResponse> zongzhiIdcResponse = zongzhiScreenSaftyMapper.getIdc();
        list.addAll(zongzhiDengbaoSystemResponse);
        list.addAll(zongzhiDengbaoUnitResponse);
        list.addAll(zongzhiZhengfuResponse);
        list.addAll(zongzhiIdcResponse);
        return list;
    }

    @Override
    public List<ZongzhiAttackResponse> getAttack() {
        return zongzhiScreenSaftyMapper.getAttack();
    }

    @Override
    public List<ZongzhiUnAttackResponse> getUnAttackTop() {
        return zongzhiScreenSaftyMapper.getUnAttackTop();
    }

    @Override
    public List<ZongzhiSafetyHazardResponse> getSafetyHazard() {
        return zongzhiScreenSaftyMapper.getSafetyHazard();
    }

    @Override
    public List<ZongzhiHazardDisposalResponse> getHazardDisposal() {
        return zongzhiScreenSaftyMapper.getHazardDisposal();
    }

    @Override
    public List<ZongzhiNotificationResponse> getNotification() {
        return zongzhiScreenSaftyMapper.getNotification();
    }

    @Override
    public List<ZongzhiTbAreaResponse> getTbArea() {
        return zongzhiScreenSaftyMapper.getTbArea();
    }

    @Override
    public List<ZongzhiTbDeptResponse> getTbDept() {
        return zongzhiScreenSaftyMapper.getTbDept();
    }

    @Override
    public List<ZongzhiTbDeptCompleteResponse> getTbDeptComplet() {
        List list =new ArrayList<>();
        //近一个月
        List<ZongzhiTbDeptCompleteMonthResponse> monthList=zongzhiScreenSaftyMapper.getmonthList();
        //近三个月
        List<ZongzhiTbDeptCompleteThirdMonthResponse> thirdList=zongzhiScreenSaftyMapper.getthirdList();
        //近六个月
        List<ZongzhiTbDeptCompleteSixResponse> sixList=zongzhiScreenSaftyMapper.getsixList();
        //近一年
        List<ZongzhiTbDeptCompleteYearResponse> yearList=zongzhiScreenSaftyMapper.getyearList();
        list.addAll(monthList);
        list.addAll(thirdList);
        list.addAll(sixList);
        list.addAll(yearList);
        return list;
    }
}
