package com.zcloud.fire.check.service;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.fire.check.api.FireCheckRecordServiceI;
import com.zcloud.fire.check.command.FireCheckRecordAddExe;
import com.zcloud.fire.check.command.FireCheckRecordRemoveExe;
import com.zcloud.fire.check.command.FireCheckRecordUpdateExe;
import com.zcloud.fire.check.command.query.FireCheckRecordQueryExe;
import com.zcloud.fire.check.dto.*;
import com.zcloud.fire.check.dto.clientobject.*;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * web-app
 *
 * @Author zhaokai
 * @Date 2025-12-12 11:10:59
 */
@Service
@AllArgsConstructor
public class FireCheckRecordServiceImpl implements FireCheckRecordServiceI {
    private final FireCheckRecordAddExe fireCheckRecordAddExe;
    private final FireCheckRecordUpdateExe fireCheckRecordUpdateExe;
    private final FireCheckRecordRemoveExe fireCheckRecordRemoveExe;
    private final FireCheckRecordQueryExe fireCheckRecordQueryExe;

    @Override
    public PageResponse<FireCheckRecordCO> listPage(FireCheckRecordPageQry qry) {

        return fireCheckRecordQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(FireCheckRecordAddCmd cmd) {

        fireCheckRecordAddExe.execute(cmd);
        return SingleResponse.buildSuccess();
    }

    @Override
    public void edit(FireCheckRecordUpdateCmd fireCheckRecordUpdateCmd) {
        fireCheckRecordUpdateExe.execute(fireCheckRecordUpdateCmd);
    }

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

    @Override
    public void removeBatch(Long[] ids) {
        fireCheckRecordRemoveExe.execute(ids);
    }

    @Override
    public PageResponse<FireBackCheckRecordCO> getCheckRecordList(FireBackCheckRecordPageQry qry) {
        return fireCheckRecordQueryExe.getCheckRecordList(qry);
    }


    @Override
    public FireCheckRecordInfoCO getInfoById(Long id) {
        return fireCheckRecordQueryExe.getInfoById(id);

    }

    @Override
    public FireCheckRecordCO saveCheckRecord(AppCheckRecordAddCmd appCheckRecordAddCmd) {
        return fireCheckRecordAddExe.saveCheckRecord(appCheckRecordAddCmd);
    }

    @Override
    public PageResponse<CorpCheckStatisticsCO> corpCheckRecordList(CorpStatisticsPageQry qry) {
        return fireCheckRecordQueryExe.corpCheckRecordList(qry);
    }

    @Override
    public PageResponse<FireCheckRecordCO> getCheckRecordPageH5(FireCheckRecordPagePointQry qry) {
        return fireCheckRecordQueryExe.getCheckRecordPageH5(qry);
    }

    @Override
    public PageResponse<FireCheckRecordInfoCO> getCheckRecordPageH5New(FireCheckRecordPagePointQry qry) {
        return fireCheckRecordQueryExe.getCheckRecordPageH5New(qry);
    }
}

