package com.zehong.system.service.impl;

import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.THiddenDangerStandingBookMapper;
import com.zehong.system.domain.THiddenDangerStandingBook;
import com.zehong.system.service.ITHiddenDangerStandingBookService;

/**
 * 隐患整治台账Service业务层处理
 * 
 * @author zehong
 * @date 2022-02-09
 */
@Service
public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStandingBookService 
{
    @Autowired
    private THiddenDangerStandingBookMapper tHiddenDangerStandingBookMapper;

    /**
     * 查询隐患整治台账
     * 
     * @param hiddenId 隐患整治台账ID
     * @return 隐患整治台账
     */
    @Override
    public THiddenDangerStandingBook selectTHiddenDangerStandingBookById(Long hiddenId)
    {
        return tHiddenDangerStandingBookMapper.selectTHiddenDangerStandingBookById(hiddenId);
    }

    /**
     * 查询隐患整治台账列表
     * 
     * @param tHiddenDangerStandingBook 隐患整治台账
     * @return 隐患整治台账
     */
    @Override
    public List<THiddenDangerStandingBook> selectTHiddenDangerStandingBookList(THiddenDangerStandingBookForm tHiddenDangerStandingBook)
    {
        return tHiddenDangerStandingBookMapper.selectTHiddenDangerStandingBookList(tHiddenDangerStandingBook);
    }

    /**
     * 新增隐患整治台账
     * 
     * @param tHiddenDangerStandingBook 隐患整治台账
     * @return 结果
     */
    @Override
    public int insertTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook)
    {
        tHiddenDangerStandingBook.setCreateTime(DateUtils.getNowDate());
        return tHiddenDangerStandingBookMapper.insertTHiddenDangerStandingBook(tHiddenDangerStandingBook);
    }

    /**
     * 修改隐患整治台账
     * 
     * @param tHiddenDangerStandingBook 隐患整治台账
     * @return 结果
     */
    @Override
    public int updateTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook)
    {
        tHiddenDangerStandingBook.setUpdateTime(DateUtils.getNowDate());
        return tHiddenDangerStandingBookMapper.updateTHiddenDangerStandingBook(tHiddenDangerStandingBook);
    }

    /**
     * 批量删除隐患整治台账
     * 
     * @param hiddenIds 需要删除的隐患整治台账ID
     * @return 结果
     */
    @Override
    public int deleteTHiddenDangerStandingBookByIds(Long[] hiddenIds)
    {
        return tHiddenDangerStandingBookMapper.deleteTHiddenDangerStandingBookByIds(hiddenIds);
    }

    /**
     * 删除隐患整治台账信息
     * 
     * @param hiddenId 隐患整治台账ID
     * @return 结果
     */
    @Override
    public int deleteTHiddenDangerStandingBookById(Long hiddenId)
    {
        return tHiddenDangerStandingBookMapper.deleteTHiddenDangerStandingBookById(hiddenId);
    }
}
