package com.zehong.system.service.impl;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TInsRecInforMapper;
import com.zehong.system.domain.TInsRecInfor;
import com.zehong.system.service.ITInsRecInforService;

/**
 * 监督检查-检查记录Service业务层处理
 * 
 * @author zehong
 * @date 2024-05-20
 */
@Service
public class TInsRecInforServiceImpl implements ITInsRecInforService 
{
    @Autowired
    private TInsRecInforMapper tInsRecInforMapper;

    /**
     * 查询监督检查-检查记录
     * 
     * @param fInsRecInforId 监督检查-检查记录ID
     * @return 监督检查-检查记录
     */
    @Override
    public TInsRecInfor selectTInsRecInforById(Long fInsRecInforId)
    {
        return tInsRecInforMapper.selectTInsRecInforById(fInsRecInforId);
    }

    /**
     * 查询监督检查-检查记录列表
     * 
     * @param tInsRecInfor 监督检查-检查记录
     * @return 监督检查-检查记录
     */
    @Override
    public List<TInsRecInfor> selectTInsRecInforList(TInsRecInfor tInsRecInfor)
    {
        return tInsRecInforMapper.selectTInsRecInforList(tInsRecInfor);
    }

    /**
     * 新增监督检查-检查记录
     * 
     * @param tInsRecInfor 监督检查-检查记录
     * @return 结果
     */
    @Override
    public int insertTInsRecInfor(TInsRecInfor tInsRecInfor)
    {
        tInsRecInfor.setfLastUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
        return tInsRecInforMapper.insertTInsRecInfor(tInsRecInfor);
    }

    /**
     * 修改监督检查-检查记录
     * 
     * @param tInsRecInfor 监督检查-检查记录
     * @return 结果
     */
    @Override
    public int updateTInsRecInfor(TInsRecInfor tInsRecInfor)
    {
        tInsRecInfor.setfLastUpdateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
        return tInsRecInforMapper.updateTInsRecInfor(tInsRecInfor);
    }

    /**
     * 批量删除监督检查-检查记录
     * 
     * @param fInsRecInforIds 需要删除的监督检查-检查记录ID
     * @return 结果
     */
    @Override
    public int deleteTInsRecInforByIds(Long[] fInsRecInforIds)
    {
        return tInsRecInforMapper.deleteTInsRecInforByIds(fInsRecInforIds);
    }

    /**
     * 删除监督检查-检查记录信息
     * 
     * @param fInsRecInforId 监督检查-检查记录ID
     * @return 结果
     */
    @Override
    public int deleteTInsRecInforById(Long fInsRecInforId)
    {
        return tInsRecInforMapper.deleteTInsRecInforById(fInsRecInforId);
    }
}
