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.SetupTmRollforceMapper;
import com.fizz.business.domain.SetupTmRollforce;
import com.fizz.business.service.ISetupTmRollforceService;

/**
 * 光整机轧制力Service业务层处理
 * 
 * @author Joshi
 * @date 2025-09-26
 */
@Service
public class SetupTmRollforceServiceImpl implements ISetupTmRollforceService 
{
    @Autowired
    private SetupTmRollforceMapper setupTmRollforceMapper;

    /**
     * 查询光整机轧制力
     * 
     * @param steelGrade 光整机轧制力主键
     * @return 光整机轧制力
     */
    @Override
    public SetupTmRollforce selectSetupTmRollforceBySteelGrade(String steelGrade, Long yieldStren, Long thick, Long elong)
    {
        return setupTmRollforceMapper.selectSetupTmRollforceBySteelGrade(steelGrade, yieldStren, thick, elong);
    }

    /**
     * 查询光整机轧制力列表
     * 
     * @param setupTmRollforce 光整机轧制力
     * @return 光整机轧制力
     */
    @Override
    public List<SetupTmRollforce> selectSetupTmRollforceList(SetupTmRollforce setupTmRollforce)
    {
        return setupTmRollforceMapper.selectSetupTmRollforceList(setupTmRollforce);
    }

    /**
     * 新增光整机轧制力
     * 
     * @param setupTmRollforce 光整机轧制力
     * @return 结果
     */
    @Override
    public int insertSetupTmRollforce(SetupTmRollforce setupTmRollforce)
    {
        setupTmRollforce.setCreateTime(DateUtils.getNowDate());
        return setupTmRollforceMapper.insertSetupTmRollforce(setupTmRollforce);
    }

    /**
     * 修改光整机轧制力
     * 
     * @param setupTmRollforce 光整机轧制力
     * @return 结果
     */
    @Override
    public int updateSetupTmRollforce(SetupTmRollforce setupTmRollforce)
    {
        setupTmRollforce.setUpdateTime(DateUtils.getNowDate());
        return setupTmRollforceMapper.updateSetupTmRollforce(setupTmRollforce);
    }

    /**
     * 批量删除光整机轧制力
     * 
     * @param steelGrades 需要删除的光整机轧制力主键
     * @return 结果
     */
    @Override
    public int deleteSetupTmRollforceBySteelGrades(String[] steelGrades, Long[] thicks, Long[] yieldStrens, Long[] elongs)
    {
        return setupTmRollforceMapper.deleteSetupTmRollforceBySteelGrades(steelGrades, thicks, yieldStrens, elongs);
    }

    /**
     * 删除光整机轧制力信息
     * 
     * @param steelGrade 光整机轧制力主键
     * @return 结果
     */
    @Override
    public int deleteSetupTmRollforceBySteelGrade(String steelGrade)
    {
        return setupTmRollforceMapper.deleteSetupTmRollforceBySteelGrade(steelGrade);
    }
}
