package com.zcloud.fire.check.service;

import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.fire.check.api.FireCheckStandardServiceI;
import com.zcloud.fire.check.command.FireCheckStandardAddExe;
import com.zcloud.fire.check.command.FireCheckStandardRemoveExe;
import com.zcloud.fire.check.command.FireCheckStandardUpdateExe;
import com.zcloud.fire.check.command.query.FireCheckStandardQueryExe;
import com.zcloud.fire.check.dto.FireCheckStandardAddCmd;
import com.zcloud.fire.check.dto.FireCheckStandardImportCmd;
import com.zcloud.fire.check.dto.FireCheckStandardPageQry;
import com.zcloud.fire.check.dto.FireCheckStandardUpdateCmd;
import com.zcloud.fire.check.dto.clientobject.FireCheckStandardCO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.Collection;

/**
 * web-app
 *
 * @Author zhaokai
 * @Date 2025-11-26 10:12:15
 */
@Service
@AllArgsConstructor
public class FireCheckStandardServiceImpl implements FireCheckStandardServiceI {
    private final FireCheckStandardAddExe fireCheckStandardAddExe;
    private final FireCheckStandardUpdateExe fireCheckStandardUpdateExe;
    private final FireCheckStandardRemoveExe fireCheckStandardRemoveExe;
    private final FireCheckStandardQueryExe fireCheckStandardQueryExe;

    @Override
    public PageResponse<FireCheckStandardCO> listPage(FireCheckStandardPageQry qry) {

        return fireCheckStandardQueryExe.execute(qry);
    }

    @Override
    public SingleResponse add(FireCheckStandardAddCmd cmd) {

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

    @Override
    public void edit(FireCheckStandardUpdateCmd fireCheckStandardUpdateCmd) {
        fireCheckStandardUpdateExe.execute(fireCheckStandardUpdateCmd);
    }

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

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

    @Override
    public FireCheckStandardCO getInfoById(Long id) {
        return fireCheckStandardQueryExe.getInfoById(id);

    }

    @Override
    public Collection<FireCheckStandardCO> listAll(FireCheckStandardPageQry qry) {
        return fireCheckStandardQueryExe.listAll(qry);
    }

    @Override
    public void importFireCheckStandardList(FireCheckStandardImportCmd fireCheckStandardImportCmd) {
         fireCheckStandardQueryExe.importFireCheckStandardList(fireCheckStandardImportCmd);
    }
}

