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.SetupTmBendforceMapper;
import com.fizz.business.domain.SetupTmBendforce;
import com.fizz.business.service.ISetupTmBendforceService;

/**
 * 光整机弯辊力Service业务层处理
 * 
 * @author Joshi
 * @date 2025-09-26
 */
@Service
public class SetupTmBendforceServiceImpl implements ISetupTmBendforceService 
{
    @Autowired
    private SetupTmBendforceMapper setupTmBendforceMapper;

    /**
     * 查询光整机弯辊力
     * 
     * @param width 光整机弯辊力主键
     * @return 光整机弯辊力
     */
    @Override
    public SetupTmBendforce selectSetupTmBendforceByWidth(Long width,Long rollForce)
    {
        return setupTmBendforceMapper.selectSetupTmBendforceByWidth(width,rollForce);
    }

    /**
     * 查询光整机弯辊力列表
     * 
     * @param setupTmBendforce 光整机弯辊力
     * @return 光整机弯辊力
     */
    @Override
    public List<SetupTmBendforce> selectSetupTmBendforceList(SetupTmBendforce setupTmBendforce)
    {
        return setupTmBendforceMapper.selectSetupTmBendforceList(setupTmBendforce);
    }

    /**
     * 新增光整机弯辊力
     * 
     * @param setupTmBendforce 光整机弯辊力
     * @return 结果
     */
    @Override
    public int insertSetupTmBendforce(SetupTmBendforce setupTmBendforce)
    {
        setupTmBendforce.setCreateTime(DateUtils.getNowDate());
        return setupTmBendforceMapper.insertSetupTmBendforce(setupTmBendforce);
    }

    /**
     * 修改光整机弯辊力
     * 
     * @param setupTmBendforce 光整机弯辊力
     * @return 结果
     */
    @Override
    public int updateSetupTmBendforce(SetupTmBendforce setupTmBendforce)
    {
        setupTmBendforce.setUpdateTime(DateUtils.getNowDate());
        return setupTmBendforceMapper.updateSetupTmBendforce(setupTmBendforce);
    }

    /**
     * 批量删除光整机弯辊力
     * 
     * @param widths 需要删除的光整机弯辊力主键
     * @return 结果
     */
    @Override
    public int deleteSetupTmBendforceByWidths(Long[] widths,Long[] rollForces)
    {
        return setupTmBendforceMapper.deleteSetupTmBendforceByWidths(widths,rollForces);
    }

    /**
     * 删除光整机弯辊力信息
     * 
     * @param width 光整机弯辊力主键
     * @return 结果
     */
    @Override
    public int deleteSetupTmBendforceByWidth(Long width)
    {
        return setupTmBendforceMapper.deleteSetupTmBendforceByWidth(width);
    }
}
