package org.qinan.safetyeval.app.change.executor.query;

import lombok.AllArgsConstructor;
import org.qinan.safetyeval.client.change.response.QualFilingEquipmentChangeCo;
import org.qinan.safetyeval.infrastructure.convertor.QualFilingEquipmentChangeDoConvertor;
import org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingEquipmentChangeDO;
import org.qinan.safetyeval.infrastructure.persistence.queryservice.QualFilingEquipmentChangeQueryService;
import org.springframework.stereotype.Component;

/**
 * 备案申请装备-变更查询执行器
 *
 * @author ltq
 * @date 2026-07-02 10:03:59
 */
@Component
@AllArgsConstructor
public class QualFilingEquipmentChangeListQueryExe {

    private final QualFilingEquipmentChangeQueryService qualFilingEquipmentChangeQueryService;
    private final QualFilingEquipmentChangeDoConvertor qualFilingEquipmentChangeDoConvertor;

    /**
     * 根据ID查找备案申请装备-变更对象
     *
     * @param id 备案申请装备-变更ID
     * @return
     */
    public QualFilingEquipmentChangeCo execute(Long id) {
        QualFilingEquipmentChangeDO qualFilingEquipmentChangeDO = qualFilingEquipmentChangeQueryService.getById(id);
        return qualFilingEquipmentChangeDoConvertor.converDoToCo(qualFilingEquipmentChangeDO);
    }

}
