package com.hzya.frame.plugin.cinvoice.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.plugin.cinvoice.dao.ICInvoiceImportHDao;
import com.hzya.frame.plugin.cinvoice.entity.CInvoiceImportHEntity;
import com.hzya.frame.plugin.cinvoice.service.ICInvoiceImportHService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description 发票批量导入有度税务 表头service
 * @Author xiangerlin
 * @Date 2025/4/18 15:38
 **/
@Service()
public class CInvoiceImportHServiceImpl extends BaseService<CInvoiceImportHEntity, String> implements ICInvoiceImportHService {
    Logger logger = LogManager.getLogger(getClass());

    private ICInvoiceImportHDao cInvoiceImportHDao;

    @Autowired
    public void setcInvoiceImportHDao(ICInvoiceImportHDao dao) {
        this.cInvoiceImportHDao = dao;
        this.dao = dao;
    }

    /**
     * 查询发票列表
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @DS("#entity.dataSourceCode")
    @Override
    public List<CInvoiceImportHEntity> queryInvoiceList(CInvoiceImportHEntity entity) throws Exception {
        List<CInvoiceImportHEntity> list = cInvoiceImportHDao.queryList(entity, "com.hzya.frame.plugin.cinvoice.dao.impl.CInvoiceImportHDaoImpl.entity_list_base");
        return list;
    }
}
