package com.ruoyi.weighbridge.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.ruoyi.weighbridge.mapper.TblWeightinfoMapper;
import com.ruoyi.weighbridge.domain.TblWeightinfo;
import com.ruoyi.weighbridge.service.ITblWeightinfoService;

/**
 * 称重单Service业务层处理
 * 
 * @author liuhj
 * @date 2022-03-10
 */
@Service
public class TblWeightinfoServiceImpl implements ITblWeightinfoService 
{
    @Autowired
    private TblWeightinfoMapper tblWeightinfoMapper;

    /**
     * 查询称重单
     * 
     * @param serialNo 称重单主键
     * @return 称重单
     */
    @Override
    public TblWeightinfo selectTblWeightinfoBySerialNo(String serialNo)
    {
        return tblWeightinfoMapper.selectTblWeightinfoBySerialNo(serialNo);
    }

    /**
     * 查询称重单列表
     * 
     * @param tblWeightinfo 称重单
     * @return 称重单
     */
    @Override
    public List<TblWeightinfo> selectTblWeightinfoList(TblWeightinfo tblWeightinfo)
    {
        return tblWeightinfoMapper.selectTblWeightinfoList(tblWeightinfo);
    }

    /**
     * 新增称重单
     * 
     * @param tblWeightinfo 称重单
     * @return 结果
     */
    @Override
    public int insertTblWeightinfo(TblWeightinfo tblWeightinfo)
    {
        return tblWeightinfoMapper.insertTblWeightinfo(tblWeightinfo);
    }

    /**
     * 修改称重单
     * 
     * @param tblWeightinfo 称重单
     * @return 结果
     */
    @Override
    public int updateTblWeightinfo(TblWeightinfo tblWeightinfo)
    {
        tblWeightinfo.setUpdateTime(DateUtils.getNowDate());
        return tblWeightinfoMapper.updateTblWeightinfo(tblWeightinfo);
    }

    /**
     * 批量删除称重单
     * 
     * @param serialNos 需要删除的称重单主键
     * @return 结果
     */
    @Override
    public int deleteTblWeightinfoBySerialNos(String[] serialNos)
    {
        return tblWeightinfoMapper.deleteTblWeightinfoBySerialNos(serialNos);
    }

    /**
     * 删除称重单信息
     * 
     * @param serialNo 称重单主键
     * @return 结果
     */
    @Override
    public int deleteTblWeightinfoBySerialNo(String serialNo)
    {
        return tblWeightinfoMapper.deleteTblWeightinfoBySerialNo(serialNo);
    }
}
