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

import lombok.AllArgsConstructor;
import org.qinan.safetyeval.client.change.response.QualFilingPersonnelChangeCo;
import org.qinan.safetyeval.infrastructure.convertor.QualFilingPersonnelChangeDoConvertor;
import org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingPersonnelChangeDO;
import org.qinan.safetyeval.infrastructure.persistence.queryservice.QualFilingPersonnelChangeQueryService;
import org.springframework.stereotype.Component;

/**
 * 备案申请人员-变更查询执行器
 *
 * @author ltq
 * @date 2026-07-02 10:04:33
 */
@Component
@AllArgsConstructor
public class QualFilingPersonnelChangeListQueryExe {

    private final QualFilingPersonnelChangeQueryService qualFilingPersonnelChangeQueryService;
    private final QualFilingPersonnelChangeDoConvertor qualFilingPersonnelChangeDoConvertor;

    /**
     * 根据ID查找备案申请人员-变更对象
     *
     * @param id 备案申请人员-变更ID
     * @return
     */
    public QualFilingPersonnelChangeCo execute(Long id) {
        QualFilingPersonnelChangeDO qualFilingPersonnelChangeDO = qualFilingPersonnelChangeQueryService.getById(id);
        return qualFilingPersonnelChangeDoConvertor.converDoToCo(qualFilingPersonnelChangeDO);
    }

}
