package com.zcloud.fire.check.service;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.fire.check.api.FireCheckListServiceI;
import com.zcloud.fire.check.command.FireCheckListAddExe;
import com.zcloud.fire.check.command.FireCheckListRemoveExe;
import com.zcloud.fire.check.command.FireCheckListUpdateExe;
import com.zcloud.fire.check.command.query.FireCheckListQueryExe;
import com.zcloud.fire.check.dto.*;
import com.zcloud.fire.check.dto.clientobject.*;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * web-app
 *
 * @Author zhaokai
 * @Date 2025-11-28 10:32:09
 */
@Service
@AllArgsConstructor
public class FireCheckListServiceImpl implements FireCheckListServiceI {
    private final FireCheckListAddExe fireCheckListAddExe;
    private final FireCheckListUpdateExe fireCheckListUpdateExe;
    private final FireCheckListRemoveExe fireCheckListRemoveExe;
    private final FireCheckListQueryExe fireCheckListQueryExe;

    @Override
    public PageResponse<FireCheckListScreenCO> screenList(FireCheckListScreenQry qry) {
        return fireCheckListQueryExe.screenList(qry);
    }

    @Override
    public PageResponse<FireCheckListCO> listPage(FireCheckListPageQry qry) {
        return fireCheckListQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(FireCheckListAddCmd cmd) {
        fireCheckListAddExe.execute(cmd);
        return SingleResponse.buildSuccess();
    }

    @Override
    public void edit(FireCheckListUpdateCmd fireCheckListUpdateCmd) {
        fireCheckListUpdateExe.execute(fireCheckListUpdateCmd);
    }

    @Override
    public void remove(Long id) {
        fireCheckListRemoveExe.execute(id);
    }

    @Override
    public void removeBatch(Long[] ids) {
        fireCheckListRemoveExe.execute(ids);
    }
    @Override
    public FireCheckListCO getInfoById(Long id) {
        return fireCheckListQueryExe.getInfoById(id);
    }

    @Override
    public void editState(FireCheckListUpdateStateCmd fireCheckListUpdateStateCmd) {
        fireCheckListUpdateExe.editState(fireCheckListUpdateStateCmd);
    }

    @Override
    public PageResponse<FireCheckListCO> appCheckList(FireCheckListPageQry qry) {
        return fireCheckListQueryExe.appCheckList(qry);

    }

    @Override
    public Integer checkListCount(FireCheckListPageQry qry) {
        return fireCheckListQueryExe.checkListCount(qry);
    }

    @Override
    public PageResponse<RiskDistributionCO> riskDistribution(RiskDistributionPageQry qry) {
        return fireCheckListQueryExe.riskDistribution(qry);
    }

    @Override
    public RiskDistributionStasticCO riskDistributionStatistic() {
        return fireCheckListQueryExe.riskDistributionStatistic();
    }

    @Override
    public PageResponse<PointDistributionCO> pointDistributionStatistic(PointDistributionPageQry qry) {
        return fireCheckListQueryExe.pointDistributionStatistic(qry);
    }

    @Override
    public List<FireCheckPointListCO> getCheckPointList(CheckPointListQry qry) {
        return fireCheckListQueryExe.getCheckPointList(qry);
    }

    @Override
    public PageResponse<FireBackCheckListCO> getBackChecKList(FireBackCheckListPageQry qry) {
        return fireCheckListQueryExe.getBackChecKList(qry);
    }



    @Override
    public PageResponse<FireCheckListCO> checkListRecordList(FireCheckListRecordPageQry qry) {
        return fireCheckListQueryExe.checkListRecordList(qry);

    }

    @Override
    public PageResponse<FireCheckListCO> getCheckListRecord(CheckListRecordPageQry qry) {
        return fireCheckListQueryExe.getCheckListRecord(qry);
    }

    @Override
    public void checkStandard(CheckPointListQry qry) {
         fireCheckListQueryExe.checkStandard(qry);
    }

    @Override
    public void overTimeRecord(Map<String, Object> params) {
        fireCheckListQueryExe.overTimeRecord(params);
    }

    @Override
    public void waitFireCheckList(String checkType) {
        fireCheckListQueryExe.waitFireCheckList(checkType);
    }
}

