package com.hotent.enterpriseDeclare.manager.impl;

import com.hotent.base.manager.impl.BaseManagerImpl;
import com.hotent.enterpriseDeclare.dao.CostAuditPeriodRecordDao;
import com.hotent.enterpriseDeclare.manager.CostAuditPeriodRecordManager;
import com.hotent.enterpriseDeclare.model.CostAuditPeriodRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 成本监审期间记录表 服务实现类
 *
 * @company 山西清众科技股份有限公司
 * @author 超级管理员
 * @since 2025-01-XX
 */
@Service
public class CostAuditPeriodRecordManagerImpl extends BaseManagerImpl<CostAuditPeriodRecordDao, CostAuditPeriodRecord> implements CostAuditPeriodRecordManager {

    @Autowired
    private CostAuditPeriodRecordDao costAuditPeriodRecordDao;

    @Override
    public CostAuditPeriodRecord getDetail(String id) {
        CostAuditPeriodRecord record = this.get(id);
        return record;
    }

    @Override
    @Transactional
    public void createOrUpdate(CostAuditPeriodRecord costAuditPeriodRecord) {
        //新建或更新
        this.saveOrUpdate(costAuditPeriodRecord);
    }

    @Override
    public List<CostAuditPeriodRecord> listByUploadIdAndAuditedUnitId(String uploadId, String auditedUnitId,String type) {
        return costAuditPeriodRecordDao.selectByUploadIdAndAuditedUnitId(uploadId, auditedUnitId,type);
    }
}

