package org.qinan.safetyeval.app.change.service.impl;

import com.alibaba.cola.dto.PageResponse;
import lombok.AllArgsConstructor;
import org.qinan.safetyeval.app.change.executor.command.QualFilingMaterialChangeAddCmdExe;
import org.qinan.safetyeval.app.change.executor.command.QualFilingMaterialChangeDelCmdExe;
import org.qinan.safetyeval.app.change.executor.command.QualFilingMaterialChangeUpdateCmdExe;
import org.qinan.safetyeval.app.change.executor.query.QualFilingMaterialChangeListQueryExe;
import org.qinan.safetyeval.app.change.executor.query.QualFilingMaterialChangePageQueryExe;
import org.qinan.safetyeval.app.change.service.QualFilingMaterialChangeServiceI;
import org.qinan.safetyeval.client.change.request.QualFilingMaterialChangeAddCmd;
import org.qinan.safetyeval.client.change.request.QualFilingMaterialChangePageQry;
import org.qinan.safetyeval.client.change.request.QualFilingMaterialChangeUpdateCmd;
import org.qinan.safetyeval.client.change.response.QualFilingMaterialChangeCo;
import org.springframework.stereotype.Service;

/**
 * 备案申请材料-变更
 *
 * @Author: ltq
 * @date 2026-07-02 10:04:07
 */
@Service
@AllArgsConstructor
public class QualFilingMaterialChangeServiceImpl implements QualFilingMaterialChangeServiceI {

    private final QualFilingMaterialChangeListQueryExe qualFilingMaterialChangeListQueryExe;
    private final QualFilingMaterialChangeUpdateCmdExe qualFilingMaterialChangeUpdateCommandExe;
    private final QualFilingMaterialChangeAddCmdExe qualFilingMaterialChangeAddCommandExe;
    private final QualFilingMaterialChangeDelCmdExe qualFilingMaterialChangeDelCommandExe;
    private final QualFilingMaterialChangePageQueryExe qualFilingMaterialChangePageQueryExe;

    @Override
    public PageResponse<QualFilingMaterialChangeCo> listQualFilingMaterialChangePage(QualFilingMaterialChangePageQry qualFilingMaterialChangePageQry) {
        return qualFilingMaterialChangePageQueryExe.execute(qualFilingMaterialChangePageQry);
    }

    @Override
    public QualFilingMaterialChangeCo getQualFilingMaterialChangeById(Long id) {
        return qualFilingMaterialChangeListQueryExe.execute(id);
    }

    @Override
    public boolean saveQualFilingMaterialChange(QualFilingMaterialChangeAddCmd qualFilingMaterialChangeAddCmd) {
        return qualFilingMaterialChangeAddCommandExe.execute(qualFilingMaterialChangeAddCmd);
    }

    @Override
    public boolean updateQualFilingMaterialChange(QualFilingMaterialChangeUpdateCmd qualFilingMaterialChangeUpdateCmd) {
        return qualFilingMaterialChangeUpdateCommandExe.execute(qualFilingMaterialChangeUpdateCmd);
    }

    @Override
    public boolean deletedQualFilingMaterialChangeById(Long id) {
        return qualFilingMaterialChangeDelCommandExe.execute(id);
    }

    @Override
    public boolean deletedQualFilingMaterialChangeByIds(Long[] ids) {
        return qualFilingMaterialChangeDelCommandExe.execute(ids);
    }

}
