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

import lombok.AllArgsConstructor;
import org.qinan.safetyeval.client.change.response.QualFilingPersonnelCertChangeCo;
import org.qinan.safetyeval.infrastructure.convertor.QualFilingPersonnelCertChangeDoConvertor;
import org.qinan.safetyeval.infrastructure.persistence.domainobject.QualFilingPersonnelCertChangeDO;
import org.qinan.safetyeval.infrastructure.persistence.queryservice.QualFilingPersonnelCertChangeQueryService;
import org.springframework.stereotype.Component;

/**
 * 备案申请人员证书查询执行器
 *
 * @author ltq
 * @date 2026-07-02 10:04:23
 */
@Component
@AllArgsConstructor
public class QualFilingPersonnelCertChangeListQueryExe {

    private final QualFilingPersonnelCertChangeQueryService qualFilingPersonnelCertChangeQueryService;
    private final QualFilingPersonnelCertChangeDoConvertor qualFilingPersonnelCertChangeDoConvertor;

    /**
     * 根据ID查找备案申请人员证书对象
     *
     * @param id 备案申请人员证书ID
     * @return
     */
    public QualFilingPersonnelCertChangeCo execute(Long id) {
        QualFilingPersonnelCertChangeDO qualFilingPersonnelCertChangeDO = qualFilingPersonnelCertChangeQueryService.getById(id);
        return qualFilingPersonnelCertChangeDoConvertor.converDoToCo(qualFilingPersonnelCertChangeDO);
    }

}
