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.SetupTmMeshMapper;
import com.fizz.business.domain.SetupTmMesh;
import com.fizz.business.service.ISetupTmMeshService;

/**
 * 光整机插入量Service业务层处理
 * 
 * @author Joshi
 * @date 2025-09-26
 */
@Service
public class SetupTmMeshServiceImpl implements ISetupTmMeshService 
{
    @Autowired
    private SetupTmMeshMapper setupTmMeshMapper;

    /**
     * 查询光整机插入量
     * 
     * @param steelGrade 光整机插入量主键
     * @return 光整机插入量
     */
    @Override
    public SetupTmMesh selectSetupTmMeshBySteelGrade(String steelGrade, Long yieldStren, Long thick)
    {
        return setupTmMeshMapper.selectSetupTmMeshBySteelGrade(steelGrade, yieldStren, thick);
    }

    /**
     * 查询光整机插入量列表
     * 
     * @param setupTmMesh 光整机插入量
     * @return 光整机插入量
     */
    @Override
    public List<SetupTmMesh> selectSetupTmMeshList(SetupTmMesh setupTmMesh)
    {
        return setupTmMeshMapper.selectSetupTmMeshList(setupTmMesh);
    }

    /**
     * 新增光整机插入量
     * 
     * @param setupTmMesh 光整机插入量
     * @return 结果
     */
    @Override
    public int insertSetupTmMesh(SetupTmMesh setupTmMesh)
    {
        setupTmMesh.setCreateTime(DateUtils.getNowDate());
        return setupTmMeshMapper.insertSetupTmMesh(setupTmMesh);
    }

    /**
     * 修改光整机插入量
     * 
     * @param setupTmMesh 光整机插入量
     * @return 结果
     */
    @Override
    public int updateSetupTmMesh(SetupTmMesh setupTmMesh)
    {
        setupTmMesh.setUpdateTime(DateUtils.getNowDate());
        return setupTmMeshMapper.updateSetupTmMesh(setupTmMesh);
    }

    /**
     * 批量删除光整机插入量
     * 
     * @param steelGrades 需要删除的光整机插入量主键
     * @return 结果
     */
    @Override
    public int deleteSetupTmMeshBySteelGrades(String[] steelGrades, Long[] yieldStrens, Long[] thicks)
    {
        return setupTmMeshMapper.deleteSetupTmMeshBySteelGrades(steelGrades, yieldStrens, thicks);
    }

    /**
     * 删除光整机插入量信息
     * 
     * @param steelGrade 光整机插入量主键
     * @return 结果
     */
    @Override
    public int deleteSetupTmMeshBySteelGrade(String steelGrade)
    {
        return setupTmMeshMapper.deleteSetupTmMeshBySteelGrade(steelGrade);
    }
}
