package com.fizz.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fizz.business.mapper.SetupTlMapper;
import com.fizz.business.domain.SetupTl;
import com.fizz.business.service.ISetupTlService;

/**
 * 拉矫机参数Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-26
 */
@Service
public class SetupTlServiceImpl implements ISetupTlService 
{
    @Autowired
    private SetupTlMapper setupTlMapper;

    /**
     * 查询拉矫机参数
     * 
     * @param steelGrade 拉矫机参数主键
     * @return 拉矫机参数
     */
    @Override
    public SetupTl selectSetupTlBySteelGrade(String steelGrade, Long yieldStren, Long thick)
    {
        return setupTlMapper.selectSetupTlBySteelGrade(steelGrade, yieldStren, thick);
    }

    /**
     * 查询拉矫机参数列表
     * 
     * @param setupTl 拉矫机参数
     * @return 拉矫机参数
     */
    @Override
    public List<SetupTl> selectSetupTlList(SetupTl setupTl)
    {
        return setupTlMapper.selectSetupTlList(setupTl);
    }

    /**
     * 新增拉矫机参数
     * 
     * @param setupTl 拉矫机参数
     * @return 结果
     */
    @Override
    public int insertSetupTl(SetupTl setupTl)
    {
        setupTl.setCreateTime(DateUtils.getNowDate());
        return setupTlMapper.insertSetupTl(setupTl);
    }

    /**
     * 修改拉矫机参数
     * 
     * @param setupTl 拉矫机参数
     * @return 结果
     */
    @Override
    public int updateSetupTl(SetupTl setupTl)
    {
        setupTl.setUpdateTime(DateUtils.getNowDate());
        return setupTlMapper.updateSetupTl(setupTl);
    }

    /**
     * 批量删除拉矫机参数
     * 
     * @param steelGrades 需要删除的拉矫机参数主键
     * @return 结果
     */
    @Override
    public int deleteSetupTlBySteelGrades(String[] steelGrades,Long[] yieldStres,Long[] thicks)
    {
        return setupTlMapper.deleteSetupTlBySteelGrades(steelGrades, yieldStres, thicks);
    }

    /**
     * 删除拉矫机参数信息
     * 
     * @param steelGrade 拉矫机参数主键
     * @return 结果
     */
    @Override
    public int deleteSetupTlBySteelGrade(String steelGrade)
    {
        return setupTlMapper.deleteSetupTlBySteelGrade(steelGrade);
    }
}
